From e834a481000f16750b9e9eec13ce9c905c218736 Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Wed, 29 Jul 2015 08:05:21 +0200 Subject: [PATCH 01/71] 8130309: Need to bailout cleanly if creation of stubs fails when codecache is out of space Check for failed expansion of stub section in code buffer and bailout. Reviewed-by: kvn, adinn, dlong, roland, twisti --- hotspot/src/cpu/aarch64/vm/aarch64.ad | 45 ++++++++++++++----- .../cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp | 9 +++- .../aarch64/vm/c1_LIRAssembler_aarch64.cpp | 12 ++++- .../src/cpu/aarch64/vm/compiledIC_aarch64.cpp | 10 +++-- .../cpu/aarch64/vm/macroAssembler_aarch64.cpp | 19 ++++---- .../cpu/aarch64/vm/macroAssembler_aarch64.hpp | 6 +-- hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp | 6 +-- hotspot/src/cpu/ppc/vm/ppc.ad | 18 +++++--- .../src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp | 3 ++ hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp | 10 +++-- hotspot/src/cpu/sparc/vm/sparc.ad | 23 +++++++--- hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp | 3 ++ hotspot/src/cpu/x86/vm/compiledIC_x86.cpp | 10 +++-- hotspot/src/cpu/x86/vm/x86.ad | 10 ++++- hotspot/src/cpu/x86/vm/x86_32.ad | 6 ++- hotspot/src/cpu/x86/vm/x86_64.ad | 6 ++- hotspot/src/cpu/zero/vm/compiledIC_zero.cpp | 3 +- hotspot/src/share/vm/c1/c1_LIRAssembler.cpp | 1 + hotspot/src/share/vm/code/compiledIC.hpp | 2 +- hotspot/src/share/vm/opto/compile.cpp | 4 ++ hotspot/src/share/vm/opto/output.cpp | 12 ++++- 21 files changed, 158 insertions(+), 60 deletions(-) diff --git a/hotspot/src/cpu/aarch64/vm/aarch64.ad b/hotspot/src/cpu/aarch64/vm/aarch64.ad index bef849a2050..37d1b09cdda 100644 --- a/hotspot/src/cpu/aarch64/vm/aarch64.ad +++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad @@ -2389,9 +2389,11 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) // 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 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) // 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 @@ encode %{ 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 @@ encode %{ 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; diff --git a/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp index 5cb78d2055d..d6f7abc7ea1 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp @@ -327,9 +327,16 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) { 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) { + bailout("trampoline stub overflow"); + return; + } ce->add_call_info_here(info()); #ifndef PRODUCT diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp index 353486c402d..907370d1385 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp @@ -1996,13 +1996,21 @@ void LIR_Assembler::align_call(LIR_Code code) { } 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()); } diff --git a/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp index 44e124cf6d9..b30a4a6df10 100644 --- a/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp @@ -51,7 +51,7 @@ bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { // ---------------------------------------------------------------------------- #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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // 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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big"); __ end_a_stub(); + return base; } #undef __ diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp index e8f0612460c..3c2cf60abc1 100644 --- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp @@ -664,7 +664,7 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in // 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 @@ void MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) { 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,7 @@ void MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) { } else { bl(pc()); } + return start_offset; } @@ -696,13 +700,11 @@ void MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) { // 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 +731,16 @@ void MacroAssembler::emit_trampoline_stub(int insts_call_instruction_offset, 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 diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp index 5f903720d97..9711266f52d 100644 --- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp @@ -539,7 +539,7 @@ public: 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 @@ public: // 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 @@ public: } // Emit the CompiledIC call idiom - void ic_call(address entry); + address ic_call(address entry); public: diff --git a/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp b/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp index 1b54594d09c..762a329e259 100644 --- a/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp +++ b/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp @@ -94,7 +94,7 @@ bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { 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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // 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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // End the stub. __ end_a_stub(); + return stub; #else ShouldNotReachHere(); #endif diff --git a/hotspot/src/cpu/ppc/vm/ppc.ad b/hotspot/src/cpu/ppc/vm/ppc.ad index a4e5f5a454a..5e0e977e287 100644 --- a/hotspot/src/cpu/ppc/vm/ppc.ad +++ b/hotspot/src/cpu/ppc/vm/ppc.ad @@ -1082,7 +1082,7 @@ void CallStubImpl::emit_trampoline_stub(MacroAssembler &_masm, int destination_t // 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 @@ EmitCallOffsets emit_call_with_trampoline_stub(MacroAssembler &_masm, address en // 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 @@ encode %{ // 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 @@ encode %{ __ 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 @@ encode %{ 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. diff --git a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp index f998a9c3a12..4f511dce70d 100644 --- a/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_CodeStubs_sparc.cpp @@ -432,6 +432,9 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) { __ 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(); diff --git a/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp b/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp index a4b2a094a5b..b6021917710 100644 --- a/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp @@ -53,7 +53,7 @@ bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { // ---------------------------------------------------------------------------- #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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { 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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // Update current stubs pointer and restore code_end. __ end_a_stub(); + return base; #else ShouldNotReachHere(); #endif diff --git a/hotspot/src/cpu/sparc/vm/sparc.ad b/hotspot/src/cpu/sparc/vm/sparc.ad index 4a742755f29..04491901ddb 100644 --- a/hotspot/src/cpu/sparc/vm/sparc.ad +++ b/hotspot/src/cpu/sparc/vm/sparc.ad @@ -1773,9 +1773,11 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) { 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 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) { 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 @@ encode %{ 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; + } } %} diff --git a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp index 71684561223..a3196fe0b6d 100644 --- a/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_CodeStubs_x86.cpp @@ -503,6 +503,9 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) { 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); diff --git a/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp b/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp index 9537ef971f7..29eba2fb99d 100644 --- a/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp +++ b/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp @@ -50,7 +50,7 @@ bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { // ---------------------------------------------------------------------------- #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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // 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 @@ void CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) { // Update current stubs pointer and restore insts_end. __ end_a_stub(); + return base; } #undef __ diff --git a/hotspot/src/cpu/x86/vm/x86.ad b/hotspot/src/cpu/x86/vm/x86.ad index 53825e4fbb2..c8aa50a106c 100644 --- a/hotspot/src/cpu/x86/vm/x86.ad +++ b/hotspot/src/cpu/x86/vm/x86.ad @@ -1594,7 +1594,10 @@ int HandlerImpl::emit_exception_handler(CodeBuffer& cbuf) { // 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 @@ int HandlerImpl::emit_deopt_handler(CodeBuffer& cbuf) { // 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 diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad index be2f7e65b36..dfe10d5b02a 100644 --- a/hotspot/src/cpu/x86/vm/x86_32.ad +++ b/hotspot/src/cpu/x86/vm/x86_32.ad @@ -1907,7 +1907,11 @@ encode %{ 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; + } } %} diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad index ea8b1c81276..c04661cda7d 100644 --- a/hotspot/src/cpu/x86/vm/x86_64.ad +++ b/hotspot/src/cpu/x86/vm/x86_64.ad @@ -2137,7 +2137,11 @@ encode %{ } 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; + } } %} diff --git a/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp b/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp index 143dc317380..185a8b169c0 100644 --- a/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp +++ b/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp @@ -60,8 +60,9 @@ bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) { // ---------------------------------------------------------------------------- -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() { diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp index f82913e0d18..2f99452a5a9 100644 --- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp @@ -443,6 +443,7 @@ void LIR_Assembler::emit_call(LIR_OpJavaCall* op) { // emit the static call stub stuff out of line emit_static_call_stub(); + CHECK_BAILOUT(); switch (op->code()) { case lir_static_call: diff --git a/hotspot/src/share/vm/code/compiledIC.hpp b/hotspot/src/share/vm/code/compiledIC.hpp index 5d14381c842..56d37c07336 100644 --- a/hotspot/src/share/vm/code/compiledIC.hpp +++ b/hotspot/src/share/vm/code/compiledIC.hpp @@ -306,7 +306,7 @@ class CompiledStaticCall: public NativeCall { 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(); diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp index 5025d8360a6..3cf18d16ceb 100644 --- a/hotspot/src/share/vm/opto/compile.cpp +++ b/hotspot/src/share/vm/opto/compile.cpp @@ -594,6 +594,10 @@ uint Compile::scratch_emit_size(const Node* n) { 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); diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp index 4c9ccaa43a1..7423155de04 100644 --- a/hotspot/src/share/vm/opto/output.cpp +++ b/hotspot/src/share/vm/opto/output.cpp @@ -1504,6 +1504,13 @@ void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts) { 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 @@ void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts) { 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)); From c030d4e363908ebf290abc74ddbb1c35df5c43a8 Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Wed, 29 Jul 2015 12:33:48 +0200 Subject: [PATCH 02/71] 8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858 TieredCompilation not validated when CICompilerCount is processed Reviewed-by: kvn, gziemski --- .../commandLineFlagConstraintsCompiler.cpp | 5 +- .../arguments/CheckCICompilerCount.java | 51 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp index c4270d6f400..4a70a000816 100644 --- a/hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp +++ b/hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp @@ -71,7 +71,10 @@ Flag::Error CICompilerCountConstraintFunc(bool verbose, intx* value) { #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) { diff --git a/hotspot/test/compiler/arguments/CheckCICompilerCount.java b/hotspot/test/compiler/arguments/CheckCICompilerCount.java index 4f50e3b3162..ed32ade9bde 100644 --- a/hotspot/test/compiler/arguments/CheckCICompilerCount.java +++ b/hotspot/test/compiler/arguments/CheckCICompilerCount.java @@ -26,6 +26,7 @@ import jdk.test.lib.*; /* * @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 @@ import jdk.test.lib.*; 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", @@ -50,6 +67,13 @@ public class CheckCICompilerCount { }; private static final String[][] NON_TIERED_EXPECTED_OUTPUTS = { + { + "CICompilerCount=0 must be at least 1", + "Improperly specified VM option 'CICompilerCount=0'" + }, + { + "intx CICompilerCount := 1 {product}" + }, { "CICompilerCount=0 must be at least 1", "Improperly specified VM option 'CICompilerCount=0'" @@ -60,18 +84,36 @@ public class CheckCICompilerCount { }; 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", @@ -80,6 +122,13 @@ public class CheckCICompilerCount { }; private static final String[][] TIERED_EXPECTED_OUTPUTS = { + { + "CICompilerCount=1 must be at least 2", + "Improperly specified VM option 'CICompilerCount=1'" + }, + { + "intx CICompilerCount := 2 {product}" + }, { "CICompilerCount=1 must be at least 2", "Improperly specified VM option 'CICompilerCount=1'" @@ -90,6 +139,8 @@ public class CheckCICompilerCount { }; private static final int[] TIERED_EXIT = { + 1, + 0, 1, 0 }; From fd2f61a53f4ce3dbdf6ea693d4f7c5f1a8c2968f Mon Sep 17 00:00:00 2001 From: Michael Haupt Date: Wed, 18 Mar 2015 16:16:30 +0100 Subject: [PATCH 03/71] 8004073: Implement C2 Ideal node specific dump() method Add Node::dump_rel() to dump a node and its related nodes (the notion of "related" depends on the node at hand); add Node::dump_comp() to dump a node in compact representation; add Node::dump_rel_comp() to dump a node and its related nodes in compact representation; add the required machinery; extend some C2 IR nodes with compact and related dumping Reviewed-by: kvn, roland --- hotspot/src/share/vm/opto/arraycopynode.cpp | 5 + hotspot/src/share/vm/opto/arraycopynode.hpp | 1 + hotspot/src/share/vm/opto/callnode.cpp | 70 +++++ hotspot/src/share/vm/opto/callnode.hpp | 10 + hotspot/src/share/vm/opto/cfgnode.cpp | 43 ++- hotspot/src/share/vm/opto/cfgnode.hpp | 18 +- hotspot/src/share/vm/opto/ifnode.cpp | 34 ++- hotspot/src/share/vm/opto/movenode.cpp | 16 +- hotspot/src/share/vm/opto/movenode.hpp | 6 +- hotspot/src/share/vm/opto/multnode.cpp | 16 +- hotspot/src/share/vm/opto/multnode.hpp | 3 +- hotspot/src/share/vm/opto/node.cpp | 288 ++++++++++++++++++-- hotspot/src/share/vm/opto/node.hpp | 49 +++- hotspot/src/share/vm/opto/rootnode.cpp | 17 +- hotspot/src/share/vm/opto/rootnode.hpp | 6 +- hotspot/src/share/vm/opto/subnode.cpp | 51 +++- hotspot/src/share/vm/opto/subnode.hpp | 11 +- 17 files changed, 593 insertions(+), 51 deletions(-) diff --git a/hotspot/src/share/vm/opto/arraycopynode.cpp b/hotspot/src/share/vm/opto/arraycopynode.cpp index b09cecc8760..0672fc8054e 100644 --- a/hotspot/src/share/vm/opto/arraycopynode.cpp +++ b/hotspot/src/share/vm/opto/arraycopynode.cpp @@ -79,10 +79,15 @@ void ArrayCopyNode::connect_outputs(GraphKit* kit) { #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 { diff --git a/hotspot/src/share/vm/opto/arraycopynode.hpp b/hotspot/src/share/vm/opto/arraycopynode.hpp index 967ae556d4e..a2237cdd2ef 100644 --- a/hotspot/src/share/vm/opto/arraycopynode.hpp +++ b/hotspot/src/share/vm/opto/arraycopynode.hpp @@ -164,6 +164,7 @@ public: #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; + virtual void dump_compact_spec(outputStream* st) const; #endif }; #endif // SHARE_VM_OPTO_ARRAYCOPYNODE_HPP diff --git a/hotspot/src/share/vm/opto/callnode.cpp b/hotspot/src/share/vm/opto/callnode.cpp index b0b73830313..3e44fec0a6c 100644 --- a/hotspot/src/share/vm/opto/callnode.cpp +++ b/hotspot/src/share/vm/opto/callnode.cpp @@ -52,6 +52,7 @@ const Type *StartNode::bottom_type() const { return _domain; } 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 @@ void ParmNode::dump_spec(outputStream *st) const { 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 *in_rel, GrowableArray *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 @@ void CallJavaNode::dump_spec(outputStream *st) const { 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 @@ void CallStaticJavaNode::dump_spec(outputStream *st) const { } 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 @@ void SafePointNode::dump_spec(outputStream *st) const { 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 *in_rel, GrowableArray *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 @@ void AbstractLockNode::set_eliminated_lock_counter() { _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 *in_rel, GrowableArray *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 //============================================================================= diff --git a/hotspot/src/share/vm/opto/callnode.hpp b/hotspot/src/share/vm/opto/callnode.hpp index 990962188e5..2c788e52a11 100644 --- a/hotspot/src/share/vm/opto/callnode.hpp +++ b/hotspot/src/share/vm/opto/callnode.hpp @@ -84,6 +84,7 @@ public: 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 @@ public: 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 *in_rel, GrowableArray *out_rel, bool compact) const; #endif }; @@ -476,6 +479,7 @@ public: #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; + virtual void related(GrowableArray *in_rel, GrowableArray *out_rel, bool compact) const; #endif }; @@ -675,6 +679,7 @@ public: #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; + virtual void dump_compact_spec(outputStream *st) const; #endif }; @@ -730,6 +735,7 @@ public: 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 @@ private: } _kind; #ifndef PRODUCT NamedCounter* _counter; + static const char* _kind_names[Nested+1]; #endif protected: @@ -1005,6 +1012,9 @@ public: #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 *in_rel, GrowableArray *out_rel, bool compact) const; #endif }; diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp index fcb3fcd2c20..9014eb6df4a 100644 --- a/hotspot/src/share/vm/opto/cfgnode.cpp +++ b/hotspot/src/share/vm/opto/cfgnode.cpp @@ -2023,6 +2023,14 @@ const RegMask &PhiNode::out_RegMask() const { } #ifndef PRODUCT +void PhiNode::related(GrowableArray *in_rel, GrowableArray *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 @@ const RegMask &GotoNode::out_RegMask() const { 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 *in_rel, GrowableArray *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 *in_rel, GrowableArray *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 @@ uint JumpProjNode::cmp( const Node &n ) const { #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 *in_rel, GrowableArray *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 diff --git a/hotspot/src/share/vm/opto/cfgnode.hpp b/hotspot/src/share/vm/opto/cfgnode.hpp index 7d851b564e0..33a378e5be5 100644 --- a/hotspot/src/share/vm/opto/cfgnode.hpp +++ b/hotspot/src/share/vm/opto/cfgnode.hpp @@ -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 @@ public: virtual const RegMask &out_RegMask() const; virtual const RegMask &in_RegMask(uint) const; #ifndef PRODUCT + virtual void related(GrowableArray *in_rel, GrowableArray *out_rel, bool compact) const; virtual void dump_spec(outputStream *st) const; #endif #ifdef ASSERT @@ -229,6 +230,10 @@ public: virtual const Type *Value( PhaseTransform *phase ) const; virtual Node *Identity( PhaseTransform *phase ); virtual const RegMask &out_RegMask() const; + +#ifndef PRODUCT + virtual void related(GrowableArray *in_rel, GrowableArray *out_rel, bool compact) const; +#endif }; //------------------------------CProjNode-------------------------------------- @@ -382,6 +387,7 @@ public: #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; + virtual void related(GrowableArray *in_rel, GrowableArray *out_rel, bool compact) const; #endif }; @@ -393,6 +399,11 @@ public: 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 *in_rel, GrowableArray *out_rel, bool compact) const; +#endif }; class IfTrueNode : public IfProjNode { @@ -455,6 +466,9 @@ public: 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 *in_rel, GrowableArray *out_rel, bool compact) const; +#endif }; class JumpProjNode : public JProjNode { @@ -479,6 +493,8 @@ class JumpProjNode : public JProjNode { 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 *in_rel, GrowableArray *out_rel, bool compact) const; #endif }; diff --git a/hotspot/src/share/vm/opto/ifnode.cpp b/hotspot/src/share/vm/opto/ifnode.cpp index bc107f4b7d5..cd60f19cd67 100644 --- a/hotspot/src/share/vm/opto/ifnode.cpp +++ b/hotspot/src/share/vm/opto/ifnode.cpp @@ -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 @@ Node *IfProjNode::Identity(PhaseTransform *phase) { return this; } -//------------------------------dump_spec-------------------------------------- #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 *in_rel, GrowableArray *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-------------------------------------- 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 *in_rel, GrowableArray *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---------------------------------- diff --git a/hotspot/src/share/vm/opto/movenode.cpp b/hotspot/src/share/vm/opto/movenode.cpp index 234cdebf031..8fe9b0233be 100644 --- a/hotspot/src/share/vm/opto/movenode.cpp +++ b/hotspot/src/share/vm/opto/movenode.cpp @@ -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 @@ const Type *MoveD2LNode::Value( PhaseTransform *phase ) const { 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 *in_rel, GrowableArray *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 diff --git a/hotspot/src/share/vm/opto/movenode.hpp b/hotspot/src/share/vm/opto/movenode.hpp index bb99f7ba083..4cd94185063 100644 --- a/hotspot/src/share/vm/opto/movenode.hpp +++ b/hotspot/src/share/vm/opto/movenode.hpp @@ -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 @@ class BinaryNode : public Node { 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 *in_rel, GrowableArray *out_rel, bool compact) const; +#endif }; diff --git a/hotspot/src/share/vm/opto/multnode.cpp b/hotspot/src/share/vm/opto/multnode.cpp index 00ff009660c..3648fef790e 100644 --- a/hotspot/src/share/vm/opto/multnode.cpp +++ b/hotspot/src/share/vm/opto/multnode.cpp @@ -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 @@ const TypePtr *ProjNode::adr_type() const { 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---------------------------------------- diff --git a/hotspot/src/share/vm/opto/multnode.hpp b/hotspot/src/share/vm/opto/multnode.hpp index 02558db1679..25f8c503436 100644 --- a/hotspot/src/share/vm/opto/multnode.hpp +++ b/hotspot/src/share/vm/opto/multnode.hpp @@ -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 @@ public: #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" diff --git a/hotspot/src/share/vm/opto/node.cpp b/hotspot/src/share/vm/opto/node.cpp index 5b2aa145d81..a331ac637cf 100644 --- a/hotspot/src/share/vm/opto/node.cpp +++ b/hotspot/src/share/vm/opto/node.cpp @@ -1489,16 +1489,6 @@ jfloat Node::getf() const { #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 @@ void Node::set_debug_orig(Node* orig) { //------------------------------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 @@ void Node::dump_out(outputStream *st) const { 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 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 *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 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 @@ void Node::dump_ctrl(int d) const { 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 in_rel(C->unique()); + GrowableArray 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 in_rel(C->unique()); + GrowableArray 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 in_rel(C->unique()); + GrowableArray 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 *in_rel, GrowableArray *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 *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 *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 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 sns(Compile::current()->unique()); + for (GrowableArrayIterator it = ns->begin(); it != ns->end(); ++it) { + Node* n = *it; + n->collect_nodes(&sns, 1, primary_is_data, !primary_is_data); + for (GrowableArrayIterator 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 *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 *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 *ns) const { + // Perform a BFS and stop at control nodes. + GrowableArray 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 @@ void TypeNode::dump_spec(outputStream *st) const { 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(); diff --git a/hotspot/src/share/vm/opto/node.hpp b/hotspot/src/share/vm/opto/node.hpp index 2dfedbc085a..97c844891d0 100644 --- a/hotspot/src/share/vm/opto/node.hpp +++ b/hotspot/src/share/vm/opto/node.hpp @@ -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 @@ public: 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 *in_rel, GrowableArray *out_rel, bool compact) const; + // Collect nodes starting from this node, explicitly including/excluding control and data links. + void collect_nodes(GrowableArray *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 *ns, bool ctrl) const; + // Collect the entire control input graph. Include data inputs if requested. + void collect_nodes_in_all_ctrl(GrowableArray *ns, bool data) const; + // Collect the entire output graph until hitting and including control nodes. + void collect_nodes_out_all_ctrl_boundary(GrowableArray *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 @@ public: #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 @@ public: virtual uint ideal_reg() const; #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; + virtual void dump_compact_spec(outputStream *st) const; #endif }; diff --git a/hotspot/src/share/vm/opto/rootnode.cpp b/hotspot/src/share/vm/opto/rootnode.cpp index 4cf51528df5..e5542f6ff74 100644 --- a/hotspot/src/share/vm/opto/rootnode.cpp +++ b/hotspot/src/share/vm/opto/rootnode.cpp @@ -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 Type *HaltNode::Value( PhaseTransform *phase ) const { 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 *in_rel, GrowableArray *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 diff --git a/hotspot/src/share/vm/opto/rootnode.hpp b/hotspot/src/share/vm/opto/rootnode.hpp index cef207d649e..3be5dfa7673 100644 --- a/hotspot/src/share/vm/opto/rootnode.hpp +++ b/hotspot/src/share/vm/opto/rootnode.hpp @@ -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 @@ public: 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 *in_rel, GrowableArray *out_rel, bool compact) const; +#endif }; #endif // SHARE_VM_OPTO_ROOTNODE_HPP diff --git a/hotspot/src/share/vm/opto/subnode.cpp b/hotspot/src/share/vm/opto/subnode.cpp index 27cf544da11..a41538d75d5 100644 --- a/hotspot/src/share/vm/opto/subnode.cpp +++ b/hotspot/src/share/vm/opto/subnode.cpp @@ -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 @@ Node *CmpNode::Identity( PhaseTransform *phase ) { 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 *in_rel, GrowableArray *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 proj(Compile::current()->unique()); + for (GrowableArrayIterator 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 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 @@ const Type *BoolNode::Value( PhaseTransform *phase ) const { 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 *in_rel, GrowableArray *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++ ) { diff --git a/hotspot/src/share/vm/opto/subnode.hpp b/hotspot/src/share/vm/opto/subnode.hpp index 485cd17717b..a287ffaf026 100644 --- a/hotspot/src/share/vm/opto/subnode.hpp +++ b/hotspot/src/share/vm/opto/subnode.hpp @@ -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 @@ public: // 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 @@ public: 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 *in_rel, GrowableArray *out_rel, bool compact) const; +#endif }; //------------------------------CmpINode--------------------------------------- @@ -311,6 +317,7 @@ public: bool is_counted_loop_exit_test(); #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; + virtual void related(GrowableArray *in_rel, GrowableArray *out_rel, bool compact) const; #endif }; From e8292406d9cc919b63fe6cc47db445516c815d53 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Sat, 18 Jul 2015 15:09:28 +0300 Subject: [PATCH 04/71] 8130937: Several methods in BeanProperty return null instead of boolean value Reviewed-by: alexsch --- .../sun/beans/introspect/PropertyInfo.java | 3 +- .../java/beans/PropertyDescriptor.java | 32 +- .../8130937/TestBooleanBeanProperties.java | 380 ++++++++++++++++++ 3 files changed, 399 insertions(+), 16 deletions(-) create mode 100644 jdk/test/java/beans/Introspector/8130937/TestBooleanBeanProperties.java diff --git a/jdk/src/java.desktop/share/classes/com/sun/beans/introspect/PropertyInfo.java b/jdk/src/java.desktop/share/classes/com/sun/beans/introspect/PropertyInfo.java index 44d6a1f7919..3bda169a89a 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/beans/introspect/PropertyInfo.java +++ b/jdk/src/java.desktop/share/classes/com/sun/beans/introspect/PropertyInfo.java @@ -40,7 +40,7 @@ import java.util.TreeMap; import static com.sun.beans.finder.ClassFinder.findClass; public final class PropertyInfo { - public enum Name {bound, expert, hidden, preferred, visualUpdate, description, enumerationValues} + public enum Name {bound, expert, hidden, preferred, required, visualUpdate, description, enumerationValues} private static final String VETO_EXCEPTION_NAME = "java.beans.PropertyVetoException"; private static final Class VETO_EXCEPTION; @@ -120,6 +120,7 @@ public final class PropertyInfo { put(Name.bound, Boolean.FALSE); } put(Name.expert, annotation.expert()); + put(Name.required, annotation.required()); put(Name.hidden, annotation.hidden()); put(Name.preferred, annotation.preferred()); put(Name.visualUpdate, annotation.visualUpdate()); diff --git a/jdk/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java b/jdk/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java index 96c29e46126..bf465a1bbd3 100644 --- a/jdk/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java +++ b/jdk/src/java.desktop/share/classes/java/beans/PropertyDescriptor.java @@ -160,21 +160,23 @@ public class PropertyDescriptor extends FeatureDescriptor { setPropertyType(info.getPropertyType()); setConstrained(info.isConstrained()); setBound(bound && info.is(PropertyInfo.Name.bound)); - if (info.is(PropertyInfo.Name.expert)) { - setValue(PropertyInfo.Name.expert.name(), Boolean.TRUE); // compatibility - setExpert(true); - } - if (info.is(PropertyInfo.Name.hidden)) { - setValue(PropertyInfo.Name.hidden.name(), Boolean.TRUE); // compatibility - setHidden(true); - } - if (info.is(PropertyInfo.Name.preferred)) { - setPreferred(true); - } - Object visual = info.get(PropertyInfo.Name.visualUpdate); - if (visual != null) { - setValue(PropertyInfo.Name.visualUpdate.name(), visual); - } + + boolean isExpert = info.is(PropertyInfo.Name.expert); + setValue(PropertyInfo.Name.expert.name(), isExpert); // compatibility + setExpert(isExpert); + + boolean isHidden = info.is(PropertyInfo.Name.hidden); + setValue(PropertyInfo.Name.hidden.name(), isHidden); // compatibility + setHidden(isHidden); + + setPreferred(info.is(PropertyInfo.Name.preferred)); + + boolean isRequired = info.is(PropertyInfo.Name.required); + setValue(PropertyInfo.Name.required.name(), isRequired); + + boolean visual = info.is(PropertyInfo.Name.visualUpdate); + setValue(PropertyInfo.Name.visualUpdate.name(), visual); + Object description = info.get(PropertyInfo.Name.description); if (description != null) { setShortDescription(description.toString()); diff --git a/jdk/test/java/beans/Introspector/8130937/TestBooleanBeanProperties.java b/jdk/test/java/beans/Introspector/8130937/TestBooleanBeanProperties.java new file mode 100644 index 00000000000..494985cde68 --- /dev/null +++ b/jdk/test/java/beans/Introspector/8130937/TestBooleanBeanProperties.java @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.beans.BeanProperty; +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.beans.PropertyDescriptor; + +/** + * @test + * @bug 8130937 + * @summary Tests the booleans properties of the BeanProperty annotation + * @library .. + */ +public final class TestBooleanBeanProperties { + + public static void main(final String[] args) { + test(Empty.class, false, false, false, false, false, false); + test(BoundTrue.class, false, false, false, false, false, false); + test(BoundFalse.class, false, false, false, false, false, false); + test(BoundListener.class, true, false, false, false, false, false); + test(BoundFalseListener.class, false, false, false, false, false, false); + test(BoundTrueListener.class, true, false, false, false, false, false); + test(ExpertTrue.class, false, true, false, false, false, false); + test(ExpertFalse.class, false, false, false, false, false, false); + test(HiddenTrue.class, false, false, true, false, false, false); + test(HiddenFalse.class, false, false, false, false, false, false); + test(PreferredTrue.class, false, false, false, true, false, false); + test(PreferredFalse.class, false, false, false, false, false, false); + test(RequiredTrue.class, false, false, false, false, true, false); + test(RequiredFalse.class, false, false, false, false, false, false); + test(VisualUpdateTrue.class, false, false, false, false, false, true); + test(VisualUpdateFalse.class, false, false, false, false, false, false); + test(All.class, true, true, true, true, true, true); + } + + private static void test(Class cls, boolean isBound, boolean isExpert, + boolean isHidden, boolean isPref, boolean isReq, + boolean isVS) { + PropertyDescriptor pd = BeanUtils.getPropertyDescriptor(cls, "value"); + if (pd.isBound() != isBound) { + throw new RuntimeException("isBound should be: " + isBound); + } + if (pd.isExpert() != isExpert || getValue(pd, "expert") != isExpert) { + throw new RuntimeException("isExpert should be:" + isExpert); + } + if (pd.isHidden() != isHidden || getValue(pd, "hidden") != isHidden) { + throw new RuntimeException("isHidden should be: " + isHidden); + } + if (pd.isPreferred() != isPref) { + throw new RuntimeException("isPreferred should be: " + isPref); + } + if (getValue(pd, "required") != isReq) { + throw new RuntimeException("required should be: " + isReq); + } + if (getValue(pd, "visualUpdate") != isVS) { + throw new RuntimeException("required should be: " + isVS); + } + } + + private static boolean getValue(PropertyDescriptor pd, String value) { + return (boolean) pd.getValue(value); + } + //////////////////////////////////////////////////////////////////////////// + + public static final class Empty { + + private int value; + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + } + + public static final class All { + + private int value; + + private PropertyChangeSupport pcs = new PropertyChangeSupport(this); + + public int getValue() { + return value; + } + + @BeanProperty(bound = true, expert = true, hidden = true, + preferred = true, required = true, visualUpdate = true) + public void setValue(int value) { + this.value = value; + } + + public void addPropertyChangeListener(PropertyChangeListener l) { + pcs.addPropertyChangeListener(l); + } + + public void removePropertyChangeListener(PropertyChangeListener l) { + pcs.removePropertyChangeListener(l); + } + } + //////////////////////////////////////////////////////////////////////////// + // bound property + //////////////////////////////////////////////////////////////////////////// + + public static final class BoundTrue { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(bound = true) + public void setValue(int value) { + this.value = value; + } + } + + public static final class BoundFalse { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(bound = false) + public void setValue(int value) { + this.value = value; + } + } + + public static final class BoundListener { + + private PropertyChangeSupport pcs = new PropertyChangeSupport(this); + + private int value; + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + public void addPropertyChangeListener(PropertyChangeListener l) { + pcs.addPropertyChangeListener(l); + } + + public void removePropertyChangeListener(PropertyChangeListener l) { + pcs.removePropertyChangeListener(l); + } + } + + public static final class BoundFalseListener { + + private PropertyChangeSupport pcs = new PropertyChangeSupport(this); + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(bound = false) + public void setValue(int value) { + this.value = value; + } + + public void addPropertyChangeListener(PropertyChangeListener l) { + pcs.addPropertyChangeListener(l); + } + + public void removePropertyChangeListener(PropertyChangeListener l) { + pcs.removePropertyChangeListener(l); + } + } + + public static final class BoundTrueListener { + + private PropertyChangeSupport pcs = new PropertyChangeSupport(this); + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(bound = true) + public void setValue(int value) { + this.value = value; + } + + public void addPropertyChangeListener(PropertyChangeListener l) { + pcs.addPropertyChangeListener(l); + } + + public void removePropertyChangeListener(PropertyChangeListener l) { + pcs.removePropertyChangeListener(l); + } + } + //////////////////////////////////////////////////////////////////////////// + // expert property + //////////////////////////////////////////////////////////////////////////// + + public static final class ExpertTrue { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(expert = true) + public void setValue(int value) { + this.value = value; + } + } + + public static final class ExpertFalse { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(expert = false) + public void setValue(int value) { + this.value = value; + } + } + //////////////////////////////////////////////////////////////////////////// + // hidden property + //////////////////////////////////////////////////////////////////////////// + + public static final class HiddenTrue { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(hidden = true) + public void setValue(int value) { + this.value = value; + } + } + + public static final class HiddenFalse { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(hidden = false) + public void setValue(int value) { + this.value = value; + } + } + //////////////////////////////////////////////////////////////////////////// + // preferred property + //////////////////////////////////////////////////////////////////////////// + + public static final class PreferredTrue { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(preferred = true) + public void setValue(int value) { + this.value = value; + } + } + + public static final class PreferredFalse { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(preferred = false) + public void setValue(int value) { + this.value = value; + } + } + //////////////////////////////////////////////////////////////////////////// + // required property + //////////////////////////////////////////////////////////////////////////// + + public static final class RequiredTrue { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(required = true) + public void setValue(int value) { + this.value = value; + } + } + + public static final class RequiredFalse { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(required = false) + public void setValue(int value) { + this.value = value; + } + } + //////////////////////////////////////////////////////////////////////////// + // visualUpdate property + //////////////////////////////////////////////////////////////////////////// + + public static final class VisualUpdateTrue { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(visualUpdate = true) + public void setValue(int value) { + this.value = value; + } + } + + public static final class VisualUpdateFalse { + + private int value; + + public int getValue() { + return value; + } + + @BeanProperty(visualUpdate = false) + public void setValue(int value) { + this.value = value; + } + } +} From 410e1bbe90e0c45974c80bb6c1857b85a5d53bbb Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Sat, 18 Jul 2015 15:12:08 +0300 Subject: [PATCH 05/71] 8074831: Resolve disabled warnings for libjsound Reviewed-by: amenkov, azvegint --- jdk/make/lib/SoundLibraries.gmk | 3 --- jdk/src/java.desktop/share/native/libjsound/PortMixer.c | 2 +- jdk/src/java.desktop/share/native/libjsound/Ports.h | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk index 08bb21bf395..972875d7e36 100644 --- a/jdk/make/lib/SoundLibraries.gmk +++ b/jdk/make/lib/SoundLibraries.gmk @@ -123,9 +123,6 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJSOUND, \ 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), \ diff --git a/jdk/src/java.desktop/share/native/libjsound/PortMixer.c b/jdk/src/java.desktop/share/native/libjsound/PortMixer.c index 8213598c0af..c7f35b37b69 100644 --- a/jdk/src/java.desktop/share/native/libjsound/PortMixer.c +++ b/jdk/src/java.desktop/share/native/libjsound/PortMixer.c @@ -272,7 +272,7 @@ void* PORT_NewCompoundControl(void* creatorV, char* type, void** controls, int c } void* PORT_NewFloatControl(void* creatorV, void* controlID, char* type, - float min, float max, float precision, char* units) { + float min, float max, float precision, const char* units) { ControlCreatorJNI* creator = (ControlCreatorJNI*) creatorV; jobject ctrl = NULL; jstring unitsString; diff --git a/jdk/src/java.desktop/share/native/libjsound/Ports.h b/jdk/src/java.desktop/share/native/libjsound/Ports.h index f58ea003b50..5de8930cd0e 100644 --- a/jdk/src/java.desktop/share/native/libjsound/Ports.h +++ b/jdk/src/java.desktop/share/native/libjsound/Ports.h @@ -93,7 +93,7 @@ typedef void* (*PORT_NewCompoundControlPtr)(void* creator, char* type, void** co * returns an opaque pointer to the created control */ typedef void* (*PORT_NewFloatControlPtr)(void* creator, void* controlID, char* type, - float min, float max, float precision, char* units); + float min, float max, float precision, const char* units); /* control: The control to add to current port * creator: pointer to the creator struct provided by PORT_GetControls From 9a85aed6c891413f03ce5aecbece37016ab44ebb Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Sat, 18 Jul 2015 15:13:16 +0300 Subject: [PATCH 06/71] 8074832: Resolve disabled warnings for libjsoundalsa Reviewed-by: amenkov, azvegint --- jdk/make/lib/SoundLibraries.gmk | 1 - .../unix/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk index 972875d7e36..df8190eab51 100644 --- a/jdk/make/lib/SoundLibraries.gmk +++ b/jdk/make/lib/SoundLibraries.gmk @@ -168,7 +168,6 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), ) -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), \ diff --git a/jdk/src/java.desktop/unix/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c b/jdk/src/java.desktop/unix/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c index 1542ad08566..47f3c3f6d89 100644 --- a/jdk/src/java.desktop/unix/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c +++ b/jdk/src/java.desktop/unix/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c @@ -431,8 +431,8 @@ void PORT_GetControls(void* id, INT32 portIndex, PortControlCreator* creator) { } } else { // more than two channels, each channels has its own control. for (channel = SND_MIXER_SCHN_FRONT_LEFT; channel <= SND_MIXER_SCHN_LAST; channel++) { - if (isPlayback && snd_mixer_selem_has_playback_channel(elem, channel) || - !isPlayback && snd_mixer_selem_has_capture_channel(elem, channel)) { + if ((isPlayback && snd_mixer_selem_has_playback_channel(elem, channel)) || + (!isPlayback && snd_mixer_selem_has_capture_channel(elem, channel))) { if (getControlSlot(portMixer, &portControl)) { portControl->elem = elem; portControl->portType = portMixer->types[portIndex]; From 0dea9d5c8533968295f5665bb6f73e52845bfaa5 Mon Sep 17 00:00:00 2001 From: Alexey Ivanov Date: Wed, 22 Jul 2015 17:33:17 +0300 Subject: [PATCH 07/71] 8130776: Remove EmbeddedFrame.requestFocusToEmbedder() method Reviewed-by: serb, ant --- .../share/classes/sun/applet/AppletPanel.java | 7 +----- .../share/classes/sun/awt/EmbeddedFrame.java | 9 -------- .../sun/awt/windows/WEmbeddedFrame.java | 9 -------- .../sun/awt/windows/WEmbeddedFramePeer.java | 6 ----- .../native/libawt/windows/awt_Frame.cpp | 23 ------------------- 5 files changed, 1 insertion(+), 53 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java index a262864b4cc..14023fcfa67 100644 --- a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java +++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java @@ -687,12 +687,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable { if (toFocus != null) { if (parent instanceof EmbeddedFrame) { - // JDK-8056915: Try to request focus to the embedder first and - // activate the embedded frame through it - if (!((EmbeddedFrame) parent).requestFocusToEmbedder()) { - // Otherwise activate the embedded frame directly - ((EmbeddedFrame) parent).synthesizeWindowActivation(true); - } + ((EmbeddedFrame) parent).synthesizeWindowActivation(true); } // EmbeddedFrame might have focus before the applet was added. // Thus after its activation the most recent focus owner will be diff --git a/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java b/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java index d90132e35e9..affe2bcb8e7 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java @@ -356,15 +356,6 @@ public abstract class EmbeddedFrame extends Frame */ public void synthesizeWindowActivation(boolean doActivate) {} - /** - * Requests the focus to the embedder. - * - * @return {@code true} if focus request was successful, and {@code false} otherwise. - */ - public boolean requestFocusToEmbedder() { - return false; - } - /** * Moves this embedded frame to a new location. The top-left corner of * the new location is specified by the x and y diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java index 05769303cc9..a2cac44e4bb 100644 --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFrame.java @@ -251,15 +251,6 @@ public class WEmbeddedFrame extends EmbeddedFrame { } } - public boolean requestFocusToEmbedder() { - if (isEmbeddedInIE) { - final WEmbeddedFramePeer peer = AWTAccessor.getComponentAccessor() - .getPeer(this); - return peer.requestFocusToEmbedder(); - } - return false; - } - public void registerAccelerator(AWTKeyStroke stroke) {} public void unregisterAccelerator(AWTKeyStroke stroke) {} diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java index 4cc3a4d716b..c0ef8a78dde 100644 --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WEmbeddedFramePeer.java @@ -79,10 +79,4 @@ public class WEmbeddedFramePeer extends WFramePeer { return !Win32GraphicsEnvironment.isDWMCompositionEnabled(); } - /** - * Sets the focus to plugin control window, the parent of embedded frame. - * Eventually, it will synthesizeWindowActivation to activate the embedded frame, - * if plugin control window gets the focus. - */ - public native boolean requestFocusToEmbedder(); } diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp index 2c25e975d39..53f6a50149e 100644 --- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp +++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp @@ -1961,29 +1961,6 @@ Java_sun_awt_windows_WFramePeer_synthesizeWmActivate(JNIEnv *env, jobject self, CATCH_BAD_ALLOC; } -JNIEXPORT jboolean JNICALL -Java_sun_awt_windows_WEmbeddedFramePeer_requestFocusToEmbedder(JNIEnv *env, jobject self) -{ - jboolean result = JNI_FALSE; - - TRY; - - AwtFrame *frame = NULL; - - PDATA pData; - JNI_CHECK_PEER_GOTO(self, ret); - frame = (AwtFrame *)pData; - - // JDK-8056915: During initial applet activation, set focus to plugin control window - HWND hwndParent = ::GetParent(frame->GetHWnd()); - - result = SetFocusToPluginControl(hwndParent); - - CATCH_BAD_ALLOC_RET(JNI_FALSE); -ret: - return result; -} - } /* extern "C" */ static bool SetFocusToPluginControl(HWND hwndPlugin) From e56a9c239328daaedc388ca64cdabb7a1bcbcfbe Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Wed, 22 Jul 2015 22:33:12 +0300 Subject: [PATCH 08/71] 8067093: Fix windows-specific deprecation warnings in the java.desktop module Reviewed-by: prr, azvegint, alexsch --- .../windows/classes/sun/awt/windows/WListPeer.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java index e89aaaea658..9429a9f8949 100644 --- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java +++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WListPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,10 +39,9 @@ final class WListPeer extends WComponentPeer implements ListPeer { // ListPeer implementation @Override - @SuppressWarnings("deprecation") public int[] getSelectedIndexes() { List l = (List)target; - int len = l.countItems(); + int len = l.getItemCount(); int sel[] = new int[len]; int nsel = 0; for (int i = 0 ; i < len ; i++) { @@ -93,10 +92,9 @@ final class WListPeer extends WComponentPeer implements ListPeer { @Override public native void delItems(int start, int end); - @SuppressWarnings("deprecation") public void clear() { List l = (List)target; - delItems(0, l.countItems()); + delItems(0, l.getItemCount()); } @Override public native void select(int index); @@ -131,7 +129,6 @@ final class WListPeer extends WComponentPeer implements ListPeer { native void create(WComponentPeer parent); @Override - @SuppressWarnings("deprecation") void initialize() { List li = (List)target; @@ -144,7 +141,7 @@ final class WListPeer extends WComponentPeer implements ListPeer { } // add any items that were already inserted in the target. - int nitems = li.countItems(); + int nitems = li.getItemCount(); if (nitems > 0) { String[] items = new String[nitems]; int maxWidth = 0; @@ -160,7 +157,7 @@ final class WListPeer extends WComponentPeer implements ListPeer { } // set whether this list should allow multiple selections. - setMultipleSelections(li.allowsMultipleSelections()); + setMultipleSelections(li.isMultipleMode()); // select the item if necessary. int sel[] = li.getSelectedIndexes(); From 4c121563fb3300f7c9df80a9f2573729bc6ea683 Mon Sep 17 00:00:00 2001 From: Alexander Zvegintsev Date: Thu, 23 Jul 2015 15:12:32 +0300 Subject: [PATCH 09/71] 8131752: [Regression] Test java/awt/GraphicsDevice/CheckDisplayModes.java fails Reviewed-by: alexsch, serb --- jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java index f24df1fd216..56b4252f761 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java @@ -316,6 +316,7 @@ public final class X11GraphicsDevice extends GraphicsDevice @Override public boolean isDisplayChangeSupported() { return (isFullScreenSupported() + && (getFullScreenWindow() != null) && !((X11GraphicsEnvironment) GraphicsEnvironment .getLocalGraphicsEnvironment()).runningXinerama()); } From 8e0627b61b5fb5e12c5c9934639506e64402bb9d Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Sat, 18 Jul 2015 15:10:44 +0300 Subject: [PATCH 10/71] 8066404: The case is failed automatically and thrown the "java.lang.IllegalStateException" exception Reviewed-by: alexsch --- .../java/beans/Performance/Test4058433.java | 54 +++++++++++-------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/jdk/test/java/beans/Performance/Test4058433.java b/jdk/test/java/beans/Performance/Test4058433.java index 71f6cc8f06c..bba0e3b6fdc 100644 --- a/jdk/test/java/beans/Performance/Test4058433.java +++ b/jdk/test/java/beans/Performance/Test4058433.java @@ -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 @@ -33,6 +33,14 @@ import java.beans.ParameterDescriptor; import java.beans.PropertyDescriptor; import java.lang.reflect.Array; import java.lang.reflect.Method; +import java.net.URI; +import java.nio.file.FileSystem; +import java.nio.file.FileSystems; +import java.nio.file.FileVisitResult; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; import java.util.Arrays; import java.util.Comparator; import java.util.Enumeration; @@ -40,19 +48,13 @@ import java.util.Map.Entry; import java.util.Objects; import java.util.TreeMap; import java.util.TreeSet; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.regex.Matcher; -import java.util.regex.Pattern; /* * @test * @bug 4058433 * @summary Generates BeanInfo for public classes in AWT, Accessibility, and Swing * @author Sergey Malenkov - * @run main/manual Test4058433 */ - public class Test4058433 implements Comparator { @Override public int compare(Object one, Object two) { @@ -76,31 +78,41 @@ public class Test4058433 implements Comparator { } public static void main(String[] args) throws Exception { - String resource = ClassLoader.getSystemResource("java/lang/Object.class").toString(); - - Pattern pattern = Pattern.compile("jar:file:(.*)!.*"); - Matcher matcher = pattern.matcher(resource); - matcher.matches(); - resource = matcher.group(1); + FileSystem fs = FileSystems.getFileSystem(URI.create("jrt:/")); + fs.getFileStores(); TreeSet> types = new TreeSet<>(new Test4058433()); - try (JarFile jarFile = new JarFile(resource.replaceAll("%20", " "))) { - Enumeration entries = jarFile.entries(); - while (entries.hasMoreElements()) { - String name = entries.nextElement().getName(); - if (name.startsWith("java/awt/") || name.startsWith("javax/accessibility/") || name.startsWith("javax/swing/")) { + Files.walkFileTree(fs.getPath("/modules/java.desktop"), new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, + BasicFileAttributes attrs) { + file = file.subpath(2, file.getNameCount()); + if (file.startsWith("java/awt/") + || file.startsWith("javax/accessibility/") + || file.startsWith("javax/swing/")) { + String name =file.toString(); if (name.endsWith(".class")) { name = name.substring(0, name.indexOf(".")).replace('/', '.'); - Class type = Class.forName(name); - if (!type.isInterface() && !type.isEnum() && !type.isAnnotation() && !type.isAnonymousClass()) { + + final Class type; + try { + type = Class.forName(name); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + if (!BeanInfo.class.isAssignableFrom(type) && !type.isInterface() + && !type.isEnum() && !type.isAnnotation() + && !type.isAnonymousClass()) { if (null == type.getDeclaringClass()) { types.add(type); } } } } + return FileVisitResult.CONTINUE; } - } + }); + System.out.println("found " + types.size() + " classes"); long time = -System.currentTimeMillis(); for (Class type : types) { From d02dfb7a3aeec3805f21b410aeace2b42b933043 Mon Sep 17 00:00:00 2001 From: Peter Brunet Date: Fri, 24 Jul 2015 13:58:44 -0500 Subject: [PATCH 11/71] 8077707: jdk9 b58 cannot run any graphical application on Win 8 with JAWS running Change dialog proc wparam type from UINT to WPARAM, lparam type from LONG to LPARAM Reviewed-by: serb, alexsch, van --- .../windows/native/libjavaaccessbridge/JavaAccessBridge.cpp | 4 ++-- .../windows/native/libjavaaccessbridge/JavaAccessBridge.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp index 52316876bca..41caff41acc 100644 --- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp @@ -114,7 +114,7 @@ extern "C" { * Our window proc * */ - BOOL APIENTRY AccessBridgeDialogProc (HWND hDlg, UINT message, UINT wParam, LONG lParam) { + BOOL APIENTRY AccessBridgeDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { int command; COPYDATASTRUCT *sentToUs; char *package; @@ -151,7 +151,7 @@ extern "C" { } else { //DEBUG_CODE(sprintf(buffer, "Got AB_MESSAGE_WAITING from HWND %p", wParam)); //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, buffer)); - LRESULT returnVal = theJavaAccessBridge->receiveMemoryPackage((HWND) wParam, lParam); + LRESULT returnVal = theJavaAccessBridge->receiveMemoryPackage((HWND) wParam, (long) lParam); } break; diff --git a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.h b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.h index d03960f7f00..9340f819c88 100644 --- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.h +++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.h @@ -44,7 +44,7 @@ extern "C" { LPVOID lpvReserved); void AppendToCallOutput(char *s); BOOL APIENTRY AccessBridgeDialogProc(HWND hDlg, UINT message, - UINT wParam, LONG lParam); + WPARAM wParam, LPARAM lParam); } /** From b505b0e570aa637ff34a2ef0330f4ee2c37609ec Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Tue, 28 Jul 2015 18:14:57 +0300 Subject: [PATCH 12/71] 8132355: Incorrect guard block in HPkeysym.h, awt_Event.h Reviewed-by: ant, azvegint --- jdk/src/java.desktop/unix/native/libawt_xawt/awt/HPkeysym.h | 2 +- jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/HPkeysym.h b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/HPkeysym.h index 2f0447b28f2..f736e752149 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/HPkeysym.h +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/HPkeysym.h @@ -58,7 +58,7 @@ performance, or use of this material. #ifndef _HPKEYSYM_H -#define _HPKEYSYM +#define _HPKEYSYM_H #define hpXK_ClearLine 0x1000FF6F #define hpXK_InsertLine 0x1000FF70 diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.h b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.h index 21e1db92fdb..06659ef9347 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.h +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_Event.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -28,7 +28,7 @@ *** ***/ #ifndef _AWT_EVENT_H_ -#define _AWT_EVENT_H +#define _AWT_EVENT_H_ #include "jni_util.h" From c25b61dc1d2ad8ef909319af914829f0b7d75475 Mon Sep 17 00:00:00 2001 From: Semyon Sadetsky Date: Tue, 28 Jul 2015 20:39:43 +0300 Subject: [PATCH 13/71] 8130769: The new menu can't be shown on the menubar after clicking the "Add" button Reviewed-by: alexsch, serb, azvegint --- jdk/src/java.desktop/share/classes/java/awt/MenuBar.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java index 5ba87f646b9..b8bb64d8efb 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java +++ b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java @@ -229,9 +229,11 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible if (m.peer == null) { m.addNotify(); } + menus.addElement(m); peer.addMenu(m); + } else { + menus.addElement(m); } - menus.addElement(m); return m; } } From 17903d15831ea709fad5a6686b21b6bc665afd5a Mon Sep 17 00:00:00 2001 From: Semyon Sadetsky Date: Tue, 28 Jul 2015 20:55:45 +0300 Subject: [PATCH 14/71] 8025815: Child FileDialog of modal dialog does not get focus on Gnome Reviewed-by: azvegint, serb --- .../sun/awt/X11/GtkFileDialogPeer.java | 42 +++++- .../unix/classes/sun/awt/X11/XFramePeer.java | 2 +- .../classes/sun/awt/X11/XNETProtocol.java | 4 +- .../native/libawt_xawt/awt/gtk2_interface.c | 1 + .../native/libawt_xawt/awt/gtk2_interface.h | 2 + .../awt/sun_awt_X11_GtkFileDialogPeer.c | 14 +- .../ModalFocus/FileDialogModalFocusTest.java | 137 ++++++++++++++++++ 7 files changed, 194 insertions(+), 8 deletions(-) create mode 100644 jdk/test/java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/GtkFileDialogPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/GtkFileDialogPeer.java index db2f2dcfa5b..d6ef132fede 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/GtkFileDialogPeer.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/GtkFileDialogPeer.java @@ -42,6 +42,8 @@ final class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { // A pointer to the native GTK FileChooser widget private volatile long widget = 0L; + private long standaloneWindow; + private volatile boolean quit; GtkFileDialogPeer(FileDialog fd) { super(fd); @@ -111,9 +113,11 @@ final class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { public void setVisible(boolean b) { XToolkit.awtLock(); try { + quit = !b; if (b) { Runnable task = () -> { showNativeDialog(); + standaloneWindow = 0; fd.setVisible(false); }; new ManagedLocalsThread(task).start(); @@ -128,7 +132,14 @@ final class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { @Override public void dispose() { - quit(); + XToolkit.awtLock(); + try { + quit = true; + quit(); + } + finally { + XToolkit.awtUnlock(); + } super.dispose(); } @@ -144,6 +155,17 @@ final class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { // have delegated to FileDialog#setFile } + protected void requestXFocus(long time, boolean timeProvided) { + if(standaloneWindow == 0) { + super.requestXFocus(time, timeProvided); + return; + } + XNETProtocol net_protocol = XWM.getWM().getNETProtocol(); + if (net_protocol != null) { + net_protocol.setActiveWindow(standaloneWindow); + } + } + @Override public void setFilenameFilter(FilenameFilter filter) { // We do not implement this method because we @@ -170,7 +192,21 @@ final class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { dirname = file.getParent(); } } - run(fd.getTitle(), fd.getMode(), dirname, filename, - fd.getFilenameFilter(), fd.isMultipleMode(), fd.getX(), fd.getY()); + if (!quit) { + run(fd.getTitle(), fd.getMode(), dirname, filename, + fd.getFilenameFilter(), fd.isMultipleMode(), fd.getX(), fd.getY()); + } + } + + /** + * Called by native code when GTK dialog is created. + */ + boolean setWindow(long xid) { + if (!quit && widget != 0) { + standaloneWindow = xid; + requestXFocus(); + return true; + } + return false; } } diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java index ea60094bb2d..aa1bc2dc83c 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java @@ -289,7 +289,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { XNETProtocol net_protocol = XWM.getWM().getNETProtocol(); if (net_protocol != null) { - net_protocol.setActiveWindow(this); + net_protocol.setActiveWindow(getWindow()); } xSetVisible(true); } diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java index a9122c8e906..5ba80bbef0f 100644 --- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java +++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XNETProtocol.java @@ -326,7 +326,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt return res; } - public void setActiveWindow(XWindow window) { + public void setActiveWindow(long window) { if (!active() || !checkProtocol(XA_NET_SUPPORTED, XA_NET_ACTIVE_WINDOW)) { return; } @@ -336,7 +336,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt msg.set_type(XConstants.ClientMessage); msg.set_message_type(XA_NET_ACTIVE_WINDOW.getAtom()); msg.set_display(XToolkit.getDisplay()); - msg.set_window(window.getWindow()); + msg.set_window(window); msg.set_format(32); msg.set_data(0, 1); msg.set_data(1, XToolkit.getCurrentServerTime()); diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c index e5711df06c3..d2ea4c8fa0e 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c @@ -576,6 +576,7 @@ void gtk2_file_chooser_load() fp_gtk_file_chooser_get_filenames = dl_symbol( "gtk_file_chooser_get_filenames"); fp_gtk_g_slist_length = dl_symbol("g_slist_length"); + fp_gdk_x11_drawable_get_xid = dl_symbol("gdk_x11_drawable_get_xid"); } gboolean gtk2_load(JNIEnv *env) diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h index 5891a66d5ff..0150f9347bb 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h @@ -27,6 +27,7 @@ #include #include +#include #define _G_TYPE_CIC(ip, gt, ct) ((ct*) ip) #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) @@ -820,6 +821,7 @@ void (*fp_gtk_widget_show)(GtkWidget *widget); void (*fp_gtk_main)(void); guint (*fp_gtk_main_level)(void); gchar* (*fp_g_path_get_dirname) (const gchar *file_name); +XID (*fp_gdk_x11_drawable_get_xid) (GdkWindow *drawable); /** * This function is available for GLIB > 2.20, so it MUST be diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c index 68019269031..97fbcc60da0 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/sun_awt_X11_GtkFileDialogPeer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ #include #include #include +#include #include "gtk2_interface.h" #include "sun_awt_X11_GtkFileDialogPeer.h" #include "java_awt_FileDialog.h" @@ -38,6 +39,7 @@ static JavaVM *jvm; static jmethodID filenameFilterCallbackMethodID = NULL; static jmethodID setFileInternalMethodID = NULL; static jfieldID widgetFieldID = NULL; +static jmethodID setWindowMethodID = NULL; JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_initIDs (JNIEnv *env, jclass cx) @@ -54,6 +56,10 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_initIDs widgetFieldID = (*env)->GetFieldID(env, cx, "widget", "J"); DASSERT(widgetFieldID != NULL); + CHECK_NULL(widgetFieldID); + + setWindowMethodID = (*env)->GetMethodID(env, cx, "setWindow", "(J)Z"); + DASSERT(setWindowMethodID != NULL); } static gboolean filenameFilterCallback(const GtkFileFilterInfo * filter_info, gpointer obj) @@ -401,7 +407,11 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer, fp_gtk_widget_show(dialog); - fp_gtk_main(); + XID xid = fp_gdk_x11_drawable_get_xid(dialog->window); + if( (*env)->CallBooleanMethod(env, jpeer, setWindowMethodID, xid) ) { + fp_gtk_main(); + } + fp_gdk_threads_leave(); } diff --git a/jdk/test/java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java b/jdk/test/java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java new file mode 100644 index 00000000000..aa8b2292f74 --- /dev/null +++ b/jdk/test/java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 8025815 + @summary Child FileDialog of modal dialog does not get focus on Gnome + @author Semyon Sadetsky + */ + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.awt.image.BufferedImage; +import java.lang.reflect.InvocationTargetException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.ReentrantLock; + +public class FileDialogModalFocusTest { + public static void main(String[] args) throws Exception { + Frame frame = new Frame(); + FileDialog fileDialog = new FileDialog((Frame) null); + test(frame, fileDialog); + frame = new Frame(); + fileDialog = new FileDialog(frame); + test(frame, fileDialog); + System.out.println("ok"); + } + + private static void test(final Frame frame, final FileDialog fileDialog) + throws InterruptedException, InvocationTargetException, + AWTException { + Button button = new Button(); + button.setBackground(Color.RED); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + fileDialog.setVisible(true); + } + }); + frame.add(button); + frame.setSize(200, 200); + EventQueue.invokeAndWait(new Runnable() { + @Override + public void run() { + frame.setVisible(true); + } + }); + Robot robot = new Robot(); + robot.setAutoDelay(200); + robot.waitForIdle(); + Point point = button.getLocationOnScreen(); + point.translate(100, 100); + robot.mouseMove(point.x, point.y); + robot.mousePress(InputEvent.BUTTON1_MASK); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + int delay = 0; + while (frame.isFocused() && delay < 2000) { + robot.delay(50); + delay += 50; + } + ReentrantLock lock = new ReentrantLock(); + Condition condition = lock.newCondition(); + button.addComponentListener(new ComponentAdapter() { + @Override + public void componentResized(ComponentEvent e) { + lock.lock(); + condition.signal(); + lock.unlock(); + } + }); + lock.lock(); + EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + frame.setExtendedState(JFrame.MAXIMIZED_BOTH); + } + }); + condition.await(5, TimeUnit.SECONDS); + lock.unlock(); + robot.delay(200); + robot.waitForIdle(); + EventQueue.invokeAndWait(new Runnable() { + @Override + public void run() { + button.requestFocus(); + Point p = new Point(button.getWidth() - 10, button.getHeight() - 10); + SwingUtilities.convertPointToScreen(p, button); + robot.mouseMove(p.x, p.y); + robot.mousePress(InputEvent.BUTTON1_MASK); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + } + }); + robot.waitForIdle(); + Point p = new Point(100, 100); + SwingUtilities.convertPointToScreen(p, button); + BufferedImage image = robot.createScreenCapture( + new Rectangle(p, + new Dimension(button.getWidth() - 200, + button.getHeight() - 200))); + boolean found = false; + for (int x = 0; x < image.getWidth(); x+=50) { + for (int y = 0; y < image.getHeight(); y+=50) { + if( (image.getRGB(x, y) & 0x00FFFF) != 0 ) { + found = true; + break; + }; + } + } + frame.dispose(); + robot.waitForIdle(); + fileDialog.dispose(); + if(!found) { + throw new RuntimeException("file chooser is underneath"); + } + } +} \ No newline at end of file From 7ecc2416293f3ee6c37c15d0ae033b701660f2d6 Mon Sep 17 00:00:00 2001 From: Semyon Sadetsky Date: Tue, 28 Jul 2015 20:59:26 +0300 Subject: [PATCH 15/71] 8130735: javax.swing.TimerQueue: timer fires late when another timer starts Reviewed-by: alexsch, serb, azvegint --- .../share/classes/javax/swing/TimerQueue.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java b/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java index d221929b849..e2ac94080f7 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/TimerQueue.java @@ -94,6 +94,9 @@ class TimerQueue implements Runnable void startIfNeeded() { if (! running) { runningLock.lock(); + if (running) { + return; + } try { final ThreadGroup threadGroup = AppContext.getAppContext().getThreadGroup(); AccessController.doPrivileged((PrivilegedAction) () -> { @@ -166,15 +169,17 @@ class TimerQueue implements Runnable try { while (running) { try { - Timer timer = queue.take().getTimer(); + DelayedTimer runningTimer = queue.take(); + Timer timer = runningTimer.getTimer(); timer.getLock().lock(); try { DelayedTimer delayedTimer = timer.delayedTimer; - if (delayedTimer != null) { + if (delayedTimer == runningTimer) { /* - * Timer is not removed after we get it from - * the queue and before the lock on the timer is - * acquired + * Timer is not removed (delayedTimer != null) + * or not removed and added (runningTimer == delayedTimer) + * after we get it from the queue and before the + * lock on the timer is acquired */ timer.post(); // have timer post an event timer.delayedTimer = null; From 5e745d9ef1721c307cd8fee7d3fc4264f1d1256b Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Tue, 28 Jul 2015 22:31:54 +0300 Subject: [PATCH 16/71] 8013586: audioInputStream.close() does not release the resource 8130305: AudioSystem behavior depends on order that providers are located Reviewed-by: prr, amenkov --- .../com/sun/media/sound/AiffFileReader.java | 185 +------------- .../com/sun/media/sound/AuFileReader.java | 236 +----------------- .../com/sun/media/sound/SunFileReader.java | 207 ++++++++------- .../media/sound/WaveExtensibleFileReader.java | 130 +++------- .../com/sun/media/sound/WaveFileReader.java | 179 +------------ .../sun/media/sound/WaveFloatFileReader.java | 84 ++----- .../sampled/FileReader/AudioFileClose.java | 54 ++++ .../sampled/FileReader/ReadersExceptions.java | 39 ++- 8 files changed, 250 insertions(+), 864 deletions(-) create mode 100644 jdk/test/javax/sound/sampled/FileReader/AudioFileClose.java diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java index 6d91be4bf61..8c9dc3c78be 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AiffFileReader.java @@ -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 @@ -27,19 +27,14 @@ package com.sun.media.sound; import java.io.DataInputStream; import java.io.DataOutputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; -import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; - /** * AIFF file reader and writer. * @@ -49,177 +44,10 @@ import javax.sound.sampled.UnsupportedAudioFileException; */ public final class AiffFileReader extends SunFileReader { - private static final int MAX_READ_LENGTH = 8; - - // METHODS TO IMPLEMENT AudioFileReader - - /** - * Obtains the audio file format of the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - public AudioFileFormat getAudioFileFormat(InputStream stream) throws UnsupportedAudioFileException, IOException { - // fix for 4489272: AudioSystem.getAudioFileFormat() fails for InputStream, but works for URL - AudioFileFormat aff = getCOMM(stream, true); - // the following is not strictly necessary - but was implemented like that in 1.3.0 - 1.4.1 - // so I leave it as it was. May remove this for 1.5.0 - stream.reset(); - return aff; - } - - - /** - * Obtains the audio file format of the URL provided. The URL must - * point to valid audio file data. - * @param url the URL from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException { - AudioFileFormat fileFormat = null; - InputStream urlStream = url.openStream(); // throws IOException - try { - fileFormat = getCOMM(urlStream, false); - } finally { - urlStream.close(); - } - return fileFormat; - } - - - /** - * Obtains the audio file format of the File provided. The File must - * point to valid audio file data. - * @param file the File from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException { - AudioFileFormat fileFormat = null; - FileInputStream fis = new FileInputStream(file); // throws IOException - // part of fix for 4325421 - try { - fileFormat = getCOMM(fis, false); - } finally { - fis.close(); - } - - return fileFormat; - } - - - - - /** - * Obtains an audio stream from the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data contained - * in the input stream. - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - public AudioInputStream getAudioInputStream(InputStream stream) throws UnsupportedAudioFileException, IOException { - // getCOMM leaves the input stream at the beginning of the audio data - AudioFileFormat fileFormat = getCOMM(stream, true); // throws UnsupportedAudioFileException, IOException - - // we've got everything, and the stream is at the - // beginning of the audio data, so return an AudioInputStream. - return new AudioInputStream(stream, fileFormat.getFormat(), fileFormat.getFrameLength()); - } - - - /** - * Obtains an audio stream from the URL provided. The URL must - * point to valid audio file data. - * @param url the URL for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the URL - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException { - InputStream urlStream = url.openStream(); // throws IOException - AudioFileFormat fileFormat = null; - try { - fileFormat = getCOMM(urlStream, false); - } finally { - if (fileFormat == null) { - urlStream.close(); - } - } - return new AudioInputStream(urlStream, fileFormat.getFormat(), fileFormat.getFrameLength()); - } - - - /** - * Obtains an audio stream from the File provided. The File must - * point to valid audio file data. - * @param file the File for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the File - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioInputStream getAudioInputStream(File file) - throws UnsupportedAudioFileException, IOException { - - FileInputStream fis = new FileInputStream(file); // throws IOException - AudioFileFormat fileFormat = null; - // part of fix for 4325421 - try { - fileFormat = getCOMM(fis, false); - } finally { - if (fileFormat == null) { - fis.close(); - } - } - return new AudioInputStream(fis, fileFormat.getFormat(), fileFormat.getFrameLength()); - } - - //-------------------------------------------------------------------- - - private AudioFileFormat getCOMM(InputStream is, boolean doReset) - throws UnsupportedAudioFileException, IOException { - - DataInputStream dis = new DataInputStream(is); - - if (doReset) { - dis.mark(MAX_READ_LENGTH); - } + @Override + AudioFileFormat getAudioFileFormatImpl(final InputStream stream) + throws UnsupportedAudioFileException, IOException { + DataInputStream dis = new DataInputStream(stream); // assumes a stream at the beginning of the file which has already // passed the magic number test... @@ -234,9 +62,6 @@ public final class AiffFileReader extends SunFileReader { // $$fb: fix for 4369044: javax.sound.sampled.AudioSystem.getAudioInputStream() works wrong with Cp037 if (magic != AiffFileFormat.AIFF_MAGIC) { // not AIFF, throw exception - if (doReset) { - dis.reset(); - } throw new UnsupportedAudioFileException("not an AIFF file"); } diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileReader.java index a12e461c95d..7e83180dffa 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/AuFileReader.java @@ -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 @@ -25,21 +25,15 @@ package com.sun.media.sound; -import java.io.BufferedInputStream; import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; -import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; - /** * AU file reader. * @@ -49,33 +43,10 @@ import javax.sound.sampled.UnsupportedAudioFileException; */ public final class AuFileReader extends SunFileReader { - // METHODS TO IMPLEMENT AudioFileReader - - /** - * Obtains the audio file format of the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - public AudioFileFormat getAudioFileFormat(InputStream stream) throws UnsupportedAudioFileException, IOException { - - AudioFormat format = null; - AuFileFormat fileFormat = null; - int maxReadLength = 28; + @Override + public AudioFileFormat getAudioFileFormatImpl(final InputStream stream) + throws UnsupportedAudioFileException, IOException { boolean bigendian = false; - int magic = -1; int headerSize = -1; int dataSize = -1; int encoding_local = -1; @@ -90,15 +61,12 @@ public final class AuFileReader extends SunFileReader { DataInputStream dis = new DataInputStream( stream ); - dis.mark(maxReadLength); - - magic = dis.readInt(); + final int magic = dis.readInt(); nread += 4; if (! (magic == AuFileFormat.AU_SUN_MAGIC) || (magic == AuFileFormat.AU_DEC_MAGIC) || (magic == AuFileFormat.AU_SUN_INV_MAGIC) || (magic == AuFileFormat.AU_DEC_INV_MAGIC) ) { - // not AU, reset the stream, place into exception, throw exception - dis.reset(); + // not AU, throw exception throw new UnsupportedAudioFileException("not an AU file"); } @@ -112,7 +80,6 @@ public final class AuFileReader extends SunFileReader { sampleRate = (bigendian==true ? dis.readInt() : rllong(dis) ); nread += 4; channels = (bigendian==true ? dis.readInt() : rllong(dis) ); nread += 4; if (channels <= 0) { - dis.reset(); throw new UnsupportedAudioFileException("Invalid number of channels"); } @@ -172,7 +139,6 @@ public final class AuFileReader extends SunFileReader { */ default: // unsupported filetype, throw exception - dis.reset(); throw new UnsupportedAudioFileException("not a valid AU file"); } @@ -184,189 +150,13 @@ public final class AuFileReader extends SunFileReader { //$$fb 2003-10-20: fix for 4940459: AudioInputStream.getFrameLength() returns 0 instead of NOT_SPECIFIED length = dataSize / frameSize; } - - format = new AudioFormat( encoding, (float)sampleRate, sampleSizeInBits, - channels, frameSize, (float)frameRate, bigendian); - - fileFormat = new AuFileFormat( AudioFileFormat.Type.AU, dataSize+headerSize, - format, length); - - dis.reset(); // Throws IOException - return fileFormat; - - } - - - /** - * Obtains the audio file format of the URL provided. The URL must - * point to valid audio file data. - * @param url the URL from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException { - - InputStream urlStream = null; - BufferedInputStream bis = null; - AudioFileFormat fileFormat = null; - AudioFormat format = null; - - urlStream = url.openStream(); // throws IOException - - try { - bis = new BufferedInputStream( urlStream, bisBufferSize ); - - fileFormat = getAudioFileFormat( bis ); // throws UnsupportedAudioFileException - } finally { - urlStream.close(); - } - - return fileFormat; - } - - - /** - * Obtains the audio file format of the File provided. The File must - * point to valid audio file data. - * @param file the File from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException { - - FileInputStream fis = null; - BufferedInputStream bis = null; - AudioFileFormat fileFormat = null; - AudioFormat format = null; - - fis = new FileInputStream( file ); // throws IOException - // part of fix for 4325421 - try { - bis = new BufferedInputStream( fis, bisBufferSize ); - fileFormat = getAudioFileFormat( bis ); // throws UnsupportedAudioFileException - } finally { - fis.close(); - } - - return fileFormat; - } - - - /** - * Obtains an audio stream from the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data contained - * in the input stream. - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - public AudioInputStream getAudioInputStream(InputStream stream) throws UnsupportedAudioFileException, IOException { - - DataInputStream dis = null; - int headerSize; - AudioFileFormat fileFormat = null; - AudioFormat format = null; - - - fileFormat = getAudioFileFormat( stream ); // throws UnsupportedAudioFileException, IOException - - // if we passed this call, we have an AU file. - - format = fileFormat.getFormat(); - - dis = new DataInputStream(stream); - // now seek past the header - - dis.readInt(); // magic - headerSize = (format.isBigEndian()==true ? dis.readInt() : rllong(dis) ); - dis.skipBytes( headerSize - 8 ); - - - // we've got everything, and the stream should be at the - // beginning of the data chunk, so return an AudioInputStream. - - return new AudioInputStream(dis, format, fileFormat.getFrameLength()); - } - - - /** - * Obtains an audio stream from the URL provided. The URL must - * point to valid audio file data. - * @param url the URL for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the URL - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException { - - InputStream urlStream = null; - BufferedInputStream bis = null; - AudioFileFormat fileFormat = null; - - urlStream = url.openStream(); // throws IOException - AudioInputStream result = null; - try { - bis = new BufferedInputStream( urlStream, bisBufferSize ); - result = getAudioInputStream( (InputStream)bis ); - } finally { - if (result == null) { - urlStream.close(); - } - } - return result; - } - - - /** - * Obtains an audio stream from the File provided. The File must - * point to valid audio file data. - * @param file the File for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the File - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException { - - FileInputStream fis = null; - BufferedInputStream bis = null; - AudioFileFormat fileFormat = null; - - fis = new FileInputStream( file ); // throws IOException - AudioInputStream result = null; - // part of fix for 4325421 - try { - bis = new BufferedInputStream( fis, bisBufferSize ); - result = getAudioInputStream( (InputStream)bis ); - } finally { - if (result == null) { - fis.close(); - } - } - - return result; + dis.skipBytes(headerSize - nread); + AudioFormat format = new AudioFormat(encoding, sampleRate, + sampleSizeInBits, channels, + frameSize, (float) frameRate, + bigendian); + return new AuFileFormat(AudioFileFormat.Type.AU, dataSize + headerSize, + format, length); } } diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java index 7e59125946b..06b9ff0e456 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/SunFileReader.java @@ -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 @@ -25,10 +25,12 @@ package com.sun.media.sound; -import java.io.File; -import java.io.InputStream; -import java.io.IOException; +import java.io.BufferedInputStream; import java.io.DataInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; import java.net.URL; import javax.sound.sampled.AudioFileFormat; @@ -36,8 +38,6 @@ import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.spi.AudioFileReader; - - /** * Abstract File Reader class. * @@ -45,118 +45,109 @@ import javax.sound.sampled.spi.AudioFileReader; */ abstract class SunFileReader extends AudioFileReader { - // buffer size for temporary input streams - protected static final int bisBufferSize = 4096; - - /** - * Constructs a new SunFileReader object. - */ - SunFileReader() { + @Override + public final AudioFileFormat getAudioFileFormat(final InputStream stream) + throws UnsupportedAudioFileException, IOException { + stream.mark(200); // The biggest value which was historically used + try { + return getAudioFileFormatImpl(stream); + } finally { + // According to specification the following is not strictly + // necessary, if we got correct format. But it was implemented like + // that in 1.3.0 - 1.8. So I leave it as it was, but it seems + // specification should be updated. + stream.reset(); + } } + @Override + public final AudioFileFormat getAudioFileFormat(final URL url) + throws UnsupportedAudioFileException, IOException { + try (InputStream is = url.openStream()) { + return getAudioFileFormatImpl(new BufferedInputStream(is)); + } + } - // METHODS TO IMPLEMENT AudioFileReader + @Override + public final AudioFileFormat getAudioFileFormat(final File file) + throws UnsupportedAudioFileException, IOException { + try (InputStream is = new FileInputStream(file)) { + return getAudioFileFormatImpl(new BufferedInputStream(is)); + } + } + + @Override + public AudioInputStream getAudioInputStream(final InputStream stream) + throws UnsupportedAudioFileException, IOException { + stream.mark(200); // The biggest value which was historically used + try { + final AudioFileFormat fileFormat = getAudioFileFormatImpl(stream); + // we've got everything, the stream is supported and it is at the + // beginning of the audio data, so return an AudioInputStream + return new AudioInputStream(stream, fileFormat.getFormat(), + fileFormat.getFrameLength()); + } catch (final UnsupportedAudioFileException e) { + stream.reset(); + throw e; + } + } + + @Override + public final AudioInputStream getAudioInputStream(final URL url) + throws UnsupportedAudioFileException, IOException { + final InputStream urlStream = url.openStream(); + try { + return getAudioInputStream(new BufferedInputStream(urlStream)); + } catch (final Throwable e) { + closeSilently(urlStream); + throw e; + } + } + + @Override + public final AudioInputStream getAudioInputStream(final File file) + throws UnsupportedAudioFileException, IOException { + final InputStream fileStream = new FileInputStream(file); + try { + return getAudioInputStream(new BufferedInputStream(fileStream)); + } catch (final Throwable e) { + closeSilently(fileStream); + throw e; + } + } /** - * Obtains the audio file format of the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - abstract public AudioFileFormat getAudioFileFormat(InputStream stream) throws UnsupportedAudioFileException, IOException; - - - /** - * Obtains the audio file format of the URL provided. The URL must - * point to valid audio file data. - * @param url the URL from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system + * Obtains the audio file format of the input stream provided. The stream + * must point to valid audio file data. Note that default implementation of + * {@link #getAudioInputStream(InputStream)} assume that this method leaves + * the input stream at the beginning of the audio data. + * + * @param stream the input stream from which file format information should + * be extracted + * @return an {@code AudioFileFormat} object describing the audio file + * format + * @throws UnsupportedAudioFileException if the stream does not point to + * valid audio file data recognized by the system * @throws IOException if an I/O exception occurs */ - abstract public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException; - - - /** - * Obtains the audio file format of the File provided. The File must - * point to valid audio file data. - * @param file the File from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - abstract public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException; - - - /** - * Obtains an audio stream from the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data contained - * in the input stream. - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - abstract public AudioInputStream getAudioInputStream(InputStream stream) throws UnsupportedAudioFileException, IOException; - - - /** - * Obtains an audio stream from the URL provided. The URL must - * point to valid audio file data. - * @param url the URL for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the URL - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - abstract public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException; - - - /** - * Obtains an audio stream from the File provided. The File must - * point to valid audio file data. - * @param file the File for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the File - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - abstract public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException; - + abstract AudioFileFormat getAudioFileFormatImpl(InputStream stream) + throws UnsupportedAudioFileException, IOException; // HELPER METHODS - + /** + * Closes the InputStream when we have read all necessary data from it, and + * ignores an IOException. + * + * @param is the InputStream which should be closed + */ + private static void closeSilently(final InputStream is) { + try { + is.close(); + } catch (final IOException ignored) { + // IOException is ignored + } + } /** * rllong diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java index 2dbcab81c7c..b238e9da66e 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java @@ -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 @@ -22,55 +22,40 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package com.sun.media.sound; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import java.util.HashMap; import java.util.Map; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; -import javax.sound.sampled.AudioFormat.Encoding; -import javax.sound.sampled.spi.AudioFileReader; /** * WAVE file reader for files using format WAVE_FORMAT_EXTENSIBLE (0xFFFE). * * @author Karl Helgason */ -public final class WaveExtensibleFileReader extends AudioFileReader { - - static private class GUID { - long i1; - - int s1; - - int s2; - - int x1; - - int x2; - - int x3; - - int x4; - - int x5; - - int x6; - - int x7; - - int x8; +public final class WaveExtensibleFileReader extends SunFileReader { + private static class GUID { + private long i1; + private int s1; + private int s2; + private int x1; + private int x2; + private int x3; + private int x4; + private int x5; + private int x6; + private int x7; + private int x8; private GUID() { } @@ -105,10 +90,12 @@ public final class WaveExtensibleFileReader extends AudioFileReader { return d; } + @Override public int hashCode() { return (int) i1; } + @Override public boolean equals(Object obj) { if (!(obj instanceof GUID)) return false; @@ -161,7 +148,7 @@ public final class WaveExtensibleFileReader extends AudioFileReader { private static final GUID SUBTYPE_IEEE_FLOAT = new GUID(0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); - private String decodeChannelMask(long channelmask) { + private static String decodeChannelMask(long channelmask) { StringBuilder sb = new StringBuilder(); long m = 1; for (int i = 0; i < allchannelnames.length; i++) { @@ -180,20 +167,8 @@ public final class WaveExtensibleFileReader extends AudioFileReader { } - public AudioFileFormat getAudioFileFormat(InputStream stream) - throws UnsupportedAudioFileException, IOException { - - stream.mark(200); - AudioFileFormat format; - try { - format = internal_getAudioFileFormat(stream); - } finally { - stream.reset(); - } - return format; - } - - private AudioFileFormat internal_getAudioFileFormat(InputStream stream) + @Override + AudioFileFormat getAudioFileFormatImpl(final InputStream stream) throws UnsupportedAudioFileException, IOException { RIFFReader riffiterator = new RIFFReader(stream); @@ -244,12 +219,9 @@ public final class WaveExtensibleFileReader extends AudioFileReader { break; } } - - if (!fmt_found) + if (!fmt_found || !data_found) { throw new UnsupportedAudioFileException(); - if (!data_found) - throw new UnsupportedAudioFileException(); - + } Map p = new HashMap(); String s_channelmask = decodeChannelMask(channelMask); if (s_channelmask != null) @@ -273,24 +245,22 @@ public final class WaveExtensibleFileReader extends AudioFileReader { } else if (subFormat.equals(SUBTYPE_IEEE_FLOAT)) { audioformat = new AudioFormat(Encoding.PCM_FLOAT, samplerate, bits, channels, framesize, samplerate, false, p); - } else + } else { throw new UnsupportedAudioFileException(); - - AudioFileFormat fileformat = new AudioFileFormat( - AudioFileFormat.Type.WAVE, audioformat, - AudioSystem.NOT_SPECIFIED); - return fileformat; + } + return new AudioFileFormat(AudioFileFormat.Type.WAVE, audioformat, + AudioSystem.NOT_SPECIFIED); } - public AudioInputStream getAudioInputStream(InputStream stream) + @Override + public AudioInputStream getAudioInputStream(final InputStream stream) throws UnsupportedAudioFileException, IOException { AudioFileFormat format = getAudioFileFormat(stream); + // we've got everything, the stream is supported and it is at the + // beginning of the header, so find the data chunk again and return an + // AudioInputStream RIFFReader riffiterator = new RIFFReader(stream); - if (!riffiterator.getFormat().equals("RIFF")) - throw new UnsupportedAudioFileException(); - if (!riffiterator.getType().equals("WAVE")) - throw new UnsupportedAudioFileException(); while (riffiterator.hasNextChunk()) { RIFFReader chunk = riffiterator.nextChunk(); if (chunk.getFormat().equals("data")) { @@ -300,40 +270,4 @@ public final class WaveExtensibleFileReader extends AudioFileReader { } throw new UnsupportedAudioFileException(); } - - public AudioFileFormat getAudioFileFormat(URL url) - throws UnsupportedAudioFileException, IOException { - InputStream stream = url.openStream(); - AudioFileFormat format; - try { - format = getAudioFileFormat(new BufferedInputStream(stream)); - } finally { - stream.close(); - } - return format; - } - - public AudioFileFormat getAudioFileFormat(File file) - throws UnsupportedAudioFileException, IOException { - InputStream stream = new FileInputStream(file); - AudioFileFormat format; - try { - format = getAudioFileFormat(new BufferedInputStream(stream)); - } finally { - stream.close(); - } - return format; - } - - public AudioInputStream getAudioInputStream(URL url) - throws UnsupportedAudioFileException, IOException { - return getAudioInputStream(new BufferedInputStream(url.openStream())); - } - - public AudioInputStream getAudioInputStream(File file) - throws UnsupportedAudioFileException, IOException { - return getAudioInputStream(new BufferedInputStream(new FileInputStream( - file))); - } - } diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFileReader.java index 3599fdfab52..96a4bd7cd1f 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFileReader.java @@ -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 @@ -27,20 +27,14 @@ package com.sun.media.sound; import java.io.DataInputStream; import java.io.EOFException; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; -import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; - - /** * WAVE file reader. * @@ -50,170 +44,12 @@ import javax.sound.sampled.UnsupportedAudioFileException; */ public final class WaveFileReader extends SunFileReader { - private static final int MAX_READ_LENGTH = 12; - - /** - * Obtains the audio file format of the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - public AudioFileFormat getAudioFileFormat(InputStream stream) throws UnsupportedAudioFileException, IOException { - // fix for 4489272: AudioSystem.getAudioFileFormat() fails for InputStream, but works for URL - AudioFileFormat aff = getFMT(stream, true); - // the following is not strictly necessary - but was implemented like that in 1.3.0 - 1.4.1 - // so I leave it as it was. May remove this for 1.5.0 - stream.reset(); - return aff; - } - - - /** - * Obtains the audio file format of the URL provided. The URL must - * point to valid audio file data. - * @param url the URL from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException { - InputStream urlStream = url.openStream(); // throws IOException - AudioFileFormat fileFormat = null; - try { - fileFormat = getFMT(urlStream, false); - } finally { - urlStream.close(); - } - return fileFormat; - } - - - /** - * Obtains the audio file format of the File provided. The File must - * point to valid audio file data. - * @param file the File from which file format information should be - * extracted - * @return an AudioFileFormat object describing the audio file format - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException { - AudioFileFormat fileFormat = null; - FileInputStream fis = new FileInputStream(file); // throws IOException - // part of fix for 4325421 - try { - fileFormat = getFMT(fis, false); - } finally { - fis.close(); - } - - return fileFormat; - } - - - /** - * Obtains an audio stream from the input stream provided. The stream must - * point to valid audio file data. In general, audio file providers may - * need to read some data from the stream before determining whether they - * support it. These parsers must - * be able to mark the stream, read enough data to determine whether they - * support the stream, and, if not, reset the stream's read pointer to its original - * position. If the input stream does not support this, this method may fail - * with an IOException. - * @param stream the input stream from which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data contained - * in the input stream. - * @throws UnsupportedAudioFileException if the stream does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - * @see InputStream#markSupported - * @see InputStream#mark - */ - public AudioInputStream getAudioInputStream(InputStream stream) throws UnsupportedAudioFileException, IOException { - // getFMT leaves the input stream at the beginning of the audio data - AudioFileFormat fileFormat = getFMT(stream, true); // throws UnsupportedAudioFileException, IOException - - // we've got everything, and the stream is at the - // beginning of the audio data, so return an AudioInputStream. - return new AudioInputStream(stream, fileFormat.getFormat(), fileFormat.getFrameLength()); - } - - - /** - * Obtains an audio stream from the URL provided. The URL must - * point to valid audio file data. - * @param url the URL for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the URL - * @throws UnsupportedAudioFileException if the URL does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException { - InputStream urlStream = url.openStream(); // throws IOException - AudioFileFormat fileFormat = null; - try { - fileFormat = getFMT(urlStream, false); - } finally { - if (fileFormat == null) { - urlStream.close(); - } - } - return new AudioInputStream(urlStream, fileFormat.getFormat(), fileFormat.getFrameLength()); - } - - - /** - * Obtains an audio stream from the File provided. The File must - * point to valid audio file data. - * @param file the File for which the AudioInputStream should be - * constructed - * @return an AudioInputStream object based on the audio file data pointed - * to by the File - * @throws UnsupportedAudioFileException if the File does not point to valid audio - * file data recognized by the system - * @throws IOException if an I/O exception occurs - */ - public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException { - FileInputStream fis = new FileInputStream(file); // throws IOException - AudioFileFormat fileFormat = null; - // part of fix for 4325421 - try { - fileFormat = getFMT(fis, false); - } finally { - if (fileFormat == null) { - fis.close(); - } - } - return new AudioInputStream(fis, fileFormat.getFormat(), fileFormat.getFrameLength()); - } - - - //-------------------------------------------------------------------- - - - private AudioFileFormat getFMT(InputStream stream, boolean doReset) throws UnsupportedAudioFileException, IOException { + @Override + AudioFileFormat getAudioFileFormatImpl(final InputStream stream) + throws UnsupportedAudioFileException, IOException { // assumes sream is rewound - int bytesRead; int nread = 0; int fmt; int length = 0; @@ -227,10 +63,6 @@ public final class WaveFileReader extends SunFileReader { DataInputStream dis = new DataInputStream( stream ); - if (doReset) { - dis.mark(MAX_READ_LENGTH); - } - int magic = dis.readInt(); int fileLength = rllong(dis); int waveMagic = dis.readInt(); @@ -244,9 +76,6 @@ public final class WaveFileReader extends SunFileReader { if ((magic != WaveFileFormat.RIFF_MAGIC) || (waveMagic != WaveFileFormat.WAVE_MAGIC)) { // not WAVE, throw UnsupportedAudioFileException - if (doReset) { - dis.reset(); - } throw new UnsupportedAudioFileException("not a WAVE file"); } diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFloatFileReader.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFloatFileReader.java index 280196ef188..3fe278fc70c 100644 --- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFloatFileReader.java +++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/WaveFloatFileReader.java @@ -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 @@ -22,14 +22,11 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package com.sun.media.sound; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; -import java.net.URL; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; @@ -37,29 +34,16 @@ import javax.sound.sampled.AudioFormat.Encoding; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; -import javax.sound.sampled.spi.AudioFileReader; /** * Floating-point encoded (format 3) WAVE file loader. * * @author Karl Helgason */ -public final class WaveFloatFileReader extends AudioFileReader { +public final class WaveFloatFileReader extends SunFileReader { - public AudioFileFormat getAudioFileFormat(InputStream stream) - throws UnsupportedAudioFileException, IOException { - - stream.mark(200); - AudioFileFormat format; - try { - format = internal_getAudioFileFormat(stream); - } finally { - stream.reset(); - } - return format; - } - - private AudioFileFormat internal_getAudioFileFormat(InputStream stream) + @Override + AudioFileFormat getAudioFileFormatImpl(final InputStream stream) throws UnsupportedAudioFileException, IOException { RIFFReader riffiterator = new RIFFReader(stream); @@ -96,30 +80,25 @@ public final class WaveFloatFileReader extends AudioFileReader { break; } } - - if (!fmt_found) + if (!fmt_found || !data_found) { throw new UnsupportedAudioFileException(); - if (!data_found) - throw new UnsupportedAudioFileException(); - + } AudioFormat audioformat = new AudioFormat( Encoding.PCM_FLOAT, samplerate, bits, channels, framesize, samplerate, false); - AudioFileFormat fileformat = new AudioFileFormat( - AudioFileFormat.Type.WAVE, audioformat, - AudioSystem.NOT_SPECIFIED); - return fileformat; + return new AudioFileFormat(AudioFileFormat.Type.WAVE, audioformat, + AudioSystem.NOT_SPECIFIED); } - public AudioInputStream getAudioInputStream(InputStream stream) + @Override + public AudioInputStream getAudioInputStream(final InputStream stream) throws UnsupportedAudioFileException, IOException { AudioFileFormat format = getAudioFileFormat(stream); + // we've got everything, the stream is supported and it is at the + // beginning of the header, so find the data chunk again and return an + // AudioInputStream RIFFReader riffiterator = new RIFFReader(stream); - if (!riffiterator.getFormat().equals("RIFF")) - throw new UnsupportedAudioFileException(); - if (!riffiterator.getType().equals("WAVE")) - throw new UnsupportedAudioFileException(); while (riffiterator.hasNextChunk()) { RIFFReader chunk = riffiterator.nextChunk(); if (chunk.getFormat().equals("data")) { @@ -129,39 +108,4 @@ public final class WaveFloatFileReader extends AudioFileReader { } throw new UnsupportedAudioFileException(); } - - public AudioFileFormat getAudioFileFormat(URL url) - throws UnsupportedAudioFileException, IOException { - InputStream stream = url.openStream(); - AudioFileFormat format; - try { - format = getAudioFileFormat(new BufferedInputStream(stream)); - } finally { - stream.close(); - } - return format; - } - - public AudioFileFormat getAudioFileFormat(File file) - throws UnsupportedAudioFileException, IOException { - InputStream stream = new FileInputStream(file); - AudioFileFormat format; - try { - format = getAudioFileFormat(new BufferedInputStream(stream)); - } finally { - stream.close(); - } - return format; - } - - public AudioInputStream getAudioInputStream(URL url) - throws UnsupportedAudioFileException, IOException { - return getAudioInputStream(new BufferedInputStream(url.openStream())); - } - - public AudioInputStream getAudioInputStream(File file) - throws UnsupportedAudioFileException, IOException { - return getAudioInputStream(new BufferedInputStream(new FileInputStream( - file))); - } } diff --git a/jdk/test/javax/sound/sampled/FileReader/AudioFileClose.java b/jdk/test/javax/sound/sampled/FileReader/AudioFileClose.java new file mode 100644 index 00000000000..3655f9e1c82 --- /dev/null +++ b/jdk/test/javax/sound/sampled/FileReader/AudioFileClose.java @@ -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 java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Paths; + +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.UnsupportedAudioFileException; + +/** + * @test + * @bug 8013586 + * @author Sergey Bylokhov + */ +public final class AudioFileClose { + + public static void main(final String[] args) throws Exception { + final File file = Files.createTempFile("JavaSound", "Test").toFile(); + try (OutputStream fos = new FileOutputStream(file)) { + fos.write(new byte[200]); + } + try { + final InputStream stream = AudioSystem.getAudioInputStream(file); + stream.close(); + } catch (final IOException | UnsupportedAudioFileException ignored) { + } + Files.delete(Paths.get(file.getAbsolutePath())); + } +} diff --git a/jdk/test/javax/sound/sampled/FileReader/ReadersExceptions.java b/jdk/test/javax/sound/sampled/FileReader/ReadersExceptions.java index e0a386ed9f6..604c703423a 100644 --- a/jdk/test/javax/sound/sampled/FileReader/ReadersExceptions.java +++ b/jdk/test/javax/sound/sampled/FileReader/ReadersExceptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,17 +21,19 @@ * questions. */ - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileException; +import javax.sound.sampled.spi.AudioFileReader; + +import static java.util.ServiceLoader.load; /** * @test - * @bug 7058662 7058666 7058672 + * @bug 7058662 7058666 7058672 8130305 * @author Sergey Bylokhov */ public final class ReadersExceptions { @@ -111,16 +113,18 @@ public final class ReadersExceptions { 0, 0, 0, 0, // dataLength }; + static byte[][] data = {wrongAIFFCh, wrongAIFFSSL, wrongAIFFSSH, wrongAUCh, + wrongWAVCh, wrongWAVSSB}; + public static void main(final String[] args) throws IOException { - test(wrongAIFFCh); - test(wrongAIFFSSL); - test(wrongAIFFSSH); - test(wrongAUCh); - test(wrongWAVCh); - test(wrongWAVSSB); + for (final byte[] bytes : data) { + testAS(bytes); + testAFR(bytes); + } } - private static void test(final byte[] buffer) throws IOException { + private static void testAS(final byte[] buffer) throws IOException { + // AudioSystem API final InputStream is = new ByteArrayInputStream(buffer); try { AudioSystem.getAudioFileFormat(is); @@ -130,4 +134,19 @@ public final class ReadersExceptions { } throw new RuntimeException("Test Failed"); } + + private static void testAFR(final byte[] buffer) throws IOException { + // AudioFileReader API + final InputStream is = new ByteArrayInputStream(buffer); + for (final AudioFileReader afr : load(AudioFileReader.class)) { + for (int i = 0; i < 10; ++i) { + try { + afr.getAudioFileFormat(is); + throw new RuntimeException("UAFE expected"); + } catch (final UnsupportedAudioFileException ignored) { + // Expected. + } + } + } + } } From c466ee0357a0bffbe1855a6168d0958631c569de Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Wed, 29 Jul 2015 20:32:35 +0300 Subject: [PATCH 17/71] 8130507: closed/java/awt/font/JNICheck/JNICheck.sh test reports some warnings Reviewed-by: azvegint, prr --- .../java.desktop/unix/native/common/awt/awt.h | 14 +++++++++----- .../unix/native/libawt/awt/awt_LoadLibrary.c | 4 ++++ .../native/libawt_xawt/awt/awt_GraphicsEnv.c | 3 +++ .../unix/native/libawt_xawt/awt/awt_util.c | 3 +++ .../native/libawt_xawt/awt/gtk2_interface.c | 19 +++++++++++++++++++ 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.desktop/unix/native/common/awt/awt.h b/jdk/src/java.desktop/unix/native/common/awt/awt.h index df5f60300b6..0dacab98a40 100644 --- a/jdk/src/java.desktop/unix/native/common/awt/awt.h +++ b/jdk/src/java.desktop/unix/native/common/awt/awt.h @@ -82,7 +82,12 @@ extern void awt_output_flush(); } while (0) #define AWT_LOCK_IMPL() \ - (*env)->CallStaticVoidMethod(env, tkClass, awtLockMID) + do { \ + (*env)->CallStaticVoidMethod(env, tkClass, awtLockMID); \ + if ((*env)->ExceptionCheck(env)) { \ + (*env)->ExceptionClear(env); \ + } \ + } while(0) #define AWT_NOFLUSH_UNLOCK_IMPL() \ do { \ @@ -91,11 +96,10 @@ extern void awt_output_flush(); (*env)->ExceptionClear(env); \ } \ (*env)->CallStaticVoidMethod(env, tkClass, awtUnlockMID); \ + if ((*env)->ExceptionCheck(env)) { \ + (*env)->ExceptionClear(env); \ + } \ if (pendingException) { \ - if ((*env)->ExceptionCheck(env)) { \ - (*env)->ExceptionDescribe(env); \ - (*env)->ExceptionClear(env); \ - } \ (*env)->Throw(env, pendingException); \ } \ } while (0) diff --git a/jdk/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c b/jdk/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c index 59483027131..3f79aa36c79 100644 --- a/jdk/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c +++ b/jdk/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c @@ -71,6 +71,10 @@ JNIEXPORT jboolean JNICALL AWTIsHeadless() { } isHeadless = (*env)->CallStaticBooleanMethod(env, graphicsEnvClass, headlessFn); + if ((*env)->ExceptionCheck(env)) { + (*env)->ExceptionClear(env); + return JNI_TRUE; + } } return isHeadless; } diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c index 1a20b404ad0..a1c9fc27c44 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c @@ -1564,6 +1564,9 @@ Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals(JNIEnv *env, for (i = 0; i < visScreenInfo->count; i++) { XdbeVisualInfo* visInfo = visScreenInfo->visinfo; (*env)->CallVoidMethod(env, this, midAddVisual, (visInfo[i]).visual); + if ((*env)->ExceptionCheck(env)) { + break; + } } #endif /* !HEADLESS */ } diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c index 13ba377966f..261986f9ac0 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_util.c @@ -98,5 +98,8 @@ awtJNI_ThreadYield(JNIEnv *env) { (*env)->CallStaticVoidMethod(env, threadClass, yieldMethodID); DASSERT(!((*env)->ExceptionOccurred(env))); + if ((*env)->ExceptionCheck(env)) { + return JNI_FALSE; + } return JNI_TRUE; } /* awtJNI_ThreadYield() */ diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c index d2ea4c8fa0e..84e2df3bdf4 100644 --- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c +++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c @@ -905,6 +905,10 @@ gboolean gtk2_load(JNIEnv *env) // Init the thread system to use GLib in a thread-safe mode (*env)->CallStaticVoidMethod(env, clazz, mid_lock); + if ((*env)->ExceptionCheck(env)) { + AWT_UNLOCK(); + return FALSE; + } // Calling g_thread_init() multiple times leads to crash on GLib < 2.24 // We can use g_thread_get_initialized () but it is available only for @@ -923,7 +927,22 @@ gboolean gtk2_load(JNIEnv *env) //called before gtk_init() or gtk_init_check() fp_gdk_threads_init(); } + jthrowable pendExcpn = NULL; + // Exception raised during mid_getAndSetInitializationNeededFlag + // call is saved and error handling is done + // after unlock method is called + if ((pendExcpn = (*env)->ExceptionOccurred(env)) != NULL) { + (*env)->ExceptionClear(env); + } (*env)->CallStaticVoidMethod(env, clazz, mid_unlock); + if (pendExcpn != NULL) { + (*env)->Throw(env, pendExcpn); + } + // check if any exception occured during mid_unlock call + if ((*env)->ExceptionCheck(env)) { + AWT_UNLOCK(); + return FALSE; + } } result = (*fp_gtk_init_check)(NULL, NULL); From fdbe749d2a3c0f258c2d4d90080e1b4cd2b90077 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Wed, 29 Jul 2015 15:08:42 -0700 Subject: [PATCH 18/71] 8132242: LogTouchedMethods (8025692) asserts if TieredCompilation is off LogTouchedMethods causes the template interpreter to generate profiling code even if no compiler is used. If TieredCompilation is off, code containing an assertion that checks that UseCompiler is set, is reached. This assertion exists on the sparc and ppc platforms. Reviewed-by: simonis, iklam, minqi --- hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp | 2 +- hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp | 2 +- .../CommandLine/PrintTouchedMethods.java | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp index 00330ef3461..2c95de9b782 100644 --- a/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp +++ b/hotspot/src/cpu/ppc/vm/interp_masm_ppc_64.cpp @@ -2187,7 +2187,7 @@ void InterpreterMacroAssembler::get_method_counters(Register method, } 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; diff --git a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp index 153bfbdda55..44ad8d91dae 100644 --- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp @@ -2314,7 +2314,7 @@ void InterpreterMacroAssembler::get_method_counters(Register method, } 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() + diff --git a/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java b/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java index 0eb1852552a..7bae35ee714 100644 --- a/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java +++ b/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java @@ -87,6 +87,24 @@ public class PrintTouchedMethods { 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(); From 4b348c9fec8d94846c6052add3037b11238fa0e1 Mon Sep 17 00:00:00 2001 From: Jeremy Manson Date: Wed, 29 Jul 2015 22:59:03 -0400 Subject: [PATCH 19/71] 6661889: thread id on Linux is inconsistent in error and log outputs Reviewed-by: dholmes, kvn --- hotspot/src/os/linux/vm/os_linux.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index 0af27515e89..3b198380646 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -653,8 +653,7 @@ static void *java_start(Thread *thread) { 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(); @@ -1424,7 +1423,8 @@ size_t os::lasterror(char *buf, size_t len) { 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(); } From cf608b3cdbc832e7de57bf5971ae25dfb20517fe Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Thu, 30 Jul 2015 12:31:20 +0400 Subject: [PATCH 20/71] 8130478: Reconsider "awt.toolkit" property usage in java.awt.Toolkit getDefaultToolkit() method Reviewed-by: prr, serb --- jdk/src/java.desktop/share/classes/java/awt/Toolkit.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java index e48d28eacf8..b8769a1fad1 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java +++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java @@ -519,13 +519,7 @@ public abstract class Toolkit { *

* If a system property named {@code "java.awt.headless"} is set * to {@code true} then the headless implementation - * of {@code Toolkit} is used. - *

- * If there is no {@code "java.awt.headless"} or it is set to - * {@code false} and there is a system property named - * {@code "awt.toolkit"}, - * that property is treated as the name of a class that is a subclass - * of {@code Toolkit}; + * of {@code Toolkit} is used, * otherwise the default platform-specific implementation of * {@code Toolkit} is used. *

From dfc226cfb6f1478bb9e55998b9c7584cda6fd4aa Mon Sep 17 00:00:00 2001 From: Alexander Scherbatiy Date: Thu, 30 Jul 2015 12:40:45 +0400 Subject: [PATCH 21/71] 8132123: MultiResolutionCachedImage unnecessarily creates base image to get its size Reviewed-by: serb --- .../awt/image/MultiResolutionCachedImage.java | 11 +- .../MultiResolutionCachedImageTest.java | 113 ++++++++++++++++++ .../swing/JSplitPane/8132123/bug8132123.html | 38 ++++++ .../swing/JSplitPane/8132123/bug8132123.java | 51 ++++++++ 4 files changed, 210 insertions(+), 3 deletions(-) create mode 100644 jdk/test/java/awt/image/multiresolution/MultiResolutionCachedImageTest.java create mode 100644 jdk/test/javax/swing/JSplitPane/8132123/bug8132123.html create mode 100644 jdk/test/javax/swing/JSplitPane/8132123/bug8132123.java diff --git a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java index b1c6dae2c4b..84d3db8d601 100644 --- a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java +++ b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java @@ -86,19 +86,24 @@ public class MultiResolutionCachedImage extends AbstractMultiResolutionImage { @Override public int getWidth(ImageObserver observer) { updateInfo(observer, ImageObserver.WIDTH); - return super.getWidth(observer); + return baseImageWidth; } @Override public int getHeight(ImageObserver observer) { updateInfo(observer, ImageObserver.HEIGHT); - return super.getHeight(observer); + return baseImageHeight; } @Override public Object getProperty(String name, ImageObserver observer) { updateInfo(observer, ImageObserver.PROPERTIES); - return super.getProperty(name, observer); + return Image.UndefinedProperty; + } + + @Override + public Image getScaledInstance(int width, int height, int hints) { + return getResolutionVariant(width, height); } @Override diff --git a/jdk/test/java/awt/image/multiresolution/MultiResolutionCachedImageTest.java b/jdk/test/java/awt/image/multiresolution/MultiResolutionCachedImageTest.java new file mode 100644 index 00000000000..9b4a52ed739 --- /dev/null +++ b/jdk/test/java/awt/image/multiresolution/MultiResolutionCachedImageTest.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.geom.Dimension2D; +import java.awt.image.BufferedImage; +import sun.awt.image.MultiResolutionCachedImage; + +/** + * @test + * @bug 8132123 + * @author Alexander Scherbatiy + * @summary MultiResolutionCachedImage unnecessarily creates base image to get + * its size + * @modules java.desktop/sun.awt.image + * @run main MultiResolutionCachedImageTest + */ +public class MultiResolutionCachedImageTest { + + private static final Color TEST_COLOR = Color.BLUE; + + public static void main(String[] args) { + + Image image = new TestMultiResolutionCachedImage(100); + + image.getWidth(null); + image.getHeight(null); + image.getProperty("comment", null); + + int scaledSize = 50; + Image scaledImage = image.getScaledInstance(scaledSize, scaledSize, + Image.SCALE_SMOOTH); + + if (!(scaledImage instanceof BufferedImage)) { + throw new RuntimeException("Wrong scaled image!"); + } + + BufferedImage buffScaledImage = (BufferedImage) scaledImage; + + if (buffScaledImage.getWidth() != scaledSize + || buffScaledImage.getHeight() != scaledSize) { + throw new RuntimeException("Wrong scaled image!"); + } + + if (buffScaledImage.getRGB(scaledSize / 2, scaledSize / 2) != TEST_COLOR.getRGB()) { + throw new RuntimeException("Wrong scaled image!"); + } + } + + private static Dimension2D getDimension(int size) { + return new Dimension(size, size); + } + + private static Dimension2D[] getSizes(int size) { + return new Dimension2D[]{getDimension(size), getDimension(2 * size)}; + } + + private static Image createImage(int width, int height) { + BufferedImage buffImage = new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + Graphics g = buffImage.createGraphics(); + g.setColor(TEST_COLOR); + g.fillRect(0, 0, width, height); + return buffImage; + } + + private static class TestMultiResolutionCachedImage + extends MultiResolutionCachedImage { + + private final int size; + + public TestMultiResolutionCachedImage(int size) { + super(size, size, getSizes(size), (w, h) -> createImage(w, h)); + this.size = size; + } + + @Override + public Image getResolutionVariant(int width, int height) { + if (width == size || height == size) { + throw new RuntimeException("Base image is requested!"); + } + return super.getResolutionVariant(width, height); + } + + @Override + protected Image getBaseImage() { + throw new RuntimeException("Base image is used"); + } + } +} diff --git a/jdk/test/javax/swing/JSplitPane/8132123/bug8132123.html b/jdk/test/javax/swing/JSplitPane/8132123/bug8132123.html new file mode 100644 index 00000000000..d65bd7bb4e1 --- /dev/null +++ b/jdk/test/javax/swing/JSplitPane/8132123/bug8132123.html @@ -0,0 +1,38 @@ + + + + +Verify that JSplitPane uses high-resolution system icons for the one-touch expanding +buttons on HiDPI displays. + +If the display does not support HiDPI mode press PASS. + +1. Run the test on HiDPI Display. +2. Check that the one-touch expanding buttons on the JSplitPane are painted +correctly. If so, press PASS, else press FAIL. + + + + + diff --git a/jdk/test/javax/swing/JSplitPane/8132123/bug8132123.java b/jdk/test/javax/swing/JSplitPane/8132123/bug8132123.java new file mode 100644 index 00000000000..75b651de776 --- /dev/null +++ b/jdk/test/javax/swing/JSplitPane/8132123/bug8132123.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +import java.awt.Color; +import javax.swing.JApplet; +import javax.swing.JPanel; +import javax.swing.JSplitPane; +import javax.swing.SwingUtilities; + +/* @test + * @bug 8132123 + * @summary MultiResolutionCachedImage unnecessarily creates base image + * to get its size + * @author Alexander Scherbatiy + * @run applet/manual=yesno bug8132123.html + */ +public class bug8132123 extends JApplet { + + @Override + public void init() { + SwingUtilities.invokeLater(() -> { + JPanel left = new JPanel(); + left.setBackground(Color.GRAY); + JPanel right = new JPanel(); + right.setBackground(Color.GRAY); + JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, + left, right); + splitPane.setOneTouchExpandable(true); + getContentPane().add(splitPane); + }); + } +} From 98fb52479fdd94f158e455edcbc920ddc2490d3b Mon Sep 17 00:00:00 2001 From: Alexander Kulyakhtin Date: Thu, 30 Jul 2015 12:41:39 +0300 Subject: [PATCH 22/71] 8130527: Serviceability tests fails with Can't attach to process A helper method changed to provide workaround for 8132539 Reviewed-by: jbachorik --- hotspot/test/testlibrary/jdk/test/lib/Utils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hotspot/test/testlibrary/jdk/test/lib/Utils.java b/hotspot/test/testlibrary/jdk/test/lib/Utils.java index 73027cbaab3..eb9ae00017c 100644 --- a/hotspot/test/testlibrary/jdk/test/lib/Utils.java +++ b/hotspot/test/testlibrary/jdk/test/lib/Utils.java @@ -314,9 +314,8 @@ public final class Utils { */ 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)); } /** From 9f39d1674f9f2c3b442702b0990f1172fcdfa8ef Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 30 Jul 2015 15:27:02 +0300 Subject: [PATCH 23/71] 8132382: [macosx] Crash during JMC or JavaFX execution when NSApplication is controlled by SWT or JavaFX libraries Reviewed-by: kizune, alexsch --- .../libawt_lwawt/awt/CFRetainedResource.m | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CFRetainedResource.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CFRetainedResource.m index 1371189b83f..b5650cdd63c 100644 --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CFRetainedResource.m +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CFRetainedResource.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,10 +40,17 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease if (releaseOnAppKitThread) { // Releasing resources on the main AppKit message loop only // Releasing resources on the nested loops may cause dangling - // pointers after the nested loop is exited - [NSApp postRunnableEvent:^(){ - CFRelease(jlong_to_ptr(ptr)); - }]; + // pointers after the nested loop is exited + if ([NSApp respondsToSelector:@selector(postRunnableEvent:)]) { + [NSApp postRunnableEvent:^() { + CFRelease(jlong_to_ptr(ptr)); + }]; + } else { + // could happen if we are embedded inside SWT/FX application, + [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() { + CFRelease(jlong_to_ptr(ptr)); + }]; + } } else { JNF_COCOA_ENTER(env); From 3b63ebf830734aab17c085f86fde4b1bed26c0a4 Mon Sep 17 00:00:00 2001 From: Dmitry Samersoff Date: Thu, 30 Jul 2015 16:26:00 +0300 Subject: [PATCH 24/71] 8059036: Implement Diagnostic Commands for heap and finalizerinfo Implement Diagnostic Commands for heap and finalizerinfo Reviewed-by: sla, plevart, mchung --- hotspot/src/share/vm/classfile/vmSymbols.hpp | 5 ++ .../share/vm/services/diagnosticCommand.cpp | 57 ++++++++++++ .../share/vm/services/diagnosticCommand.hpp | 40 +++++++++ .../dcmd/gc/FinalizerInfoTest.java | 87 +++++++++++++++++++ .../serviceability/dcmd/gc/HeapInfoTest.java | 54 ++++++++++++ 5 files changed, 243 insertions(+) create mode 100644 hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java create mode 100644 hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp index b453e0ec1fa..967750e6c72 100644 --- a/hotspot/src/share/vm/classfile/vmSymbols.hpp +++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp @@ -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") \ diff --git a/hotspot/src/share/vm/services/diagnosticCommand.cpp b/hotspot/src/share/vm/services/diagnosticCommand.cpp index e0fa2193c11..8c326cf73f5 100644 --- a/hotspot/src/share/vm/services/diagnosticCommand.cpp +++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp @@ -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 @@ void DCmdRegistrant::register_dcmds(){ DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); + DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); + DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); #if INCLUDE_SERVICES // Heap dumping/inspection supported DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(DCmd_Source_Internal | DCmd_Source_AttachAPI, true, false)); DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl(full_export, true, false)); @@ -333,6 +336,60 @@ void RunFinalizationDCmd::execute(DCmdSource source, TRAPS) { 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), diff --git a/hotspot/src/share/vm/services/diagnosticCommand.hpp b/hotspot/src/share/vm/services/diagnosticCommand.hpp index 9362687128a..3106c0c9079 100644 --- a/hotspot/src/share/vm/services/diagnosticCommand.hpp +++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp @@ -241,6 +241,46 @@ public: 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 { diff --git a/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java b/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java new file mode 100644 index 00000000000..1e53a234b5a --- /dev/null +++ b/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java @@ -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()); + } +} diff --git a/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java b/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java new file mode 100644 index 00000000000..daedf1252ef --- /dev/null +++ b/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java @@ -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()); + } +} + From 47bdec1c0e5f94ba91315eb4292b8eceb59bdba4 Mon Sep 17 00:00:00 2001 From: Dmitry Samersoff Date: Thu, 30 Jul 2015 16:29:13 +0300 Subject: [PATCH 25/71] 8059036: Implement Diagnostic Commands for heap and finalizerinfo Implement Diagnostic Commands for heap and finalizerinfo Reviewed-by: sla, plevart, mchung --- .../classes/java/lang/ref/Finalizer.java | 6 +- .../java/lang/ref/FinalizerHistogram.java | 80 ++++++++++++++ .../classes/java/lang/ref/Reference.java | 4 +- .../classes/java/lang/ref/ReferenceQueue.java | 39 ++++++- .../java/lang/ref/FinalizerHistogramTest.java | 104 ++++++++++++++++++ 5 files changed, 225 insertions(+), 8 deletions(-) create mode 100644 jdk/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java create mode 100644 jdk/test/java/lang/ref/FinalizerHistogramTest.java diff --git a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java index d9cabe61543..3bd631226c9 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/Finalizer.java @@ -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 @@ final class Finalizer extends FinalReference { /* Package-private; must add(); } + static ReferenceQueue getQueue() { + return queue; + } + /* Invoked by VM */ static void register(Object finalizee) { new Finalizer(finalizee); diff --git a/jdk/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java b/jdk/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java new file mode 100644 index 00000000000..e5c95c1c8c4 --- /dev/null +++ b/jdk/src/java.base/share/classes/java/lang/ref/FinalizerHistogram.java @@ -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 countMap = new HashMap<>(); + ReferenceQueue 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; + } +} diff --git a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java index 7f6456f0947..854cdd6cb9d 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java @@ -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 @@ public abstract class Reference { * 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) diff --git a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java index 534d21c7b2b..bf1af798fd4 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java @@ -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 @@ public class ReferenceQueue { } } - @SuppressWarnings("unchecked") private Reference reallyPoll() { /* Must hold lock */ Reference 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 rn = r.next; + head = (rn == r) ? null : rn; r.queue = NULL; r.next = r; queueLength--; @@ -164,4 +165,32 @@ public class ReferenceQueue { 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> action) { + for (Reference r = head; r != null;) { + action.accept(r); + @SuppressWarnings("unchecked") + Reference 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; + } + } + } } diff --git a/jdk/test/java/lang/ref/FinalizerHistogramTest.java b/jdk/test/java/lang/ref/FinalizerHistogramTest.java new file mode 100644 index 00000000000..a201331f47a --- /dev/null +++ b/jdk/test/java/lang/ref/FinalizerHistogramTest.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.ReentrantLock; + +import java.lang.reflect.Method; +import java.lang.reflect.Field; + +/* + * @test + * @summary Unit test for FinalizerHistogram + * @run main FinalizerHistogramTest + */ + +public class FinalizerHistogramTest { + static ReentrantLock lock = new ReentrantLock(); + static volatile int wasInitialized = 0; + static volatile int wasTrapped = 0; + static final int objectsCount = 1000; + + static 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 static void main(String[] argvs) { + try { + lock.lock(); + for(int i = 0; i < objectsCount; ++i) { + new MyObject(); + } + System.out.println("Objects intialized: " + objectsCount); + System.gc(); + while(wasTrapped < 1); + + Class klass = Class.forName("java.lang.ref.FinalizerHistogram"); + + Method m = klass.getDeclaredMethod("getFinalizerHistogram"); + m.setAccessible(true); + Object entries[] = (Object[]) m.invoke(null); + + Class entryKlass = Class.forName("java.lang.ref.FinalizerHistogram$Entry"); + Field name = entryKlass.getDeclaredField("className"); + name.setAccessible(true); + Field count = entryKlass.getDeclaredField("instanceCount"); + count.setAccessible(true); + + System.out.println("Unreachable instances waiting for finalization"); + System.out.println("#instances class name"); + System.out.println("-----------------------"); + + boolean found = false; + for (Object entry : entries) { + Object e = entryKlass.cast(entry); + System.out.printf("%10d %s\n", count.get(e), name.get(e)); + if (((String) name.get(e)).indexOf("MyObject") != -1 ) { + found = true; + } + } + + if (!found) { + throw new RuntimeException("MyObject is not found in test output"); + } + + System.out.println("Test PASSED"); + } catch(Exception e) { + System.err.println("Test failed with " + e); + e.printStackTrace(System.err); + throw new RuntimeException("Test failed"); + } finally { + lock.unlock(); + } + } +} From 7e31b6a900313d822f470f2bf3045f43ea9cf2f0 Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Thu, 30 Jul 2015 19:10:23 +0300 Subject: [PATCH 26/71] 6206439: JInternalFrame.setLayer(Integer layer) should throw NullPointerException when layer=null Reviewed-by: ant, alexsch --- .../classes/javax/swing/JInternalFrame.java | 1 + .../SetLayerNPE/SetLayerNPE.java | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 jdk/test/javax/swing/JInternalFrame/SetLayerNPE/SetLayerNPE.java diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java b/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java index 8549e1328f7..06aff62f849 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/JInternalFrame.java @@ -1247,6 +1247,7 @@ public class JInternalFrame extends JComponent implements * * @param layer an Integer object specifying this * frame's desktop layer + * @throws NullPointerException if {@code layer} is {@code null} * @see JLayeredPane * @beaninfo * expert: true diff --git a/jdk/test/javax/swing/JInternalFrame/SetLayerNPE/SetLayerNPE.java b/jdk/test/javax/swing/JInternalFrame/SetLayerNPE/SetLayerNPE.java new file mode 100644 index 00000000000..728c560589d --- /dev/null +++ b/jdk/test/javax/swing/JInternalFrame/SetLayerNPE/SetLayerNPE.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.awt.EventQueue; + +import javax.swing.JDesktopPane; +import javax.swing.JInternalFrame; + +/** + * @test + * @bug 6206439 + */ +public final class SetLayerNPE { + + public static void main(final String[] args) throws Exception { + EventQueue.invokeAndWait(() -> { + try { + // JInternalFrame without parent + new JInternalFrame("My Frame").setLayer(null); + throw new AssertionError("expected NPE was not thrown"); + } catch (final NullPointerException ignored) { + } + }); + EventQueue.invokeAndWait(() -> { + try { + // JInternalFrame with parent + JInternalFrame jif = new JInternalFrame("My Frame"); + new JDesktopPane().add(jif); + jif.setLayer(null); + throw new AssertionError("expected NPE was not thrown"); + } catch (final NullPointerException ignored) { + } + }); + } +} From 791267a0961353693ad6a92d888675b2e2837edc Mon Sep 17 00:00:00 2001 From: Yuri Nesterenko Date: Fri, 31 Jul 2015 13:13:30 +0300 Subject: [PATCH 27/71] 6544871: java/awt/event/KeyEvent/KeyTyped/CtrlASCII.html fails from jdk b09 on windows Reviewed-by: serb --- jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java index cf3f1e3d941..1c63ea856b6 100644 --- a/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java +++ b/jdk/test/java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java @@ -257,8 +257,12 @@ public class CtrlASCII extends Applet implements KeyListener }// start() public void punchCtrlKey( Robot ro, int keyCode ) { ro.keyPress(KeyEvent.VK_CONTROL); - ro.keyPress(keyCode); - ro.keyRelease(keyCode); + try { + ro.keyPress(keyCode); + ro.keyRelease(keyCode); + }catch(IllegalArgumentException iae) { + System.err.println("skip probably invalid keyCode "+keyCode); + } ro.keyRelease(KeyEvent.VK_CONTROL); ro.delay(200); } From 71f82b9db5d1cc129df46245e911f6abb39e9381 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Fri, 31 Jul 2015 15:29:34 +0200 Subject: [PATCH 28/71] 8129215: com.sun.jmx.mbeanserver.Introspector may provide results inconsistent with the JavaBeans Introspector Reviewed-by: dfuchs --- .../com/sun/jmx/mbeanserver/Introspector.java | 13 ++- .../mbeanserver/introspector/BeanClass.java | 28 +++++ .../introspector/SimpleIntrospectorTest.java | 104 ++++++++++++++++++ 3 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 jdk/test/com/sun/jmx/mbeanserver/introspector/BeanClass.java create mode 100644 jdk/test/com/sun/jmx/mbeanserver/introspector/SimpleIntrospectorTest.java diff --git a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java index e3c273328fc..92dc59c0b64 100644 --- a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java +++ b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java @@ -552,8 +552,10 @@ public class Introspector { // Java Beans introspection // Class clazz = complex.getClass(); - Method readMethod = JavaBeansAccessor.getReadMethod(clazz, element); - if (readMethod == null) { + Method readMethod; + if (JavaBeansAccessor.isAvailable()) { + readMethod = JavaBeansAccessor.getReadMethod(clazz, element); + } else { // Java Beans not available so use simple introspection // to locate method readMethod = SimpleIntrospector.getReadMethod(clazz, element); @@ -676,7 +678,12 @@ public class Introspector { * {@code null} if no method is found. */ static Method getReadMethod(Class clazz, String property) { - // first character in uppercase (compatibility with JavaBeans) + if (Character.isUpperCase(property.charAt(0))) { + // the property name must start with a lower-case letter + return null; + } + // first character after 'get/is' prefix must be in uppercase + // (compatibility with JavaBeans) property = property.substring(0, 1).toUpperCase(Locale.ENGLISH) + property.substring(1); String getMethod = GET_METHOD_PREFIX + property; diff --git a/jdk/test/com/sun/jmx/mbeanserver/introspector/BeanClass.java b/jdk/test/com/sun/jmx/mbeanserver/introspector/BeanClass.java new file mode 100644 index 00000000000..06746f64923 --- /dev/null +++ b/jdk/test/com/sun/jmx/mbeanserver/introspector/BeanClass.java @@ -0,0 +1,28 @@ +/* + * 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. + */ +public class BeanClass { + public int getNumber() {return 1;} + public boolean isAvailable() {return false;} +} diff --git a/jdk/test/com/sun/jmx/mbeanserver/introspector/SimpleIntrospectorTest.java b/jdk/test/com/sun/jmx/mbeanserver/introspector/SimpleIntrospectorTest.java new file mode 100644 index 00000000000..1b463f585a2 --- /dev/null +++ b/jdk/test/com/sun/jmx/mbeanserver/introspector/SimpleIntrospectorTest.java @@ -0,0 +1,104 @@ + +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. 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. + */ +import java.lang.reflect.Method; + +/* + * @test + * @bug 8129215 + * @summary The test checks whether the SimpleIntrospector is honoring the + * the JavaBeans property naming convention of always starting + * with a lower-case letter + * + * @author Jaroslav Bachorik + * @modules java.management + * @run clean SimpleIntrospectorTest + * @run build SimpleIntrospectorTest BeanClass + * @run main SimpleIntrospectorTest + */ +public class SimpleIntrospectorTest { + private static Method INTROSPECT_GETTER; + + public static void main(String ... args) throws Exception { + Class clz = Class.forName( + "com.sun.jmx.mbeanserver.Introspector$SimpleIntrospector" + ); + INTROSPECT_GETTER = clz.getDeclaredMethod( + "getReadMethod", + Class.class, + String.class + ); + INTROSPECT_GETTER.setAccessible(true); + boolean result = true; + result &= checkNumberValid(); + result &= checkNumberInvalid(); + result &= checkAvailableValid(); + result &= checkAvailableInvalid(); + + if (!result) { + throw new Error(); + } + } + + private static boolean checkNumberValid() throws Exception { + return checkGetter(false, "number"); + } + + private static boolean checkNumberInvalid() throws Exception { + return checkGetter(true, "Number"); + } + + private static boolean checkAvailableValid() throws Exception { + return checkGetter(false, "available"); + } + + private static boolean checkAvailableInvalid() throws Exception { + return checkGetter(true, "Available"); + } + + private static boolean checkGetter(boolean nullExpected, String name) + throws Exception { + Method m = getReadMethod(BeanClass.class, name); + boolean result = (m != null); + if (nullExpected) result = !result; + + if (result) { + return true; + } + if (nullExpected) { + System.err.println("SimpleIntrospector resolved an unknown getter " + + "for attribute '"+ name +"'"); + } else { + System.err.println("SimpleIntrospector fails to resolve getter " + + "for attribute '"+ name +"'"); + } + return false; + } + + private static Method getReadMethod(Class clz, String attr) + throws Exception { + return (Method)INTROSPECT_GETTER.invoke(null, clz, attr); + } +} From abd5c879c5a8bf862944ff9348a6bbc6640c7004 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Fri, 31 Jul 2015 15:36:19 +0200 Subject: [PATCH 29/71] 8129976: RunFinalizationTest.java times out frequently Reviewed-by: sspitsyn --- .../dcmd/gc/RunFinalizationTest.java | 73 ++++++++++--------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java b/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java index 21606a83b7c..bc34351974c 100644 --- a/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java +++ b/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java @@ -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 @@ import jdk.test.lib.dcmd.JMXExecutor; * 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); } } From 26cd440c5591b51f53c060481078570fe5545515 Mon Sep 17 00:00:00 2001 From: Zoltan Majo Date: Mon, 3 Aug 2015 09:39:29 +0200 Subject: [PATCH 30/71] 8132457: Unify command-line flags controlling the usage of compiler intrinsics Cleanup processing of command-line flags controlling intrinsics. Reviewed-by: kvn --- hotspot/src/share/vm/c1/c1_Compiler.cpp | 23 ------ hotspot/src/share/vm/c1/c1_Compiler.hpp | 9 --- hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 12 ++- hotspot/src/share/vm/classfile/vmSymbols.cpp | 68 ++++++++++++++-- hotspot/src/share/vm/classfile/vmSymbols.hpp | 7 +- .../share/vm/compiler/abstractCompiler.hpp | 14 +--- hotspot/src/share/vm/opto/c2_globals.hpp | 3 - hotspot/src/share/vm/opto/c2compiler.cpp | 80 ------------------- hotspot/src/share/vm/opto/c2compiler.hpp | 15 +--- hotspot/src/share/vm/opto/library_call.cpp | 2 +- hotspot/src/share/vm/runtime/globals.hpp | 3 + 11 files changed, 88 insertions(+), 148 deletions(-) diff --git a/hotspot/src/share/vm/c1/c1_Compiler.cpp b/hotspot/src/share/vm/c1/c1_Compiler.cpp index 84a7bd09682..dad6edb35b3 100644 --- a/hotspot/src/share/vm/c1/c1_Compiler.cpp +++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp @@ -239,25 +239,6 @@ bool Compiler::is_intrinsic_supported(methodHandle method) { 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::compile_method(ciEnv* env, ciMethod* method, int entry_bci) { 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); -} diff --git a/hotspot/src/share/vm/c1/c1_Compiler.hpp b/hotspot/src/share/vm/c1/c1_Compiler.hpp index 8b8c8d414e3..96a6bad4f5e 100644 --- a/hotspot/src/share/vm/c1/c1_Compiler.hpp +++ b/hotspot/src/share/vm/c1/c1_Compiler.hpp @@ -55,18 +55,9 @@ class Compiler: public AbstractCompiler { // 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(); }; diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp index e607b02febc..f3b25e8fa41 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp @@ -3491,8 +3491,16 @@ void GraphBuilder::build_graph_for_intrinsic(ciMethod* callee) { 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. diff --git a/hotspot/src/share/vm/classfile/vmSymbols.cpp b/hotspot/src/share/vm/classfile/vmSymbols.cpp index 1a968acc82c..cbbc4122853 100644 --- a/hotspot/src/share/vm/classfile/vmSymbols.cpp +++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp @@ -417,8 +417,59 @@ int vmIntrinsics::predicates_needed(vmIntrinsics::ID id) { } } -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 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { 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 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { 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 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { 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 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) { 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; diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp index 9e67c5012e0..8017edd3905 100644 --- a/hotspot/src/share/vm/classfile/vmSymbols.hpp +++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp @@ -1384,10 +1384,9 @@ public: // '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 diff --git a/hotspot/src/share/vm/compiler/abstractCompiler.hpp b/hotspot/src/share/vm/compiler/abstractCompiler.hpp index e3a727b0886..41c155d09a3 100644 --- a/hotspot/src/share/vm/compiler/abstractCompiler.hpp +++ b/hotspot/src/share/vm/compiler/abstractCompiler.hpp @@ -75,8 +75,8 @@ class AbstractCompiler : public CHeapObj { // // 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 @@ class AbstractCompiler : public CHeapObj { // 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 @@ class AbstractCompiler : public CHeapObj { 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; } diff --git a/hotspot/src/share/vm/opto/c2_globals.hpp b/hotspot/src/share/vm/opto/c2_globals.hpp index 4c6824cf3f9..779c01e57c5 100644 --- a/hotspot/src/share/vm/opto/c2_globals.hpp +++ b/hotspot/src/share/vm/opto/c2_globals.hpp @@ -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") \ \ diff --git a/hotspot/src/share/vm/opto/c2compiler.cpp b/hotspot/src/share/vm/opto/c2compiler.cpp index 64ac374d00d..8da6995d80c 100644 --- a/hotspot/src/share/vm/opto/c2compiler.cpp +++ b/hotspot/src/share/vm/opto/c2compiler.cpp @@ -157,14 +157,6 @@ void C2Compiler::print_timers() { 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 @@ bool C2Compiler::is_intrinsic_supported(methodHandle method, bool is_virtual) { 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; diff --git a/hotspot/src/share/vm/opto/c2compiler.hpp b/hotspot/src/share/vm/opto/c2compiler.hpp index d651b1de0e5..f8308190444 100644 --- a/hotspot/src/share/vm/opto/c2compiler.hpp +++ b/hotspot/src/share/vm/opto/c2compiler.hpp @@ -51,11 +51,11 @@ public: // 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 @@ public: // 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(); }; diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp index 23b993edcbd..417135b7c54 100644 --- a/hotspot/src/share/vm/opto/library_call.cpp +++ b/hotspot/src/share/vm/opto/library_call.cpp @@ -327,7 +327,7 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) { 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) { diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index daec828a2c0..502aab6eca8 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -855,6 +855,9 @@ public: 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") \ \ From bdc4e4d0450dd45fe179b5b31e499f2d0f8eddfc Mon Sep 17 00:00:00 2001 From: Andrew Dinn Date: Mon, 3 Aug 2015 05:05:40 -0400 Subject: [PATCH 31/71] 8132875: AArch64: Fix error introduced into AArch64 CodeCache by commit for 8130309 The fix for issue 8130309 introduced several errors into the AArch64 codecache routines Reviewed-by: aph, thartmann, kvn --- hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp | 2 +- hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp | 3 +++ hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp index d6f7abc7ea1..bdfc017aa82 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/c1_CodeStubs_aarch64.cpp @@ -334,7 +334,7 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) { relocInfo::static_call_type); address call = __ trampoline_call(resolve); if (call == NULL) { - bailout("trampoline stub overflow"); + ce->bailout("trampoline stub overflow"); return; } ce->add_call_info_here(info()); diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp index d6d323857d3..6d7e27e617b 100644 --- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp +++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.hpp @@ -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; diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp index 3c2cf60abc1..2bd4127cd50 100644 --- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp +++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp @@ -685,7 +685,8 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) { } else { bl(pc()); } - return start_offset; + // just need to return a non-null address + return pc(); } From 2bf01467e3eb2036967a155ee4d531798fc300a9 Mon Sep 17 00:00:00 2001 From: Staffan Larsen Date: Mon, 3 Aug 2015 11:12:57 +0200 Subject: [PATCH 32/71] 8132876: Increase PerfDataMemorySize to 64K Reviewed-by: sspitsyn --- hotspot/src/share/vm/runtime/globals.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index d2982e0d422..62bb586d98c 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -3913,7 +3913,7 @@ public: 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.") \ \ From e4c4b49bdffee5776d57f62c5780320739644388 Mon Sep 17 00:00:00 2001 From: Olivier Lagneau Date: Mon, 3 Aug 2015 15:31:29 +0200 Subject: [PATCH 33/71] 8130339: Add tracing info to LowMemoryTest.java to help 8130339 diagnosis Run test with traces even when timeout occurs. Reviewed-by: jbachorik, sspitsyn --- .../MemoryMXBean/LowMemoryTest.java | 98 +++++++++++++++++-- 1 file changed, 89 insertions(+), 9 deletions(-) diff --git a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java index 7c6eb0bb5b8..5e8bda4cd86 100644 --- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java +++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest.java @@ -33,7 +33,7 @@ * @library /lib/testlibrary/ * @modules java.management * @build jdk.testlibrary.* LowMemoryTest MemoryUtil RunUtil - * @run main/timeout=600 LowMemoryTest + * @run main/timeout=600 LowMemoryTest * @requires vm.opt.ExplicitGCInvokesConcurrent != "true" * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true" * @requires vm.opt.DisableExplicitGC != "true" @@ -44,6 +44,9 @@ import java.util.*; import java.util.concurrent.Phaser; import javax.management.*; import javax.management.openmbean.CompositeData; +import jdk.testlibrary.ProcessTools; +import jdk.testlibrary.JDKToolFinder; +import jdk.testlibrary.Utils; public class LowMemoryTest { private static final MemoryMXBean mm = ManagementFactory.getMemoryMXBean(); @@ -56,6 +59,7 @@ public class LowMemoryTest { private static final int NUM_CHUNKS = 2; private static final int YOUNG_GEN_SIZE = 8 * 1024 * 1024; private static long chunkSize; + private static final String classMain = "LowMemoryTest$TestMain"; /** * Run the test multiple times with different GC versions. @@ -63,7 +67,6 @@ public class LowMemoryTest { * Then with GC versions specified by the test. */ public static void main(String a[]) throws Throwable { - final String main = "LowMemoryTest$TestMain"; // Use a low young gen size to ensure that the // allocated objects are put in the old gen. final String nmFlag = "-Xmn" + YOUNG_GEN_SIZE; @@ -73,12 +76,75 @@ public class LowMemoryTest { // Prevent G1 from selecting a large heap region size, // since that would change the young gen size. final String g1Flag = "-XX:G1HeapRegionSize=1m"; - RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseSerialGC"); - RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseParallelGC"); - RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseG1GC", g1Flag); - RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC"); + + // Runs the test collecting subprocess I/O while it's running. + traceTest(classMain + ", -XX:+UseSerialGC", nmFlag, lpFlag, "-XX:+UseSerialGC"); + traceTest(classMain + ", -XX:+UseParallelGC", nmFlag, lpFlag, "-XX:+UseParallelGC"); + traceTest(classMain + ", -XX:+UseG1GC", nmFlag, lpFlag, "-XX:+UseG1GC", g1Flag); + traceTest(classMain + ", -XX:+UseConcMarkSweepGC", nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC"); } + /* + * Creating command-line for running subprocess JVM: + * + * JVM command line is like: + * {test_jdk}/bin/java {defaultopts} -cp {test.class.path} {testopts} main + * + * {defaultopts} are the default java options set by the framework. + * + * @param testOpts java options specified by the test. + */ + private static List buildCommandLine(String... testOpts) { + List opts = new ArrayList<>(); + opts.add(JDKToolFinder.getJDKTool("java")); + opts.addAll(Arrays.asList(Utils.getTestJavaOpts())); + opts.add("-cp"); + opts.add(System.getProperty("test.class.path", "test.class.path")); + opts.add("-XX:+PrintGCDetails"); + opts.addAll(Arrays.asList(testOpts)); + opts.add(classMain); + + return opts; + } + + /** + * Runs LowMemoryTest$TestMain with the passed options and redirects subprocess + * standard I/O to the current (parent) process. This provides a trace of what + * happens in the subprocess while it is runnning (and before it terminates). + * + * @param prefixName the prefix string for redirected outputs + * @param testOpts java options specified by the test. + */ + private static void traceTest(String prefixName, + String... testOpts) + throws Throwable { + + // Building command-line + List opts = buildCommandLine(testOpts); + + // We activate all tracing in subprocess + opts.add("trace"); + + // Launch separate JVM subprocess + String[] optsArray = opts.toArray(new String[0]); + ProcessBuilder pb = new ProcessBuilder(optsArray); + System.out.println("\n========= Tracing of subprocess " + prefixName + " ========="); + Process p = ProcessTools.startProcess(prefixName, pb); + + // Handling end of subprocess + try { + int exitCode = p.waitFor(); + if (exitCode != 0) { + throw new RuntimeException( + "Subprocess unexpected exit value of [" + exitCode + "]. Expected 0.\n"); + } + } catch (InterruptedException e) { + throw new RuntimeException("Parent process interrupted with exception : \n " + e + " :" ); + } + + + } + private static volatile boolean listenerInvoked = false; static class SensorListener implements NotificationListener { @Override @@ -204,6 +270,7 @@ public class LowMemoryTest { System.out.println("Setting threshold for " + mpool.getName() + " from " + mpool.getUsageThreshold() + " to " + newThreshold + ". Current used = " + mu.getUsed()); + mpool.setUsageThreshold(newThreshold); if (mpool.getUsageThreshold() != newThreshold) { @@ -236,7 +303,6 @@ public class LowMemoryTest { throw new RuntimeException("TEST FAILED."); System.out.println(RunUtil.successMessage); - } } @@ -298,28 +364,42 @@ public class LowMemoryTest { static class SweeperThread extends Thread { private void doTask() { + int iterations = 0; + if (trace) { + System.out.println("SweeperThread clearing allocated objects."); + } + for (; mpool.getUsage().getUsed() >= mpool.getUsageThreshold();) { // clear all allocated objects and invoke GC objectPool.clear(); mm.gc(); + + if (trace) { + iterations++; + System.out.println("SweeperThread called " + iterations + + " time(s) MemoryMXBean.gc()."); + } + goSleep(100); } } + @Override public void run() { for (int i = 1; i <= NUM_TRIGGERS; i++) { // Sync with AllocatorThread's first phase. phaser.arriveAndAwaitAdvance(); - System.out.println("SweepThread is doing task " + i + + System.out.println("SweeperThread is doing task " + i + " phase " + phaser.getPhase()); + doTask(); listenerInvoked = false; // Sync with AllocatorThread's second phase. phaser.arriveAndAwaitAdvance(); - System.out.println("SweepThread done task " + i + + System.out.println("SweeperThread done task " + i + " phase " + phaser.getPhase()); if (testFailed) return; } From 9bd3fad53c111ae228f67f1fc787116dc78fa9d7 Mon Sep 17 00:00:00 2001 From: Peter Brunet Date: Mon, 3 Aug 2015 15:48:33 -0500 Subject: [PATCH 34/71] 8132249: Clean up JAB debugging code Remove dead code; replace DEBUG_CODE with PrintDebugString; fix typos, incorrect print args Reviewed-by: van --- .../AccessBridgeATInstance.cpp | 2 +- .../AccessBridgeJavaEntryPoints.cpp | 2 +- .../libjavaaccessbridge/JavaAccessBridge.cpp | 47 +++++-------------- .../AccessBridgeJavaVMInstance.cpp | 2 +- .../AccessBridgeWindowsEntryPoints.cpp | 1 - .../WinAccessBridge.cpp | 4 +- 6 files changed, 17 insertions(+), 41 deletions(-) diff --git a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp index 092c4a0b352..e62eb1c983c 100644 --- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeATInstance.cpp @@ -87,7 +87,7 @@ LRESULT AccessBridgeATInstance::initiateIPC() { DWORD errorCode; - PrintDebugString("\r\nin AccessBridgeATInstance::initiateIPC()"); + PrintDebugString("\r\nIn AccessBridgeATInstance::initiateIPC()"); // open Windows-initiated IPC filemap & map it to a ptr diff --git a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp index 952df4f8c55..9131f363136 100644 --- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp @@ -40,7 +40,7 @@ AccessBridgeJavaEntryPoints::AccessBridgeJavaEntryPoints(JNIEnv *jniEnvironment, jobject bridgeObject) { jniEnv = jniEnvironment; accessBridgeObject = (jobject)bridgeObject; - PrintDebugString("AccessBridgeJavaEntryPoints(%X, %X) called", jniEnv, accessBridgeObject); + PrintDebugString("AccessBridgeJavaEntryPoints(%p, %p) called", jniEnv, accessBridgeObject); } diff --git a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp index 41caff41acc..40aba7c3a88 100644 --- a/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libjavaaccessbridge/JavaAccessBridge.cpp @@ -89,27 +89,6 @@ extern "C" { theJavaAccessBridge->javaRun(env, obj); } -#if 0 // SetDlgItemText has caused problems with JAWS - /** - * Append debug info to dialog - * - */ - void AppendToCallInfo(char *s) { - char buffer[4096]; - - PrintDebugString(s); - - GetDlgItemText(theDialogWindow, cCallInfo, buffer, sizeof(buffer)); - if (strlen(buffer) < (sizeof(buffer) - strlen(s))) { - strncat(buffer, s, sizeof(buffer)); - SetDlgItemText(theDialogWindow, cCallInfo, buffer); - } else { - SetDlgItemText(theDialogWindow, cCallInfo, s); - } - } -#endif - - /** * Our window proc * @@ -118,24 +97,23 @@ extern "C" { int command; COPYDATASTRUCT *sentToUs; char *package; - //DEBUG_CODE(char buffer[256]); switch (message) { case WM_INITDIALOG: - //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, "Initializing")); + PrintDebugString("In AccessBridgeDialog - Initializing"); break; case WM_COMMAND: command = LOWORD (wParam); + PrintDebugString("In AccessBridgeDialog - Got WM_COMMAND, command: %X", command); break; // call from Java with data for us to deliver case WM_COPYDATA: if (theDialogWindow == (HWND) wParam) { - //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, "Got WM_COPYDATA from ourselves")); + PrintDebugString("In AccessBridgeDialog - Got WM_COPYDATA from ourselves"); } else { - //DEBUG_CODE(sprintf(buffer, "Got WM_COPYDATA from HWND %p", wParam)); - //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, buffer)); + PrintDebugString("In AccessBridgeDialog - Got WM_COPYDATA from HWND %p", wParam); sentToUs = (COPYDATASTRUCT *) lParam; package = (char *) sentToUs->lpData; theJavaAccessBridge->processPackage(package, sentToUs->cbData); @@ -147,18 +125,16 @@ extern "C" { // wParam == sourceHwnd // lParam == buffer size in shared memory if (theDialogWindow == (HWND) wParam) { - //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, "Got AB_MESSAGE_WAITING from ourselves")); + PrintDebugString("In AccessBridgeDialog - Got AB_MESSAGE_WAITING from ourselves"); } else { - //DEBUG_CODE(sprintf(buffer, "Got AB_MESSAGE_WAITING from HWND %p", wParam)); - //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, buffer)); + PrintDebugString("In AccessBridgeDialog - Got AB_MESSAGE_WAITING from HWND %p", wParam); LRESULT returnVal = theJavaAccessBridge->receiveMemoryPackage((HWND) wParam, (long) lParam); } break; // a JavaAccessBridge DLL is going away case AB_DLL_GOING_AWAY: - // wParam == sourceHwnd - //DEBUG_CODE(SetDlgItemText(theDialogWindow, cStatusText, "Got AB_DLL_GOING_AWAY message")); + PrintDebugString("In AccessBridgeDialog - Got AB_DLL_GOING_AWAY message"); theJavaAccessBridge->WindowsATDestroyed((HWND) wParam); break; @@ -169,6 +145,7 @@ extern "C" { // A new Windows AT just said "hi"; // say "hi" back so it can mate up with us // otherwise don't do anything (e.g. don't set up data structures yet) + PrintDebugString("In AccessBridgeDialog - Got theFromWindowsHelloMsgID message"); theJavaAccessBridge->postHelloToWindowsDLLMsg((HWND) wParam); } } @@ -324,9 +301,9 @@ JavaAccessBridge::initWindow() { */ void JavaAccessBridge::postHelloToWindowsDLLMsg(HWND destHwnd) { - PrintDebugString("\r\nin JavaAccessBridge::postHelloToWindowsDLLMsg"); + PrintDebugString("\r\nIn JavaAccessBridge::postHelloToWindowsDLLMsg"); PrintDebugString(" calling PostMessage(%p, %X, %p, %p)", - destHwnd, theFromJavaHelloMsgID, dialogWindow, javaVM); + destHwnd, theFromJavaHelloMsgID, dialogWindow, dialogWindow); PostMessage(destHwnd, theFromJavaHelloMsgID, (WPARAM) dialogWindow, (LPARAM) dialogWindow); } @@ -2493,7 +2470,7 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, jobject eventObj, jobject source) { \ \ PrintDebugString("\r\nFiring event id = %d(%p, %p, %p, %p); vmID = %X", \ - eventConstant, env, callingObj, eventObj, source, javaVM); \ + eventConstant, env, callingObj, eventObj, source, dialogWindow); \ \ /* sanity check */ \ if (ATs == (AccessBridgeATInstance *) 0) { \ @@ -2531,7 +2508,7 @@ JavaAccessBridge::firePropertyTableModelChange(JNIEnv *env, jobject callingObj, void JavaAccessBridge::javaShutdown(JNIEnv *env, jobject callingObj) { PrintDebugString("\r\nFiring event id = %d(%p, %p); vmID = %X", - cJavaShutdownEvent, env, callingObj, javaVM); + cJavaShutdownEvent, env, callingObj, dialogWindow); /* sanity check */ if (ATs == (AccessBridgeATInstance *) 0) { diff --git a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp index 7294a3e5c6b..129cf144fb4 100644 --- a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp @@ -188,7 +188,7 @@ AccessBridgeJavaVMInstance::initiateIPC() { * with the Java AccessBridge DLL * * NOTE: WM_COPYDATA is only for one-way IPC; there - * is now way to return parameters (especially big ones) + * is no way to return parameters (especially big ones) * Use sendMemoryPackage() to do that! */ LRESULT diff --git a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeWindowsEntryPoints.cpp b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeWindowsEntryPoints.cpp index afd5677550f..22004433b07 100644 --- a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeWindowsEntryPoints.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeWindowsEntryPoints.cpp @@ -51,7 +51,6 @@ extern "C" { // open our window if (theWindowsAccessBridge != (WinAccessBridge *) 0) { theWindowsAccessBridge->initWindow(); - DEBUG_CODE(SetDlgItemText(theDialogWindow, cInvokedByText, "Windows")); } } diff --git a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp index a24e8fa45a3..17412f9befd 100644 --- a/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp +++ b/jdk/src/jdk.accessibility/windows/native/libwindowsaccessbridge/WinAccessBridge.cpp @@ -366,7 +366,7 @@ LRESULT WinAccessBridge::rendezvousWithNewJavaDLL(HWND JavaBridgeDLLwindow, long vmID) { LRESULT returnVal; - PrintDebugString("in JavaAccessBridge::rendezvousWithNewJavaDLL(%p, %X)", + PrintDebugString("in WinAccessBridge::rendezvousWithNewJavaDLL(%p, %X)", JavaBridgeDLLwindow, vmID); isVMInstanceChainInUse = true; @@ -880,7 +880,7 @@ WinAccessBridge::isJavaWindow(HWND window) { return FALSE; } - PrintDebugString(" in WinAccessBridge::isJavaWindow"); + PrintDebugString("In WinAccessBridge::isJavaWindow"); From 8dfd822c414db2be27843dcb9f6514eb7e3497c2 Mon Sep 17 00:00:00 2001 From: David Holmes Date: Mon, 3 Aug 2015 16:54:08 -0400 Subject: [PATCH 35/71] 8080298: Clean up os::...::supports_variable_stack_size() Reviewed-by: kbarrett, simonis, stuefe, coleenp --- hotspot/src/os/aix/vm/os_aix.cpp | 46 ++++++++-------- hotspot/src/os/aix/vm/os_aix.hpp | 2 - hotspot/src/os/bsd/vm/os_bsd.cpp | 53 +++++++++---------- hotspot/src/os/bsd/vm/os_bsd.hpp | 4 +- hotspot/src/os/linux/vm/os_linux.cpp | 52 +++++++++--------- hotspot/src/os/linux/vm/os_linux.hpp | 2 - hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp | 6 +-- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp | 6 +-- .../src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp | 6 +-- .../linux_aarch64/vm/os_linux_aarch64.cpp | 5 +- .../src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp | 2 - .../os_cpu/linux_sparc/vm/os_linux_sparc.cpp | 5 +- .../src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 5 -- .../os_cpu/linux_zero/vm/os_linux_zero.cpp | 6 +-- 14 files changed, 77 insertions(+), 123 deletions(-) diff --git a/hotspot/src/os/aix/vm/os_aix.cpp b/hotspot/src/os/aix/vm/os_aix.cpp index c78577c542f..f2c3933f35f 100644 --- a/hotspot/src/os/aix/vm/os_aix.cpp +++ b/hotspot/src/os/aix/vm/os_aix.cpp @@ -971,34 +971,32 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) { 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); + 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(); + 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); diff --git a/hotspot/src/os/aix/vm/os_aix.hpp b/hotspot/src/os/aix/vm/os_aix.hpp index faba5c2b45e..8e96dd9f6c5 100644 --- a/hotspot/src/os/aix/vm/os_aix.hpp +++ b/hotspot/src/os/aix/vm/os_aix.hpp @@ -131,8 +131,6 @@ class Aix { 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; } diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp index 8f935d85c05..1c243ae387f 100644 --- a/hotspot/src/os/bsd/vm/os_bsd.cpp +++ b/hotspot/src/os/bsd/vm/os_bsd.cpp @@ -739,40 +739,35 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) { 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); + // 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(); + 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; { diff --git a/hotspot/src/os/bsd/vm/os_bsd.hpp b/hotspot/src/os/bsd/vm/os_bsd.hpp index 8c6dbb78888..8b48cb78cf0 100644 --- a/hotspot/src/os/bsd/vm/os_bsd.hpp +++ b/hotspot/src/os/bsd/vm/os_bsd.hpp @@ -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 @@ class Bsd { 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* cpu_to_node() { return _cpu_to_node; } diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index 3b198380646..bd4aa14b32f 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -711,39 +711,35 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, 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); + // 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(); + 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)); diff --git a/hotspot/src/os/linux/vm/os_linux.hpp b/hotspot/src/os/linux/vm/os_linux.hpp index 9128344ace2..b8104e75ebc 100644 --- a/hotspot/src/os/linux/vm/os_linux.hpp +++ b/hotspot/src/os/linux/vm/os_linux.hpp @@ -83,8 +83,6 @@ class Linux { 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* cpu_to_node() { return _cpu_to_node; } diff --git a/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp b/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp index 9381b5dcd17..d8829b51c6f 100644 --- a/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp +++ b/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp @@ -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 @@ void os::Aix::init_thread_fpu_state(void) { 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) diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp index 4b2da94715a..423fea33748 100644 --- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp +++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @@ -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 @@ bool os::is_allocatable(size_t bytes) { #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 @@ size_t os::Bsd::min_stack_allowed = (48 DEBUG_ONLY(+4))*K; #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 diff --git a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp index 0ed05eb9a76..9b2db238c0e 100644 --- a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp +++ b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp @@ -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 @@ bool os::is_allocatable(size_t bytes) { 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); diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp index 2d116ef212c..3a3ffd9fb30 100644 --- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp +++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp @@ -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 @@ bool os::is_allocatable(size_t bytes) { 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) diff --git a/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp b/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp index a605d147bd4..ebf67a09f3a 100644 --- a/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp +++ b/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp @@ -467,8 +467,6 @@ void os::Linux::set_fpu_control_word(int fpu_control) { 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) diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp index e733cc9e6ab..0c1c6263586 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp @@ -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 @@ bool os::is_allocatable(size_t bytes) { 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) diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp index 700c6a762a7..decb51ea74f 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp @@ -623,11 +623,6 @@ size_t os::Linux::min_stack_allowed = 64 * K; 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) diff --git a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp index 08c46153e5f..5473f8aa44d 100644 --- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp +++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp @@ -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 @@ bool os::is_allocatable(size_t bytes) { 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); From 861ba88c865e865b17d539495f4b612903c9dfe1 Mon Sep 17 00:00:00 2001 From: Alexander Zvegintsev Date: Tue, 4 Aug 2015 12:34:08 +0300 Subject: [PATCH 36/71] 8130400: Test java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java fails with ClassCastException Reviewed-by: prr, serb --- .../classes/sun/java2d/xr/XRDrawImage.java | 28 +++++++++++-------- .../IncorrectClipXorModeSurface2Surface.java | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRDrawImage.java b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRDrawImage.java index ea8edbb391a..69502f2ee2a 100644 --- a/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRDrawImage.java +++ b/jdk/src/java.desktop/unix/classes/sun/java2d/xr/XRDrawImage.java @@ -46,24 +46,28 @@ public class XRDrawImage extends DrawImage { SurfaceData dstData = sg.surfaceData; SurfaceData srcData = dstData.getSourceSurfaceData(img, SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor); - int compRule = ((AlphaComposite) sg.composite).getRule(); - float extraAlpha = ((AlphaComposite) sg.composite).getAlpha(); - if (srcData != null && !isBgOperation(srcData, bgColor) + if (sg.composite instanceof AlphaComposite) { + int compRule = ((AlphaComposite) sg.composite).getRule(); + float extraAlpha = ((AlphaComposite) sg.composite).getAlpha(); + + if (srcData != null && !isBgOperation(srcData, bgColor) && interpType <= AffineTransformOp.TYPE_BILINEAR && (XRUtils.isMaskEvaluated(XRUtils.j2dAlphaCompToXR(compRule)) - || (XRUtils.isTransformQuadrantRotated(tx)) && extraAlpha == 1.0f)) - { - SurfaceType srcType = srcData.getSurfaceType(); - SurfaceType dstType = dstData.getSurfaceType(); + || (XRUtils.isTransformQuadrantRotated(tx)) + && extraAlpha == 1.0f)) + { + SurfaceType srcType = srcData.getSurfaceType(); + SurfaceType dstType = dstData.getSurfaceType(); - TransformBlit blit = TransformBlit.getFromCache(srcType, - sg.imageComp, dstType); - if (blit != null) { - blit.Transform(srcData, dstData, sg.composite, - sg.getCompClip(), tx, interpType, sx1, sy1, 0, 0, sx2 + TransformBlit blit = TransformBlit.getFromCache(srcType, + sg.imageComp, dstType); + if (blit != null) { + blit.Transform(srcData, dstData, sg.composite, + sg.getCompClip(), tx, interpType, sx1, sy1, 0, 0, sx2 - sx1, sy2 - sy1); return; + } } } diff --git a/jdk/test/java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java b/jdk/test/java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java index 8a9b1bd1ae7..c23a1cf0968 100644 --- a/jdk/test/java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java +++ b/jdk/test/java/awt/image/DrawImage/IncorrectClipXorModeSurface2Surface.java @@ -40,7 +40,7 @@ import static java.awt.geom.Rectangle2D.Double; /** * @test - * @bug 8061831 + * @bug 8061831 8130400 * @summary Tests drawing volatile image to volatile image using different * clips + xor mode. Results of the blit compatibleImage to * compatibleImage is used for comparison. From 21330b8cf8affa0195173c9897dcf1d2f4ba7493 Mon Sep 17 00:00:00 2001 From: Semyon Sadetsky Date: Tue, 4 Aug 2015 12:58:50 +0300 Subject: [PATCH 37/71] 8130892: Test javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java fails in Solaris Sparcv9 Reviewed-by: alexsch, serb --- .../share/classes/javax/swing/plaf/basic/BasicTextUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java index 4058c912563..2941cc9e85b 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java @@ -940,7 +940,7 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { rootView.setSize(d.width - i.left - i.right - caretMargin, d.height - i.top - i.bottom); } - else if (d.width == 0 || d.height == 0) { + else if (d.width <= 0 || d.height <= 0) { // Probably haven't been layed out yet, force some sort of // initial sizing. rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE); From b215a2b390f93eb59cb6595e0a6160f225fb3672 Mon Sep 17 00:00:00 2001 From: Semyon Sadetsky Date: Tue, 4 Aug 2015 13:14:28 +0300 Subject: [PATCH 38/71] 8132136: [PIT] RTL orientation in JEditorPane is broken Reviewed-by: alexsch, serb --- .../swing/plaf/basic/BasicTextFieldUI.java | 7 +- .../classes/javax/swing/text/GlyphView.java | 19 +--- .../JTextPane/JTextPaneDocumentAlignment.java | 99 +++++++++++++++++++ 3 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 jdk/test/javax/swing/JTextPane/JTextPaneDocumentAlignment.java diff --git a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java index 5a5f119c48a..1db0d09a875 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextFieldUI.java @@ -97,12 +97,7 @@ public class BasicTextFieldUI extends BasicTextUI { String kind = elem.getName(); if (kind != null) { if (kind.equals(AbstractDocument.ContentElementName)) { - return new GlyphView(elem) { - @Override - public int getResizeWeight(int axis) { - return 0; - } - }; + return new GlyphView(elem); } else if (kind.equals(AbstractDocument.ParagraphElementName)) { return new I18nFieldView(elem); } diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java index ccd88f1fc82..31eb62d5d6b 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java @@ -537,17 +537,6 @@ public class GlyphView extends View implements TabableView, Cloneable { } } - /** - * {@inheritDoc} - */ - @Override - public int getResizeWeight(int axis) { - if (axis == View.X_AXIS) { - return 1; - } - return 0; - } - /** * Determines the minimum span for this view along an axis. * @@ -561,11 +550,13 @@ public class GlyphView extends View implements TabableView, Cloneable { */ @Override public float getMinimumSpan(int axis) { + int w = getResizeWeight(axis); + if (w == 0) { + // can't resize + return getPreferredSpan(axis); + } switch (axis) { case View.X_AXIS: - if (getResizeWeight(X_AXIS) == 0) { - return getPreferredSpan(X_AXIS); - } if (minimumSpan < 0) { minimumSpan = 0; int p0 = getStartOffset(); diff --git a/jdk/test/javax/swing/JTextPane/JTextPaneDocumentAlignment.java b/jdk/test/javax/swing/JTextPane/JTextPaneDocumentAlignment.java new file mode 100644 index 00000000000..f75d1c08a28 --- /dev/null +++ b/jdk/test/javax/swing/JTextPane/JTextPaneDocumentAlignment.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + @bug 8132136 + @summary [PIT] RTL orientation in JEditorPane is broken + @author Semyon Sadetsky + */ + +import javax.swing.*; +import javax.swing.text.BadLocationException; +import javax.swing.text.SimpleAttributeSet; +import javax.swing.text.StyleConstants; +import java.awt.*; + +public class JTextPaneDocumentAlignment { + + private static JFrame frame; + private static JTextPane jTextPane; + private static int position; + + public static void main(String[] args) throws Exception{ + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + frame = new JFrame(); + frame.setUndecorated(true); + frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); + frame.setSize(200, 200); + jTextPane = new JTextPane(); + jTextPane.setContentType("text/html"); + jTextPane.setText( + "Test"); + SimpleAttributeSet right = new SimpleAttributeSet(); + StyleConstants.setAlignment(right, StyleConstants.ALIGN_RIGHT); + jTextPane.getStyledDocument() + .setParagraphAttributes(0, 10, right, true); + frame.getContentPane().add(jTextPane); + frame.setVisible(true); + } + }); + Robot robot = new Robot(); + robot.waitForIdle(); + robot.delay(200); + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + try { + position = jTextPane.modelToView(1).x; + SimpleAttributeSet center = new SimpleAttributeSet(); + StyleConstants.setAlignment(center, + StyleConstants.ALIGN_CENTER); + jTextPane.getStyledDocument() + .setParagraphAttributes(0, 10, center, true); + } catch (BadLocationException e) { + e.printStackTrace(); + } + } + }); + if(position < 100) { + throw new RuntimeException("Text is not right aligned " + position); + } + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + try { + position = jTextPane.modelToView(1).x; + } catch (BadLocationException e) { + e.printStackTrace(); + } + frame.dispose(); + } + }); + if(position < 20) { + throw new RuntimeException("Text is not center aligned " + position); + } + System.out.println("ok"); + } +} From 4673cb217ea7c7e4120454ce85e967e6f71c6135 Mon Sep 17 00:00:00 2001 From: Bengt Rutisson Date: Tue, 4 Aug 2015 12:58:54 +0200 Subject: [PATCH 39/71] 8132953: imageDecompressor.hpp should not include precompiled.hpp Reviewed-by: dholmes --- hotspot/src/share/vm/classfile/imageDecompressor.cpp | 2 +- hotspot/src/share/vm/classfile/imageDecompressor.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/classfile/imageDecompressor.cpp b/hotspot/src/share/vm/classfile/imageDecompressor.cpp index 68c5c56f2a4..d6339500234 100644 --- a/hotspot/src/share/vm/classfile/imageDecompressor.cpp +++ b/hotspot/src/share/vm/classfile/imageDecompressor.cpp @@ -22,8 +22,8 @@ * */ -#include "runtime/thread.inline.hpp" #include "precompiled.hpp" +#include "runtime/thread.inline.hpp" #include "classfile/imageDecompressor.hpp" #include "runtime/thread.hpp" #include "utilities/bytes.hpp" diff --git a/hotspot/src/share/vm/classfile/imageDecompressor.hpp b/hotspot/src/share/vm/classfile/imageDecompressor.hpp index c57a8523fdf..6fca341b003 100644 --- a/hotspot/src/share/vm/classfile/imageDecompressor.hpp +++ b/hotspot/src/share/vm/classfile/imageDecompressor.hpp @@ -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" From de096038636476268a4e159c7642b0996e3dbe6b Mon Sep 17 00:00:00 2001 From: Alexander Stepanov Date: Tue, 4 Aug 2015 14:03:49 +0300 Subject: [PATCH 40/71] 8131055: bean annotations: add a test checking if a user-defined BeanInfo is top-priority as compared with the annotations Reviewed-by: alexsch, serb --- .../4058433/TestBeanInfoPriority.java | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 jdk/test/java/beans/Introspector/4058433/TestBeanInfoPriority.java diff --git a/jdk/test/java/beans/Introspector/4058433/TestBeanInfoPriority.java b/jdk/test/java/beans/Introspector/4058433/TestBeanInfoPriority.java new file mode 100644 index 00000000000..589e9c06696 --- /dev/null +++ b/jdk/test/java/beans/Introspector/4058433/TestBeanInfoPriority.java @@ -0,0 +1,294 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + + +import java.awt.event.ActionListener; +import java.awt.event.MouseListener; +import java.beans.BeanDescriptor; +import java.beans.BeanInfo; +import java.beans.BeanProperty; +import java.beans.EventSetDescriptor; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.JavaBean; +import java.beans.MethodDescriptor; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; +import javax.swing.SwingContainer; +import java.util.Arrays; + +/** + * @test + * @bug 4058433 8131055 + * @summary Check if the user-defined bean info + * is not overridden with the annotated one. + * @author a.stepanov + */ + + +public class TestBeanInfoPriority { + + // ========== test bean (annotations must be ignored!) ========== + + @JavaBean( + description = "annotation-description", + defaultProperty = "other", + defaultEventSet = "mouse") + @SwingContainer(value = false) + public static class TestClass { + + private int value; + private double other; + + @BeanProperty( + bound = false, + expert = false, + hidden = false, + preferred = false, + required = false, + visualUpdate = false, + description = "annotation-value", + enumerationValues = { + "javax.swing.SwingConstants.NORTH"} + ) + public void setValue(int v) { value = v; } + public int getValue() { return value; } + + + @BeanProperty( + bound = true, + expert = true, + hidden = true, + preferred = true, + required = true, + visualUpdate = true, + description = "annotation-other", + enumerationValues = { + "javax.swing.SwingConstants.LEFT", + "javax.swing.SwingConstants.RIGHT", + "javax.swing.SwingConstants.CENTER"} + ) + public void setOther(double o) { other = o; } + public double getOther() { return other; } + + public void addActionListener(ActionListener l) {} + public void removeActionListener(ActionListener l) {} + + public void addMouseListener(MouseListener l) {} + public void removeMouseListener(MouseListener l) {} + } + + // ========== user-defined bean info ========== + + public static class TestClassBeanInfo extends SimpleBeanInfo { + + private static final int iOther = 0; + private static final int iValue = 1; + + private static final int iAction = 0; + private static final int iMouse = 1; + + + @Override + public BeanDescriptor getBeanDescriptor() { + + BeanDescriptor bd = new BeanDescriptor(TestClass.class, null); + bd.setShortDescription("user-defined-description"); + bd.setValue("isContainer", true); + bd.setValue("containerDelegate", "user-defined-delegate"); + + return bd; + } + + @Override + public PropertyDescriptor[] getPropertyDescriptors() { + + PropertyDescriptor[] p = new PropertyDescriptor[2]; + + try { + + // value + PropertyDescriptor pdValue = new PropertyDescriptor( + "value", TestClass.class, "getValue", "setValue"); + pdValue.setBound(true); + pdValue.setConstrained(true); + pdValue.setExpert(true); + pdValue.setHidden(true); + pdValue.setPreferred(true); + pdValue.setValue("required", true); + pdValue.setValue("visualUpdate", true); + pdValue.setShortDescription("user-defined-value"); + pdValue.setValue("enumerationValues", new Object[]{ + "EAST", 3, "javax.swing.SwingConstants.EAST", + "WEST", 7, "javax.swing.SwingConstants.WEST"}); + p[iValue] = pdValue; + + // other + PropertyDescriptor pdOther = new PropertyDescriptor( + "other", TestClass.class, "getOther", "setOther"); + pdOther.setBound(false); + pdOther.setConstrained(false); + pdOther.setExpert(false); + pdOther.setHidden(false); + pdOther.setPreferred(false); + pdOther.setValue("required", false); + pdOther.setValue("visualUpdate", false); + pdOther.setShortDescription("user-defined-other"); + pdOther.setValue("enumerationValues", new Object[]{ + "TOP", 1, "javax.swing.SwingConstants.TOP"}); + p[iOther] = pdOther; + + } catch(IntrospectionException e) { + e.printStackTrace(); + } + + return p; + } + + @Override + public EventSetDescriptor[] getEventSetDescriptors() { + EventSetDescriptor[] es = new EventSetDescriptor[2]; + try { + es[iAction] = new EventSetDescriptor( + TestClass.class, + "actionListener", + java.awt.event.ActionListener.class, + new String[] {"actionPerformed"}, + "addActionListener", + "removeActionListener"); + es[iMouse] = new EventSetDescriptor( + TestClass.class, + "mouseListener", + java.awt.event.MouseListener.class, + new String[] {"mouseClicked", "mousePressed", "mouseReleased", "mouseEntered", "mouseExited"}, + "addMouseListener", + "removeMouseListener"); + } catch(IntrospectionException e) { + e.printStackTrace(); + } + return es; + } + + @Override + public MethodDescriptor[] getMethodDescriptors() { + MethodDescriptor[] m = new MethodDescriptor[0]; + return m; + } + + @Override + public int getDefaultPropertyIndex() { return iValue; } // default: value + + @Override + public int getDefaultEventIndex() { return iAction; } // default: action + + @Override + public java.awt.Image getIcon(int iconKind) { return null; } + } + + // ========== auxiliary functions ========== + + static void checkEq(String what, Object v, Object ref) throws Exception { + + if ((v != null) && v.equals(ref)) { + System.out.println(what + ": ok (" + ref.toString() + ")"); + } else { + throw new Exception( + "invalid " + what + ", expected: \"" + ref + "\", got: \"" + v + "\""); + } + } + + static void checkEnumEq(String what, Object v, Object ref[]) throws Exception { + + what = "\"" + what + "\""; + if (v == null) { + throw new Exception("null " + what + " enumeration values"); + } + + String msg = "invalid " + what + " enumeration values"; + if (!(v instanceof Object[])) { throw new Exception(msg); } + + if (Arrays.equals((Object []) v, ref)) { + System.out.println(what + " enumeration values: ok"); + } else { throw new Exception(msg); } + } + + + // ========== test ========== + + + public static void main(String[] args) throws Exception { + + BeanInfo i = Introspector.getBeanInfo(TestClass.class, Object.class); + BeanDescriptor bd = i.getBeanDescriptor(); + + checkEq("description", bd.getShortDescription(), "user-defined-description"); + checkEq("default property index", i.getDefaultPropertyIndex(), 1); + checkEq("default event index", i.getDefaultEventIndex(), 0); + + checkEq("isContainer", i.getBeanDescriptor().getValue("isContainer"), true); + checkEq("containerDelegate", + i.getBeanDescriptor().getValue("containerDelegate"), "user-defined-delegate"); + System.out.println(""); + + PropertyDescriptor[] pds = i.getPropertyDescriptors(); + for (PropertyDescriptor pd: pds) { + String name = pd.getName(); + switch (name) { + case "value": + checkEq("\"value\" isBound", pd.isBound(), true); + checkEq("\"value\" isConstrained", pd.isConstrained(), true); + checkEq("\"value\" isExpert", pd.isExpert(), true); + checkEq("\"value\" isHidden", pd.isHidden(), true); + checkEq("\"value\" isPreferred", pd.isPreferred(), true); + checkEq("\"value\" required", pd.getValue("required"), true); + checkEq("\"value\" visualUpdate", pd.getValue("visualUpdate"), true); + + checkEq("\"value\" description", pd.getShortDescription(), "user-defined-value"); + + checkEnumEq(pd.getName(), pd.getValue("enumerationValues"), + new Object[]{ + "EAST", 3, "javax.swing.SwingConstants.EAST", + "WEST", 7, "javax.swing.SwingConstants.WEST"}); + System.out.println(""); + break; + case "other": + checkEq("\"other\" isBound", pd.isBound(), false); + checkEq("\"other\" isConstrained", pd.isConstrained(), false); + checkEq("\"other\" isExpert", pd.isExpert(), false); + checkEq("\"other\" isHidden", pd.isHidden(), false); + checkEq("\"other\" isPreferred", pd.isPreferred(), false); + checkEq("\"other\" required", pd.getValue("required"), false); + checkEq("\"other\" visualUpdate", pd.getValue("visualUpdate"), false); + + checkEq("\"other\" description", pd.getShortDescription(), "user-defined-other"); + + checkEnumEq(pd.getName(), pd.getValue("enumerationValues"), + new Object[]{"TOP", 1, "javax.swing.SwingConstants.TOP"}); + System.out.println(""); + break; + default: + throw new Exception("invalid property descriptor: " + name); + } + } + } +} From b9a10bbf8d79d4f2c51410e3e925ea0f4f721e1e Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Thu, 6 Aug 2015 18:20:11 -0700 Subject: [PATCH 41/71] 8133044: [TESTBUG] CLDRDisplayNameTest uses deprecated API, fails Reviewed-by: okutsu --- jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java b/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java index aae1c639d73..b6038ac90b2 100644 --- a/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java +++ b/jdk/test/java/util/TimeZone/CLDRDisplayNamesTest.java @@ -109,9 +109,6 @@ public class CLDRDisplayNamesTest { fmtROOT.parse("Thu Nov 13 04:35:51 AKST 2008"); fmtUS.parse("Thu Nov 13 04:35:51 AKST 2008"); fmtUK.parse("Thu Nov 13 04:35:51 GMT-09:00 2008"); - String dateString = new Date().toString(); - System.out.println("Date: "+dateString); - System.out.println("Parsed Date: "+new Date(Date.parse(dateString)).toString()); } catch (ParseException pe) { System.err.println(pe); errors++; From 0ee85af4ecdfddb91f10a6c041599c7a09359d9b Mon Sep 17 00:00:00 2001 From: Volker Simonis Date: Fri, 7 Aug 2015 10:25:19 +0200 Subject: [PATCH 42/71] 8132551: Initialize local varibales before returning them in p11_convert.c Reviewed-by: wetmore --- .../share/native/libj2pkcs11/p11_convert.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_convert.c b/jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_convert.c index 89842582b82..78e52a20404 100644 --- a/jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_convert.c +++ b/jdk/src/jdk.crypto.pkcs11/share/native/libj2pkcs11/p11_convert.c @@ -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 (c) 2002 Graz University of Technology. All rights reserved. @@ -474,6 +474,7 @@ CK_SSL3_MASTER_KEY_DERIVE_PARAMS jSsl3MasterKeyDeriveParamToCKSsl3MasterKeyDeriv jfieldID fieldID; jclass jSsl3RandomDataClass; jobject jRandomInfo, jRIClientRandom, jRIServerRandom, jVersion; + memset(&ckParam, 0, sizeof(CK_SSL3_MASTER_KEY_DERIVE_PARAMS)); /* get RandomInfo */ jSsl3MasterKeyDeriveParamsClass = (*env)->FindClass(env, CLASS_SSL3_MASTER_KEY_DERIVE_PARAMS); @@ -527,6 +528,7 @@ CK_TLS_PRF_PARAMS jTlsPrfParamsToCKTlsPrfParam(JNIEnv *env, jobject jParam) CK_TLS_PRF_PARAMS ckParam; jfieldID fieldID; jobject jSeed, jLabel, jOutput; + memset(&ckParam, 0, sizeof(CK_TLS_PRF_PARAMS)); // TBD: what if jParam == NULL?! @@ -592,6 +594,7 @@ CK_SSL3_KEY_MAT_PARAMS jSsl3KeyMatParamToCKSsl3KeyMatParam(JNIEnv *env, jobject jobject jRandomInfo, jRIClientRandom, jRIServerRandom; jobject jReturnedKeyMaterial, jRMIvClient, jRMIvServer; CK_ULONG ckTemp; + memset(&ckParam, 0, sizeof(CK_SSL3_KEY_MAT_PARAMS)); /* get ulMacSizeInBits */ jSsl3KeyMatParamsClass = (*env)->FindClass(env, CLASS_SSL3_KEY_MAT_PARAMS); @@ -1355,6 +1358,7 @@ CK_RSA_PKCS_OAEP_PARAMS jRsaPkcsOaepParamToCKRsaPkcsOaepParam(JNIEnv *env, jobje jlong jHashAlg, jMgf, jSource; jobject jSourceData; CK_BYTE_PTR ckpByte; + memset(&ckParam, 0, sizeof(CK_RSA_PKCS_OAEP_PARAMS)); /* get hashAlg */ jRsaPkcsOaepParamsClass = (*env)->FindClass(env, CLASS_RSA_PKCS_OAEP_PARAMS); @@ -1404,6 +1408,7 @@ CK_PBE_PARAMS jPbeParamToCKPbeParam(JNIEnv *env, jobject jParam) jlong jIteration; jobject jInitVector, jPassword, jSalt; CK_ULONG ckTemp; + memset(&ckParam, 0, sizeof(CK_PBE_PARAMS)); /* get pInitVector */ jPbeParamsClass = (*env)->FindClass(env, CLASS_PBE_PARAMS); @@ -1522,6 +1527,7 @@ CK_PKCS5_PBKD2_PARAMS jPkcs5Pbkd2ParamToCKPkcs5Pbkd2Param(JNIEnv *env, jobject j jfieldID fieldID; jlong jSaltSource, jIteration, jPrf; jobject jSaltSourceData, jPrfData; + memset(&ckParam, 0, sizeof(CK_PKCS5_PBKD2_PARAMS)); /* get saltSource */ jPkcs5Pbkd2ParamsClass = (*env)->FindClass(env, CLASS_PKCS5_PBKD2_PARAMS); @@ -1734,6 +1740,7 @@ CK_X9_42_DH1_DERIVE_PARAMS jX942Dh1DeriveParamToCKX942Dh1DeriveParam(JNIEnv *env jfieldID fieldID; jlong jKdf; jobject jOtherInfo, jPublicData; + memset(&ckParam, 0, sizeof(CK_X9_42_DH1_DERIVE_PARAMS)); /* get kdf */ jX942Dh1DeriveParamsClass = (*env)->FindClass(env, CLASS_X9_42_DH1_DERIVE_PARAMS); @@ -1779,6 +1786,7 @@ CK_X9_42_DH2_DERIVE_PARAMS jX942Dh2DeriveParamToCKX942Dh2DeriveParam(JNIEnv *env jfieldID fieldID; jlong jKdf, jPrivateDataLen, jPrivateData; jobject jOtherInfo, jPublicData, jPublicData2; + memset(&ckParam, 0, sizeof(CK_X9_42_DH2_DERIVE_PARAMS)); /* get kdf */ jX942Dh2DeriveParamsClass = (*env)->FindClass(env, CLASS_X9_42_DH2_DERIVE_PARAMS); From f0c2f2479357580a7da8e58d0fefe07fc2f5c729 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 7 Aug 2015 07:10:44 -0700 Subject: [PATCH 43/71] 8080115: (fs) Crash in libgio when calling Files.probeContentType(path) from parallel threads Make GnomeFileTypeDetector.probeGio() synchronized and add a regression test based on the test source included in JDK-8080115. Reviewed-by: chegar --- .../sun/nio/fs/GnomeFileTypeDetector.java | 2 +- .../probeContentType/ParallelProbes.java | 96 +++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java diff --git a/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java b/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java index 7d120e45e45..88c6839e492 100644 --- a/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java +++ b/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java @@ -67,7 +67,7 @@ public class GnomeFileTypeDetector // GIO private static native boolean initializeGio(); - private static native byte[] probeGio(long pathAddress); + private static synchronized native byte[] probeGio(long pathAddress); static { AccessController.doPrivileged(new PrivilegedAction<>() { diff --git a/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java b/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java new file mode 100644 index 00000000000..bfa1ec9227e --- /dev/null +++ b/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; + +/* @test + * @summary Test probing content type simultaneously from multiple threads. + * @requires (os.family == "linux") | (os.family == "solaris") + * @run main/othervm ParallelProbes 10 + */ +public class ParallelProbes { + + private static final int REPEATS = 1000; + + private int numThreads = 0; + private ArrayList threads; + + public ParallelProbes(int numThreads) { + System.out.println("Using <" + numThreads + "> threads."); + this.numThreads = numThreads; + this.threads = new ArrayList(numThreads); + } + + private Path createTmpFile() throws IOException { + final Path p = Files.createTempFile("prefix", ".json"); + Files.write(p, "{\"test\"}".getBytes()); + System.out.println("Write test file <" + p + ">"); + return p; + } + + private Runnable createRunnable(final Path p) { + Runnable r = new Runnable() { + public void run() { + for (int i = 0; i < REPEATS; i++) { + try { + System.out.println(Thread.currentThread().getName() + + " -> " + Files.probeContentType(p)); + } catch (IOException ioException) { + ioException.printStackTrace(); + } + } + } + }; + return r; + } + + public void start() throws IOException { + for (int i = 0; i < numThreads; i++) { + final Path p = createTmpFile(); + Runnable r = createRunnable(p); + Thread thread = new Thread(r, "thread-" + i); + thread.start(); + threads.add(thread); + } + } + + public void join() { + for (Thread thread : threads) { + try { + thread.join(); + } catch (InterruptedException e) { + // ignore it and proceed to the next one + } + } + } + + public static void main(String[] args) throws Exception { + ParallelProbes probes = + new ParallelProbes(args.length < 1 ? 1 : Integer.parseInt(args[0])); + probes.start(); + probes.join(); + } +} From e0803f5e68deb2314e95308a527a4db671f3cf5a Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Fri, 7 Aug 2015 16:09:10 -0700 Subject: [PATCH 44/71] 8133207: ParallelProbes.java test fails after changes for JDK-8080115 Do not run in othervm mode. Reviewed-by: darcy, rriggs --- .../java/nio/file/Files/probeContentType/ParallelProbes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java b/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java index bfa1ec9227e..cb1016cdc53 100644 --- a/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java +++ b/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java @@ -29,7 +29,7 @@ import java.util.ArrayList; /* @test * @summary Test probing content type simultaneously from multiple threads. * @requires (os.family == "linux") | (os.family == "solaris") - * @run main/othervm ParallelProbes 10 + * @run main ParallelProbes 10 */ public class ParallelProbes { From 900dc0a49cd6c3a863c21824b17854387a8def72 Mon Sep 17 00:00:00 2001 From: Jan Lahoda Date: Mon, 10 Aug 2015 09:47:35 +0200 Subject: [PATCH 45/71] 8129562: JDK 9 build using boot-jdk classes instead of newly compiled classes Need to specify empty -extdirs and -endorseddirs to javac to avoid loading of boot JDK classes during build. Reviewed-by: tbell, coffeys, jjg, henryjen --- make/CompileJavaModules.gmk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index ea48c7f40f1..8d97cd0aad2 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -512,8 +512,8 @@ JAVA_MODULES := $(ALL_JAVA_MODULES) JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER))) # Create an empty directory to set the bootclasspath to. -EMPTY_BOOTCLASSPATH := $(SUPPORT_OUTPUTDIR)/empty-dir -$(call MakeDir, $(EMPTY_BOOTCLASSPATH)) +EMPTY_DIR := $(SUPPORT_OUTPUTDIR)/empty-dir +$(call MakeDir, $(EMPTY_DIR)) # This macro sets up compilation of a module and declares dependencies for it. # Param 1 - module name @@ -534,7 +534,7 @@ define SetupModuleCompilation $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent) endif $1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH)) - $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_BOOTCLASSPATH) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS) + $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) -classpath "$$($1_CLASSPATH)" $$($1_ADD_JAVAC_FLAGS) $$(eval $$(call SetupJavaCompilation,$1, \ SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \ From 0785d3b590984de0fee8f4590d5a167bee80343b Mon Sep 17 00:00:00 2001 From: Frank Yuan Date: Mon, 10 Aug 2015 09:52:32 -0700 Subject: [PATCH 46/71] 8132660: Change jaxp unit test package name to be different with jaxp api Reviewed-by: joehw --- .../javax/xml/jaxp/unittest/TEST.properties | 6 - .../{javax/xml => }/common/Bug6350682.java | 4 +- .../xml => }/common/Bug6723276Test.java | 4 +- .../{javax/xml => }/common/Bug6941169.xml | 0 .../{javax/xml => }/common/Bug6941169.xsd | 0 .../xml => }/common/Bug6941169Test.java | 4 +- .../xml => }/common/Bug7143711Test.java | 2 +- .../{javax/xml => }/datatype/Bug6320118.java | 4 +- .../xml => }/datatype/Bug6937951Test.java | 8 +- .../xml => }/datatype/Bug6937964Test.java | 8 +- .../xml => }/datatype/Bug7042647Test.java | 8 +- .../datatype/DatatypeFactoryTest.java | 9 +- .../xml => }/datatype/DurationTest.java | 8 +- .../xml => }/datatype/FactoryFindTest.java | 6 +- .../datatype/XMLGregorianCalendarTest.java | 9 +- .../{org/w3c => }/dom/Bug4915524.java | 4 +- .../{org/w3c => }/dom/Bug4915748.java | 4 +- .../{org/w3c => }/dom/Bug4966082.java | 4 +- .../unittest/{org/w3c => }/dom/Bug4966082.xml | 0 .../{org/w3c => }/dom/Bug4966138.java | 4 +- .../{org/w3c => }/dom/Bug4966142.java | 4 +- .../unittest/{org/w3c => }/dom/Bug4966142.xml | 0 .../unittest/{org/w3c => }/dom/Bug4966142.xsd | 0 .../{org/w3c => }/dom/Bug4966143.java | 4 +- .../unittest/{org/w3c => }/dom/Bug4966143.xml | 0 .../unittest/{org/w3c => }/dom/Bug4966143.xsd | 0 .../{org/w3c => }/dom/Bug6339023.java | 4 +- .../{org/w3c => }/dom/Bug6355326.java | 4 +- .../{org/w3c => }/dom/Bug6367542.java | 4 +- .../{org/w3c => }/dom/Bug6520131.java | 4 +- .../{org/w3c => }/dom/Bug6521260.java | 4 +- .../unittest/{org/w3c => }/dom/Bug6582545.xml | 0 .../{org/w3c => }/dom/Bug6582545Test.java | 7 +- .../unittest/{org/w3c => }/dom/Bug6879614.xml | 0 .../{org/w3c => }/dom/Bug6879614Test.java | 5 +- .../{org/w3c => }/dom/CR6333993Test.java | 6 +- .../{org/w3c => }/dom/CR6517707Test.java | 7 +- .../{org/w3c => }/dom/CR6517717Test.java | 7 +- .../{org/w3c => }/dom/CR6909336Test.java | 5 +- .../w3c => }/dom/DOMConfigurationTest.java | 19 +- .../w3c => }/dom/DOMConfigurationTest.xsd | 0 .../{org/w3c => }/dom/DOMXPathTest.java | 4 +- .../{org/w3c => }/dom/JdkXmlDomTest.java | 2 +- .../{org/w3c => }/dom/TCKEncodingTest.java | 5 +- .../{org/w3c => }/dom/ls/Bug4973153.java | 4 +- .../{org/w3c => }/dom/ls/Bug6290947.java | 4 +- .../{org/w3c => }/dom/ls/Bug6354955.java | 4 +- .../{org/w3c => }/dom/ls/Bug6376823.java | 4 +- .../{org/w3c => }/dom/ls/Bug6710741Test.java | 6 +- .../{org/w3c => }/dom/ls/LSParserTCKTest.java | 8 +- .../{org/w3c => }/dom/ls/LSParserTest.java | 8 +- .../w3c => }/dom/ls/LSSerializerTest.java | 6 +- .../{org/w3c => }/dom/ls/note_in_dtd.xml | 0 .../jaxp/unittest/{org/w3c => }/dom/test.xml | 0 .../jaxp/unittest/{org/w3c => }/dom/test.xsd | 0 .../parsers/Bug4674384_MAX_OCCURS_Test.java | 7 +- .../parsers/Bug4674384_MAX_OCCURS_Test.xml | 0 .../parsers/Bug4674384_MAX_OCCURS_Test.xsd | 0 .../{javax/xml => }/parsers/Bug4934208.java | 4 +- .../{javax/xml => }/parsers/Bug4967002.java | 4 +- .../{javax/xml => }/parsers/Bug4985486.java | 4 +- .../{javax/xml => }/parsers/Bug4985486.xml | 0 .../{javax/xml => }/parsers/Bug4991020.java | 4 +- .../{javax/xml => }/parsers/Bug4991020.xml | 0 .../{javax/xml => }/parsers/Bug4991020.xsd | 0 .../{javax/xml => }/parsers/Bug4991946.java | 4 +- .../{javax/xml => }/parsers/Bug4991946.xml | 0 .../{javax/xml => }/parsers/Bug4991946.xsd | 0 .../{javax/xml => }/parsers/Bug5010072.java | 4 +- .../{javax/xml => }/parsers/Bug5010072.xsd | 0 .../{javax/xml => }/parsers/Bug5025825.java | 4 +- .../{javax/xml => }/parsers/Bug6309988.java | 4 +- .../{javax/xml => }/parsers/Bug6341770.java | 4 +- .../{javax/xml => }/parsers/Bug6361283.java | 4 +- .../xml => }/parsers/Bug6506304Test.java | 7 +- .../{javax/xml => }/parsers/Bug6518733.java | 4 +- .../{javax/xml => }/parsers/Bug6518733.xml | 0 .../{javax/xml => }/parsers/Bug6564400.java | 4 +- .../{javax/xml => }/parsers/Bug6564400.xml | 0 .../{javax/xml => }/parsers/Bug6564400.xsd | 0 .../{javax/xml => }/parsers/Bug6573786.java | 4 +- .../parsers/Bug6573786ErrorHandler.java | 4 +- .../{javax/xml => }/parsers/Bug6594813.java | 4 +- .../{javax/xml => }/parsers/Bug6608841.dtd | 0 .../{javax/xml => }/parsers/Bug6608841.java | 4 +- .../{javax/xml => }/parsers/Bug6608841.xml | 0 .../parsers/Bug6608841_xhtml11-flat.dtd | 0 .../{javax/xml => }/parsers/Bug6690015.java | 4 +- .../{javax/xml => }/parsers/Bug6760982.java | 4 +- .../xml => }/parsers/Bug6849942Test.java | 7 +- .../{javax/xml => }/parsers/Bug7157608.dtd | 0 .../{javax/xml => }/parsers/Bug7157608.xml | 0 .../xml => }/parsers/Bug7157608Test.java | 7 +- .../{javax/xml => }/parsers/Bug7157608_1.xml | 0 .../xml => }/parsers/Bug7166896Test.java | 8 +- .../{javax/xml => }/parsers/Bug8073385.java | 2 +- .../{javax/xml => }/parsers/DosTest.xml | 0 .../{javax/xml => }/parsers/DosTest3.xml | 0 .../xml => }/parsers/FactoryFindTest.java | 6 +- .../xml => }/parsers/MyDefaultHandler.java | 4 +- .../xml => }/parsers/MyErrorHandler.java | 4 +- .../xml => }/parsers/ParseEmptyStream.java | 7 +- .../{javax/xml => }/parsers/bug6690015.xml | 0 .../{javax/xml => }/parsers/bug6760982.xml | 0 .../{javax/xml => }/parsers/catalog.xml | 0 .../{javax/xml => }/parsers/catalog.xsd | 0 .../{javax/xml => }/parsers/entity.xml | 0 .../{javax/xml => }/parsers/entity64K.xml | 0 .../unittest/{javax/xml => }/parsers/test.xsd | 0 .../{javax/xml => }/parsers/test1.xml | 0 .../{javax/xml => }/parsers/test2.xml | 0 .../unittest/{javax/xml => }/parsers/toys.xml | 0 .../unittest/{javax/xml => }/parsers/toys.xsd | 0 .../{javax/xml => }/parsers/toys3002.xsd | 0 .../parsers/xinclude/Bug6794483Test.java | 2 +- .../xml => }/parsers/xinclude/test1.xml | 0 .../xml => }/parsers/xinclude/test2.xml | 0 .../xml/jaxp/unittest/policy/PolicyUtil.java | 35 -- .../xml/jaxp/unittest/policy/common.policy | 27 - .../xml => }/sax/Attributes2ImplTest.java | 4 +- .../{org/xml => }/sax/Bug6889654Test.java | 4 +- .../{org/xml => }/sax/Bug6925410Test.java | 4 +- .../{org/xml => }/sax/Bug6949607Test.java | 4 +- .../{org/xml => }/sax/Bug6992561Test.java | 4 +- .../unittest/{org/xml => }/sax/Bug7057778.xml | 0 .../{org/xml => }/sax/Bug7057778Test.java | 4 +- .../xml => }/sax/DefaultHandler2Test.java | 4 +- .../{org/xml => }/sax/IssueTracker56Test.java | 4 +- .../{org/xml => }/sax/MyDefaultHandler2.java | 4 +- .../{org/xml => }/sax/NSSupportTest.java | 4 +- .../{org/xml => }/sax/SAXExceptionExt.java | 4 +- .../{org/xml => }/sax/externalDTD.dtd | 0 .../jaxp/unittest/{org/xml => }/sax/toys.xml | 0 .../unittest/{org/xml => }/sax/toys_error.xml | 0 .../AttributeLocalNameTest.java | 2 +- .../{javax/xml => }/stream/Bug6370703.java | 4 +- .../{javax/xml => }/stream/Bug6378422.java | 4 +- .../{javax/xml => }/stream/Bug6380870.java | 4 +- .../{javax/xml => }/stream/Bug6489502.java | 2 +- .../{javax/xml => }/stream/Bug6509774.java | 4 +- .../xml => }/stream/Bug6688002Test.java | 9 +- .../{javax/xml => }/stream/Bug6976938.xml | 0 .../xml => }/stream/Bug6976938Test.java | 8 +- .../stream/CoalesceTest/CoalesceTest.java | 2 +- .../xml => }/stream/CoalesceTest/coalesce.xml | 0 .../stream/EntitiesTest/EntityTest.java | 2 +- .../stream/EntitiesTest/testCharRef.xml | 0 .../EntitiesTest/testCharRef.xml.output | 0 .../stream/EventReaderDelegateTest.java | 10 +- .../EventsTest}/Issue41Test.java | 4 +- .../EventsTest}/Issue48Test.java | 4 +- .../EventsTest}/Issue53Test.java | 4 +- .../EventsTest}/Issue58Test.java | 4 +- .../xml => }/stream/FactoryFindTest.java | 7 +- .../xml => }/stream/FactoryFindTest.policy | 0 .../stream/IgnoreExternalDTDTest.java | 9 +- .../ProcessingInstructionTest.java | 4 +- .../stream/StreamReaderDelegateTest.java | 9 +- .../xml => }/stream/XMLEventLocationTest.java | 6 +- .../stream/XMLEventReaderTest/Bug6489890.java | 2 +- .../stream/XMLEventReaderTest/Bug6555001.java | 2 +- .../XMLEventReaderTest/Bug6586466Test.java | 2 +- .../XMLEventReaderTest/Bug6613059Test.java | 2 +- .../XMLEventReaderTest/Bug6668115Test.java | 2 +- .../XMLEventReaderTest/Bug6846133Test.java | 2 +- .../XMLEventReaderTest/Issue40Test.java | 2 +- .../stream/XMLEventReaderTest/bug6613059.xml | 0 .../stream/XMLEventReaderTest/play.xml | 0 .../stream/XMLEventReaderTest/play2.xml | 0 .../stream/XMLEventReaderTest/sgml.xml | 0 .../ReaderToWriterTest.java | 2 +- .../ReaderToWriterTest.wsdl | 0 .../XMLEventWriterTest/ReaderToWriterTest.xml | 0 .../W2JDLR4002TestService.wsdl.data | 0 .../XMLEventWriterTest.java | 2 +- .../XMLEventWriterTest/XMLEventWriterTest.xml | 0 .../stream/XMLEventWriterTest/merge-1.xml | 0 .../stream/XMLEventWriterTest/merge-2.xml | 0 .../stream/XMLEventWriterTest/replace1.txt | 0 .../XMLInputFactoryTest/Bug6756677Test.java | 6 +- .../XMLInputFactoryTest/Bug6909759Test.java | 2 +- .../XMLInputFactoryTest/IssueTracker38.java | 2 +- .../XMLInputFactoryTest/MyInputFactory.java | 2 +- .../stream/XMLInputFactoryTest/play.xml | 0 .../XMLOutputFactoryTest/Bug6846132Test.java | 2 +- .../DuplicateNSDeclarationTest.java | 2 +- .../StreamResultTest.java | 2 +- .../XMLResolverTest/XMLResolverTest.java | 2 +- .../XMLResolverTest/XMLResolverTest.xml | 0 .../stream/XMLResolverTest/replace1.txt | 0 .../stream/XMLResolverTest/replace2.txt | 0 .../XMLStreamExceptionTest/ExceptionTest.java | 2 +- .../XMLStreamFilterTest/Bug6481615.java | 2 +- .../XMLStreamFilterTest/Bug6481678.java | 2 +- .../XMLStreamFilterTest/HasNextTest.java | 2 +- .../XMLStreamFilterTest/HasNextTest.xml | 0 .../HasNextTypeFilter.java | 2 +- .../stream/XMLStreamReaderTest/BOMTest.java | 2 +- .../XMLStreamReaderTest/Bug6388460.java | 2 +- .../XMLStreamReaderTest/Bug6472982Test.java | 2 +- .../stream/XMLStreamReaderTest/Bug6767322.xml | 0 .../XMLStreamReaderTest/Bug6767322Test.java | 2 +- .../XMLStreamReaderTest/Bug6847819Test.java | 2 +- .../stream/XMLStreamReaderTest/BugTest.java | 2 +- .../DefaultAttributeTest.java | 2 +- .../XMLStreamReaderTest/DoubleXmlnsTest.java | 2 +- .../XMLStreamReaderTest/ExternalDTD.dtd} | 0 .../XMLStreamReaderTest/ExternalDTD.xml} | 0 .../XMLStreamReaderTest/Hello.wsdl.data | 0 .../XMLStreamReaderTest/IsValidatingTest.java | 2 +- .../XMLStreamReaderTest/IsValidatingTest.xml | 0 .../IsValidatingTestInternalSubset.xml | 0 .../XMLStreamReaderTest/Issue44Test.java | 2 +- .../XMLStreamReaderTest/Issue47Test.java | 2 +- .../XMLStreamReaderTest/IssueTracker24.java | 2 +- .../XMLStreamReaderTest/IssueTracker35.java | 2 +- .../XMLStreamReaderTest/IssueTracker70.java | 2 +- .../XMLStreamReaderTest/IssueTracker70.xml | 0 .../XMLStreamReaderTest/Jsr173MR1Req5.xml | 0 .../Jsr173MR1Req5Test.java | 2 +- .../XMLStreamReaderTest/Jsr173MR1Req8.xml | 0 .../Jsr173MR1Req8Test.java | 2 +- .../XMLStreamReaderTest/NamespaceTest.java | 2 +- .../XMLStreamReaderTest/StreamReaderTest.java | 2 +- .../XMLStreamReaderTest/SupportDTDTest.java | 2 +- .../XMLStreamReaderTest/UTF16-BE.wsdl.data | 0 .../XMLStreamReaderTest/UTF8-BOM.xml.data | 0 .../XMLStreamReaderTest/VoiceXMLDTDTest.java | 2 +- .../stream/XMLStreamReaderTest/XML11Test.java | 2 +- .../stream/XMLStreamReaderTest/XMLSchema.dtd | 0 .../stream/XMLStreamReaderTest/XMLSchema.xsd | 0 .../stream/XMLStreamReaderTest/datatypes.dtd | 0 .../stream/XMLStreamReaderTest/report.dtd | 0 .../stream/XMLStreamReaderTest/sgml.xml | 0 .../stream/XMLStreamReaderTest/voicexml.xml | 0 .../stream/XMLStreamReaderTest/vxml.dtd | 0 .../stream/XMLStreamReaderTest/xml11.xml.data | 0 .../AttributeEscapeTest.java | 2 +- .../XMLStreamWriterTest/Bug6452107.java | 2 +- .../XMLStreamWriterTest/Bug6600882Test.java | 2 +- .../XMLStreamWriterTest/Bug6675332Test.java | 2 +- .../XMLStreamWriterTest/Bug7037352Test.java | 2 +- .../stream/XMLStreamWriterTest/DOMUtil.java | 2 +- .../XMLStreamWriterTest/DomUtilTest.java | 2 +- .../XMLStreamWriterTest/EmptyElementTest.java | 2 +- .../XMLStreamWriterTest/EncodingTest.java | 2 +- .../XMLStreamWriterTest/NamespaceTest.java | 2 +- .../NullUriDetectionTest.java | 2 +- .../XMLStreamWriterTest/SqeLinuxTest.java | 2 +- .../UnprefixedNameTest.java | 2 +- .../XMLStreamWriterTest/WriterTest.java | 2 +- .../XMLStreamWriterTest.java | 2 +- .../stream/XMLStreamWriterTest/message_12.xml | 0 .../XMLStreamWriterTest/testEight.xml.org | 0 .../XMLStreamWriterTest/testFive.xml.org | 0 .../XMLStreamWriterTest/testFour.xml.org | 0 .../XMLStreamWriterTest/testOne.xml.org | 0 .../XMLStreamWriterTest/testSeven.xml.org | 0 .../XMLStreamWriterTest/testSix.xml.org | 0 .../XMLStreamWriterTest/testThree.xml.org | 0 .../{javax/xml => }/stream/basic-form.vxml | 0 .../{javax/xml => }/stream/report.dtd | 0 .../xml => }/stream/sgml-bad-systemId.xml | 0 .../unittest/{javax/xml => }/stream/sgml.xml | 0 .../xml => }/stream/sgml_Bug6509774.xml | 0 .../{javax/xml => }/stream/testfile1.xml | 0 .../{javax/xml => }/stream/testfile2.xml | 0 .../{javax/xml => }/stream/testfile3.xml | 0 .../{javax/xml => }/stream/testfile4.xml | 0 .../unittest/{javax/xml => }/stream/toys.xml | 0 .../unittest/{javax/xml => }/stream/vxml.dtd | 0 .../{javax/xml => }/transform/5368141.xml | 0 .../{javax/xml => }/transform/Bug4693341.dtd | 0 .../{javax/xml => }/transform/Bug4693341.out | 0 .../{javax/xml => }/transform/Bug4693341.xml | 0 .../xml => }/transform/Bug4693341Test.java | 4 +- .../xml => }/transform/Bug4693341_golden.dtd | 0 .../xml => }/transform/Bug4693341_golden.xml | 0 .../{javax/xml => }/transform/Bug4892774.java | 13 +- .../{javax/xml => }/transform/Bug5073477.java | 4 +- .../{javax/xml => }/transform/Bug5073477.xml | 0 .../{javax/xml => }/transform/Bug6175602.java | 4 +- .../{javax/xml => }/transform/Bug6206491.java | 4 +- .../{javax/xml => }/transform/Bug6206491.xml | 0 .../{javax/xml => }/transform/Bug6206491.xsl | 0 .../xml => }/transform/Bug6206491_2.xml | 0 .../xml => }/transform/Bug6216226Test.java | 6 +- .../{javax/xml => }/transform/Bug6311448.java | 4 +- .../{javax/xml => }/transform/Bug6384805.java | 4 +- .../{javax/xml => }/transform/Bug6465722.java | 4 +- .../{javax/xml => }/transform/Bug6467808.java | 4 +- .../{javax/xml => }/transform/Bug6490380.java | 4 +- .../{javax/xml => }/transform/Bug6490921.java | 4 +- .../{javax/xml => }/transform/Bug6505031.java | 4 +- .../{javax/xml => }/transform/Bug6513892.java | 4 +- .../{javax/xml => }/transform/Bug6537167.java | 4 +- .../{javax/xml => }/transform/Bug6540545.java | 4 +- .../{javax/xml => }/transform/Bug6559595.java | 4 +- .../{javax/xml => }/transform/Bug6565260.java | 4 +- .../{javax/xml => }/transform/Bug6940416.java | 4 +- .../xml => }/transform/BugDB12665704.xml | 0 .../xml => }/transform/BugDB12665704.xsl | 0 .../xml => }/transform/BugDB12665704Test.java | 10 +- .../{javax/xml => }/transform/CR6401137.xml | 0 .../{javax/xml => }/transform/CR6401137.xsl | 0 .../xml => }/transform/CR6401137Test.java | 8 +- .../xml => }/transform/CR6551600.policy | 0 .../xml => }/transform/CR6551600Test.java | 6 +- .../{javax/xml => }/transform/CR6577667.xsl | 0 .../xml => }/transform/CR6577667Test.java | 6 +- .../xml => }/transform/CR6652519Test.java | 6 +- .../xml => }/transform/CR6689809Test.java | 5 +- .../{javax/xml => }/transform/CR6905829.xml | 0 .../{javax/xml => }/transform/CR6905829.xsl | 0 .../xml => }/transform/CR6905829Inc.xsl | 0 .../xml => }/transform/CR6905829Test.java | 6 +- .../{javax/xml => }/transform/CR6935697.xml | 0 .../{javax/xml => }/transform/CR6935697.xsl | 0 .../xml => }/transform/CR6935697Test.java | 9 +- .../{javax/xml => }/transform/CR6941869.xml | 0 .../{javax/xml => }/transform/CR6941869.xsl | 0 .../xml => }/transform/CR6941869Test.java | 6 +- .../{javax/xml => }/transform/CR6957215.xml | 0 .../{javax/xml => }/transform/CR6957215.xsl | 0 .../xml => }/transform/CR6957215Test.java | 12 +- .../{javax/xml => }/transform/CR7098746.xml | 0 .../{javax/xml => }/transform/CR7098746.xsl | 0 .../xml => }/transform/CR7098746Test.java | 9 +- .../xml => }/transform/DOMResultTest.java | 9 +- .../xml => }/transform/DocumentExtFunc.java | 2 +- .../xml => }/transform/FactoryFindTest.java | 6 +- .../{javax/xml => }/transform/Issue2204.xml | 0 .../{javax/xml => }/transform/Issue2204.xsl | 0 .../xml => }/transform/Issue2204Test.java | 4 +- .../{javax/xml => }/transform/Issue2290.xsl | 0 .../xml => }/transform/Issue2290Test.java | 4 +- .../transform/MsWordXMLImport.xsl.data | 2 +- .../NCAA_Conference_Schedule_XML.dtd | 0 .../xml => }/transform/OpenJDK100017Test.java | 6 +- .../xml => }/transform/PredicateInKeyTest.xml | 2 +- .../xml => }/transform/PredicateInKeyTest.xsl | 2 +- .../xml => }/transform/SAX2DOMTest.java | 4 +- .../{javax/xml => }/transform/SAX2DOMTest.xml | 0 .../transform/SecureProcessingTest.java | 8 +- .../transform/SecureProcessingTest.xml | 0 .../transform/SecureProcessingTest.xsl | 0 .../{javax/xml => }/transform/SourceTest.java | 7 +- .../{javax/xml => }/transform/SourceTest.xml | 0 .../{javax/xml => }/transform/SourceTest.xsl | 0 .../xml => }/transform/StAXSourceTest.java | 8 +- .../transform/TransformerFactoryTest.java | 11 +- .../xml => }/transform/TransformerTest.java | 7 +- .../transform/TransformerUtilFactory.java | 14 +- .../transform/VersionDefaultHandler.java | 4 +- .../transform/VersionEventWriter.java | 4 +- .../{javax/xml => }/transform/ViewEditor1.xsl | 0 .../xml => }/transform/XSLTFunctionsTest.java | 12 +- .../{javax/xml => }/transform/attribset27.xml | 0 .../{javax/xml => }/transform/attribset27.xsl | 0 .../{javax/xml => }/transform/catalog.xml | 0 .../{javax/xml => }/transform/catalog.xsd | 0 .../{javax/xml => }/transform/catalog_10.xml | 0 .../{javax/xml => }/transform/config.dtd | 0 .../{javax/xml => }/transform/config.xml | 0 .../xml => }/transform/default-layout.xsl | 0 .../xml => }/transform/global-variables.xsl | 0 .../{javax/xml => }/transform/global.xsl | 0 .../{javax/xml => }/transform/home.xsl | 0 .../unittest/{javax/xml => }/transform/in.xml | 0 .../{javax/xml => }/transform/inner.xsl | 0 .../{javax/xml => }/transform/logon.xsl | 0 .../{javax/xml => }/transform/maps.xml | 0 .../{javax/xml => }/transform/msgAttach.xml | 0 .../{javax/xml => }/transform/numbering63.xml | 0 .../{javax/xml => }/transform/numbering63.xsl | 0 .../{javax/xml => }/transform/outer.xsl | 0 .../{javax/xml => }/transform/redirect.xml | 0 .../{javax/xml => }/transform/redirect.xsl | 0 .../xml => }/transform/sax/Bug6451633.java | 4 +- .../{javax/xml => }/transform/src.xml | 0 .../{javax/xml => }/transform/template.xml | 0 .../xml => }/transform/tigertest-in.xml | 0 .../{javax/xml => }/transform/tigertest.xsl | 0 .../{javax/xml => }/transform/tmp.xml | 0 .../{javax/xml => }/transform/toys.xml | 0 .../{javax/xml => }/transform/transform.xsl | 0 .../xml => }/transform/upload-media-form.xsl | 0 .../xml => }/transform/upload-media.xsl | 0 .../{javax/xml => }/transform/util.xsl | 0 .../xml => }/transform/util/DOMUtil.java | 4 +- .../xml => }/transform/util/SAXUtil.java | 7 +- .../xml => }/transform/util/StAXUtil.java | 9 +- .../xml => }/transform/util/StreamUtil.java | 7 +- .../transform/util/TransformerUtil.java | 4 +- .../jaxp/unittest/util/BOMInputStream.java | 80 --- .../xml/jaxp/unittest/util/BaseStAXUT.java | 559 ------------------ .../unittest/util/DraconianErrorHandler.java | 37 -- .../{javax/xml => }/validation/6773084.policy | 0 .../xml => }/validation/AnyElementTest.java | 4 +- .../xml => }/validation/Bug4966232.java | 4 +- .../xml => }/validation/Bug4966254.java | 4 +- .../{javax/xml => }/validation/Bug4966254.xml | 0 .../{javax/xml => }/validation/Bug4966254.xsd | 0 .../xml => }/validation/Bug4969042.java | 4 +- .../xml => }/validation/Bug4969089.java | 4 +- .../xml => }/validation/Bug4969110.java | 4 +- .../xml => }/validation/Bug4969689.java | 4 +- .../xml => }/validation/Bug4969692.java | 4 +- .../xml => }/validation/Bug4969693.java | 4 +- .../xml => }/validation/Bug4969695.java | 4 +- .../xml => }/validation/Bug4969732.java | 4 +- .../xml => }/validation/Bug4970380.java | 4 +- .../xml => }/validation/Bug4970383.java | 4 +- .../xml => }/validation/Bug4970400.java | 4 +- .../xml => }/validation/Bug4970402.java | 4 +- .../xml => }/validation/Bug4970951.java | 4 +- .../xml => }/validation/Bug4971605.java | 4 +- .../xml => }/validation/Bug4971607.java | 4 +- .../xml => }/validation/Bug4972882.java | 4 +- .../xml => }/validation/Bug4986844.java | 4 +- .../{javax/xml => }/validation/Bug4986844.xsd | 0 .../xml => }/validation/Bug4987574.java | 4 +- .../xml => }/validation/Bug4988267.java | 4 +- .../{javax/xml => }/validation/Bug4988267.xsd | 0 .../xml => }/validation/Bug4988268.java | 4 +- .../{javax/xml => }/validation/Bug4988268.xsd | 0 .../xml => }/validation/Bug4988387.java | 4 +- .../{javax/xml => }/validation/Bug4988387.xsd | 0 .../xml => }/validation/Bug4996446.java | 4 +- .../{javax/xml => }/validation/Bug4996446.xsd | 0 .../xml => }/validation/Bug4997818.java | 4 +- .../xml => }/validation/Bug5011500.java | 4 +- .../xml => }/validation/Bug5072946.java | 4 +- .../{javax/xml => }/validation/Bug5072946.xml | 0 .../{javax/xml => }/validation/Bug5072946.xsd | 0 .../xml => }/validation/Bug6378043.java | 4 +- .../xml => }/validation/Bug6449797.java | 4 +- .../{javax/xml => }/validation/Bug6449797.xsd | 0 .../xml => }/validation/Bug6457662.java | 4 +- .../{javax/xml => }/validation/Bug6467424.xml | 0 .../{javax/xml => }/validation/Bug6467424.xsd | 0 .../xml => }/validation/Bug6467424Test.java | 7 +- .../xml => }/validation/Bug6483188.java | 4 +- .../xml => }/validation/Bug6493687.java | 4 +- .../{javax/xml => }/validation/Bug6493687.xml | 0 .../{javax/xml => }/validation/Bug6493687.xsd | 0 .../xml => }/validation/Bug6509668.java | 4 +- .../xml => }/validation/Bug6526547.java | 4 +- .../{javax/xml => }/validation/Bug6526547.xml | 0 .../{javax/xml => }/validation/Bug6526547.xsd | 0 .../xml => }/validation/Bug6531160.java | 4 +- .../{javax/xml => }/validation/Bug6695843.xml | 0 .../{javax/xml => }/validation/Bug6695843.xsd | 0 .../xml => }/validation/Bug6695843Test.java | 7 +- .../{javax/xml => }/validation/Bug6773084.xsd | 0 .../validation/Bug6773084In/Bug6773084_1.xml | 0 .../validation/Bug6773084In/Bug6773084_10.xml | 0 .../validation/Bug6773084In/Bug6773084_11.xml | 0 .../validation/Bug6773084In/Bug6773084_12.xml | 0 .../validation/Bug6773084In/Bug6773084_13.xml | 0 .../validation/Bug6773084In/Bug6773084_14.xml | 0 .../validation/Bug6773084In/Bug6773084_15.xml | 0 .../validation/Bug6773084In/Bug6773084_16.xml | 0 .../validation/Bug6773084In/Bug6773084_17.xml | 0 .../validation/Bug6773084In/Bug6773084_18.xml | 0 .../validation/Bug6773084In/Bug6773084_19.xml | 0 .../validation/Bug6773084In/Bug6773084_2.xml | 0 .../validation/Bug6773084In/Bug6773084_20.xml | 0 .../validation/Bug6773084In/Bug6773084_21.xml | 0 .../validation/Bug6773084In/Bug6773084_22.xml | 0 .../validation/Bug6773084In/Bug6773084_23.xml | 0 .../validation/Bug6773084In/Bug6773084_24.xml | 0 .../validation/Bug6773084In/Bug6773084_25.xml | 0 .../validation/Bug6773084In/Bug6773084_3.xml | 0 .../validation/Bug6773084In/Bug6773084_4.xml | 0 .../validation/Bug6773084In/Bug6773084_5.xml | 0 .../validation/Bug6773084In/Bug6773084_6.xml | 0 .../validation/Bug6773084In/Bug6773084_7.xml | 0 .../validation/Bug6773084In/Bug6773084_8.xml | 0 .../validation/Bug6773084In/Bug6773084_9.xml | 0 .../xml => }/validation/Bug6773084Test.java | 7 +- .../xml => }/validation/Bug6859210.java | 4 +- .../xml => }/validation/Bug6925531Test.java | 7 +- .../{javax/xml => }/validation/Bug6946312.xml | 0 .../xml => }/validation/Bug6946312Test.java | 6 +- .../{javax/xml => }/validation/Bug6954738.xml | 0 .../{javax/xml => }/validation/Bug6954738.xsd | 0 .../xml => }/validation/Bug6954738_Test.java | 7 +- .../xml => }/validation/CR6708840Test.java | 7 +- .../{javax/xml => }/validation/CR6740048.java | 4 +- .../{javax/xml => }/validation/CR6740048.xml | 0 .../{javax/xml => }/validation/CR6740048.xsd | 0 .../{javax/xml => }/validation/CREMAS01.xml | 0 .../{javax/xml => }/validation/CREMAS01.xsd | 0 .../xml => }/validation/ErrorHandlerImpl.java | 4 +- .../{javax/xml => }/validation/Issue682.xml | 0 .../{javax/xml => }/validation/Issue682.xsd | 0 .../xml => }/validation/Issue682Test.java | 4 +- .../xml => }/validation/IssueTracker30.java | 4 +- .../IssueTracker30_occurs-error.xml | 0 .../validation/IssueTracker30_occurs-ok.xml | 0 .../IssueTracker30_occurs-optimize-error.xml | 0 .../IssueTracker30_occurs-optimize-ok.xml | 0 .../IssueTracker30_occurs-optimize.xsd | 0 .../validation/IssueTracker30_occurs.xsd | 0 .../xml => }/validation/JaxpIssue43Test.java | 7 +- .../xml => }/validation/JaxpIssue49.java | 7 +- .../xml => }/validation/JaxpIssue49.xml | 0 .../validation/LargeMaxOccursTest.java | 7 +- .../xml => }/validation/MultiOccursTest.java | 4 +- .../validation/MultiOccursUnboundedTest.java | 4 +- .../xml => }/validation/OccursTest.java | 4 +- .../validation/OccursUnboundedTest.java | 4 +- .../validation/OccursWildcardTest.java | 4 +- .../validation/OccursWildcardUnbounded.java | 4 +- .../validation/ParticlesId005Test.java | 4 +- .../validation/ParticlesIg004Test.java | 7 +- .../validation/ParticlesQ013Test.java | 4 +- .../validation/ProcessContents-lax-error.xml | 0 .../validation/ProcessContents-ok.xml | 0 .../xml => }/validation/ProcessContents.xsd | 0 .../xml => }/validation/TCKGroupA008Test.java | 8 +- .../xml => }/validation/ValidatorTest.java | 7 +- .../xml => }/validation/XMLDocBuilder.java | 4 +- .../validation/XMLSchemaValidator.java | 4 +- .../xml => }/validation/gMonths-invalid.xml | 2 +- .../{javax/xml => }/validation/gMonths.xml | 2 +- .../{javax/xml => }/validation/gMonths.xsd | 2 +- .../{javax/xml => }/validation/groupA008.xsd | 0 .../xml => }/validation/groupA008ea.red | 0 .../xml => }/validation/groupA008eb.red | 0 .../xml => }/validation/hello_literal.wsdl | 0 .../{javax/xml => }/validation/idI009.xsd | 0 .../{javax/xml => }/validation/idIimp.xsd | 0 .../{javax/xml => }/validation/idIxpns.xsd | 0 .../{javax/xml => }/validation/idIxpns1.xsd | 0 .../{javax/xml => }/validation/mgG014.xsd | 0 .../{javax/xml => }/validation/mgJ014.xsd | 0 .../validation/multi-occurs-error-max.xml | 0 .../validation/multi-occurs-error-min-max.xml | 0 .../validation/multi-occurs-error-min.xml | 0 .../xml => }/validation/multi-occurs-ok.xml | 0 .../multi-occurs-unbounded-error-min.xml | 0 .../validation/multi-occurs-unbounded-ok.xml | 0 .../validation/multi-occurs-unbounded.xsd | 0 .../xml => }/validation/multi-occurs.xsd | 0 .../xml => }/validation/occurs-error-max.xml | 0 .../validation/occurs-error-min-max.xml | 0 .../xml => }/validation/occurs-error-min.xml | 0 .../{javax/xml => }/validation/occurs-ok.xml | 0 .../validation/occurs-unbounded-error-min.xml | 0 .../validation/occurs-unbounded-ok.xml | 0 .../xml => }/validation/occurs-unbounded.xsd | 0 .../validation/occurs-wildcard-unbounded.xsd | 0 .../xml => }/validation/occurs-wildcard.xsd | 0 .../{javax/xml => }/validation/occurs.xsd | 0 .../xml => }/validation/particlesId005.xml | 0 .../xml => }/validation/particlesId005.xsd | 0 .../xml => }/validation/particlesIe003.xsd | 0 .../xml => }/validation/particlesIg004.xsd | 0 .../xml => }/validation/particlesOptimize.xsd | 0 .../xml => }/validation/particlesQ013.xml | 0 .../xml => }/validation/particlesQ013.xsd | 0 .../xml => }/validation/particlesR005.xsd | 0 .../xml => }/validation/targetNS00101m2.xsd | 0 .../validation/targetNS00101m2_stub.xml | 0 .../validation/targetNS00101m2_stub.xsd | 0 .../xml => }/validation/targetNS00101m2a.xsd | 0 .../Bug6943252In/byte_fractionDigits004.xsd | 0 .../Bug6943252In/byte_fractionDigits007.xsd | 0 .../Bug6943252In/int_fractionDigits004.xsd | 0 .../Bug6943252In/int_fractionDigits007.xsd | 0 .../integer_fractionDigits004.xsd | 0 .../integer_fractionDigits007.xsd | 0 .../Bug6943252In/long_fractionDigits004.xsd | 0 .../Bug6943252In/long_fractionDigits007.xsd | 0 .../negativeInteger_fractionDigits004.xsd | 0 .../negativeInteger_fractionDigits007.xsd | 0 .../nonNegativeInteger_fractionDigits004.xsd | 0 .../nonNegativeInteger_fractionDigits007.xsd | 0 .../nonPositiveInteger_fractionDigits004.xsd | 0 .../nonPositiveInteger_fractionDigits007.xsd | 0 .../positiveInteger_fractionDigits004.xsd | 0 .../positiveInteger_fractionDigits007.xsd | 0 .../Bug6943252In/short_fractionDigits004.xsd | 0 .../Bug6943252In/short_fractionDigits007.xsd | 0 .../unsignedByte_fractionDigits004.xsd | 0 .../unsignedByte_fractionDigits007.xsd | 0 .../unsignedInt_fractionDigits004.xsd | 0 .../unsignedInt_fractionDigits007.xsd | 0 .../unsignedLong_fractionDigits004.xsd | 0 .../unsignedLong_fractionDigits007.xsd | 0 .../unsignedShort_fractionDigits004.xsd | 0 .../unsignedShort_fractionDigits007.xsd | 0 .../validation/tck/Bug6943252Test.java | 2 +- .../xml => }/validation/tck/Bug6963124.xsd | 0 .../validation/tck/Bug6963124Test.java | 2 +- .../xml => }/validation/tck/Bug6963468.xml | 0 .../xml => }/validation/tck/Bug6963468.xsd | 0 .../validation/tck/Bug6963468Test.java | 2 +- .../xml => }/validation/tck/Bug6964720.xsd | 0 .../validation/tck/Bug6964720Test.java | 2 +- .../tck/Bug6967214/RegexTest_1258.xsd | 0 .../validation/tck/Bug6967214/reD10.xsd | 0 .../validation/tck/Bug6967214/reD11.xsd | 0 .../validation/tck/Bug6967214/reD12.xsd | 0 .../validation/tck/Bug6967214/reE9.xsd | 0 .../validation/tck/Bug6967214Test.java | 2 +- .../xml => }/validation/tck/Bug6970890.xsd | 0 .../validation/tck/Bug6970890Test.java | 2 +- .../xml => }/validation/tck/Bug6970890_1.xsd | 0 .../xml => }/validation/tck/Bug6971190.xml | 0 .../xml => }/validation/tck/Bug6971190.xsd | 0 .../validation/tck/Bug6971190Test.java | 2 +- .../xml => }/validation/tck/Bug6971190_v.xml | 0 .../xml => }/validation/tck/Bug6971190_v.xsd | 0 .../xml => }/validation/tck/Bug6974551.xml | 0 .../xml => }/validation/tck/Bug6974551.xsd | 0 .../validation/tck/Bug6974551Test.java | 2 +- .../validation/tck/Bug6975265/notatF025.xsd | 0 .../validation/tck/Bug6975265/notatF037.xsd | 0 .../validation/tck/Bug6975265/notatF041.xsd | 0 .../validation/tck/Bug6975265/notatF045.xsd | 0 .../validation/tck/Bug6975265/notatF049.xsd | 0 .../validation/tck/Bug6975265Test.java | 2 +- .../validation/tck/Bug6977201/reA2.xml | 0 .../validation/tck/Bug6977201/reA2.xsd | 0 .../validation/tck/Bug6977201/reA3.xml | 0 .../validation/tck/Bug6977201/reA3.xsd | 0 .../validation/tck/Bug6977201/reA4.xml | 0 .../validation/tck/Bug6977201/reA4.xsd | 0 .../validation/tck/Bug6977201/reA5.xml | 0 .../validation/tck/Bug6977201/reA5.xsd | 0 .../validation/tck/Bug6977201/reA6.xml | 0 .../validation/tck/Bug6977201/reA6.xsd | 0 .../validation/tck/Bug6977201Test.java | 2 +- .../xml => }/validation/tck/Bug6989956.xml | 0 .../xml => }/validation/tck/Bug6989956.xsd | 0 .../validation/tck/Bug6989956Test.java | 2 +- .../xml => }/validation/tck/Bug7014246.xsd | 0 .../validation/tck/Bug7014246Test.java | 2 +- .../xml => }/validation/test-element.xsd | 0 .../xml => }/validation/test-sequence.xsd | 0 .../{javax/xml => }/validation/test.xsd | 0 .../{javax/xml => }/validation/toys.xml | 0 .../{javax/xml => }/validation/toys.xsd | 0 .../{javax/xml => }/validation/types.xsd | 0 .../{javax/xml => }/xpath/Bug4991857.java | 4 +- .../{javax/xml => }/xpath/Bug4991939.java | 4 +- .../{javax/xml => }/xpath/Bug4992788.java | 4 +- .../{javax/xml => }/xpath/Bug4992793.java | 4 +- .../{javax/xml => }/xpath/Bug4992805.java | 4 +- .../xml => }/xpath/ClassLoaderTest.java | 4 +- .../{javax/xml => }/xpath/MyClassLoader.java | 4 +- .../xml => }/xpath/SecureProcessingTest.java | 11 +- .../xml => }/xpath/SecureProcessingTest.xml | 0 .../xml => }/xpath/XPathAnyTypeTest.java | 10 +- .../xml => }/xpath/XPathExpAnyTypeTest.java | 11 +- .../{javax/xml => }/xpath/XPathTest.java | 6 +- .../{javax/xml => }/xpath/XPathTestBase.java | 14 +- 660 files changed, 817 insertions(+), 1281 deletions(-) delete mode 100644 jaxp/test/javax/xml/jaxp/unittest/TEST.properties rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/common/Bug6350682.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/common/Bug6723276Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/common/Bug6941169.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/common/Bug6941169.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/common/Bug6941169Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/common/Bug7143711Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/Bug6320118.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/Bug6937951Test.java (88%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/Bug6937964Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/Bug7042647Test.java (89%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/DatatypeFactoryTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/DurationTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/FactoryFindTest.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/datatype/XMLGregorianCalendarTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4915524.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4915748.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966082.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966082.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966138.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966142.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966142.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966142.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966143.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966143.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug4966143.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6339023.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6355326.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6367542.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6520131.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6521260.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6582545.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6582545Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6879614.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/Bug6879614Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/CR6333993Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/CR6517707Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/CR6517717Test.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/CR6909336Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/DOMConfigurationTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/DOMConfigurationTest.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/DOMXPathTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/JdkXmlDomTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/TCKEncodingTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/Bug4973153.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/Bug6290947.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/Bug6354955.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/Bug6376823.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/Bug6710741Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/LSParserTCKTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/LSParserTest.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/LSSerializerTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/ls/note_in_dtd.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/test.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/w3c => }/dom/test.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4674384_MAX_OCCURS_Test.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4674384_MAX_OCCURS_Test.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4674384_MAX_OCCURS_Test.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4934208.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4967002.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4985486.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4985486.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4991020.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4991020.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4991020.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4991946.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4991946.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug4991946.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug5010072.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug5010072.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug5025825.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6309988.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6341770.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6361283.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6506304Test.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6518733.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6518733.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6564400.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6564400.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6564400.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6573786.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6573786ErrorHandler.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6594813.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6608841.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6608841.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6608841.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6608841_xhtml11-flat.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6690015.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6760982.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug6849942Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug7157608.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug7157608.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug7157608Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug7157608_1.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug7166896Test.java (91%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/Bug8073385.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/DosTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/DosTest3.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/FactoryFindTest.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/MyDefaultHandler.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/MyErrorHandler.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/ParseEmptyStream.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/bug6690015.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/bug6760982.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/catalog.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/catalog.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/entity.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/entity64K.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/test.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/test1.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/test2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/toys.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/toys.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/toys3002.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/xinclude/Bug6794483Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/xinclude/test1.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/parsers/xinclude/test2.xml (100%) delete mode 100644 jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java delete mode 100644 jaxp/test/javax/xml/jaxp/unittest/policy/common.policy rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Attributes2ImplTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Bug6889654Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Bug6925410Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Bug6949607Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Bug6992561Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Bug7057778.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/Bug7057778Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/DefaultHandler2Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/IssueTracker56Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/MyDefaultHandler2.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/NSSupportTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/SAXExceptionExt.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/externalDTD.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/toys.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{org/xml => }/sax/toys_error.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/AttributeLocalNameTest/AttributeLocalNameTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6370703.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6378422.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6380870.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6489502.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6509774.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6688002Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6976938.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/Bug6976938Test.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/CoalesceTest/CoalesceTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/CoalesceTest/coalesce.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/EntitiesTest/EntityTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/EntitiesTest/testCharRef.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/EntitiesTest/testCharRef.xml.output (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/EventReaderDelegateTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/Events => stream/EventsTest}/Issue41Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/Events => stream/EventsTest}/Issue48Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/Events => stream/EventsTest}/Issue53Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/Events => stream/EventsTest}/Issue58Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/FactoryFindTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/FactoryFindTest.policy (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/IgnoreExternalDTDTest.java (90%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/ProcessingInstruction => stream/ProcessingInstructionTest}/ProcessingInstructionTest.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/StreamReaderDelegateTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventLocationTest.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Bug6489890.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Bug6555001.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Bug6586466Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Bug6613059Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Bug6668115Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Bug6846133Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/Issue40Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/bug6613059.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/play.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/play2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventReaderTest/sgml.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/ReaderToWriterTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/ReaderToWriterTest.wsdl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/ReaderToWriterTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/W2JDLR4002TestService.wsdl.data (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/XMLEventWriterTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/XMLEventWriterTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/merge-1.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/merge-2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLEventWriterTest/replace1.txt (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLInputFactoryTest/Bug6756677Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLInputFactoryTest/Bug6909759Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLInputFactoryTest/IssueTracker38.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLInputFactoryTest/MyInputFactory.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLInputFactoryTest/play.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLOutputFactoryTest/Bug6846132Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLOutputFactoryTest/StreamResultTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLResolverTest/XMLResolverTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLResolverTest/XMLResolverTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLResolverTest/replace1.txt (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLResolverTest/replace2.txt (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamExceptionTest/ExceptionTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamFilterTest/Bug6481615.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamFilterTest/Bug6481678.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamFilterTest/HasNextTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamFilterTest/HasNextTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamFilterTest/HasNextTypeFilter.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/BOMTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Bug6388460.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Bug6472982Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Bug6767322.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Bug6767322Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Bug6847819Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/BugTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/DefaultAttributeTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/DoubleXmlnsTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/XMLStreamReaderTest/ExternalDTD.dtd.bak => stream/XMLStreamReaderTest/ExternalDTD.dtd} (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml/stream/XMLStreamReaderTest/ExternalDTD.xml.bak => stream/XMLStreamReaderTest/ExternalDTD.xml} (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Hello.wsdl.data (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IsValidatingTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IsValidatingTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IsValidatingTestInternalSubset.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Issue44Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Issue47Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IssueTracker24.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IssueTracker35.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IssueTracker70.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/IssueTracker70.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Jsr173MR1Req5.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Jsr173MR1Req8.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/NamespaceTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/StreamReaderTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/SupportDTDTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/UTF16-BE.wsdl.data (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/UTF8-BOM.xml.data (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/XML11Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/XMLSchema.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/XMLSchema.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/datatypes.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/report.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/sgml.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/voicexml.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/vxml.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamReaderTest/xml11.xml.data (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/AttributeEscapeTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/Bug6452107.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/Bug6600882Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/Bug6675332Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/Bug7037352Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/DOMUtil.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/DomUtilTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/EmptyElementTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/EncodingTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/NamespaceTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/NullUriDetectionTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/SqeLinuxTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/UnprefixedNameTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/WriterTest.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/XMLStreamWriterTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/message_12.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testEight.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testFive.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testFour.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testOne.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testSeven.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testSix.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/XMLStreamWriterTest/testThree.xml.org (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/basic-form.vxml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/report.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/sgml-bad-systemId.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/sgml.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/sgml_Bug6509774.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/testfile1.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/testfile2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/testfile3.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/testfile4.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/toys.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/stream/vxml.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/5368141.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4693341.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4693341.out (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4693341.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4693341Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4693341_golden.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4693341_golden.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug4892774.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug5073477.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug5073477.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6175602.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6206491.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6206491.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6206491.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6206491_2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6216226Test.java (91%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6311448.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6384805.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6465722.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6467808.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6490380.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6490921.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6505031.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6513892.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6537167.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6540545.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6559595.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6565260.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Bug6940416.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/BugDB12665704.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/BugDB12665704.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/BugDB12665704Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6401137.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6401137.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6401137Test.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6551600.policy (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6551600Test.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6577667.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6577667Test.java (90%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6652519Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6689809Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6905829.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6905829.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6905829Inc.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6905829Test.java (91%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6935697.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6935697.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6935697Test.java (89%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6941869.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6941869.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6941869Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6957215.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6957215.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR6957215Test.java (88%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR7098746.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR7098746.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/CR7098746Test.java (90%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/DOMResultTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/DocumentExtFunc.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/FactoryFindTest.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Issue2204.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Issue2204.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Issue2204Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Issue2290.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/Issue2290Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/MsWordXMLImport.xsl.data (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/NCAA_Conference_Schedule_XML.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/OpenJDK100017Test.java (91%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/PredicateInKeyTest.xml (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/PredicateInKeyTest.xsl (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SAX2DOMTest.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SAX2DOMTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SecureProcessingTest.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SecureProcessingTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SecureProcessingTest.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SourceTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SourceTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/SourceTest.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/StAXSourceTest.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/TransformerFactoryTest.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/TransformerTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/TransformerUtilFactory.java (84%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/VersionDefaultHandler.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/VersionEventWriter.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/ViewEditor1.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/XSLTFunctionsTest.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/attribset27.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/attribset27.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/catalog.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/catalog.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/catalog_10.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/config.dtd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/config.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/default-layout.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/global-variables.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/global.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/home.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/in.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/inner.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/logon.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/maps.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/msgAttach.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/numbering63.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/numbering63.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/outer.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/redirect.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/redirect.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/sax/Bug6451633.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/src.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/template.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/tigertest-in.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/tigertest.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/tmp.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/toys.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/transform.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/upload-media-form.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/upload-media.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/util.xsl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/util/DOMUtil.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/util/SAXUtil.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/util/StAXUtil.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/util/StreamUtil.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/transform/util/TransformerUtil.java (94%) delete mode 100644 jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java delete mode 100644 jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java delete mode 100644 jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/6773084.policy (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/AnyElementTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4966232.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4966254.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4966254.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4966254.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969042.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969089.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969110.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969689.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969692.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969693.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969695.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4969732.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4970380.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4970383.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4970400.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4970402.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4970951.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4971605.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4971607.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4972882.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4986844.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4986844.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4987574.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4988267.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4988267.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4988268.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4988268.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4988387.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4988387.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4996446.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4996446.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug4997818.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug5011500.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug5072946.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug5072946.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug5072946.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6378043.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6449797.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6449797.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6457662.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6467424.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6467424.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6467424Test.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6483188.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6493687.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6493687.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6493687.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6509668.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6526547.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6526547.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6526547.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6531160.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6695843.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6695843.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6695843Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_1.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_10.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_11.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_12.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_13.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_14.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_15.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_16.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_17.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_18.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_19.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_20.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_21.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_22.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_23.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_24.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_25.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_3.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_4.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_5.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_6.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_7.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_8.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084In/Bug6773084_9.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6773084Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6859210.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6925531Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6946312.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6946312Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6954738.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6954738.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Bug6954738_Test.java (92%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/CR6708840Test.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/CR6740048.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/CR6740048.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/CR6740048.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/CREMAS01.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/CREMAS01.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ErrorHandlerImpl.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Issue682.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Issue682.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/Issue682Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30_occurs-error.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30_occurs-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30_occurs-optimize-error.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30_occurs-optimize-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30_occurs-optimize.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/IssueTracker30_occurs.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/JaxpIssue43Test.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/JaxpIssue49.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/JaxpIssue49.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/LargeMaxOccursTest.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/MultiOccursTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/MultiOccursUnboundedTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/OccursTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/OccursUnboundedTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/OccursWildcardTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/OccursWildcardUnbounded.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ParticlesId005Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ParticlesIg004Test.java (88%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ParticlesQ013Test.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ProcessContents-lax-error.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ProcessContents-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ProcessContents.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/TCKGroupA008Test.java (89%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/ValidatorTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/XMLDocBuilder.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/XMLSchemaValidator.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/gMonths-invalid.xml (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/gMonths.xml (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/gMonths.xsd (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/groupA008.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/groupA008ea.red (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/groupA008eb.red (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/hello_literal.wsdl (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/idI009.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/idIimp.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/idIxpns.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/idIxpns1.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/mgG014.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/mgJ014.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-error-max.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-error-min-max.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-error-min.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-unbounded-error-min.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-unbounded-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs-unbounded.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/multi-occurs.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-error-max.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-error-min-max.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-error-min.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-unbounded-error-min.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-unbounded-ok.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-unbounded.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-wildcard-unbounded.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs-wildcard.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/occurs.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesId005.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesId005.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesIe003.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesIg004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesOptimize.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesQ013.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesQ013.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/particlesR005.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/targetNS00101m2.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/targetNS00101m2_stub.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/targetNS00101m2_stub.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/targetNS00101m2a.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/byte_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/byte_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/int_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/int_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/integer_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/integer_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/long_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/long_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/negativeInteger_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/negativeInteger_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/nonNegativeInteger_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/nonNegativeInteger_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/nonPositiveInteger_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/nonPositiveInteger_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/positiveInteger_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/positiveInteger_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/short_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/short_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedByte_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedByte_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedInt_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedInt_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedLong_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedLong_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedShort_fractionDigits004.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252In/unsignedShort_fractionDigits007.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6943252Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6963124.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6963124Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6963468.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6963468.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6963468Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6964720.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6964720Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6967214/RegexTest_1258.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6967214/reD10.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6967214/reD11.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6967214/reD12.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6967214/reE9.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6967214Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6970890.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6970890Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6970890_1.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6971190.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6971190.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6971190Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6971190_v.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6971190_v.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6974551.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6974551.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6974551Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6975265/notatF025.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6975265/notatF037.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6975265/notatF041.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6975265/notatF045.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6975265/notatF049.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6975265Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA2.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA2.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA3.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA3.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA4.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA4.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA5.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA5.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA6.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201/reA6.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6977201Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6989956.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6989956.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug6989956Test.java (99%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug7014246.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/tck/Bug7014246Test.java (98%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/test-element.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/test-sequence.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/test.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/toys.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/toys.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/validation/types.xsd (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/Bug4991857.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/Bug4991939.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/Bug4992788.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/Bug4992793.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/Bug4992805.java (95%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/ClassLoaderTest.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/MyClassLoader.java (93%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/SecureProcessingTest.java (94%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/SecureProcessingTest.xml (100%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/XPathAnyTypeTest.java (97%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/XPathExpAnyTypeTest.java (96%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/XPathTest.java (89%) rename jaxp/test/javax/xml/jaxp/unittest/{javax/xml => }/xpath/XPathTestBase.java (92%) diff --git a/jaxp/test/javax/xml/jaxp/unittest/TEST.properties b/jaxp/test/javax/xml/jaxp/unittest/TEST.properties deleted file mode 100644 index 23136c131a5..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/TEST.properties +++ /dev/null @@ -1,6 +0,0 @@ -# jaxp test uses TestNG -TestNG.dirs = . - -# Declare module dependency -modules=java.xml - diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6350682.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6350682.java rename to jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java index 04d4f2502b7..e955df49676 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6350682.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6350682.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.common; +package common; import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.TransformerFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6723276Test.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6723276Test.java rename to jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java index 7e1ecd89a6f..63ac73d4973 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6723276Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6723276Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.common; +package common; import org.testng.annotations.Test; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169.xml b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169.xml rename to jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169.xsd b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169.xsd rename to jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169Test.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169Test.java rename to jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java index fa35c3aa2cb..8f03995bc10 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug6941169Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.common; +package common; import java.io.InputStream; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug7143711Test.java b/jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug7143711Test.java rename to jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java index 7b38db0c0c2..5074da2150b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug7143711Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/common/Bug7143711Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.common; +package common; import java.security.AllPermission; import java.security.Permission; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6320118.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6320118.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java index 959a978f6f0..87d3829e658 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6320118.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6320118.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.datatype; +package datatype; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937951Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java similarity index 88% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937951Test.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java index a7335644c61..161f127b9b2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937951Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937951Test.java @@ -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 @@ -21,7 +21,11 @@ * questions. */ -package javax.xml.datatype; +package datatype; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937964Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937964Test.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java index 31aff0538f9..73ea2930cf2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937964Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug6937964Test.java @@ -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 @@ -21,11 +21,15 @@ * questions. */ -package javax.xml.datatype; +package datatype; import java.math.BigDecimal; import java.math.BigInteger; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeConstants; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.Duration; import javax.xml.namespace.QName; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug7042647Test.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java similarity index 89% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug7042647Test.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java index 36438265010..3bf98f65bed 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug7042647Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/Bug7042647Test.java @@ -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 @@ -21,11 +21,15 @@ * questions. */ -package javax.xml.datatype; +package datatype; import java.util.Calendar; import java.util.GregorianCalendar; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DatatypeFactoryTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DatatypeFactoryTest.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java index 67e458ee719..c6977e98967 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DatatypeFactoryTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/DatatypeFactoryTest.java @@ -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 @@ -21,11 +21,16 @@ * questions. */ -package javax.xml.datatype; +package datatype; import java.math.BigDecimal; import java.math.BigInteger; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeConstants; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.Duration; +import javax.xml.datatype.XMLGregorianCalendar; import javax.xml.namespace.QName; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DurationTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DurationTest.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java index f97536c8765..ece77adc8fa 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DurationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/DurationTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.datatype; +package datatype; import java.math.BigDecimal; import java.math.BigInteger; @@ -30,6 +30,10 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone; +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeConstants; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.Duration; import javax.xml.namespace.QName; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/FactoryFindTest.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java index e9e84bd61a3..87e46373e8b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/FactoryFindTest.java @@ -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 @@ -21,11 +21,13 @@ * questions. */ -package javax.xml.datatype; +package datatype; import java.net.URL; import java.net.URLClassLoader; +import javax.xml.datatype.DatatypeFactory; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/XMLGregorianCalendarTest.java b/jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/XMLGregorianCalendarTest.java rename to jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java index b842fd5a177..4c3deb901ac 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/XMLGregorianCalendarTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/XMLGregorianCalendarTest.java @@ -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 @@ -21,7 +21,12 @@ * questions. */ -package javax.xml.datatype; +package datatype; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeConstants; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; import org.testng.Assert; import org.testng.annotations.BeforeMethod; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4915524.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4915524.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java index f496447619d..3540089c9ef 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4915524.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915524.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4915748.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4915748.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java index 9e04b082254..8c8f71714de 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4915748.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4915748.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966082.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966082.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java index 3bc3c357443..b18f8094710 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966082.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966082.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966082.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966082.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966138.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966138.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java index ddd0bf5ff89..5244112fe3f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966138.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966138.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java index dd55013d571..890ada5f019 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.xsd b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966142.xsd rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966142.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java index 7133089d296..9cf87b200af 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.xsd b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug4966143.xsd rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug4966143.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6339023.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6339023.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java index 273708cc209..7b611bd9993 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6339023.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6339023.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6355326.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6355326.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java index 911baf4a07f..cea41cc9a87 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6355326.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6355326.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6367542.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6367542.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java index fa77a70df16..c0a3e164834 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6367542.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6367542.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6520131.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6520131.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java index c30f43070da..982d481014e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6520131.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6520131.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6521260.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6521260.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java index bcfa894ed53..3c9a97644eb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6521260.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6521260.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6582545.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6582545.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6582545Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6582545Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java index 2966d0accc6..fec67cdfe20 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6582545Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6582545Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.File; import java.io.IOException; @@ -32,6 +32,9 @@ import javax.xml.parsers.ParserConfigurationException; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.NodeList; import org.xml.sax.SAXException; /* diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6879614.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6879614.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6879614Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6879614Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java index 7c669698814..b19a28ba29a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/Bug6879614Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/Bug6879614Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.File; import java.io.IOException; @@ -31,6 +31,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.testng.annotations.Test; +import org.w3c.dom.Document; import org.xml.sax.SAXException; /* diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6333993Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6333993Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java index b54e9c61de0..84c06b829b4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6333993Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6333993Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.ByteArrayInputStream; @@ -34,6 +34,8 @@ import javax.xml.xpath.XPathFactory; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.w3c.dom.NodeList; /* * @bug 6333993 diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6517707Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6517707Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java index 67241c85d05..9bc2c6c3a0f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6517707Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517707Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -33,6 +33,9 @@ import javax.xml.parsers.ParserConfigurationException; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Entity; import org.xml.sax.InputSource; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6517717Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6517717Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java index 02e1972b11a..44bab9c37f7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6517717Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6517717Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.IOException; import java.io.StringReader; @@ -32,6 +32,9 @@ import javax.xml.parsers.ParserConfigurationException; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.DOMException; +import org.w3c.dom.Document; +import org.w3c.dom.Entity; import org.xml.sax.InputSource; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6909336Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6909336Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java index 85e90cd294b..15dc9636af6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/CR6909336Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/CR6909336Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; @@ -30,6 +30,7 @@ import javax.xml.transform.dom.DOMResult; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.Document; import org.w3c.dom.bootstrap.DOMImplementationRegistry; /* diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMConfigurationTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMConfigurationTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java index 6a4fba6245c..0bc4669c4e6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMConfigurationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.java @@ -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 @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.w3c.dom; +package dom; import java.io.IOException; import java.io.StringReader; @@ -34,6 +34,21 @@ import javax.xml.parsers.ParserConfigurationException; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.Attr; +import org.w3c.dom.CDATASection; +import org.w3c.dom.Comment; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.DOMError; +import org.w3c.dom.DOMErrorHandler; +import org.w3c.dom.DOMException; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Entity; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.ProcessingInstruction; +import org.w3c.dom.Text; import org.w3c.dom.ls.DOMImplementationLS; import org.w3c.dom.ls.LSInput; import org.w3c.dom.ls.LSParser; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMConfigurationTest.xsd b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMConfigurationTest.xsd rename to jaxp/test/javax/xml/jaxp/unittest/dom/DOMConfigurationTest.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMXPathTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMXPathTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java index fa92dc7175b..ebd97facd4b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMXPathTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/DOMXPathTest.java @@ -20,12 +20,14 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.w3c.dom; +package dom; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; + import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.DOMImplementation; /* * @bug 8042244 diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/JdkXmlDomTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/JdkXmlDomTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java index b65b4fd6bff..4c1269cf79c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/JdkXmlDomTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/JdkXmlDomTest.java @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package org.w3c.dom; +package dom; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/TCKEncodingTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/TCKEncodingTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java index a5148fb563b..4f4ece1766a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/TCKEncodingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/TCKEncodingTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom; +package dom; import java.io.IOException; import java.io.StringReader; @@ -32,6 +32,7 @@ import javax.xml.parsers.ParserConfigurationException; import org.testng.Assert; import org.testng.annotations.Test; +import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug4973153.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug4973153.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java index 6b9b44ccaac..b16d06c6172 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug4973153.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug4973153.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6290947.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6290947.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java index 065dfcbe491..9ef91451fbe 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6290947.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6290947.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import java.io.StringBufferInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6354955.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6354955.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java index d184cf8e6f2..cdaa0cf4d03 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6354955.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6354955.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6376823.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6376823.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java index f3ba84e2e0e..d4fcc32aeb9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6376823.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6376823.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import java.io.StringBufferInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6710741Test.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6710741Test.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java index 3f70fb7b6bb..d0b95b99073 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/Bug6710741Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/Bug6710741Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -30,6 +30,8 @@ import org.testng.Assert; import org.testng.annotations.Test; import org.w3c.dom.Document; import org.w3c.dom.Element; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSException; /* * @bug 6710741 diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSParserTCKTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSParserTCKTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java index 69e27e1bb96..8c609fc594d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSParserTCKTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTCKTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import java.io.IOException; import java.io.StringBufferInputStream; @@ -39,6 +39,10 @@ import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSParser; +import org.w3c.dom.ls.LSParserFilter; import org.w3c.dom.traversal.NodeFilter; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSParserTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSParserTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java index 3d0c199ea3f..bf24b878037 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSParserTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSParserTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -33,6 +33,10 @@ import org.w3c.dom.DOMError; import org.w3c.dom.DOMErrorHandler; import org.w3c.dom.DOMException; import org.w3c.dom.DOMImplementation; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSInput; +import org.w3c.dom.ls.LSParser; +import org.w3c.dom.ls.LSResourceResolver; /* * @summary Test LSParser's DOMConfiguration for supported properties. diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSSerializerTest.java b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSSerializerTest.java rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java index 9df924a3c43..172d3299d5b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSSerializerTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/LSSerializerTest.java @@ -21,7 +21,7 @@ * questions. */ -package org.w3c.dom.ls; +package dom.ls; import java.io.IOException; import java.io.OutputStream; @@ -39,6 +39,10 @@ import org.w3c.dom.DOMError; import org.w3c.dom.DOMErrorHandler; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; +import org.w3c.dom.ls.DOMImplementationLS; +import org.w3c.dom.ls.LSException; +import org.w3c.dom.ls.LSOutput; +import org.w3c.dom.ls.LSSerializer; import org.xml.sax.InputSource; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/note_in_dtd.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/ls/note_in_dtd.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/note_in_dtd.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/ls/note_in_dtd.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/test.xml b/jaxp/test/javax/xml/jaxp/unittest/dom/test.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/test.xml rename to jaxp/test/javax/xml/jaxp/unittest/dom/test.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/test.xsd b/jaxp/test/javax/xml/jaxp/unittest/dom/test.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/test.xsd rename to jaxp/test/javax/xml/jaxp/unittest/dom/test.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java index 7978e5c7c15..5c8248a065b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.java @@ -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 @@ -21,10 +21,13 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + import org.testng.Assert; import org.testng.annotations.Test; import org.xml.sax.helpers.DefaultHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4674384_MAX_OCCURS_Test.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4934208.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4934208.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java index 8e77af0ef87..50f5514f3af 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4934208.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4934208.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4967002.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4967002.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java index 3fd09a7b6e4..084323445a9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4967002.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4967002.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java index b8ab86e6858..c87f47187c7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import javax.xml.parsers.SAXParserFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4985486.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java index 38036a725e0..6a50919122f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991020.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java index 39091809059..f48e0bdc783 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug4991946.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java index 292a3042e71..68d9a170435 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5010072.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5025825.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5025825.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java index a2912089f9e..9a87104746b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5025825.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug5025825.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6309988.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6309988.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java index 499dc2a5861..fc38d41c3e4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6309988.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6309988.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6341770.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6341770.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java index e5b1f74a793..94873dfaab3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6341770.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6341770.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; import java.io.FileWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6361283.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6361283.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java index 8a0f3c9f322..f3bfb88fce1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6361283.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6361283.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6506304Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6506304Test.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java index b93e7333977..a7e82d51eab 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6506304Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6506304Test.java @@ -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 @@ -21,7 +21,10 @@ * questions. */ -package javax.xml.parsers; +package parsers; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java index c1d141eef53..c6a03542a43 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.FileReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6518733.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java index c76304d8bad..e7aa719dd81 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6564400.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java index 49488360b0d..ff3d19388e6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.InputStream; import java.io.StringBufferInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786ErrorHandler.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786ErrorHandler.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java index 5d55cea1029..b938eb6eb6f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786ErrorHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6573786ErrorHandler.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6594813.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6594813.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java index d660f958bcc..a89d834642f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6594813.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6594813.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.StringReader; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.dtd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.dtd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java index d68837793fe..db724d83e86 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841_xhtml11-flat.dtd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841_xhtml11-flat.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841_xhtml11-flat.dtd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6608841_xhtml11-flat.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6690015.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6690015.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java index 50838e82196..25f536f73bb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6690015.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6690015.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6760982.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6760982.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java index 1a2bc04f9de..cfd2fe26a74 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6760982.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6760982.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; import java.io.FileReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6849942Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6849942Test.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java index 3a28a094243..c65bd1bc285 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6849942Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug6849942Test.java @@ -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 @@ -21,10 +21,13 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.ByteArrayInputStream; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + import org.testng.Assert; import org.testng.annotations.Test; import org.w3c.dom.Document; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608.dtd b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608.dtd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608Test.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java index c4a7f7a42e6..bd1e303dc17 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608Test.java @@ -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 @@ -21,11 +21,14 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.File; import java.io.IOException; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608_1.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608_1.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608_1.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7157608_1.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7166896Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java similarity index 91% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7166896Test.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java index e886bca59c9..7230f9c1488 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7166896Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug7166896Test.java @@ -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 @@ -21,10 +21,14 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.IOException; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + import org.testng.Assert; import org.testng.annotations.Test; import org.w3c.dom.Document; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug8073385.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug8073385.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java index 1d3aa66ce08..5a034c378b9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug8073385.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/Bug8073385.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.StringReader; import java.util.Locale; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/DosTest.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/DosTest.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/DosTest.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/DosTest.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/DosTest3.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/DosTest3.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/DosTest3.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/DosTest3.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/FactoryFindTest.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java index 6f769714125..031b0fea2a2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/FactoryFindTest.java @@ -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 @@ -21,11 +21,13 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.net.URL; import java.net.URLClassLoader; +import javax.xml.parsers.SAXParserFactory; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/MyDefaultHandler.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/MyDefaultHandler.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java index a63bcd4cf26..c690163eb86 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/MyDefaultHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyDefaultHandler.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import org.xml.sax.Attributes; import org.xml.sax.Locator; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/MyErrorHandler.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/MyErrorHandler.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java index 3dc24dcdfcb..695c932f603 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/MyErrorHandler.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/MyErrorHandler.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers; +package parsers; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/ParseEmptyStream.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/ParseEmptyStream.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java index cc9ba34faa7..a6dafccba4c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/ParseEmptyStream.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/ParseEmptyStream.java @@ -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 @@ -21,10 +21,13 @@ * questions. */ -package javax.xml.parsers; +package parsers; import java.io.StringReader; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + import org.testng.Assert; import org.testng.annotations.Test; import org.xml.sax.InputSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/bug6690015.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/bug6690015.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/bug6690015.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/bug6690015.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/bug6760982.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/bug6760982.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/bug6760982.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/bug6760982.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/catalog.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/catalog.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/catalog.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/catalog.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/catalog.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/catalog.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/catalog.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/catalog.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/entity.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/entity.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/entity.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/entity.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/entity64K.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/entity64K.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/entity64K.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/entity64K.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/test.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/test.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/test.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/test.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/test1.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/test1.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/test1.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/test1.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/test2.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/test2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/test2.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/test2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/toys.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/toys.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/toys.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/toys.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/toys.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/toys.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/toys.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/toys.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/toys3002.xsd b/jaxp/test/javax/xml/jaxp/unittest/parsers/toys3002.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/toys3002.xsd rename to jaxp/test/javax/xml/jaxp/unittest/parsers/toys3002.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/Bug6794483Test.java b/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/Bug6794483Test.java rename to jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java index ee5e2587d6c..841191704eb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/Bug6794483Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/Bug6794483Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.parsers.xinclude; +package parsers.xinclude; import static java.lang.System.lineSeparator; import static org.testng.Assert.assertEquals; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/test1.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/test1.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/test1.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/test1.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/test2.xml b/jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/test2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/xinclude/test2.xml rename to jaxp/test/javax/xml/jaxp/unittest/parsers/xinclude/test2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java b/jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java deleted file mode 100644 index 340f5de7d55..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package policy; - -import java.security.Policy; - -public class PolicyUtil { - - public static void changePolicy(String policyFile) { - System.setProperty("java.security.policy", policyFile); - Policy.getPolicy().refresh(); - } - -} diff --git a/jaxp/test/javax/xml/jaxp/unittest/policy/common.policy b/jaxp/test/javax/xml/jaxp/unittest/policy/common.policy deleted file mode 100644 index 0ca5f742c09..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/policy/common.policy +++ /dev/null @@ -1,27 +0,0 @@ -grant { - permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; - permission java.lang.RuntimePermission "accessDeclaredMembers"; - - permission java.io.FilePermission "${test.classes}/../../-", "read, write, delete"; - permission java.io.FilePermission ".", "read, write, delete"; - permission java.util.PropertyPermission "*", "read, write"; - - permission java.lang.RuntimePermission "setSecurityManager"; - permission java.lang.RuntimePermission "createSecurityManager"; - permission java.lang.RuntimePermission "createClassLoader"; - permission java.lang.RuntimePermission "setIO"; - permission java.lang.RuntimePermission "setContextClassLoader"; - permission java.security.SecurityPermission "getPolicy"; - - permission java.io.FilePermission "${test.src}/-", "read, write, delete"; - permission java.io.FilePermission "${user.dir}/-", "read, write, delete"; - permission java.io.FilePermission "${java.io.tmpdir}/-", "read, write, delete"; - - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.bcel.internal.classfile"; - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.bcel.internal.generic"; - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.stream.writers"; - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xerces.internal.impl"; - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xalan.internal"; - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xalan.internal.xsltc.trax"; - permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xalan.internal.xslt"; -}; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Attributes2ImplTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Attributes2ImplTest.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java index 362440fcf55..e8a1bba6864 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Attributes2ImplTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Attributes2ImplTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6889654Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6889654Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java index ece2b16f09c..e5043aa0f48 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6889654Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6889654Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6925410Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6925410Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java index 280d2c8d6e1..5679ed6b262 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6925410Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6925410Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import javax.xml.datatype.DatatypeConfigurationException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6949607Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6949607Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java index 800788a8581..d8fd89cd29a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6949607Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6949607Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.ByteArrayInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6992561Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6992561Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java index f4761bf9440..d82fe101f47 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug6992561Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug6992561Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug7057778.xml b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug7057778.xml rename to jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug7057778Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug7057778Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java index 39039ddc223..77809766d5e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/Bug7057778Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/DefaultHandler2Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/DefaultHandler2Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java index ecce29090ce..15205d745cb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/DefaultHandler2Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/DefaultHandler2Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/IssueTracker56Test.java b/jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/IssueTracker56Test.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java index 9b26c5d04e0..b5a46472f34 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/IssueTracker56Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/MyDefaultHandler2.java b/jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/MyDefaultHandler2.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java index 548d662256e..44ac9fde73d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/MyDefaultHandler2.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/MyDefaultHandler2.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/NSSupportTest.java b/jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/NSSupportTest.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java index b2c5221f259..c04ecc7ab54 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/NSSupportTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/NSSupportTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import java.util.Enumeration; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/SAXExceptionExt.java b/jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/SAXExceptionExt.java rename to jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java index 3e5421c5573..9b9800d27fa 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/SAXExceptionExt.java +++ b/jaxp/test/javax/xml/jaxp/unittest/sax/SAXExceptionExt.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package org.xml.sax; +package sax; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/externalDTD.dtd b/jaxp/test/javax/xml/jaxp/unittest/sax/externalDTD.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/externalDTD.dtd rename to jaxp/test/javax/xml/jaxp/unittest/sax/externalDTD.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/toys.xml b/jaxp/test/javax/xml/jaxp/unittest/sax/toys.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/toys.xml rename to jaxp/test/javax/xml/jaxp/unittest/sax/toys.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/toys_error.xml b/jaxp/test/javax/xml/jaxp/unittest/sax/toys_error.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/org/xml/sax/toys_error.xml rename to jaxp/test/javax/xml/jaxp/unittest/sax/toys_error.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/AttributeLocalNameTest/AttributeLocalNameTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/AttributeLocalNameTest/AttributeLocalNameTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java index dd2570c8daa..01d54e05785 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/AttributeLocalNameTest/AttributeLocalNameTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/AttributeLocalNameTest/AttributeLocalNameTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.AttributeLocalNameTest; +package stream.AttributeLocalNameTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6370703.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6370703.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java index 0366b2ef831..f386e5d5a30 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6370703.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6370703.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6378422.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6378422.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java index be4e230a51f..f273d1f002e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6378422.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6378422.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import javax.xml.stream.XMLInputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6380870.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6380870.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java index 8f8cfa45f98..8eb6a7ffad9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6380870.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6380870.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6489502.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6489502.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java index 1c0793995fa..9cc264a4fd6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6489502.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6489502.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLInputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6509774.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6509774.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java index 711775fba81..b92f4bf0757 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6509774.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6509774.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6688002Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6688002Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java index 594546296b4..57bb97ed144 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6688002Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6688002Test.java @@ -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 @@ -21,13 +21,18 @@ * questions. */ -package javax.xml.stream; +package stream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6976938.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6976938.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6976938Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6976938Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java index 08be1fe5c51..ac317469cd7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Bug6976938Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/Bug6976938Test.java @@ -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 @@ -21,9 +21,13 @@ * questions. */ -package javax.xml.stream; +package stream; import javax.xml.namespace.QName; +import javax.xml.stream.EventFilter; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/CoalesceTest/CoalesceTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/CoalesceTest/CoalesceTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java index 899e2705892..70f286cefbe 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/CoalesceTest/CoalesceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/CoalesceTest.java @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package javax.xml.stream.CoalesceTest; +package stream.CoalesceTest; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/CoalesceTest/coalesce.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/coalesce.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/CoalesceTest/coalesce.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/CoalesceTest/coalesce.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/EntityTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/EntityTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java index 0da8153adce..aa72e3fb139 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/EntityTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/EntityTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.EntitiesTest; +package stream.EntitiesTest; import java.io.IOException; import java.io.InputStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/testCharRef.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/testCharRef.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/testCharRef.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/testCharRef.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/testCharRef.xml.output b/jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/testCharRef.xml.output similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EntitiesTest/testCharRef.xml.output rename to jaxp/test/javax/xml/jaxp/unittest/stream/EntitiesTest/testCharRef.xml.output diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EventReaderDelegateTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EventReaderDelegateTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java index 77186aea6e1..b314ff7a022 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/EventReaderDelegateTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventReaderDelegateTest.java @@ -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 @@ -21,14 +21,20 @@ * questions. */ -package javax.xml.stream; +package stream; import org.testng.annotations.Test; import org.testng.Assert; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; import javax.xml.stream.util.EventReaderDelegate; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue41Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue41Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java index 87d3ad41587..738f4e3329a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue41Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue41Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.Events; +package stream.EventsTest; import java.io.StringReader; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue48Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue48Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java index b10b6cd92c0..b5673029449 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue48Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue48Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.Events; +package stream.EventsTest; import java.io.StringReader; import java.util.Iterator; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue53Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue53Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java index c9c1deeac13..7193d27e48f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue53Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue53Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.Events; +package stream.EventsTest; import javax.xml.stream.XMLEventFactory; import javax.xml.stream.events.StartDocument; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue58Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue58Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java index 30ce60028dd..3c467411b70 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/Events/Issue58Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/EventsTest/Issue58Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.Events; +package stream.EventsTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/FactoryFindTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java index 555c8a8a565..f016df38df4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import java.io.File; import java.io.FileInputStream; @@ -32,6 +32,9 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.Properties; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLOutputFactory; + import org.testng.Assert; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/FactoryFindTest.policy b/jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.policy similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/FactoryFindTest.policy rename to jaxp/test/javax/xml/jaxp/unittest/stream/FactoryFindTest.policy diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/IgnoreExternalDTDTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java similarity index 90% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/IgnoreExternalDTDTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java index 79b6c89603c..5475cba5d6e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/IgnoreExternalDTDTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/IgnoreExternalDTDTest.java @@ -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 @@ -21,10 +21,15 @@ * questions. */ -package javax.xml.stream; +package stream; import java.io.StringReader; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; + import org.testng.annotations.Test; /* diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/ProcessingInstruction/ProcessingInstructionTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/ProcessingInstruction/ProcessingInstructionTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java index 9dc297f9761..1234a37a803 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/ProcessingInstruction/ProcessingInstructionTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/ProcessingInstructionTest/ProcessingInstructionTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.ProcessingInstruction; +package stream.ProcessingInstructionTest; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/StreamReaderDelegateTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/StreamReaderDelegateTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java index b1f76f9672b..d7f9f485fc2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/StreamReaderDelegateTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/StreamReaderDelegateTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream; +package stream; import java.io.File; import java.io.FileInputStream; @@ -30,6 +30,11 @@ import java.io.InputStream; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; +import javax.xml.stream.FactoryConfigurationError; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; import javax.xml.stream.util.StreamReaderDelegate; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventLocationTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventLocationTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java index eccc7ff7d0c..6c760382c58 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventLocationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventLocationTest.java @@ -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 @@ -21,8 +21,10 @@ * questions. */ -package javax.xml.stream; +package stream; +import javax.xml.stream.Location; +import javax.xml.stream.XMLEventFactory; import javax.xml.stream.events.XMLEvent; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6489890.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6489890.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java index 84a49f956c4..0d554808f79 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6489890.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6489890.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLInputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6555001.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6555001.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java index dfd95e3aca2..566186c4c33 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6555001.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6555001.java @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6586466Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6586466Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java index c3484426bad..319c50ad7fa 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6586466Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6586466Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import org.testng.annotations.Test; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6613059Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6613059Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java index 73fe8c4c61e..88d0be0c17d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6613059Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6613059Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import org.testng.annotations.Test; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6668115Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6668115Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java index a66ec748058..c56e7569c3c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6668115Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6668115Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6846133Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6846133Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java index 0470a6bf441..16bf959dc45 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Bug6846133Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Bug6846133Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import javax.xml.stream.XMLStreamException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Issue40Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Issue40Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java index 48ecebcae90..161b6e6dcdb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/Issue40Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/Issue40Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventReaderTest; +package stream.XMLEventReaderTest; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/bug6613059.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/bug6613059.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/bug6613059.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/bug6613059.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/play.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/play.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/play.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/play.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/play2.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/play2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/play2.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/play2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/sgml.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/sgml.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventReaderTest/sgml.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventReaderTest/sgml.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java index 9c2df037342..1805e9922f0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventWriterTest; +package stream.XMLEventWriterTest; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.wsdl b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.wsdl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.wsdl rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.wsdl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/ReaderToWriterTest.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/ReaderToWriterTest.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/W2JDLR4002TestService.wsdl.data b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/W2JDLR4002TestService.wsdl.data similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/W2JDLR4002TestService.wsdl.data rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/W2JDLR4002TestService.wsdl.data diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/XMLEventWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/XMLEventWriterTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java index d12ca93b4a9..ab076f27d6e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/XMLEventWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLEventWriterTest; +package stream.XMLEventWriterTest; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/XMLEventWriterTest.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/XMLEventWriterTest.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/XMLEventWriterTest.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/merge-1.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/merge-1.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/merge-1.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/merge-1.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/merge-2.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/merge-2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/merge-2.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/merge-2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/replace1.txt b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/replace1.txt similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLEventWriterTest/replace1.txt rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLEventWriterTest/replace1.txt diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/Bug6756677Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/Bug6756677Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java index 569d6c5f5f9..17604ac6d09 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/Bug6756677Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6756677Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLInputFactoryTest; +package stream.XMLInputFactoryTest; import javax.xml.stream.XMLInputFactory; @@ -36,7 +36,7 @@ public class Bug6756677Test { @Test public void testNewInstance() { - String myFactory = "javax.xml.stream.XMLInputFactoryTest.MyInputFactory"; + String myFactory = "stream.XMLInputFactoryTest.MyInputFactory"; try { System.setProperty("MyInputFactory", myFactory); XMLInputFactory xif = XMLInputFactory.newInstance("MyInputFactory", null); @@ -52,7 +52,7 @@ public class Bug6756677Test { // newFactory was added in StAX 1.2 @Test public void testNewFactory() { - String myFactory = "javax.xml.stream.XMLInputFactoryTest.MyInputFactory"; + String myFactory = "stream.XMLInputFactoryTest.MyInputFactory"; ClassLoader cl = null; try { System.setProperty("MyInputFactory", myFactory); diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/Bug6909759Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/Bug6909759Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java index 1c699c83323..36cc136dadd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/Bug6909759Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/Bug6909759Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLInputFactoryTest; +package stream.XMLInputFactoryTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/IssueTracker38.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/IssueTracker38.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java index f468d7a0f41..448a854d45f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/IssueTracker38.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/IssueTracker38.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLInputFactoryTest; +package stream.XMLInputFactoryTest; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLInputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/MyInputFactory.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/MyInputFactory.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java index 581c122585c..551d3f0f8d2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/MyInputFactory.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/MyInputFactory.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLInputFactoryTest; +package stream.XMLInputFactoryTest; import java.io.InputStream; import java.io.Reader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/play.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/play.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLInputFactoryTest/play.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLInputFactoryTest/play.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/Bug6846132Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/Bug6846132Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java index 9e5093d35e6..15afdafd751 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/Bug6846132Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/Bug6846132Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLOutputFactoryTest; +package stream.XMLOutputFactoryTest; import javax.xml.stream.XMLEventWriter; import javax.xml.stream.XMLOutputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java index 64517c363ed..884c9235d24 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/DuplicateNSDeclarationTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLOutputFactoryTest; +package stream.XMLOutputFactoryTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/StreamResultTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/StreamResultTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java index 368c80c1b0d..96d928c6572 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLOutputFactoryTest/StreamResultTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLOutputFactoryTest/StreamResultTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLOutputFactoryTest; +package stream.XMLOutputFactoryTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/XMLResolverTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/XMLResolverTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java index 9d4ca307fff..1a0780398d6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/XMLResolverTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLResolverTest; +package stream.XMLResolverTest; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/XMLResolverTest.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/XMLResolverTest.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/XMLResolverTest.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/replace1.txt b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/replace1.txt similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/replace1.txt rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/replace1.txt diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/replace2.txt b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/replace2.txt similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLResolverTest/replace2.txt rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLResolverTest/replace2.txt diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamExceptionTest/ExceptionTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamExceptionTest/ExceptionTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java index a64d93f1dd8..3e0dda7d042 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamExceptionTest/ExceptionTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamExceptionTest/ExceptionTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamExceptionTest; +package stream.XMLStreamExceptionTest; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/Bug6481615.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/Bug6481615.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java index 25bc88d22d6..1aa221969d3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/Bug6481615.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481615.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamFilterTest; +package stream.XMLStreamFilterTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/Bug6481678.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/Bug6481678.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java index 1f697b775a5..9b3273ac09e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/Bug6481678.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/Bug6481678.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamFilterTest; +package stream.XMLStreamFilterTest; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java index 5625f78177f..3df73ae0472 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamFilterTest; +package stream.XMLStreamFilterTest; import javax.xml.stream.StreamFilter; import javax.xml.stream.XMLInputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTest.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTest.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTest.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTypeFilter.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTypeFilter.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java index 95b3f505a27..1fd6e20fe08 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamFilterTest/HasNextTypeFilter.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamFilterTest/HasNextTypeFilter.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamFilterTest; +package stream.XMLStreamFilterTest; import javax.xml.stream.EventFilter; import javax.xml.stream.StreamFilter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/BOMTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/BOMTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java index eb7c3b44770..b253e95b1b0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/BOMTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BOMTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6388460.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6388460.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java index 4d6b58ad41a..c73348c744c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6388460.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6388460.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6472982Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6472982Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java index 830718fe175..c22dde736de 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6472982Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6472982Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6767322.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6767322.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6767322Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6767322Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java index fe0da552cc8..b9ffde7fefd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6767322Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6767322Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.ByteArrayInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6847819Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6847819Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java index c9211c06781..2480b727d90 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Bug6847819Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Bug6847819Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import org.testng.annotations.Test; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/BugTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/BugTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java index 2499a07db4a..15e01a21896 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/BugTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/BugTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/DefaultAttributeTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/DefaultAttributeTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java index 33e8c5b9353..6ce3bd4568d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/DefaultAttributeTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DefaultAttributeTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.util.Iterator; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/DoubleXmlnsTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/DoubleXmlnsTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java index da73bd6cc91..df1ced6bb61 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/DoubleXmlnsTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/DoubleXmlnsTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/ExternalDTD.dtd.bak b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/ExternalDTD.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/ExternalDTD.dtd.bak rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/ExternalDTD.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/ExternalDTD.xml.bak b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/ExternalDTD.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/ExternalDTD.xml.bak rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/ExternalDTD.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Hello.wsdl.data b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Hello.wsdl.data similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Hello.wsdl.data rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Hello.wsdl.data diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java index dcd2d39b2bb..06dc2665a7f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTest.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTest.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTest.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTestInternalSubset.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTestInternalSubset.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IsValidatingTestInternalSubset.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IsValidatingTestInternalSubset.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Issue44Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Issue44Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java index 47ed0bc9ff9..082aa87d0c4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Issue44Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue44Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Issue47Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Issue47Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java index 736971d1f5a..7d868423677 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Issue47Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Issue47Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker24.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker24.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java index 0d2f723fcd1..dd0fb1a0bf9 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker24.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker24.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker35.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker35.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java index 2f93c9810b6..1aa8d6b4c7c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker35.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker35.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker70.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker70.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java index ed9dc284943..c616a3aa669 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker70.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker70.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/IssueTracker70.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/IssueTracker70.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req5.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req5.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java index c58fd03908d..50dfed8a487 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req5Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req8.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req8.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java index c39106f24bc..d1c007402ff 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/Jsr173MR1Req8Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/NamespaceTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/NamespaceTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java index 75d32705daf..5c9440d0998 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/NamespaceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/NamespaceTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/StreamReaderTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/StreamReaderTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java index 8b7475db66a..cbaa37863cf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/StreamReaderTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/StreamReaderTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/SupportDTDTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/SupportDTDTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java index 7b8e28e8a01..1a2e325fdd2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/SupportDTDTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/SupportDTDTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/UTF16-BE.wsdl.data b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/UTF16-BE.wsdl.data similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/UTF16-BE.wsdl.data rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/UTF16-BE.wsdl.data diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/UTF8-BOM.xml.data b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/UTF8-BOM.xml.data similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/UTF8-BOM.xml.data rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/UTF8-BOM.xml.data diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java index 5e193f667fa..5befcb70609 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/VoiceXMLDTDTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XML11Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XML11Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java index 2293aaca37a..ac98279175d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XML11Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XML11Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamReaderTest; +package stream.XMLStreamReaderTest; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLInputFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XMLSchema.dtd b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XMLSchema.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XMLSchema.dtd rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XMLSchema.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XMLSchema.xsd b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XMLSchema.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/XMLSchema.xsd rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/XMLSchema.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/datatypes.dtd b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/datatypes.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/datatypes.dtd rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/datatypes.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/report.dtd b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/report.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/report.dtd rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/report.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/sgml.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/sgml.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/sgml.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/sgml.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/voicexml.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/voicexml.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/voicexml.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/voicexml.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/vxml.dtd b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/vxml.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/vxml.dtd rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/vxml.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/xml11.xml.data b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/xml11.xml.data similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamReaderTest/xml11.xml.data rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamReaderTest/xml11.xml.data diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/AttributeEscapeTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/AttributeEscapeTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java index 0cd9466dbf3..7a426c93f8d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/AttributeEscapeTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/AttributeEscapeTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6452107.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6452107.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java index 2d45aa2f603..b3148c60502 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6452107.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6452107.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; import java.io.OutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6600882Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6600882Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java index 3b22705100a..f34b559f86c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6600882Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6600882Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6675332Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6675332Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java index a22580670a0..e52fb4acbd4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug6675332Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug6675332Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug7037352Test.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug7037352Test.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java index a15b7a6142f..7c1e50264d5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/Bug7037352Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/Bug7037352Test.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/DOMUtil.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/DOMUtil.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java index 674e00dc193..f59ef011018 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/DOMUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DOMUtil.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.IOException; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/DomUtilTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/DomUtilTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java index 76d5c981bd3..d2c2491e36e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/DomUtilTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/DomUtilTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/EmptyElementTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/EmptyElementTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java index 475c3edb323..b813ef5607c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/EmptyElementTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EmptyElementTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/EncodingTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/EncodingTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java index d79a2331374..50973152487 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/EncodingTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/EncodingTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NamespaceTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NamespaceTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java index 7f036defb2f..24d89a08ba6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NamespaceTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NamespaceTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NullUriDetectionTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NullUriDetectionTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java index 9dbb40cec11..3eb0222cbaf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NullUriDetectionTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/NullUriDetectionTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/SqeLinuxTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/SqeLinuxTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java index fa53214f633..90ca0f313a2 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/SqeLinuxTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SqeLinuxTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/UnprefixedNameTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/UnprefixedNameTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java index c4174cf10fa..5e05fd82394 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/UnprefixedNameTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/UnprefixedNameTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/WriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/WriterTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java index 05f777d9327..adb43d95e0a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/WriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/WriterTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.FileInputStream; import java.io.FileOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/XMLStreamWriterTest.java b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/XMLStreamWriterTest.java rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java index 4fa782130f9..2bc71a315ce 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/XMLStreamWriterTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/XMLStreamWriterTest.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.stream.XMLStreamWriterTest; +package stream.XMLStreamWriterTest; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/message_12.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/message_12.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/message_12.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/message_12.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testEight.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testEight.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testEight.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testEight.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testFive.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testFive.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testFive.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testFive.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testFour.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testFour.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testFour.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testFour.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testOne.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testOne.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testOne.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testOne.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testSeven.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testSeven.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testSeven.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testSeven.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testSix.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testSix.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testSix.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testSix.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testThree.xml.org b/jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testThree.xml.org similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/testThree.xml.org rename to jaxp/test/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/testThree.xml.org diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/basic-form.vxml b/jaxp/test/javax/xml/jaxp/unittest/stream/basic-form.vxml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/basic-form.vxml rename to jaxp/test/javax/xml/jaxp/unittest/stream/basic-form.vxml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/report.dtd b/jaxp/test/javax/xml/jaxp/unittest/stream/report.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/report.dtd rename to jaxp/test/javax/xml/jaxp/unittest/stream/report.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/sgml-bad-systemId.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/sgml-bad-systemId.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/sgml-bad-systemId.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/sgml-bad-systemId.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/sgml.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/sgml.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/sgml.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/sgml.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/sgml_Bug6509774.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/sgml_Bug6509774.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/sgml_Bug6509774.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/sgml_Bug6509774.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile1.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/testfile1.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile1.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/testfile1.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile2.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/testfile2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile2.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/testfile2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile3.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/testfile3.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile3.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/testfile3.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile4.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/testfile4.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/testfile4.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/testfile4.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/toys.xml b/jaxp/test/javax/xml/jaxp/unittest/stream/toys.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/toys.xml rename to jaxp/test/javax/xml/jaxp/unittest/stream/toys.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/vxml.dtd b/jaxp/test/javax/xml/jaxp/unittest/stream/vxml.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/vxml.dtd rename to jaxp/test/javax/xml/jaxp/unittest/stream/vxml.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/5368141.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/5368141.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/5368141.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/5368141.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341.dtd b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341.dtd rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341.out b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341.out similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341.out rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341.out diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java index 605baf81ef5..f0dc71feb5a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import java.io.FileInputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341_golden.dtd b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341_golden.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341_golden.dtd rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341_golden.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341_golden.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341_golden.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4693341_golden.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4693341_golden.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4892774.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4892774.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java index c4b54f80cd0..e65bdaf6058 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug4892774.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug4892774.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; @@ -32,16 +32,17 @@ import javax.xml.transform.dom.DOMResult; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.stax.StAXResult; import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.util.DOMUtil; -import javax.xml.transform.util.SAXUtil; -import javax.xml.transform.util.StAXUtil; -import javax.xml.transform.util.StreamUtil; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import transform.util.DOMUtil; +import transform.util.SAXUtil; +import transform.util.StAXUtil; +import transform.util.StreamUtil; + /* * @bug 4892774 * @summary Test identity transformer with all possible types of Source and Result combinations for doucment version and encoding information. diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug5073477.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug5073477.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java index 7d061c2c2c0..4d406747c8a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug5073477.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug5073477.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug5073477.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug5073477.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6175602.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6175602.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java index ae568341344..bb3c7d61a29 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6175602.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6175602.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java index 9b508796ac9..eaaa3f77908 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491_2.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491_2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6206491_2.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6206491_2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6216226Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java similarity index 91% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6216226Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java index ec856b7116f..275fd8c5af1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6216226Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6216226Test.java @@ -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 @@ -21,11 +21,13 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import java.io.StringReader; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6311448.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6311448.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java index 5b395170918..db6925d00e4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6311448.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6311448.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6384805.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6384805.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java index c59b9555f0a..680398bf037 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6384805.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6384805.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.util.Iterator; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6465722.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6465722.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java index 3a261092f0e..80d5139e7c3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6465722.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6465722.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringReader; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6467808.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6467808.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java index e32947c1814..7a7fb1aa074 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6467808.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6467808.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6490380.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6490380.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java index 5ec65e81110..4385fb245bf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6490380.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490380.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringWriter; import java.net.URL; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6490921.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6490921.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java index b8ec881fdc6..38f72d5a89f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6490921.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6490921.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6505031.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6505031.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6505031.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6505031.java index 931bf6dc34b..d3fa4fd30f4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6505031.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6505031.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringWriter; import java.util.HashMap; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6513892.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6513892.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java index ac9fab16438..da26d64e2ec 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6513892.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6513892.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6537167.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6537167.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java index f64c67213b5..c75ff71b584 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6537167.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6537167.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6540545.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6540545.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java index e9ddaee53a7..2c76ad694fa 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6540545.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6540545.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6559595.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6559595.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java index 1c568b1b86c..162c92a2e8a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6559595.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6559595.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringReader; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6565260.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6565260.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java index d6a548bff68..3b0f6361b1d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6565260.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6565260.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6940416.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6940416.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java index 5c881e10089..41f7279506a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6940416.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Bug6940416.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.FileInputStream; import java.io.FileNotFoundException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java index 6099296b73f..5f5fa0e8fdd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/BugDB12665704Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/BugDB12665704Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.BufferedReader; import java.io.ByteArrayInputStream; @@ -33,6 +33,12 @@ import java.io.InputStream; import java.io.StringReader; import java.io.StringWriter; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java index c74fb355e89..7a2c5427633 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6401137Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6401137Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -29,6 +29,10 @@ import java.io.File; import java.io.FileReader; import java.io.InputStream; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6551600.policy b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600.policy similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6551600.policy rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600.policy diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6551600Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6551600Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java index 4211bdf5d8d..f364f5d2332 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6551600Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6551600Test.java @@ -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 @@ -21,12 +21,14 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6577667.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6577667.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6577667Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java similarity index 90% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6577667Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java index b6039c120e1..70767a47d3b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6577667Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6577667Test.java @@ -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 @@ -21,10 +21,12 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.InputStream; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamSource; import org.testng.Assert; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6652519Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6652519Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java index afec16489fd..9be065fb038 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6652519Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6652519Test.java @@ -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 @@ -21,12 +21,14 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6689809Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6689809Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java index dec6b4eb799..91da2f6d4fd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6689809Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6689809Test.java @@ -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 @@ -21,10 +21,11 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.CharArrayWriter; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829Inc.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Inc.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829Inc.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Inc.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java similarity index 91% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java index 9a77ed1a1bf..60de73f31e0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6905829Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6905829Test.java @@ -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 @@ -21,11 +21,13 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import java.io.StringWriter; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java similarity index 89% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java index 646043feaa6..6742d3fe47e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6935697Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6935697Test.java @@ -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 @@ -21,10 +21,15 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.FileOutputStream; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Templates; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java index d2e6eba9b41..07a18b6ad14 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6941869Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6941869Test.java @@ -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 @@ -21,11 +21,13 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.File; import java.io.StringWriter; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java similarity index 88% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java index 2a8460a10a7..3d9a74012b1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR6957215Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR6957215Test.java @@ -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 @@ -21,12 +21,20 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.StringWriter; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.SourceLocator; +import javax.xml.transform.Templates; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java similarity index 90% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java index 5b3e71c18a2..d67a58ad847 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CR7098746Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/CR7098746Test.java @@ -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 @@ -21,10 +21,15 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringWriter; +import javax.xml.transform.Result; +import javax.xml.transform.Source; +import javax.xml.transform.Templates; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DOMResultTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DOMResultTest.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java index b08d532bd09..b21fadd8724 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DOMResultTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/DOMResultTest.java @@ -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 @@ -21,10 +21,11 @@ * questions. */ -package javax.xml.transform; +package transform; import org.testng.annotations.Test; import org.testng.Assert; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -33,6 +34,10 @@ import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DocumentExtFunc.java b/jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DocumentExtFunc.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java index 44976edcc1a..81227c7d691 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/DocumentExtFunc.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/DocumentExtFunc.java @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import org.w3c.dom.Node; import org.w3c.dom.NodeList; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/FactoryFindTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/FactoryFindTest.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java index 370f0fff2ac..c0f17b8d5c0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/FactoryFindTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/FactoryFindTest.java @@ -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 @@ -21,11 +21,13 @@ * questions. */ -package javax.xml.transform; +package transform; import java.net.URL; import java.net.URLClassLoader; +import javax.xml.transform.TransformerFactory; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java index 35bcab3dc23..b0912eb8479 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2204Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2204Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2290.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2290.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2290Test.java b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2290Test.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java index 1c63d974bb0..b2be968bea6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Issue2290Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/Issue2290Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform; +package transform; import java.io.StringReader; import java.io.StringWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/MsWordXMLImport.xsl.data b/jaxp/test/javax/xml/jaxp/unittest/transform/MsWordXMLImport.xsl.data similarity index 99% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/MsWordXMLImport.xsl.data rename to jaxp/test/javax/xml/jaxp/unittest/transform/MsWordXMLImport.xsl.data index 9ba08025521..07e954144c8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/MsWordXMLImport.xsl.data +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/MsWordXMLImport.xsl.data @@ -1,7 +1,7 @@ " - + "" + + "" + "" - + "" + + "" + ""; static final String documentTesteExpectedResult = "" diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/attribset27.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/attribset27.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/attribset27.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/attribset27.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/attribset27.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/attribset27.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/attribset27.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/attribset27.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/catalog.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/catalog.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/catalog.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/catalog.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/catalog.xsd b/jaxp/test/javax/xml/jaxp/unittest/transform/catalog.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/catalog.xsd rename to jaxp/test/javax/xml/jaxp/unittest/transform/catalog.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/catalog_10.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/catalog_10.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/catalog_10.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/catalog_10.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/config.dtd b/jaxp/test/javax/xml/jaxp/unittest/transform/config.dtd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/config.dtd rename to jaxp/test/javax/xml/jaxp/unittest/transform/config.dtd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/config.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/config.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/config.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/config.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/default-layout.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/default-layout.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/default-layout.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/default-layout.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/global-variables.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/global-variables.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/global-variables.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/global-variables.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/global.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/global.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/global.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/global.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/home.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/home.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/home.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/home.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/in.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/in.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/in.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/in.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/inner.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/inner.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/inner.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/inner.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/logon.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/logon.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/logon.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/logon.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/maps.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/maps.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/maps.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/maps.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/msgAttach.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/msgAttach.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/msgAttach.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/msgAttach.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/numbering63.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/numbering63.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/numbering63.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/numbering63.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/numbering63.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/numbering63.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/numbering63.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/numbering63.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/outer.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/outer.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/outer.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/outer.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/redirect.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/redirect.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/redirect.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/redirect.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/redirect.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/redirect.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/redirect.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/redirect.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/sax/Bug6451633.java b/jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/sax/Bug6451633.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java index 855fa6ee1e6..a299656033e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/sax/Bug6451633.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/sax/Bug6451633.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform.sax; +package transform.sax; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/src.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/src.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/src.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/src.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/template.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/template.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/template.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/template.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/tigertest-in.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/tigertest-in.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/tigertest-in.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/tigertest-in.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/tigertest.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/tigertest.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/tigertest.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/tigertest.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/tmp.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/tmp.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/tmp.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/tmp.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/toys.xml b/jaxp/test/javax/xml/jaxp/unittest/transform/toys.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/toys.xml rename to jaxp/test/javax/xml/jaxp/unittest/transform/toys.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/transform.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/transform.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/transform.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/transform.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/upload-media-form.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/upload-media-form.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/upload-media-form.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/upload-media-form.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/upload-media.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/upload-media.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/upload-media.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/upload-media.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util.xsl b/jaxp/test/javax/xml/jaxp/unittest/transform/util.xsl similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util.xsl rename to jaxp/test/javax/xml/jaxp/unittest/transform/util.xsl diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/DOMUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/DOMUtil.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java index 1881299a7c6..988da74f834 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/DOMUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/DOMUtil.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform.util; +package transform.util; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/SAXUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/SAXUtil.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java index fd7421c23ff..9e257ebf9a6 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/SAXUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/SAXUtil.java @@ -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 @@ -21,19 +21,20 @@ * questions. */ -package javax.xml.transform.util; +package transform.util; import java.io.InputStream; import javax.xml.transform.Result; import javax.xml.transform.Source; -import javax.xml.transform.VersionDefaultHandler; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.sax.SAXSource; import org.testng.Assert; import org.xml.sax.InputSource; +import transform.VersionDefaultHandler; + public class SAXUtil extends TransformerUtil { private static SAXUtil instance = null; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/StAXUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/StAXUtil.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java index 6c17ffa7829..26374d76ab0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/StAXUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StAXUtil.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform.util; +package transform.util; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -34,13 +34,14 @@ import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import javax.xml.transform.Result; import javax.xml.transform.Source; -import javax.xml.transform.TransformerUtilFactory; -import javax.xml.transform.VersionEventWriter; import javax.xml.transform.stax.StAXResult; import javax.xml.transform.stax.StAXSource; import org.testng.Assert; +import transform.TransformerUtilFactory; +import transform.VersionEventWriter; + public class StAXUtil extends TransformerUtil { private static StAXUtil instance = null; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/StreamUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/StreamUtil.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java index 7bbf93f4359..019c2f16b1e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/StreamUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/StreamUtil.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform.util; +package transform.util; import java.io.File; import java.io.FileInputStream; @@ -33,13 +33,14 @@ import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.Result; import javax.xml.transform.Source; -import javax.xml.transform.VersionDefaultHandler; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.testng.Assert; import org.w3c.dom.Document; +import transform.VersionDefaultHandler; + public class StreamUtil extends TransformerUtil { DocumentBuilder docBuilder = null; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/TransformerUtil.java b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/TransformerUtil.java rename to jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java index 5a92fe77069..61d7bfe09db 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/util/TransformerUtil.java +++ b/jaxp/test/javax/xml/jaxp/unittest/transform/util/TransformerUtil.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.transform.util; +package transform.util; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java b/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java deleted file mode 100644 index 2088452af58..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package util; - -import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.util.HashMap; -import java.util.Map; - -public class BOMInputStream { - public static InputStream createStream(String charset, InputStream input) { - - try { - byte[] content = read(input).getBytes(charset); - byte[] head = bom.get(charset); - if (head == null) - return null; - byte[] result = new byte[head.length + content.length]; - System.arraycopy(head, 0, result, 0, head.length); - System.arraycopy(content, 0, result, head.length, content.length); - return new ByteArrayInputStream(result); - } catch (UnsupportedEncodingException e) { - return null; - } - } - - private static String read(InputStream input) - { - try { - StringBuffer sb = new StringBuffer(); - InputStreamReader r = new InputStreamReader(new BufferedInputStream(input)); - int c = 0; - while ((c = r.read()) != -1) - sb.append((char)c); - return sb.toString(); - } catch (IOException e) { - return ""; - } finally { - try { - input.close(); - } catch (IOException e) - {} - } - } - - - private final static Map bom = new HashMap(); - private final static byte[][] bomBytes = {{(byte)0xEF, (byte)0xBB, (byte)0xBF}, - {(byte)0xFE, (byte)0xFF}}; - - static { - bom.put("UTF-8", bomBytes[0]); - bom.put("UTF-16BE", bomBytes[1]); - } - -} diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java b/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java deleted file mode 100644 index 86a54335249..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package util; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.StringReader; -import java.io.UnsupportedEncodingException; -import java.util.HashMap; - -import javax.xml.stream.XMLEventFactory; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLResolver; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.events.XMLEvent; - -import org.testng.Assert; - -/** - * Base class for all StaxTest unit test classes. Contains shared - * functionality for many common set up tasks, as well as for - * outputting diagnostics. - * - */ -public class BaseStAXUT implements XMLStreamConstants { - /** - * This is the de facto standard property that enables accurate reporting of - * CDATA events. - */ - final static String PROP_REPORT_CDATA = "http://java.sun.com/xml/stream/properties/report-cdata-event"; - - final static HashMap mTokenTypes = new HashMap(); - static { - mTokenTypes.put(new Integer(START_ELEMENT), "START_ELEMENT"); - mTokenTypes.put(new Integer(END_ELEMENT), "END_ELEMENT"); - mTokenTypes.put(new Integer(START_DOCUMENT), "START_DOCUMENT"); - mTokenTypes.put(new Integer(END_DOCUMENT), "END_DOCUMENT"); - mTokenTypes.put(new Integer(CHARACTERS), "CHARACTERS"); - mTokenTypes.put(new Integer(CDATA), "CDATA"); - mTokenTypes.put(new Integer(COMMENT), "COMMENT"); - mTokenTypes.put(new Integer(PROCESSING_INSTRUCTION), "PROCESSING_INSTRUCTION"); - mTokenTypes.put(new Integer(DTD), "DTD"); - mTokenTypes.put(new Integer(SPACE), "SPACE"); - mTokenTypes.put(new Integer(ENTITY_REFERENCE), "ENTITY_REFERENCE"); - mTokenTypes.put(new Integer(NAMESPACE), "NAMESPACE_DECLARATION"); - mTokenTypes.put(new Integer(NOTATION_DECLARATION), "NOTATION_DECLARATION"); - mTokenTypes.put(new Integer(ENTITY_DECLARATION), "ENTITY_DECLARATION"); - } - - /* - * /////////////////////////////////////////////////// // Consts for - * expected values /////////////////////////////////////////////////// - */ - - /** - * Expected return value for streamReader.getNamespaceURI() in - * non-namespace-aware mode. - */ - protected final String DEFAULT_URI_NON_NS = ""; - - protected final String DEFAULT_URI_NS = ""; - - /* - * /////////////////////////////////////////////////// // Other consts - * /////////////////////////////////////////////////// - */ - - /* - * /////////////////////////////////////////////////// // Cached instances - * /////////////////////////////////////////////////// - */ - - XMLInputFactory mInputFactory; - XMLOutputFactory mOutputFactory; - XMLEventFactory mEventFactory; - - protected XMLInputFactory getInputFactory() { - if (mInputFactory == null) { - mInputFactory = getNewInputFactory(); - } - return mInputFactory; - } - - protected static XMLInputFactory getNewInputFactory() { - return XMLInputFactory.newInstance(); - } - - protected XMLOutputFactory getOutputFactory() { - if (mOutputFactory == null) { - mOutputFactory = getNewOutputFactory(); - } - return mOutputFactory; - } - - protected static XMLOutputFactory getNewOutputFactory() { - return XMLOutputFactory.newInstance(); - } - - protected XMLEventFactory getEventFactory() { - if (mEventFactory == null) { - mEventFactory = XMLEventFactory.newInstance(); - } - return mEventFactory; - } - - protected static XMLStreamReader constructStreamReader(XMLInputFactory f, String content) throws XMLStreamException { - // return f.createXMLStreamReader(new StringReader(content)); - try { - byte[] data = content.getBytes("UTF-8"); - return constructStreamReader(f, data); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } - } - - protected static XMLStreamReader constructStreamReader(XMLInputFactory f, byte[] b) throws XMLStreamException { - return f.createXMLStreamReader(new ByteArrayInputStream(b)); - } - - protected static XMLStreamReader constructStreamReaderForFile(XMLInputFactory f, String filename) throws IOException, XMLStreamException { - File inf = new File(filename); - XMLStreamReader sr = f.createXMLStreamReader(inf.toURL().toString(), new FileReader(inf)); - Assert.assertEquals(START_DOCUMENT, sr.getEventType()); - return sr; - } - - protected XMLStreamReader constructNsStreamReader(String content) throws XMLStreamException { - XMLInputFactory f = getInputFactory(); - setNamespaceAware(f, true); - return f.createXMLStreamReader(new StringReader(content)); - } - - protected XMLStreamReader constructNsStreamReader(String content, boolean coal) throws XMLStreamException { - XMLInputFactory f = getInputFactory(); - setNamespaceAware(f, true); - setCoalescing(f, coal); - return f.createXMLStreamReader(new StringReader(content)); - } - - /* - * ////////////////////////////////////////////////// // Configuring input - * factory ////////////////////////////////////////////////// - */ - - protected static boolean isCoalescing(XMLInputFactory f) throws XMLStreamException { - return ((Boolean) f.getProperty(XMLInputFactory.IS_COALESCING)).booleanValue(); - } - - protected static void setCoalescing(XMLInputFactory f, boolean state) throws XMLStreamException { - Boolean b = state ? Boolean.TRUE : Boolean.FALSE; - f.setProperty(XMLInputFactory.IS_COALESCING, b); - // Let's just double-check it... - Assert.assertEquals(state, isCoalescing(f)); - } - - protected static boolean isValidating(XMLInputFactory f) throws XMLStreamException { - return ((Boolean) f.getProperty(XMLInputFactory.IS_VALIDATING)).booleanValue(); - } - - protected static void setValidating(XMLInputFactory f, boolean state) throws XMLStreamException { - try { - Boolean b = state ? Boolean.TRUE : Boolean.FALSE; - f.setProperty(XMLInputFactory.IS_VALIDATING, b); - } catch (IllegalArgumentException iae) { - Assert.fail("Could not set DTD validating mode to " + state + ": " + iae); - // throw new XMLStreamException(iae.getMessage(), iae); - } - Assert.assertEquals(state, isValidating(f)); - } - - protected static boolean isNamespaceAware(XMLInputFactory f) throws XMLStreamException { - return ((Boolean) f.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue(); - } - - /** - * @return True if setting succeeded, and property supposedly was - * succesfully set to the value specified; false if there was a - * problem. - */ - protected static boolean setNamespaceAware(XMLInputFactory f, boolean state) throws XMLStreamException { - try { - f.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, state ? Boolean.TRUE : Boolean.FALSE); - - /* - * 07-Sep-2005, TSa: Let's not assert, but instead let's see if it - * sticks. Some implementations might choose to silently ignore - * setting, at least for 'false'? - */ - return (isNamespaceAware(f) == state); - } catch (IllegalArgumentException e) { - /* - * Let's assume, then, that the property (or specific value for it) - * is NOT supported... - */ - return false; - } - } - - protected static void setReplaceEntities(XMLInputFactory f, boolean state) throws XMLStreamException { - Boolean b = state ? Boolean.TRUE : Boolean.FALSE; - f.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, b); - Assert.assertEquals(b, f.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)); - } - - protected static void setSupportDTD(XMLInputFactory f, boolean state) throws XMLStreamException { - Boolean b = state ? Boolean.TRUE : Boolean.FALSE; - f.setProperty(XMLInputFactory.SUPPORT_DTD, b); - Assert.assertEquals(b, f.getProperty(XMLInputFactory.SUPPORT_DTD)); - } - - protected static boolean setSupportExternalEntities(XMLInputFactory f, boolean state) throws XMLStreamException { - Boolean b = state ? Boolean.TRUE : Boolean.FALSE; - try { - f.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, b); - Object act = f.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES); - return (act instanceof Boolean) && ((Boolean) act).booleanValue() == state; - } catch (IllegalArgumentException e) { - /* - * Let's assume, then, that the property (or specific value for it) - * is NOT supported... - */ - return false; - } - } - - protected static void setResolver(XMLInputFactory f, XMLResolver resolver) throws XMLStreamException { - f.setProperty(XMLInputFactory.RESOLVER, resolver); - } - - protected static boolean setReportCData(XMLInputFactory f, boolean state) throws XMLStreamException { - - Boolean b = state ? Boolean.TRUE : Boolean.FALSE; - if (f.isPropertySupported(PROP_REPORT_CDATA)) { - f.setProperty(PROP_REPORT_CDATA, b); - return true; - } - return false; - } - - /* - * ////////////////////////////////////////////////// // Stream reader - * accessors ////////////////////////////////////////////////// - */ - - /** - * Method that not only gets currently available text from the reader, but - * also checks that its consistenly accessible using different StAX methods. - */ - protected static String getAndVerifyText(XMLStreamReader sr) throws XMLStreamException { - String text = sr.getText(); - - /* - * 05-Apr-2006, TSa: Although getText() is available for DTD and - * ENTITY_REFERENCE, getTextXxx() are not. Thus, can not do more checks - * for those types. - */ - int type = sr.getEventType(); - if (type != ENTITY_REFERENCE && type != DTD) { - Assert.assertNotNull("getText() should never return null.", text); - int expLen = sr.getTextLength(); - /* - * Hmmh. Can only return empty text for CDATA (since empty blocks - * are legal). - */ - /* - * !!! 01-Sep-2004, TSa: note: theoretically, in coalescing mode, it - * could be possible to have empty CDATA section(s) get converted to - * CHARACTERS, which would be empty... may need to enhance this to - * check that mode is not coalescing? Or something - */ - if (sr.getEventType() == CHARACTERS) { - if (expLen == 0) { - Assert.fail("Stream reader should never return empty Strings."); - } - } - Assert.assertEquals(expLen, text.length(), "Expected text length of " + expLen + ", got " + text.length()); - char[] textChars = sr.getTextCharacters(); - int start = sr.getTextStart(); - String text2 = new String(textChars, start, expLen); - Assert.assertEquals("Expected getText() and getTextCharacters() to return same value for event of type (" + tokenTypeDesc(sr.getEventType()) + ")", - text, text2); - } else { // DTD or ENTITY_REFERENCE - // not sure if null is legal for these either, but... - if (text == null) { // let's prevent an NPE at caller - text = ""; - } - } - return text; - } - - protected static String getAllText(XMLStreamReader sr) throws XMLStreamException { - StringBuffer sb = new StringBuffer(); - while (true) { - int tt = sr.getEventType(); - if (tt != CHARACTERS && tt != SPACE) { - break; - } - sb.append(getAndVerifyText(sr)); - sr.next(); - } - return sb.toString(); - } - - protected static String getAllCData(XMLStreamReader sr) throws XMLStreamException { - StringBuffer sb = new StringBuffer(); - while (true) { - /* - * Note: CDATA sections CAN be reported as CHARACTERS, but not as - * SPACE - */ - int tt = sr.getEventType(); - if (tt != CHARACTERS && tt != CDATA) { - break; - } - sb.append(getAndVerifyText(sr)); - sr.next(); - } - return sb.toString(); - } - - /* - * ////////////////////////////////////////////////// // Derived assert/fail - * methods ////////////////////////////////////////////////// - */ - - protected static void assertTokenType(int expType, int actType) { - if (expType == actType) { - return; - } - Assert.fail("Expected token " + tokenTypeDesc(expType) + "; got " + tokenTypeDesc(actType) + "."); - } - - protected static void assertTokenType(int expType, int actType, XMLStreamReader sr) { - if (expType == actType) { - return; - } - Assert.fail("Expected token " + tokenTypeDesc(expType) + "; got " + tokenTypeDesc(actType, sr) + "."); - } - - protected static void assertTextualTokenType(int actType) { - if (actType != CHARACTERS && actType != SPACE && actType != CDATA) { - Assert.fail("Expected textual token (CHARACTERS, SPACE or CDATA)" + "; got " + tokenTypeDesc(actType) + "."); - } - } - - protected static void failStrings(String msg, String exp, String act) { - // !!! TODO: Indicate position where Strings differ - Assert.fail(msg + ": expected " + quotedPrintable(exp) + ", got " + quotedPrintable(act)); - } - - /** - * Specific method makes sense, since earlier it was not clear whether null - * or empty string (or perhaps both) would be the right answer when there is - * no prefix. - *

- * However: as per javadocs of {@link XMLStreamReader#getPrefix}, from JDK - * 1.6 indicate, the current understanding is that null is the - * ultimate right answer here. - */ - protected static void assertNoPrefix(XMLStreamReader sr) throws XMLStreamException { - String prefix = sr.getPrefix(); - if (prefix != null) { - if (prefix.length() != 0) { - Assert.fail("Current element should not have a prefix: got '" + prefix + "'"); - } else { - Assert.fail("Expected null to signify missing prefix (see XMLStreamReader#getPrefix() JavaDocs): got empty String"); - } - } - } - - protected static void assertNoAttrPrefix(String attrPrefix) throws XMLStreamException { - if (attrPrefix != null) { - if (attrPrefix.length() != 0) { - Assert.fail("Attribute should not have a prefix: got '" + attrPrefix + "'"); - } else { - Assert.fail("Expected null to signify missing attribute prefix (see XMLStreamReader#getAttributePrefix() JavaDocs): got empty String"); - } - } - } - - /** - * Similar to {@link #assertNoPrefix}, but here we do know that unbound - * namespace URI should be indicated as empty String. - */ - protected static void assertNoNsURI(XMLStreamReader sr) throws XMLStreamException { - String uri = sr.getNamespaceURI(); - if (uri == null) { - Assert.fail("Expected empty String to indicate \"no namespace\": got null"); - } else if (uri.length() != 0) { - Assert.fail("Expected empty String to indicate \"no namespace\": got '" + uri + "'"); - } - } - - protected static void assertNoAttrNamespace(String attrNsURI) throws XMLStreamException { - if (attrNsURI == null) { - // refer to 6903561; accept null for now. - // fail("Expected empty String to indicate \"no namespace\" (for attribute): got null"); - } else if (attrNsURI.length() != 0) { - Assert.fail("Expected empty String to indicate \"no namespace\" (for attribute): got '" + attrNsURI + "'"); - } - } - - protected static void assertNoPrefixOrNs(XMLStreamReader sr) throws XMLStreamException { - assertNoPrefix(sr); - assertNoNsURI(sr); - } - - /** - * Helper assertion that assert that the String is either null or empty - * (""). - */ - protected static void assertNullOrEmpty(String str) { - if (str != null && str.length() > 0) { - Assert.fail("Expected String to be empty or null; was '" + str + "' (length " + str.length() + ")"); - } - } - - /* - * ////////////////////////////////////////////////// // Debug/output - * helpers ////////////////////////////////////////////////// - */ - - protected static String tokenTypeDesc(int tt) { - String desc = (String) mTokenTypes.get(new Integer(tt)); - if (desc == null) { - return "[" + tt + "]"; - } - return desc; - } - - protected static String tokenTypeDesc(XMLEvent evt) { - return tokenTypeDesc(evt.getEventType()); - } - - final static int MAX_DESC_TEXT_CHARS = 8; - - protected static String tokenTypeDesc(int tt, XMLStreamReader sr) { - String desc = tokenTypeDesc(tt); - // Let's show first 8 chars or so... - if (tt == CHARACTERS || tt == SPACE || tt == CDATA) { - String str = sr.getText(); - if (str.length() > MAX_DESC_TEXT_CHARS) { - desc = "\"" + str.substring(0, MAX_DESC_TEXT_CHARS) + "\"[...]"; - } else { - desc = "\"" + desc + "\""; - } - desc = " (" + desc + ")"; - } - return desc; - } - - protected static String valueDesc(String value) { - if (value == null) { - return "[NULL]"; - } - return "\"" + value + "\""; - } - - protected static String printable(char ch) { - if (ch == '\n') { - return "\\n"; - } - if (ch == '\r') { - return "\\r"; - } - if (ch == '\t') { - return "\\t"; - } - if (ch == ' ') { - return "_"; - } - if (ch > 127 || ch < 32) { - StringBuffer sb = new StringBuffer(6); - sb.append("\\u"); - String hex = Integer.toHexString((int) ch); - for (int i = 0, len = 4 - hex.length(); i < len; i++) { - sb.append('0'); - } - sb.append(hex); - return sb.toString(); - } - return null; - } - - protected static String printable(String str) { - if (str == null || str.length() == 0) { - return str; - } - - int len = str.length(); - StringBuffer sb = new StringBuffer(len + 64); - for (int i = 0; i < len; ++i) { - char c = str.charAt(i); - String res = printable(c); - if (res == null) { - sb.append(c); - } else { - sb.append(res); - } - } - return sb.toString(); - } - - protected static String quotedPrintable(String str) { - if (str == null || str.length() == 0) { - return "[0]''"; - } - return "[len: " + str.length() + "] '" + printable(str) + "'"; - } - - protected void reportNADueToProperty(String method, String prop) { - String clsName = getClass().getName(); - /* - * 27-Sep-2005, TSa: Should probably use some other mechanism for - * reporting this. Does JUnit have something applicable? - */ - System.err.println("Skipping " + clsName + "#" + method + ": property '" + prop + "' (or one of its values) not supported."); - } - - protected void reportNADueToNS(String method) { - reportNADueToProperty(method, "IS_NAMESPACE_AWARE"); - } - - protected void reportNADueToExtEnt(String method) { - reportNADueToProperty(method, "IS_SUPPORTING_EXTERNAL_ENTITIES"); - } - - protected void reportNADueToEntityExpansion(String method, int type) { - String clsName = getClass().getName(); - String msg = (type > 0) ? " (next event: " + tokenTypeDesc(type) + ")" : ""; - System.err.println("Skipping " + clsName + "#" + method + ": entity expansion does not seem to be functioning properly" + msg + "."); - } -} diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java b/jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java deleted file mode 100644 index 5a408d1278a..00000000000 --- a/jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package util; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.helpers.DefaultHandler; - -public final class DraconianErrorHandler extends DefaultHandler { - public void error(SAXParseException e) throws SAXException { - throw e; - } - - public void fatalError(SAXParseException e) throws SAXException { - throw e; - } -} diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/6773084.policy b/jaxp/test/javax/xml/jaxp/unittest/validation/6773084.policy similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/6773084.policy rename to jaxp/test/javax/xml/jaxp/unittest/validation/6773084.policy diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/AnyElementTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/AnyElementTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java index f37f0bfab28..a1218b1616e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/AnyElementTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/AnyElementTest.java @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package javax.xml.validation; +package validation; /* * @bug 8080907 @@ -31,6 +31,8 @@ import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; import java.net.URISyntaxException; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966232.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966232.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java index 925bf2c9123..1e9d473fb5c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966232.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966232.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.dom.DOMSource; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java index 6d1f0ad2374..e081f37f072 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4966254.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4966254.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969042.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969042.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java index 71ad30d61c9..d04395e6615 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969042.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969042.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969089.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969089.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java index 32477a246b5..4b7f0b53078 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969089.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969089.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969110.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969110.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java index f9fb0f4adb9..ace534e2c53 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969110.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969110.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.ValidatorHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969689.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969689.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java index 6790321bdbf..85cc249fefb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969689.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969689.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969692.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969692.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java index e19372242a3..2e146123869 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969692.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969692.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969693.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969693.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java index 026da4a3ebf..18512dde195 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969693.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969693.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969695.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969695.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java index 39ea1b7be03..db6941673d5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969695.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969695.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969732.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969732.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java index 5f298af454d..3fe2dcfb9bf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4969732.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4969732.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970380.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970380.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java index b9a0656b002..b9d055547e5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970380.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970380.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.ValidatorHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970383.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970383.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java index 3ac15277ec4..f53615333c4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970383.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970383.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.ValidatorHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970400.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970400.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java index d0c57b20765..c4575679ca5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970400.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970400.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.ValidatorHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970402.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970402.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java index 55f3d1d9d3d..e66e01062ed 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970402.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970402.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970951.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970951.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java index 4f986a8920a..e033d499078 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4970951.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4970951.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4971605.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4971605.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java index 09cd588489a..566f17c0c1a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4971605.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971605.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4971607.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4971607.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java index e33b040a778..870e7a7bc38 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4971607.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4971607.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; import javax.xml.validation.ValidatorHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4972882.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4972882.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java index 8e84e840626..8b3ce663eca 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4972882.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4972882.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4986844.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4986844.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java index 73049545f24..f98f6d5b768 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4986844.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4986844.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4986844.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4986844.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4987574.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4987574.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java index a56806a61c8..d479455524a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4987574.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4987574.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.FileWriter; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988267.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988267.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java index 4c372f5ad7a..ef57585545d 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988267.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988267.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988267.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988267.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988268.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988268.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java index d99960674b0..0005f17e51c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988268.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988268.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988268.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988268.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988387.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988387.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java index 9ca25216ec6..b7b889b90fb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988387.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988387.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4988387.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4988387.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4996446.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4996446.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java index e381e65f59c..4ea0afe938e 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4996446.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.net.URL; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4996446.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4996446.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4996446.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4997818.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4997818.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java index 7330d49358b..b46bf36eea7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug4997818.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug4997818.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5011500.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5011500.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java index bc65b4de23b..6d79fb2cc7b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5011500.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5011500.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.ByteArrayInputStream; import java.io.InputStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java index 327a387e51a..9769d1dc8f3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug5072946.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug5072946.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6378043.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6378043.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java index 6078724f89c..c561bb12ecf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6378043.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6378043.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6449797.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6449797.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java index ca24b94281f..3b797edc0b3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6449797.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.java @@ -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 @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package javax.xml.validation; +package validation; import javax.xml.XMLConstants; import javax.xml.validation.SchemaFactory; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6449797.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6449797.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6449797.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6457662.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6457662.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java index 84bfa2681f3..3518a0e7267 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6457662.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6457662.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.FileOutputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java index 76cf2a30699..4ebce561e3f 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6467424Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6467424Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.IOException; @@ -38,6 +38,9 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6483188.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6483188.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java index 848a545bec8..f5947130ee7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6483188.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6483188.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.net.URL; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java index 5034d3d29f6..2da6c45a1fb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import org.testng.annotations.Test; import org.w3c.dom.Document; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6493687.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6493687.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6509668.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java similarity index 98% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6509668.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java index 094c8a6eac9..2c9906c9711 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6509668.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6509668.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java index dfbf550e560..e737d7514fc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6526547.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6526547.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6531160.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6531160.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java index 7c682dbd4fb..53cea01f5d8 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6531160.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6531160.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.StringReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java index fde9fb2e420..e70dbff8a11 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6695843Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6695843Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; @@ -30,6 +30,9 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.dom.DOMSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_1.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_1.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_1.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_1.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_10.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_10.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_10.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_10.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_11.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_11.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_11.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_11.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_12.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_12.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_12.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_12.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_13.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_13.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_13.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_13.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_14.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_14.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_14.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_14.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_15.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_15.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_15.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_15.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_16.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_16.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_16.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_16.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_17.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_17.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_17.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_17.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_18.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_18.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_18.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_18.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_19.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_19.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_19.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_19.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_2.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_2.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_2.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_2.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_20.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_20.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_20.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_20.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_21.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_21.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_21.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_21.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_22.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_22.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_22.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_22.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_23.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_23.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_23.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_23.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_24.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_24.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_24.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_24.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_25.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_25.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_25.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_25.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_3.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_3.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_3.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_3.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_4.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_4.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_4.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_4.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_5.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_5.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_5.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_5.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_6.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_6.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_6.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_6.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_7.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_7.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_7.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_7.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_8.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_8.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_8.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_8.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_9.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_9.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084In/Bug6773084_9.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084In/Bug6773084_9.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java index 41103d20b13..98737edebaf 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6773084Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.FileFilter; @@ -38,6 +38,9 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.BeforeClass; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6859210.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6859210.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java index 322a7dc4fa2..1bb0d046499 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6859210.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6859210.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6925531Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6925531Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java index 03b2efd3a53..b3fad32adb0 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6925531Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6925531Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -35,6 +35,9 @@ import java.security.PrivilegedAction; import javax.xml.XMLConstants; import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6946312.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6946312.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6946312Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6946312Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java index b93c1ac8f62..5f0b19d50dc 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6946312Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6946312Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.InputStream; @@ -31,6 +31,8 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738_Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java similarity index 92% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738_Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java index da5bb1a4cab..5118754af73 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Bug6954738_Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6954738_Test.java @@ -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 @@ -21,12 +21,15 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import javax.xml.XMLConstants; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.annotations.Test; import org.xml.sax.ErrorHandler; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6708840Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6708840Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java index 932c8fb43b8..7c9b0bd83e1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6708840Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6708840Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.FileWriter; @@ -33,6 +33,9 @@ import javax.xml.stream.XMLStreamReader; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.stax.StAXSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.java b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java index 7ef779eb0a9..26a239b2854 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CR6740048.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/CR6740048.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CREMAS01.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/CREMAS01.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CREMAS01.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/CREMAS01.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CREMAS01.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/CREMAS01.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/CREMAS01.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/CREMAS01.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ErrorHandlerImpl.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java similarity index 94% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ErrorHandlerImpl.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java index 6fbd8570d88..95806ed3f21 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ErrorHandlerImpl.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ErrorHandlerImpl.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/Issue682.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/Issue682.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java index 9301f3bd6b8..e1753f06817 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/Issue682Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Issue682Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.InputStream; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30.java b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java index afde0f092a4..765fa1329c5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-error.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-error.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-error.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-error.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-ok.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-ok.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-ok.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-ok.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-optimize-error.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-optimize-error.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-optimize-error.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-optimize-error.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-optimize-ok.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-optimize-ok.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-optimize-ok.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-optimize-ok.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-optimize.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-optimize.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs-optimize.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs-optimize.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/IssueTracker30_occurs.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/IssueTracker30_occurs.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue43Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue43Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java index 5a451ca7a6e..e590b221330 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue43Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue43Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.FileInputStream; import java.util.ArrayList; @@ -34,6 +34,9 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.annotations.Test; import org.w3c.dom.Document; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue49.java b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue49.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java index 85522e9503d..aec363119a1 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue49.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.FileInputStream; @@ -33,6 +33,9 @@ import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue49.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/JaxpIssue49.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/JaxpIssue49.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/LargeMaxOccursTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/LargeMaxOccursTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java index 4a4e06235d2..d78322723c7 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/LargeMaxOccursTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/LargeMaxOccursTest.java @@ -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 @@ -21,11 +21,14 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import javax.xml.XMLConstants; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/MultiOccursTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/MultiOccursTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java index 7f0dbddebee..014e8af7dad 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/MultiOccursTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/MultiOccursUnboundedTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/MultiOccursUnboundedTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java index 8d7d5163756..b6069c26a3b 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/MultiOccursUnboundedTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/MultiOccursUnboundedTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java index be3ed12bf0f..0cb9177760c 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursUnboundedTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursUnboundedTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java index 47d1ba9af91..df0e07829dd 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursUnboundedTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursUnboundedTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursWildcardTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursWildcardTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java index 36b21cdf8bd..36b97cf9361 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursWildcardTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursWildcardUnbounded.java b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursWildcardUnbounded.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java index e11fa92fd47..b454db97b22 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/OccursWildcardUnbounded.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/OccursWildcardUnbounded.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesId005Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesId005Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java index 429ea2d9d83..74169f4af09 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesId005Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesId005Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesIg004Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java similarity index 88% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesIg004Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java index c1618505e34..2fe1a305e2a 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesIg004Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesIg004Test.java @@ -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 @@ -21,11 +21,14 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import javax.xml.XMLConstants; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesQ013Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java similarity index 96% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesQ013Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java index ef589d13847..33e73d5ce80 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ParticlesQ013Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ParticlesQ013Test.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ProcessContents-lax-error.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/ProcessContents-lax-error.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ProcessContents-lax-error.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/ProcessContents-lax-error.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ProcessContents-ok.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/ProcessContents-ok.xml similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ProcessContents-ok.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/ProcessContents-ok.xml diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ProcessContents.xsd b/jaxp/test/javax/xml/jaxp/unittest/validation/ProcessContents.xsd similarity index 100% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ProcessContents.xsd rename to jaxp/test/javax/xml/jaxp/unittest/validation/ProcessContents.xsd diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/TCKGroupA008Test.java b/jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java similarity index 89% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/TCKGroupA008Test.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java index e097422fbdf..c88c09b85f5 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/TCKGroupA008Test.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/TCKGroupA008Test.java @@ -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 @@ -21,10 +21,14 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; + import org.testng.Assert; import org.testng.annotations.Test; import org.xml.sax.SAXException; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ValidatorTest.java b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ValidatorTest.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java index 5a84c5211a7..9dd421a4a26 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/ValidatorTest.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/ValidatorTest.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.File; import java.io.FileInputStream; @@ -34,6 +34,9 @@ import javax.xml.stream.XMLOutputFactory; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.stax.StAXResult; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/XMLDocBuilder.java b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java similarity index 97% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/XMLDocBuilder.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java index f0513bb3683..de9b0d935e4 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/XMLDocBuilder.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLDocBuilder.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.InputStreamReader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/XMLSchemaValidator.java b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java similarity index 95% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/XMLSchemaValidator.java rename to jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java index c1722a190e5..beb05e56afb 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/XMLSchemaValidator.java +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/XMLSchemaValidator.java @@ -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 @@ -21,7 +21,7 @@ * questions. */ -package javax.xml.validation; +package validation; import java.io.IOException; import java.io.Reader; diff --git a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/gMonths-invalid.xml b/jaxp/test/javax/xml/jaxp/unittest/validation/gMonths-invalid.xml similarity index 93% rename from jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/gMonths-invalid.xml rename to jaxp/test/javax/xml/jaxp/unittest/validation/gMonths-invalid.xml index a3071b50bab..ce13a8848a3 100644 --- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/validation/gMonths-invalid.xml +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/gMonths-invalid.xml @@ -1,7 +1,7 @@ - - The Publishers - - Alfred Publishing - 15535 Morrison - South Oaks CA 91403 - &max; - - eXtensible Markup Language - - - - diff --git a/jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java b/jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java new file mode 100644 index 00000000000..340f5de7d55 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/policy/PolicyUtil.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package policy; + +import java.security.Policy; + +public class PolicyUtil { + + public static void changePolicy(String policyFile) { + System.setProperty("java.security.policy", policyFile); + Policy.getPolicy().refresh(); + } + +} diff --git a/jaxp/test/javax/xml/jaxp/unittest/policy/common.policy b/jaxp/test/javax/xml/jaxp/unittest/policy/common.policy new file mode 100644 index 00000000000..0ca5f742c09 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/policy/common.policy @@ -0,0 +1,27 @@ +grant { + permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; + permission java.lang.RuntimePermission "accessDeclaredMembers"; + + permission java.io.FilePermission "${test.classes}/../../-", "read, write, delete"; + permission java.io.FilePermission ".", "read, write, delete"; + permission java.util.PropertyPermission "*", "read, write"; + + permission java.lang.RuntimePermission "setSecurityManager"; + permission java.lang.RuntimePermission "createSecurityManager"; + permission java.lang.RuntimePermission "createClassLoader"; + permission java.lang.RuntimePermission "setIO"; + permission java.lang.RuntimePermission "setContextClassLoader"; + permission java.security.SecurityPermission "getPolicy"; + + permission java.io.FilePermission "${test.src}/-", "read, write, delete"; + permission java.io.FilePermission "${user.dir}/-", "read, write, delete"; + permission java.io.FilePermission "${java.io.tmpdir}/-", "read, write, delete"; + + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.bcel.internal.classfile"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.bcel.internal.generic"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.stream.writers"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xerces.internal.impl"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xalan.internal"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xalan.internal.xsltc.trax"; + permission java.lang.RuntimePermission "accessClassInPackage.com.sun.org.apache.xalan.internal.xslt"; +}; diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java b/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java new file mode 100644 index 00000000000..2088452af58 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/util/BOMInputStream.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package util; + +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.util.HashMap; +import java.util.Map; + +public class BOMInputStream { + public static InputStream createStream(String charset, InputStream input) { + + try { + byte[] content = read(input).getBytes(charset); + byte[] head = bom.get(charset); + if (head == null) + return null; + byte[] result = new byte[head.length + content.length]; + System.arraycopy(head, 0, result, 0, head.length); + System.arraycopy(content, 0, result, head.length, content.length); + return new ByteArrayInputStream(result); + } catch (UnsupportedEncodingException e) { + return null; + } + } + + private static String read(InputStream input) + { + try { + StringBuffer sb = new StringBuffer(); + InputStreamReader r = new InputStreamReader(new BufferedInputStream(input)); + int c = 0; + while ((c = r.read()) != -1) + sb.append((char)c); + return sb.toString(); + } catch (IOException e) { + return ""; + } finally { + try { + input.close(); + } catch (IOException e) + {} + } + } + + + private final static Map bom = new HashMap(); + private final static byte[][] bomBytes = {{(byte)0xEF, (byte)0xBB, (byte)0xBF}, + {(byte)0xFE, (byte)0xFF}}; + + static { + bom.put("UTF-8", bomBytes[0]); + bom.put("UTF-16BE", bomBytes[1]); + } + +} diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java b/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java new file mode 100644 index 00000000000..86a54335249 --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/util/BaseStAXUT.java @@ -0,0 +1,559 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package util; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.util.HashMap; + +import javax.xml.stream.XMLEventFactory; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLResolver; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.events.XMLEvent; + +import org.testng.Assert; + +/** + * Base class for all StaxTest unit test classes. Contains shared + * functionality for many common set up tasks, as well as for + * outputting diagnostics. + * + */ +public class BaseStAXUT implements XMLStreamConstants { + /** + * This is the de facto standard property that enables accurate reporting of + * CDATA events. + */ + final static String PROP_REPORT_CDATA = "http://java.sun.com/xml/stream/properties/report-cdata-event"; + + final static HashMap mTokenTypes = new HashMap(); + static { + mTokenTypes.put(new Integer(START_ELEMENT), "START_ELEMENT"); + mTokenTypes.put(new Integer(END_ELEMENT), "END_ELEMENT"); + mTokenTypes.put(new Integer(START_DOCUMENT), "START_DOCUMENT"); + mTokenTypes.put(new Integer(END_DOCUMENT), "END_DOCUMENT"); + mTokenTypes.put(new Integer(CHARACTERS), "CHARACTERS"); + mTokenTypes.put(new Integer(CDATA), "CDATA"); + mTokenTypes.put(new Integer(COMMENT), "COMMENT"); + mTokenTypes.put(new Integer(PROCESSING_INSTRUCTION), "PROCESSING_INSTRUCTION"); + mTokenTypes.put(new Integer(DTD), "DTD"); + mTokenTypes.put(new Integer(SPACE), "SPACE"); + mTokenTypes.put(new Integer(ENTITY_REFERENCE), "ENTITY_REFERENCE"); + mTokenTypes.put(new Integer(NAMESPACE), "NAMESPACE_DECLARATION"); + mTokenTypes.put(new Integer(NOTATION_DECLARATION), "NOTATION_DECLARATION"); + mTokenTypes.put(new Integer(ENTITY_DECLARATION), "ENTITY_DECLARATION"); + } + + /* + * /////////////////////////////////////////////////// // Consts for + * expected values /////////////////////////////////////////////////// + */ + + /** + * Expected return value for streamReader.getNamespaceURI() in + * non-namespace-aware mode. + */ + protected final String DEFAULT_URI_NON_NS = ""; + + protected final String DEFAULT_URI_NS = ""; + + /* + * /////////////////////////////////////////////////// // Other consts + * /////////////////////////////////////////////////// + */ + + /* + * /////////////////////////////////////////////////// // Cached instances + * /////////////////////////////////////////////////// + */ + + XMLInputFactory mInputFactory; + XMLOutputFactory mOutputFactory; + XMLEventFactory mEventFactory; + + protected XMLInputFactory getInputFactory() { + if (mInputFactory == null) { + mInputFactory = getNewInputFactory(); + } + return mInputFactory; + } + + protected static XMLInputFactory getNewInputFactory() { + return XMLInputFactory.newInstance(); + } + + protected XMLOutputFactory getOutputFactory() { + if (mOutputFactory == null) { + mOutputFactory = getNewOutputFactory(); + } + return mOutputFactory; + } + + protected static XMLOutputFactory getNewOutputFactory() { + return XMLOutputFactory.newInstance(); + } + + protected XMLEventFactory getEventFactory() { + if (mEventFactory == null) { + mEventFactory = XMLEventFactory.newInstance(); + } + return mEventFactory; + } + + protected static XMLStreamReader constructStreamReader(XMLInputFactory f, String content) throws XMLStreamException { + // return f.createXMLStreamReader(new StringReader(content)); + try { + byte[] data = content.getBytes("UTF-8"); + return constructStreamReader(f, data); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + } + + protected static XMLStreamReader constructStreamReader(XMLInputFactory f, byte[] b) throws XMLStreamException { + return f.createXMLStreamReader(new ByteArrayInputStream(b)); + } + + protected static XMLStreamReader constructStreamReaderForFile(XMLInputFactory f, String filename) throws IOException, XMLStreamException { + File inf = new File(filename); + XMLStreamReader sr = f.createXMLStreamReader(inf.toURL().toString(), new FileReader(inf)); + Assert.assertEquals(START_DOCUMENT, sr.getEventType()); + return sr; + } + + protected XMLStreamReader constructNsStreamReader(String content) throws XMLStreamException { + XMLInputFactory f = getInputFactory(); + setNamespaceAware(f, true); + return f.createXMLStreamReader(new StringReader(content)); + } + + protected XMLStreamReader constructNsStreamReader(String content, boolean coal) throws XMLStreamException { + XMLInputFactory f = getInputFactory(); + setNamespaceAware(f, true); + setCoalescing(f, coal); + return f.createXMLStreamReader(new StringReader(content)); + } + + /* + * ////////////////////////////////////////////////// // Configuring input + * factory ////////////////////////////////////////////////// + */ + + protected static boolean isCoalescing(XMLInputFactory f) throws XMLStreamException { + return ((Boolean) f.getProperty(XMLInputFactory.IS_COALESCING)).booleanValue(); + } + + protected static void setCoalescing(XMLInputFactory f, boolean state) throws XMLStreamException { + Boolean b = state ? Boolean.TRUE : Boolean.FALSE; + f.setProperty(XMLInputFactory.IS_COALESCING, b); + // Let's just double-check it... + Assert.assertEquals(state, isCoalescing(f)); + } + + protected static boolean isValidating(XMLInputFactory f) throws XMLStreamException { + return ((Boolean) f.getProperty(XMLInputFactory.IS_VALIDATING)).booleanValue(); + } + + protected static void setValidating(XMLInputFactory f, boolean state) throws XMLStreamException { + try { + Boolean b = state ? Boolean.TRUE : Boolean.FALSE; + f.setProperty(XMLInputFactory.IS_VALIDATING, b); + } catch (IllegalArgumentException iae) { + Assert.fail("Could not set DTD validating mode to " + state + ": " + iae); + // throw new XMLStreamException(iae.getMessage(), iae); + } + Assert.assertEquals(state, isValidating(f)); + } + + protected static boolean isNamespaceAware(XMLInputFactory f) throws XMLStreamException { + return ((Boolean) f.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue(); + } + + /** + * @return True if setting succeeded, and property supposedly was + * succesfully set to the value specified; false if there was a + * problem. + */ + protected static boolean setNamespaceAware(XMLInputFactory f, boolean state) throws XMLStreamException { + try { + f.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, state ? Boolean.TRUE : Boolean.FALSE); + + /* + * 07-Sep-2005, TSa: Let's not assert, but instead let's see if it + * sticks. Some implementations might choose to silently ignore + * setting, at least for 'false'? + */ + return (isNamespaceAware(f) == state); + } catch (IllegalArgumentException e) { + /* + * Let's assume, then, that the property (or specific value for it) + * is NOT supported... + */ + return false; + } + } + + protected static void setReplaceEntities(XMLInputFactory f, boolean state) throws XMLStreamException { + Boolean b = state ? Boolean.TRUE : Boolean.FALSE; + f.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, b); + Assert.assertEquals(b, f.getProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES)); + } + + protected static void setSupportDTD(XMLInputFactory f, boolean state) throws XMLStreamException { + Boolean b = state ? Boolean.TRUE : Boolean.FALSE; + f.setProperty(XMLInputFactory.SUPPORT_DTD, b); + Assert.assertEquals(b, f.getProperty(XMLInputFactory.SUPPORT_DTD)); + } + + protected static boolean setSupportExternalEntities(XMLInputFactory f, boolean state) throws XMLStreamException { + Boolean b = state ? Boolean.TRUE : Boolean.FALSE; + try { + f.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, b); + Object act = f.getProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES); + return (act instanceof Boolean) && ((Boolean) act).booleanValue() == state; + } catch (IllegalArgumentException e) { + /* + * Let's assume, then, that the property (or specific value for it) + * is NOT supported... + */ + return false; + } + } + + protected static void setResolver(XMLInputFactory f, XMLResolver resolver) throws XMLStreamException { + f.setProperty(XMLInputFactory.RESOLVER, resolver); + } + + protected static boolean setReportCData(XMLInputFactory f, boolean state) throws XMLStreamException { + + Boolean b = state ? Boolean.TRUE : Boolean.FALSE; + if (f.isPropertySupported(PROP_REPORT_CDATA)) { + f.setProperty(PROP_REPORT_CDATA, b); + return true; + } + return false; + } + + /* + * ////////////////////////////////////////////////// // Stream reader + * accessors ////////////////////////////////////////////////// + */ + + /** + * Method that not only gets currently available text from the reader, but + * also checks that its consistenly accessible using different StAX methods. + */ + protected static String getAndVerifyText(XMLStreamReader sr) throws XMLStreamException { + String text = sr.getText(); + + /* + * 05-Apr-2006, TSa: Although getText() is available for DTD and + * ENTITY_REFERENCE, getTextXxx() are not. Thus, can not do more checks + * for those types. + */ + int type = sr.getEventType(); + if (type != ENTITY_REFERENCE && type != DTD) { + Assert.assertNotNull("getText() should never return null.", text); + int expLen = sr.getTextLength(); + /* + * Hmmh. Can only return empty text for CDATA (since empty blocks + * are legal). + */ + /* + * !!! 01-Sep-2004, TSa: note: theoretically, in coalescing mode, it + * could be possible to have empty CDATA section(s) get converted to + * CHARACTERS, which would be empty... may need to enhance this to + * check that mode is not coalescing? Or something + */ + if (sr.getEventType() == CHARACTERS) { + if (expLen == 0) { + Assert.fail("Stream reader should never return empty Strings."); + } + } + Assert.assertEquals(expLen, text.length(), "Expected text length of " + expLen + ", got " + text.length()); + char[] textChars = sr.getTextCharacters(); + int start = sr.getTextStart(); + String text2 = new String(textChars, start, expLen); + Assert.assertEquals("Expected getText() and getTextCharacters() to return same value for event of type (" + tokenTypeDesc(sr.getEventType()) + ")", + text, text2); + } else { // DTD or ENTITY_REFERENCE + // not sure if null is legal for these either, but... + if (text == null) { // let's prevent an NPE at caller + text = ""; + } + } + return text; + } + + protected static String getAllText(XMLStreamReader sr) throws XMLStreamException { + StringBuffer sb = new StringBuffer(); + while (true) { + int tt = sr.getEventType(); + if (tt != CHARACTERS && tt != SPACE) { + break; + } + sb.append(getAndVerifyText(sr)); + sr.next(); + } + return sb.toString(); + } + + protected static String getAllCData(XMLStreamReader sr) throws XMLStreamException { + StringBuffer sb = new StringBuffer(); + while (true) { + /* + * Note: CDATA sections CAN be reported as CHARACTERS, but not as + * SPACE + */ + int tt = sr.getEventType(); + if (tt != CHARACTERS && tt != CDATA) { + break; + } + sb.append(getAndVerifyText(sr)); + sr.next(); + } + return sb.toString(); + } + + /* + * ////////////////////////////////////////////////// // Derived assert/fail + * methods ////////////////////////////////////////////////// + */ + + protected static void assertTokenType(int expType, int actType) { + if (expType == actType) { + return; + } + Assert.fail("Expected token " + tokenTypeDesc(expType) + "; got " + tokenTypeDesc(actType) + "."); + } + + protected static void assertTokenType(int expType, int actType, XMLStreamReader sr) { + if (expType == actType) { + return; + } + Assert.fail("Expected token " + tokenTypeDesc(expType) + "; got " + tokenTypeDesc(actType, sr) + "."); + } + + protected static void assertTextualTokenType(int actType) { + if (actType != CHARACTERS && actType != SPACE && actType != CDATA) { + Assert.fail("Expected textual token (CHARACTERS, SPACE or CDATA)" + "; got " + tokenTypeDesc(actType) + "."); + } + } + + protected static void failStrings(String msg, String exp, String act) { + // !!! TODO: Indicate position where Strings differ + Assert.fail(msg + ": expected " + quotedPrintable(exp) + ", got " + quotedPrintable(act)); + } + + /** + * Specific method makes sense, since earlier it was not clear whether null + * or empty string (or perhaps both) would be the right answer when there is + * no prefix. + *

+ * However: as per javadocs of {@link XMLStreamReader#getPrefix}, from JDK + * 1.6 indicate, the current understanding is that null is the + * ultimate right answer here. + */ + protected static void assertNoPrefix(XMLStreamReader sr) throws XMLStreamException { + String prefix = sr.getPrefix(); + if (prefix != null) { + if (prefix.length() != 0) { + Assert.fail("Current element should not have a prefix: got '" + prefix + "'"); + } else { + Assert.fail("Expected null to signify missing prefix (see XMLStreamReader#getPrefix() JavaDocs): got empty String"); + } + } + } + + protected static void assertNoAttrPrefix(String attrPrefix) throws XMLStreamException { + if (attrPrefix != null) { + if (attrPrefix.length() != 0) { + Assert.fail("Attribute should not have a prefix: got '" + attrPrefix + "'"); + } else { + Assert.fail("Expected null to signify missing attribute prefix (see XMLStreamReader#getAttributePrefix() JavaDocs): got empty String"); + } + } + } + + /** + * Similar to {@link #assertNoPrefix}, but here we do know that unbound + * namespace URI should be indicated as empty String. + */ + protected static void assertNoNsURI(XMLStreamReader sr) throws XMLStreamException { + String uri = sr.getNamespaceURI(); + if (uri == null) { + Assert.fail("Expected empty String to indicate \"no namespace\": got null"); + } else if (uri.length() != 0) { + Assert.fail("Expected empty String to indicate \"no namespace\": got '" + uri + "'"); + } + } + + protected static void assertNoAttrNamespace(String attrNsURI) throws XMLStreamException { + if (attrNsURI == null) { + // refer to 6903561; accept null for now. + // fail("Expected empty String to indicate \"no namespace\" (for attribute): got null"); + } else if (attrNsURI.length() != 0) { + Assert.fail("Expected empty String to indicate \"no namespace\" (for attribute): got '" + attrNsURI + "'"); + } + } + + protected static void assertNoPrefixOrNs(XMLStreamReader sr) throws XMLStreamException { + assertNoPrefix(sr); + assertNoNsURI(sr); + } + + /** + * Helper assertion that assert that the String is either null or empty + * (""). + */ + protected static void assertNullOrEmpty(String str) { + if (str != null && str.length() > 0) { + Assert.fail("Expected String to be empty or null; was '" + str + "' (length " + str.length() + ")"); + } + } + + /* + * ////////////////////////////////////////////////// // Debug/output + * helpers ////////////////////////////////////////////////// + */ + + protected static String tokenTypeDesc(int tt) { + String desc = (String) mTokenTypes.get(new Integer(tt)); + if (desc == null) { + return "[" + tt + "]"; + } + return desc; + } + + protected static String tokenTypeDesc(XMLEvent evt) { + return tokenTypeDesc(evt.getEventType()); + } + + final static int MAX_DESC_TEXT_CHARS = 8; + + protected static String tokenTypeDesc(int tt, XMLStreamReader sr) { + String desc = tokenTypeDesc(tt); + // Let's show first 8 chars or so... + if (tt == CHARACTERS || tt == SPACE || tt == CDATA) { + String str = sr.getText(); + if (str.length() > MAX_DESC_TEXT_CHARS) { + desc = "\"" + str.substring(0, MAX_DESC_TEXT_CHARS) + "\"[...]"; + } else { + desc = "\"" + desc + "\""; + } + desc = " (" + desc + ")"; + } + return desc; + } + + protected static String valueDesc(String value) { + if (value == null) { + return "[NULL]"; + } + return "\"" + value + "\""; + } + + protected static String printable(char ch) { + if (ch == '\n') { + return "\\n"; + } + if (ch == '\r') { + return "\\r"; + } + if (ch == '\t') { + return "\\t"; + } + if (ch == ' ') { + return "_"; + } + if (ch > 127 || ch < 32) { + StringBuffer sb = new StringBuffer(6); + sb.append("\\u"); + String hex = Integer.toHexString((int) ch); + for (int i = 0, len = 4 - hex.length(); i < len; i++) { + sb.append('0'); + } + sb.append(hex); + return sb.toString(); + } + return null; + } + + protected static String printable(String str) { + if (str == null || str.length() == 0) { + return str; + } + + int len = str.length(); + StringBuffer sb = new StringBuffer(len + 64); + for (int i = 0; i < len; ++i) { + char c = str.charAt(i); + String res = printable(c); + if (res == null) { + sb.append(c); + } else { + sb.append(res); + } + } + return sb.toString(); + } + + protected static String quotedPrintable(String str) { + if (str == null || str.length() == 0) { + return "[0]''"; + } + return "[len: " + str.length() + "] '" + printable(str) + "'"; + } + + protected void reportNADueToProperty(String method, String prop) { + String clsName = getClass().getName(); + /* + * 27-Sep-2005, TSa: Should probably use some other mechanism for + * reporting this. Does JUnit have something applicable? + */ + System.err.println("Skipping " + clsName + "#" + method + ": property '" + prop + "' (or one of its values) not supported."); + } + + protected void reportNADueToNS(String method) { + reportNADueToProperty(method, "IS_NAMESPACE_AWARE"); + } + + protected void reportNADueToExtEnt(String method) { + reportNADueToProperty(method, "IS_SUPPORTING_EXTERNAL_ENTITIES"); + } + + protected void reportNADueToEntityExpansion(String method, int type) { + String clsName = getClass().getName(); + String msg = (type > 0) ? " (next event: " + tokenTypeDesc(type) + ")" : ""; + System.err.println("Skipping " + clsName + "#" + method + ": entity expansion does not seem to be functioning properly" + msg + "."); + } +} diff --git a/jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java b/jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java new file mode 100644 index 00000000000..5a408d1278a --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/util/DraconianErrorHandler.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package util; + +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; + +public final class DraconianErrorHandler extends DefaultHandler { + public void error(SAXParseException e) throws SAXException { + throw e; + } + + public void fatalError(SAXParseException e) throws SAXException { + throw e; + } +} From 1104878b02a596cde6a7e2f0339ac1b332b89323 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Tue, 11 Aug 2015 10:53:50 +0200 Subject: [PATCH 51/71] 8133105: Fix getFinalAttributes() on Windows to handle more special cases Reviewed-by: simonis, rriggs --- .../windows/native/libjava/WinNTFileSystem_md.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c b/jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c index 3c280c0c9b4..1e29fd23965 100644 --- a/jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c +++ b/jdk/src/java.base/windows/native/libjava/WinNTFileSystem_md.c @@ -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 @@ -233,10 +233,13 @@ DWORD getFinalAttributes(WCHAR *path) if (GetFileAttributesExW(path, GetFileExInfoStandard, &wfad)) { attr = getFinalAttributesIfReparsePoint(path, wfad.dwFileAttributes); - } else if (GetLastError() == ERROR_SHARING_VIOLATION && - (h = FindFirstFileW(path, &wfd)) != INVALID_HANDLE_VALUE) { - attr = getFinalAttributesIfReparsePoint(path, wfd.dwFileAttributes); - FindClose(h); + } else { + DWORD lerr = GetLastError(); + if ((lerr == ERROR_SHARING_VIOLATION || lerr == ERROR_ACCESS_DENIED) && + (h = FindFirstFileW(path, &wfd)) != INVALID_HANDLE_VALUE) { + attr = getFinalAttributesIfReparsePoint(path, wfd.dwFileAttributes); + FindClose(h); + } } return attr; } From 784379f7a44106e1e0a0c6e9c87bed5eec406623 Mon Sep 17 00:00:00 2001 From: Sean Mullan Date: Tue, 11 Aug 2015 08:48:18 -0400 Subject: [PATCH 52/71] 8077055: Allow other named SecurityPermissions, RuntimePermissions, and AuthPermissions to be used Reviewed-by: weijun --- .../classes/java/lang/RuntimePermission.java | 29 +++++++++--------- .../java/security/SecurityPermission.java | 30 +++++++++++-------- .../javax/security/auth/AuthPermission.java | 20 +++++++------ 3 files changed, 43 insertions(+), 36 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java index 0df77f5e520..36b48b75d39 100644 --- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java +++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java @@ -31,22 +31,19 @@ import java.util.Hashtable; 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. - * - *

+ * 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. + *

* 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. - *

- * 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. + *

+ * 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. * * @@ -353,6 +350,10 @@ import java.util.StringTokenizer; * *
* + * @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 diff --git a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java index 5bb74569d3f..60d1d785860 100644 --- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java +++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java @@ -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.Hashtable; 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. - *

- * 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. + *

+ * 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. - *

- * 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. + *

+ * 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. * * * @@ -299,6 +299,10 @@ import java.util.StringTokenizer; * *
* + * @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 diff --git a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java index 49f51481d17..889d14af979 100644 --- a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java +++ b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java @@ -26,18 +26,17 @@ package javax.security.auth; /** - * This class is for authentication permissions. - * An AuthPermission contains a name - * (also referred to as a "target name") - * but no actions list; you either have the named permission - * or you don't. + * This class is for authentication permissions. An {@code AuthPermission} + * contains a name (also referred to as a "target name") but no actions + * list; you either have the named permission or you don't. * *

The target name is the name of a security configuration parameter - * (see below). Currently the AuthPermission object is used to - * guard access to the Policy, Subject, LoginContext, - * and Configuration objects. + * (see below). Currently the {@code AuthPermission} object is used to + * guard access to the {@link Policy}, {@link Subject}, + * {@link javax.security.auth.login.LoginContext}, and + * {@link javax.security.auth.login.Configuration} objects. * - *

The possible target names for an Authentication Permission are: + *

The standard target names for an Authentication Permission are: * *

  *      doAs -                  allow the caller to invoke the
@@ -125,6 +124,9 @@ package javax.security.auth;
  *                              Subject-based access control policy.
  * 
* + * @implNote + * Implementations may define additional target names, but should use naming + * conventions such as reverse domain name notation to avoid name clashes. */ public final class AuthPermission extends java.security.BasicPermission { From c683f90b9ae8a6561245880c5b7ef3b1a79ec357 Mon Sep 17 00:00:00 2001 From: Alexander Stepanov Date: Tue, 11 Aug 2015 20:46:46 +0300 Subject: [PATCH 53/71] 8133188: docs: replace tags (obsolete in html5) for java.util Reviewed-by: martin --- .../classes/java/util/AbstractCollection.java | 54 +- .../share/classes/java/util/AbstractMap.java | 138 +-- .../java/util/AbstractSequentialList.java | 68 +- .../share/classes/java/util/AbstractSet.java | 44 +- .../share/classes/java/util/ArrayList.java | 8 +- .../share/classes/java/util/Arrays.java | 813 +++++++++--------- .../share/classes/java/util/Collection.java | 154 ++-- .../share/classes/java/util/Collections.java | 210 ++--- .../share/classes/java/util/Comparator.java | 72 +- .../share/classes/java/util/Dictionary.java | 72 +- .../util/DuplicateFormatFlagsException.java | 2 +- .../java/util/EmptyStackException.java | 4 +- .../share/classes/java/util/EnumMap.java | 40 +- .../share/classes/java/util/EnumSet.java | 28 +- .../share/classes/java/util/Enumeration.java | 10 +- ...ormatFlagsConversionMismatchException.java | 2 +- .../share/classes/java/util/Formattable.java | 20 +- .../classes/java/util/FormattableFlags.java | 12 +- .../share/classes/java/util/Formatter.java | 216 ++--- .../java/util/FormatterClosedException.java | 2 +- .../share/classes/java/util/HashMap.java | 96 +-- .../share/classes/java/util/HashSet.java | 66 +- .../share/classes/java/util/Hashtable.java | 102 +-- .../classes/java/util/IdentityHashMap.java | 170 ++-- .../util/IllegalFormatCodePointException.java | 2 +- .../IllegalFormatConversionException.java | 2 +- .../util/IllegalFormatFlagsException.java | 2 +- .../util/IllegalFormatPrecisionException.java | 2 +- .../util/IllegalFormatWidthException.java | 2 +- .../java/util/InputMismatchException.java | 10 +- .../share/classes/java/util/JumboEnumSet.java | 28 +- .../classes/java/util/LinkedHashMap.java | 108 +-- .../classes/java/util/LinkedHashSet.java | 34 +- .../share/classes/java/util/LinkedList.java | 8 +- .../share/classes/java/util/List.java | 150 ++-- .../share/classes/java/util/Locale.java | 34 +- .../share/classes/java/util/Map.java | 189 ++-- .../util/MissingFormatArgumentException.java | 2 +- .../util/MissingFormatWidthException.java | 2 +- .../java/util/MissingResourceException.java | 8 +- .../java/util/NoSuchElementException.java | 8 +- .../share/classes/java/util/Observable.java | 50 +- .../share/classes/java/util/Observer.java | 8 +- .../share/classes/java/util/Properties.java | 36 +- .../share/classes/java/util/RandomAccess.java | 14 +- .../classes/java/util/RegularEnumSet.java | 28 +- .../share/classes/java/util/Scanner.java | 330 +++---- .../java/util/ServiceConfigurationError.java | 6 +- .../share/classes/java/util/Set.java | 102 +-- .../share/classes/java/util/SortedSet.java | 102 +-- .../share/classes/java/util/Stack.java | 28 +- .../classes/java/util/StringTokenizer.java | 84 +- .../share/classes/java/util/Timer.java | 30 +- .../share/classes/java/util/TimerTask.java | 4 +- .../share/classes/java/util/TreeSet.java | 6 +- .../UnknownFormatConversionException.java | 2 +- .../util/UnknownFormatFlagsException.java | 2 +- .../share/classes/java/util/Vector.java | 16 +- .../share/classes/java/util/WeakHashMap.java | 149 ++-- .../classes/java/util/regex/MatchResult.java | 33 +- .../classes/java/util/regex/Matcher.java | 187 ++-- .../classes/java/util/regex/Pattern.java | 482 +++++------ .../util/regex/PatternSyntaxException.java | 4 +- .../classes/java/util/regex/package-info.java | 2 +- 64 files changed, 2352 insertions(+), 2347 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/AbstractCollection.java b/jdk/src/java.base/share/classes/java/util/AbstractCollection.java index 4e530150706..6f344f8befe 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractCollection.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractCollection.java @@ -26,23 +26,23 @@ package java.util; /** - * This class provides a skeletal implementation of the Collection + * This class provides a skeletal implementation of the {@code Collection} * interface, to minimize the effort required to implement this interface.

* * To implement an unmodifiable collection, the programmer needs only to - * extend this class and provide implementations for the iterator and - * size methods. (The iterator returned by the iterator - * method must implement hasNext and next.)

+ * 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}.)

* * To implement a modifiable collection, the programmer must additionally - * override this class's add method (which otherwise throws an - * UnsupportedOperationException), and the iterator returned by the - * iterator method must additionally implement its remove + * 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.

* * The programmer should generally provide a void (no argument) and - * Collection constructor, as per the recommendation in the - * Collection interface specification.

+ * {@code Collection} constructor, as per the recommendation in the + * {@code Collection} interface specification.

* * 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 @@ public abstract class AbstractCollection implements Collection { * {@inheritDoc} * * @implSpec - * This implementation returns size() == 0. + * This implementation returns {@code size() == 0}. */ public boolean isEmpty() { return size() == 0; @@ -255,7 +255,7 @@ public abstract class AbstractCollection implements Collection { * * @implSpec * This implementation always throws an - * UnsupportedOperationException. + * {@code UnsupportedOperationException}. * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} @@ -276,8 +276,8 @@ public abstract class AbstractCollection implements Collection { * from the collection using the iterator's remove method. * *

Note that this implementation throws an - * UnsupportedOperationException if the iterator returned by this - * collection's iterator method does not implement the remove + * {@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 @@ public abstract class AbstractCollection implements Collection { * 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 true is returned, otherwise false. + * contained {@code true} is returned, otherwise {@code false}. * * @throws ClassCastException {@inheritDoc} * @throws NullPointerException {@inheritDoc} @@ -335,7 +335,7 @@ public abstract class AbstractCollection implements Collection { * each object returned by the iterator to this collection, in turn. * *

Note that this implementation will throw an - * UnsupportedOperationException unless add is + * {@code UnsupportedOperationException} unless {@code add} is * overridden (assuming the specified collection is non-empty). * * @throws UnsupportedOperationException {@inheritDoc} @@ -361,11 +361,11 @@ public abstract class AbstractCollection implements Collection { * 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 remove method. + * this collection with the iterator's {@code remove} method. * *

Note that this implementation will throw an - * UnsupportedOperationException if the iterator returned by the - * iterator method does not implement the remove 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 @@ public abstract class AbstractCollection implements Collection { * 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 remove method. + * from this collection with the iterator's {@code remove} method. * *

Note that this implementation will throw an - * UnsupportedOperationException if the iterator returned by the - * iterator method does not implement the remove 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 @@ public abstract class AbstractCollection implements Collection { * * @implSpec * This implementation iterates over this collection, removing each - * element using the Iterator.remove operation. Most + * element using the {@code Iterator.remove} operation. Most * implementations will probably choose to override this method for * efficiency. * *

Note that this implementation will throw an - * UnsupportedOperationException if the iterator returned by this - * collection's iterator method does not implement the - * remove 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 @@ public abstract class AbstractCollection implements Collection { * 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 - * ("[]"). Adjacent elements are separated by the characters - * ", " (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 diff --git a/jdk/src/java.base/share/classes/java/util/AbstractMap.java b/jdk/src/java.base/share/classes/java/util/AbstractMap.java index 143f228f904..20d0cac928d 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractMap.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractMap.java @@ -27,24 +27,24 @@ package java.util; import java.util.Map.Entry; /** - * This class provides a skeletal implementation of the Map + * This class provides a skeletal implementation of the {@code Map} * interface, to minimize the effort required to implement this interface. * *

To implement an unmodifiable map, the programmer needs only to extend this - * class and provide an implementation for the entrySet 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 AbstractSet. This set should - * not support the add or remove methods, and its iterator - * should not support the remove 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. * *

To implement a modifiable map, the programmer must additionally override - * this class's put method (which otherwise throws an - * UnsupportedOperationException), and the iterator returned by - * entrySet().iterator() must additionally implement its - * remove 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. * *

The programmer should generally provide a void (no argument) and map - * constructor, as per the recommendation in the Map interface + * constructor, as per the recommendation in the {@code Map} interface * specification. * *

The documentation for each non-abstract method in this class describes its @@ -79,7 +79,7 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation returns entrySet().size(). + * This implementation returns {@code entrySet().size()}. */ public int size() { return entrySet().size(); @@ -89,7 +89,7 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation returns size() == 0. + * This implementation returns {@code size() == 0}. */ public boolean isEmpty() { return size() == 0; @@ -99,10 +99,10 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation iterates over entrySet() searching + * This implementation iterates over {@code entrySet()} searching * for an entry with the specified value. If such an entry is found, - * true is returned. If the iteration terminates without - * finding such an entry, false 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 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation iterates over entrySet() searching + * This implementation iterates over {@code entrySet()} searching * for an entry with the specified key. If such an entry is found, - * true is returned. If the iteration terminates without - * finding such an entry, false 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 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation iterates over entrySet() 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, null 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 @@ public abstract class AbstractMap implements Map { * * @implSpec * This implementation always throws an - * UnsupportedOperationException. + * {@code UnsupportedOperationException}. * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} @@ -213,18 +213,18 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation iterates over entrySet() 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 getValue 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 - * remove operation, and the saved value is returned. If the - * iteration terminates without finding such an entry, null 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. * *

Note that this implementation throws an - * UnsupportedOperationException if the entrySet - * iterator does not support the remove 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 @@ public abstract class AbstractMap implements Map { * * @implSpec * This implementation iterates over the specified map's - * entrySet() collection, and calls this map's put + * {@code entrySet()} collection, and calls this map's {@code put} * operation once for each entry returned by the iteration. * *

Note that this implementation throws an - * UnsupportedOperationException if this map does not support - * the put 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 @@ public abstract class AbstractMap implements Map { * {@inheritDoc} * * @implSpec - * This implementation calls entrySet().clear(). + * This implementation calls {@code entrySet().clear()}. * *

Note that this implementation throws an - * UnsupportedOperationException if the entrySet - * does not support the clear operation. + * {@code UnsupportedOperationException} if the {@code entrySet} + * does not support the {@code clear} operation. * * @throws UnsupportedOperationException {@inheritDoc} */ @@ -314,10 +314,10 @@ public abstract class AbstractMap implements Map { * @implSpec * This implementation returns a set that subclasses {@link AbstractSet}. * The subclass's iterator method returns a "wrapper object" over this - * map's entrySet() iterator. The size method - * delegates to this map's size method and the - * contains method delegates to this map's - * containsKey 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. * *

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 @@ public abstract class AbstractMap implements Map { * @implSpec * This implementation returns a collection that subclasses {@link * AbstractCollection}. The subclass's iterator method returns a - * "wrapper object" over this map's entrySet() iterator. - * The size method delegates to this map's size - * method and the contains method delegates to this map's - * containsValue 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. * *

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 @@ public abstract class AbstractMap implements Map { /** * Compares the specified object with this map for equality. Returns - * true if the given object is also a map and the two maps - * represent the same mappings. More formally, two maps m1 and - * m2 represent the same mappings if - * m1.entrySet().equals(m2.entrySet()). This ensures that the - * equals method works properly across different implementations - * of the Map 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 true. 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 false. If so, it iterates over this map's - * entrySet 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, false is returned. If the - * iteration completes, true 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 true 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 @@ public abstract class AbstractMap implements Map { /** * 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 - * entrySet() view. This ensures that m1.equals(m2) - * implies that m1.hashCode()==m2.hashCode() for any two maps - * m1 and m2, 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 entrySet(), 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 @@ public abstract class AbstractMap implements Map { /** * 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 entrySet view's iterator, enclosed in braces - * ("{}"). Adjacent mappings are separated by the characters - * ", " (comma and space). Each key-value mapping is rendered as - * the key followed by an equals sign ("=") 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 @@ public abstract class AbstractMap implements Map { } /** - * Returns a shallow copy of this AbstractMap 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 @@ public abstract class AbstractMap implements Map { /** * An Entry maintaining a key and a value. The value may be - * changed using the setValue 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 SimpleEntry instances in method - * Map.entrySet().toArray. + * arrays of {@code SimpleEntry} instances in method + * {@code Map.entrySet().toArray}. * * @since 1.6 */ @@ -689,7 +689,7 @@ public abstract class AbstractMap implements Map { /** * Returns a String representation of this map entry. This * implementation returns the string representation of this - * entry's key followed by the equals character ("=") + * 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 @@ public abstract class AbstractMap implements Map { /** * An Entry maintaining an immutable key and value. This class - * does not support method setValue. 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 @@ public abstract class AbstractMap implements Map { /** * Replaces the value corresponding to this entry with the specified * value (optional operation). This implementation simply throws - * UnsupportedOperationException, as this class implements + * {@code UnsupportedOperationException}, as this class implements * an immutable map entry. * * @param value new value to be stored in this entry @@ -820,7 +820,7 @@ public abstract class AbstractMap implements Map { /** * Returns a String representation of this map entry. This * implementation returns the string representation of this - * entry's key followed by the equals character ("=") + * 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 diff --git a/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java b/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java index 85f77c6e308..bd6736ba63c 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractSequentialList.java @@ -26,31 +26,31 @@ package java.util; /** - * This class provides a skeletal implementation of the List + * 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), AbstractList should be used + * random access data (such as an array), {@code AbstractList} should be used * in preference to this class.

* - * This class is the opposite of the AbstractList class in the sense - * that it implements the "random access" methods (get(int index), - * set(int index, E element), add(int index, E element) and - * remove(int index)) 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.

* * To implement a list the programmer needs only to extend this class and - * provide implementations for the listIterator and size + * provide implementations for the {@code listIterator} and {@code size} * methods. For an unmodifiable list, the programmer need only implement the - * list iterator's hasNext, next, hasPrevious, - * previous and index methods.

+ * list iterator's {@code hasNext}, {@code next}, {@code hasPrevious}, + * {@code previous} and {@code index} methods.

* * For a modifiable list the programmer should additionally implement the list - * iterator's set method. For a variable-size list the programmer - * should additionally implement the list iterator's remove and - * add methods.

+ * 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.

* * The programmer should generally provide a void (no argument) and collection - * constructor, as per the recommendation in the Collection interface + * constructor, as per the recommendation in the {@code Collection} interface * specification.

* * This class is a member of the @@ -78,8 +78,8 @@ public abstract class AbstractSequentialList extends AbstractList { * Returns the element at the specified position in this list. * *

This implementation first gets a list iterator pointing to the - * indexed element (with listIterator(index)). Then, it gets - * the element using ListIterator.next 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 @@ public abstract class AbstractSequentialList extends AbstractList { * specified element (optional operation). * *

This implementation first gets a list iterator pointing to the - * indexed element (with listIterator(index)). Then, it gets - * the current element using ListIterator.next and replaces it - * with ListIterator.set. + * indexed element (with {@code listIterator(index)}). Then, it gets + * the current element using {@code ListIterator.next} and replaces it + * with {@code ListIterator.set}. * *

Note that this implementation will throw an - * UnsupportedOperationException if the list iterator does not - * implement the set operation. + * {@code UnsupportedOperationException} if the list iterator does not + * implement the {@code set} operation. * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} @@ -128,12 +128,12 @@ public abstract class AbstractSequentialList extends AbstractList { * indices). * *

This implementation first gets a list iterator pointing to the - * indexed element (with listIterator(index)). Then, it - * inserts the specified element with ListIterator.add. + * indexed element (with {@code listIterator(index)}). Then, it + * inserts the specified element with {@code ListIterator.add}. * *

Note that this implementation will throw an - * UnsupportedOperationException if the list iterator does not - * implement the add operation. + * {@code UnsupportedOperationException} if the list iterator does not + * implement the {@code add} operation. * * @throws UnsupportedOperationException {@inheritDoc} * @throws ClassCastException {@inheritDoc} @@ -156,12 +156,12 @@ public abstract class AbstractSequentialList extends AbstractList { * list. * *

This implementation first gets a list iterator pointing to the - * indexed element (with listIterator(index)). Then, it removes - * the element with ListIterator.remove. + * indexed element (with {@code listIterator(index)}). Then, it removes + * the element with {@code ListIterator.remove}. * *

Note that this implementation will throw an - * UnsupportedOperationException if the list iterator does not - * implement the remove operation. + * {@code UnsupportedOperationException} if the list iterator does not + * implement the {@code remove} operation. * * @throws UnsupportedOperationException {@inheritDoc} * @throws IndexOutOfBoundsException {@inheritDoc} @@ -193,14 +193,14 @@ public abstract class AbstractSequentialList extends AbstractList { * *

This implementation gets an iterator over the specified collection and * a list iterator over this list pointing to the indexed element (with - * listIterator(index)). 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 ListIterator.add followed by - * ListIterator.next (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). * *

Note that this implementation will throw an - * UnsupportedOperationException if the list iterator returned by - * the listIterator method does not implement the add + * {@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 @@ public abstract class AbstractSequentialList extends AbstractList { * sequence). * * @param index index of first element to be returned from the list - * iterator (by a call to the next 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} diff --git a/jdk/src/java.base/share/classes/java/util/AbstractSet.java b/jdk/src/java.base/share/classes/java/util/AbstractSet.java index e999188564d..35e2ba4ec99 100644 --- a/jdk/src/java.base/share/classes/java/util/AbstractSet.java +++ b/jdk/src/java.base/share/classes/java/util/AbstractSet.java @@ -26,20 +26,20 @@ package java.util; /** - * This class provides a skeletal implementation of the Set + * This class provides a skeletal implementation of the {@code Set} * interface to minimize the effort required to implement this * interface.

* * 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 Set + * 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).

* * Note that this class does not override any of the implementations from - * the AbstractCollection class. It merely adds implementations - * for equals and hashCode.

+ * the {@code AbstractCollection} class. It merely adds implementations + * for {@code equals} and {@code hashCode}.

* * This class is a member of the * @@ -67,20 +67,20 @@ public abstract class AbstractSet extends AbstractCollection implements Se /** * Compares the specified object with this set for equality. Returns - * true 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 equals method works - * properly across different implementations of the Set + * this set. This ensures that the {@code equals} method works + * properly across different implementations of the {@code Set} * interface.

* * This implementation first checks if the specified object is this - * set; if so it returns true. 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 - * containsAll((Collection) o). + * {@code containsAll((Collection) o)}. * * @param o object to be compared for equality with this set - * @return true 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 @@ public abstract class AbstractSet extends AbstractCollection implements Se /** * 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 null element is defined to be zero. - * This ensures that s1.equals(s2) implies that - * s1.hashCode()==s2.hashCode() for any two sets s1 - * and s2, 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}. * *

This implementation iterates over the set, calling the - * hashCode 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 @@ public abstract class AbstractSet extends AbstractCollection implements Se * the two sets. * *

This implementation determines which is the smaller of this set - * and the specified collection, by invoking the size + * 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 remove 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 remove method. + * set's {@code remove} method. * *

Note that this implementation will throw an - * UnsupportedOperationException if the iterator returned by the - * iterator method does not implement the remove 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 true if this set changed as a result of the call - * @throws UnsupportedOperationException if the removeAll 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 diff --git a/jdk/src/java.base/share/classes/java/util/ArrayList.java b/jdk/src/java.base/share/classes/java/util/ArrayList.java index 7a3ad72fb46..6afb4338350 100644 --- a/jdk/src/java.base/share/classes/java/util/ArrayList.java +++ b/jdk/src/java.base/share/classes/java/util/ArrayList.java @@ -294,7 +294,7 @@ public class ArrayList extends AbstractList * 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 - * (o==null ? e==null : o.equals(e)). + * {@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 @@ public class ArrayList extends AbstractList * 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 - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. */ public int indexOf(Object o) { @@ -327,7 +327,7 @@ public class ArrayList extends AbstractList * 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 - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. */ public int lastIndexOf(Object o) { @@ -511,7 +511,7 @@ public class ArrayList extends AbstractList * 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 - * (o==null ? get(i)==null : o.equals(get(i))) + * {@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). diff --git a/jdk/src/java.base/share/classes/java/util/Arrays.java b/jdk/src/java.base/share/classes/java/util/Arrays.java index 70049da5802..35962987cc8 100644 --- a/jdk/src/java.base/share/classes/java/util/Arrays.java +++ b/jdk/src/java.base/share/classes/java/util/Arrays.java @@ -1772,10 +1772,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -1802,11 +1802,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -1853,10 +1853,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -1883,11 +1883,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -1934,10 +1934,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -1964,11 +1964,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2015,10 +2015,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -2045,11 +2045,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2096,10 +2096,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -2126,11 +2126,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2178,10 +2178,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -2209,11 +2209,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2269,10 +2269,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -2300,11 +2300,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2366,10 +2366,10 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -2404,11 +2404,11 @@ public class Arrays { * @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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2464,13 +2464,13 @@ public class Arrays { * @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 - * null 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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 a.length 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 >= 0 if * and only if the key is found. @@ -2503,15 +2503,15 @@ public class Arrays { * @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 - * null 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, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point 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 toIndex 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 >= 0 if * and only if the key is found. @@ -2557,16 +2557,16 @@ public class Arrays { // Equality Testing /** - * Returns true if the two specified arrays of longs are + * Returns {@code true} if the two specified arrays of longs are * equal 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 null. + * 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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of ints are + * Returns {@code true} if the two specified arrays of ints are * equal 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 null. + * 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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of shorts are + * Returns {@code true} if the two specified arrays of shorts are * equal 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 null. + * 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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of chars are + * Returns {@code true} if the two specified arrays of chars are * equal 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 null. + * 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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of bytes are + * Returns {@code true} if the two specified arrays of bytes are * equal 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 null. + * 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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of booleans are + * Returns {@code true} if the two specified arrays of booleans are * equal 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 null. + * 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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of doubles are + * Returns {@code true} if the two specified arrays of doubles are * equal 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 null. + * two array references are considered equal if both are {@code null}. * - * Two doubles d1 and d2 are considered equal if: - *

    new Double(d1).equals(new Double(d2))
- * (Unlike the == operator, this method considers - * NaN equals to itself, and 0.0d unequal to -0.0d.) + * Two doubles {@code d1} and {@code d2} are considered equal if: + *
    {@code new Double(d1).equals(new Double(d2))}
+ * (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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of floats are + * Returns {@code true} if the two specified arrays of floats are * equal 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 null. + * two array references are considered equal if both are {@code null}. * - * Two floats f1 and f2 are considered equal if: - *
    new Float(f1).equals(new Float(f2))
- * (Unlike the == operator, this method considers - * NaN equals to itself, and 0.0f unequal to -0.0f.) + * Two floats {@code f1} and {@code f2} are considered equal if: + *
    {@code new Float(f1).equals(new Float(f2))}
+ * (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 true 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 @@ public class Arrays { } /** - * Returns true if the two specified arrays of Objects are + * Returns {@code true} if the two specified arrays of Objects are * equal 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 e1 - * and e2 are considered equal if (e1==null ? e2==null - * : e1.equals(e2)). 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 equal 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 null. + * 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 true 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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { /** * 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 fromIndex, inclusive, to index - * toIndex, exclusive. (If fromIndex==toIndex, 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 @@ public class Arrays { * @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 fromIndex > toIndex - * @throws ArrayIndexOutOfBoundsException if fromIndex < 0 or - * toIndex > a.length + * @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 @@ public class Arrays { * 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 null. + * 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 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original 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 @@ public class Arrays { * 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 null. + * 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 newType. + * The resulting array is of the class {@code newType}. * * @param the class of the objects in the original array * @param the class of the objects in the returned array @@ -3200,11 +3201,11 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original is null + * @throws NegativeArraySizeException if {@code newLength} is negative + * @throws NullPointerException if {@code original} is null * @throws ArrayStoreException if an element copied from - * original is not of a runtime type that can be stored in - * an array of class newType + * {@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 @@ public class Arrays { * 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 (byte)0. + * 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 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original 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 @@ public class Arrays { * 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 (short)0. + * 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 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original 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 @@ public class Arrays { * 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 0. + * 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 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original 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 @@ public class Arrays { * 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 0L. + * 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 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original 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 @@ public class Arrays { * 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 '\\u000'. Such indices + * the original, the copy will contain {@code '\\u000'}. Such indices * will exist if and only if the specified length is greater than that of * the original array. * @@ -3327,8 +3328,8 @@ public class Arrays { * @param newLength the length of the copy to be returned * @return a copy of the original array, truncated or padded with null characters * to obtain the specified length - * @throws NegativeArraySizeException if newLength is negative - * @throws NullPointerException if original is null + * @throws NegativeArraySizeException if {@code newLength} is negative + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static char[] copyOf(char[] original, int newLength) { @@ -3343,7 +3344,7 @@ public class Arrays { * 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 0f. + * copy but not the original, the copy will contain {@code 0f}. * Such indices will exist if and only if the specified length * is greater than that of the original array. * @@ -3351,8 +3352,8 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original is null + * @throws NegativeArraySizeException if {@code newLength} is negative + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static float[] copyOf(float[] original, int newLength) { @@ -3367,7 +3368,7 @@ public class Arrays { * 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 0d. + * copy but not the original, the copy will contain {@code 0d}. * Such indices will exist if and only if the specified length * is greater than that of the original array. * @@ -3375,8 +3376,8 @@ public class Arrays { * @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 newLength is negative - * @throws NullPointerException if original is null + * @throws NegativeArraySizeException if {@code newLength} is negative + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static double[] copyOf(double[] original, int newLength) { @@ -3387,11 +3388,11 @@ public class Arrays { } /** - * Copies the specified array, truncating or padding with false (if necessary) + * Copies the specified array, truncating or padding with {@code false} (if necessary) * 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 false. + * copy but not the original, the copy will contain {@code false}. * Such indices will exist if and only if the specified length * is greater than that of the original array. * @@ -3399,8 +3400,8 @@ public class Arrays { * @param newLength the length of the copy to be returned * @return a copy of the original array, truncated or padded with false elements * to obtain the specified length - * @throws NegativeArraySizeException if newLength is negative - * @throws NullPointerException if original is null + * @throws NegativeArraySizeException if {@code newLength} is negative + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static boolean[] copyOf(boolean[] original, int newLength) { @@ -3412,17 +3413,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * null is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code null} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. *

* The resulting array is of exactly the same class as the original array. * @@ -3435,8 +3436,8 @@ public class Arrays { * truncated or padded with nulls to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ @SuppressWarnings("unchecked") @@ -3446,18 +3447,18 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * null is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. - * The resulting array is of the class newType. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code null} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. + * The resulting array is of the class {@code newType}. * * @param the class of the objects in the original array * @param the class of the objects in the returned array @@ -3470,11 +3471,11 @@ public class Arrays { * truncated or padded with nulls to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @throws ArrayStoreException if an element copied from - * original is not of a runtime type that can be stored in - * an array of class newType. + * {@code original} is not of a runtime type that can be stored in + * an array of class {@code newType}. * @since 1.6 */ @HotSpotIntrinsicCandidate @@ -3493,17 +3494,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * (byte)0 is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code (byte)0} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3513,8 +3514,8 @@ public class Arrays { * truncated or padded with zeros to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static byte[] copyOfRange(byte[] original, int from, int to) { @@ -3529,17 +3530,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * (short)0 is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code (short)0} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3549,8 +3550,8 @@ public class Arrays { * truncated or padded with zeros to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static short[] copyOfRange(short[] original, int from, int to) { @@ -3565,17 +3566,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * 0 is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code 0} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3585,8 +3586,8 @@ public class Arrays { * truncated or padded with zeros to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static int[] copyOfRange(int[] original, int from, int to) { @@ -3601,17 +3602,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * 0L is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code 0L} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3621,8 +3622,8 @@ public class Arrays { * truncated or padded with zeros to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static long[] copyOfRange(long[] original, int from, int to) { @@ -3637,17 +3638,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * '\\u000' is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code '\\u000'} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3657,8 +3658,8 @@ public class Arrays { * truncated or padded with null characters to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static char[] copyOfRange(char[] original, int from, int to) { @@ -3673,17 +3674,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * 0f is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code 0f} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3693,8 +3694,8 @@ public class Arrays { * truncated or padded with zeros to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static float[] copyOfRange(float[] original, int from, int to) { @@ -3709,17 +3710,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * 0d is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code 0d} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3729,8 +3730,8 @@ public class Arrays { * truncated or padded with zeros to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static double[] copyOfRange(double[] original, int from, int to) { @@ -3745,17 +3746,17 @@ public class Arrays { /** * Copies the specified range of the specified array into a new array. - * The initial index of the range (from) must lie between zero - * and original.length, inclusive. The value at - * original[from] is placed into the initial element of the copy - * (unless from == original.length or from == to). + * The initial index of the range ({@code from}) must lie between zero + * and {@code original.length}, inclusive. The value at + * {@code original[from]} is placed into the initial element of the copy + * (unless {@code from == original.length} or {@code from == to}). * Values from subsequent elements in the original array are placed into * subsequent elements in the copy. The final index of the range - * (to), which must be greater than or equal to from, - * may be greater than original.length, in which case - * false is placed in all elements of the copy whose index is - * greater than or equal to original.length - from. The length - * of the returned array will be to - from. + * ({@code to}), which must be greater than or equal to {@code from}, + * may be greater than {@code original.length}, in which case + * {@code false} is placed in all elements of the copy whose index is + * greater than or equal to {@code original.length - from}. The length + * of the returned array will be {@code to - from}. * * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive @@ -3765,8 +3766,8 @@ public class Arrays { * truncated or padded with false elements to obtain the required length * @throws ArrayIndexOutOfBoundsException if {@code from < 0} * or {@code from > original.length} - * @throws IllegalArgumentException if from > to - * @throws NullPointerException if original is null + * @throws IllegalArgumentException if {@code from > to} + * @throws NullPointerException if {@code original} is null * @since 1.6 */ public static boolean[] copyOfRange(boolean[] original, int from, int to) { @@ -3902,18 +3903,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two long arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code long} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Long} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(long a[]) { @@ -3931,18 +3932,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two non-null int arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two non-null {@code int} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Integer} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(int a[]) { @@ -3958,18 +3959,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two short arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code short} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Short} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(short a[]) { @@ -3985,18 +3986,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two char arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code char} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Character} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(char a[]) { @@ -4012,18 +4013,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two byte arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code byte} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Byte} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(byte a[]) { @@ -4039,18 +4040,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two boolean arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code boolean} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Boolean} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(boolean a[]) { @@ -4066,18 +4067,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two float arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code float} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Float} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(float a[]) { @@ -4093,18 +4094,18 @@ public class Arrays { /** * Returns a hash code based on the contents of the specified array. - * For any two double arrays a and b - * such that Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + * For any two {@code double} arrays {@code a} and {@code b} + * such that {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is the same value that would be - * obtained by invoking the {@link List#hashCode() hashCode} + * obtained by invoking the {@link List#hashCode() hashCode} * method on a {@link List} containing a sequence of {@link Double} - * instances representing the elements of a in the same order. - * If a is null, this method returns 0. + * instances representing the elements of {@code a} in the same order. + * If {@code a} is {@code null}, this method returns 0. * * @param a the array whose hash value to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @since 1.5 */ public static int hashCode(double a[]) { @@ -4127,16 +4128,16 @@ public class Arrays { * element, either directly or indirectly through one or more levels of * arrays. * - *

For any two arrays a and b such that - * Arrays.equals(a, b), it is also the case that - * Arrays.hashCode(a) == Arrays.hashCode(b). + *

For any two arrays {@code a} and {@code b} such that + * {@code Arrays.equals(a, b)}, it is also the case that + * {@code Arrays.hashCode(a) == Arrays.hashCode(b)}. * *

The value returned by this method is equal to the value that would - * be returned by Arrays.asList(a).hashCode(), unless a - * is null, in which case 0 is returned. + * be returned by {@code Arrays.asList(a).hashCode()}, unless {@code a} + * is {@code null}, in which case {@code 0} is returned. * * @param a the array whose content-based hash code to compute - * @return a content-based hash code for a + * @return a content-based hash code for {@code a} * @see #deepHashCode(Object[]) * @since 1.5 */ @@ -4161,23 +4162,23 @@ public class Arrays { * one or more levels of arrays. The behavior of such an invocation is * undefined. * - *

For any two arrays a and b such that - * Arrays.deepEquals(a, b), it is also the case that - * Arrays.deepHashCode(a) == Arrays.deepHashCode(b). + *

For any two arrays {@code a} and {@code b} such that + * {@code Arrays.deepEquals(a, b)}, it is also the case that + * {@code Arrays.deepHashCode(a) == Arrays.deepHashCode(b)}. * *

The computation of the value returned by this method is similar to * that of the value returned by {@link List#hashCode()} on a list - * containing the same elements as a in the same order, with one - * difference: If an element e of a is itself an array, - * its hash code is computed not by calling e.hashCode(), but as - * by calling the appropriate overloading of Arrays.hashCode(e) - * if e is an array of a primitive type, or as by calling - * Arrays.deepHashCode(e) recursively if e is an array - * of a reference type. If a is null, this method + * containing the same elements as {@code a} in the same order, with one + * difference: If an element {@code e} of {@code a} is itself an array, + * its hash code is computed not by calling {@code e.hashCode()}, but as + * by calling the appropriate overloading of {@code Arrays.hashCode(e)} + * if {@code e} is an array of a primitive type, or as by calling + * {@code Arrays.deepHashCode(e)} recursively if {@code e} is an array + * of a reference type. If {@code a} is {@code null}, this method * returns 0. * * @param a the array whose deep-content-based hash code to compute - * @return a deep-content-based hash code for a + * @return a deep-content-based hash code for {@code a} * @see #hashCode(Object[]) * @since 1.5 */ @@ -4217,28 +4218,28 @@ public class Arrays { } /** - * Returns true if the two specified arrays are deeply + * Returns {@code true} if the two specified arrays are deeply * equal to one another. Unlike the {@link #equals(Object[],Object[])} * method, this method is appropriate for use with nested arrays of * arbitrary depth. * *

Two array references are considered deeply equal if both - * are null, or if they refer to arrays that contain the same + * are {@code null}, or if they refer to arrays that contain the same * number of elements and all corresponding pairs of elements in the two * arrays are deeply equal. * - *

Two possibly null elements e1 and e2 are + *

Two possibly {@code null} elements {@code e1} and {@code e2} are * deeply equal if any of the following conditions hold: *

    - *
  • e1 and e2 are both arrays of object reference - * types, and Arrays.deepEquals(e1, e2) would return true - *
  • e1 and e2 are arrays of the same primitive + *
  • {@code e1} and {@code e2} are both arrays of object reference + * types, and {@code Arrays.deepEquals(e1, e2) would return true} + *
  • {@code e1} and {@code e2} are arrays of the same primitive * type, and the appropriate overloading of - * Arrays.equals(e1, e2) would return true. - *
  • e1 == e2 - *
  • e1.equals(e2) would return true. + * {@code Arrays.equals(e1, e2)} would return true. + *
  • {@code e1 == e2} + *
  • {@code e1.equals(e2)} would return true. *
- * Note that this definition permits null elements at any depth. + * Note that this definition permits {@code null} elements at any depth. * *

If either of the specified arrays contain themselves as elements * either directly or indirectly through one or more levels of arrays, @@ -4246,7 +4247,7 @@ public class Arrays { * * @param a1 one array to be tested for equality * @param a2 the other array to be tested for equality - * @return true if the two arrays are equal + * @return {@code true} if the two arrays are equal * @see #equals(Object[],Object[]) * @see Objects#deepEquals(Object, Object) * @since 1.5 @@ -4307,14 +4308,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(long). Returns "null" if a - * is null. + * {@code String.valueOf(long)}. Returns {@code "null"} if {@code a} + * is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(long[] a) { @@ -4337,14 +4338,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(int). Returns "null" if a is - * null. + * {@code String.valueOf(int)}. Returns {@code "null"} if {@code a} is + * {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(int[] a) { @@ -4367,14 +4368,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(short). Returns "null" if a - * is null. + * {@code String.valueOf(short)}. Returns {@code "null"} if {@code a} + * is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(short[] a) { @@ -4397,14 +4398,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(char). Returns "null" if a - * is null. + * {@code String.valueOf(char)}. Returns {@code "null"} if {@code a} + * is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(char[] a) { @@ -4427,14 +4428,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements - * are separated by the characters ", " (a comma followed + * enclosed in square brackets ({@code "[]"}). Adjacent elements + * are separated by the characters {@code ", "} (a comma followed * by a space). Elements are converted to strings as by - * String.valueOf(byte). Returns "null" if - * a is null. + * {@code String.valueOf(byte)}. Returns {@code "null"} if + * {@code a} is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(byte[] a) { @@ -4457,14 +4458,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(boolean). Returns "null" if - * a is null. + * {@code String.valueOf(boolean)}. Returns {@code "null"} if + * {@code a} is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(boolean[] a) { @@ -4487,14 +4488,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(float). Returns "null" if a - * is null. + * {@code String.valueOf(float)}. Returns {@code "null"} if {@code a} + * is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(float[] a) { @@ -4518,14 +4519,14 @@ public class Arrays { /** * Returns a string representation of the contents of the specified array. * The string representation consists of a list of the array's elements, - * enclosed in square brackets ("[]"). Adjacent elements are - * separated by the characters ", " (a comma followed by a + * enclosed in square brackets ({@code "[]"}). Adjacent elements are + * separated by the characters {@code ", "} (a comma followed by a * space). Elements are converted to strings as by - * String.valueOf(double). Returns "null" if a - * is null. + * {@code String.valueOf(double)}. Returns {@code "null"} if {@code a} + * is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @since 1.5 */ public static String toString(double[] a) { @@ -4549,15 +4550,15 @@ public class Arrays { * Returns a string representation of the contents of the specified array. * If the array contains other arrays as elements, they are converted to * strings by the {@link Object#toString} method inherited from - * Object, which describes their identities rather than + * {@code Object}, which describes their identities rather than * their contents. * *

The value returned by this method is equal to the value that would - * be returned by Arrays.asList(a).toString(), unless a - * is null, in which case "null" is returned. + * be returned by {@code Arrays.asList(a).toString()}, unless {@code a} + * is {@code null}, in which case {@code "null"} is returned. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @see #deepToString(Object[]) * @since 1.5 */ @@ -4586,29 +4587,29 @@ public class Arrays { * designed for converting multidimensional arrays to strings. * *

The string representation consists of a list of the array's - * elements, enclosed in square brackets ("[]"). Adjacent - * elements are separated by the characters ", " (a comma + * elements, enclosed in square brackets ({@code "[]"}). Adjacent + * elements are separated by the characters {@code ", "} (a comma * followed by a space). Elements are converted to strings as by - * String.valueOf(Object), unless they are themselves + * {@code String.valueOf(Object)}, unless they are themselves * arrays. * - *

If an element e is an array of a primitive type, it is + *

If an element {@code e} is an array of a primitive type, it is * converted to a string as by invoking the appropriate overloading of - * Arrays.toString(e). If an element e is an array of a + * {@code Arrays.toString(e)}. If an element {@code e} is an array of a * reference type, it is converted to a string as by invoking * this method recursively. * *

To avoid infinite recursion, if the specified array contains itself * as an element, or contains an indirect reference to itself through one * or more levels of arrays, the self-reference is converted to the string - * "[...]". For example, an array containing only a reference - * to itself would be rendered as "[[...]]". + * {@code "[...]"}. For example, an array containing only a reference + * to itself would be rendered as {@code "[[...]]"}. * - *

This method returns "null" if the specified array - * is null. + *

This method returns {@code "null"} if the specified array + * is {@code null}. * * @param a the array whose string representation to return - * @return a string representation of a + * @return a string representation of {@code a} * @see #toString(Object[]) * @since 1.5 */ diff --git a/jdk/src/java.base/share/classes/java/util/Collection.java b/jdk/src/java.base/share/classes/java/util/Collection.java index 3a01908d73e..f92b9f6153f 100644 --- a/jdk/src/java.base/share/classes/java/util/Collection.java +++ b/jdk/src/java.base/share/classes/java/util/Collection.java @@ -35,30 +35,30 @@ import java.util.stream.StreamSupport; * collections allow duplicate elements and others do not. Some are ordered * and others unordered. The JDK does not provide any direct * implementations of this interface: it provides implementations of more - * specific subinterfaces like Set and List. This interface + * specific subinterfaces like {@code Set} and {@code List}. This interface * is typically used to pass collections around and manipulate them where * maximum generality is desired. * *

Bags or multisets (unordered collections that may contain * duplicate elements) should implement this interface directly. * - *

All general-purpose Collection implementation classes (which - * typically implement Collection indirectly through one of its + *

All general-purpose {@code Collection} implementation classes (which + * typically implement {@code Collection} indirectly through one of its * subinterfaces) should provide two "standard" constructors: a void (no * arguments) constructor, which creates an empty collection, and a - * constructor with a single argument of type Collection, which + * constructor with a single argument of type {@code Collection}, which * creates a new collection with the same elements as its argument. In * effect, the latter constructor allows the user to copy any collection, * producing an equivalent collection of the desired implementation type. * There is no way to enforce this convention (as interfaces cannot contain - * constructors) but all of the general-purpose Collection + * constructors) but all of the general-purpose {@code Collection} * implementations in the Java platform libraries comply. * *

The "destructive" methods contained in this interface, that is, the * methods that modify the collection on which they operate, are specified to - * throw UnsupportedOperationException if this collection does not + * throw {@code UnsupportedOperationException} if this collection does not * support the operation. If this is the case, these methods may, but are not - * required to, throw an UnsupportedOperationException if the + * required to, throw an {@code UnsupportedOperationException} if the * invocation would have no effect on the collection. For example, invoking * the {@link #addAll(Collection)} method on an unmodifiable collection may, * but is not required to, throw the exception if the collection to be added @@ -69,7 +69,7 @@ import java.util.stream.StreamSupport; * they may contain. For example, some implementations prohibit null elements, * and some have restrictions on the types of their elements. Attempting to * add an ineligible element throws an unchecked exception, typically - * NullPointerException or ClassCastException. Attempting + * {@code NullPointerException} or {@code ClassCastException}. Attempting * to query the presence of an ineligible element may throw an exception, * or it may simply return false; some implementations will exhibit the former * behavior and some will exhibit the latter. More generally, attempting an @@ -90,13 +90,13 @@ import java.util.stream.StreamSupport; *

Many methods in Collections Framework interfaces are defined in * terms of the {@link Object#equals(Object) equals} method. For example, * the specification for the {@link #contains(Object) contains(Object o)} - * method says: "returns true if and only if this collection - * contains at least one element e such that - * (o==null ? e==null : o.equals(e))." This specification should - * not be construed to imply that invoking Collection.contains - * with a non-null argument o will cause o.equals(e) to be - * invoked for any element e. Implementations are free to implement - * optimizations whereby the equals invocation is avoided, for + * method says: "returns {@code true} if and only if this collection + * contains at least one element {@code e} such that + * {@code (o==null ? e==null : o.equals(e))}." This specification should + * not be construed to imply that invoking {@code Collection.contains} + * with a non-null argument {@code o} will cause {@code o.equals(e)} to be + * invoked for any element {@code e}. Implementations are free to implement + * optimizations whereby the {@code equals} invocation is avoided, for * example, by first comparing the hash codes of the two elements. (The * {@link Object#hashCode()} specification guarantees that two objects with * unequal hash codes cannot be equal.) More generally, implementations of @@ -146,28 +146,28 @@ public interface Collection extends Iterable { /** * Returns the number of elements in this collection. If this collection - * contains more than Integer.MAX_VALUE elements, returns - * Integer.MAX_VALUE. + * contains more than {@code Integer.MAX_VALUE} elements, returns + * {@code Integer.MAX_VALUE}. * * @return the number of elements in this collection */ int size(); /** - * Returns true if this collection contains no elements. + * Returns {@code true} if this collection contains no elements. * - * @return true if this collection contains no elements + * @return {@code true} if this collection contains no elements */ boolean isEmpty(); /** - * Returns true if this collection contains the specified element. - * More formally, returns true if and only if this collection - * contains at least one element e such that - * (o==null ? e==null : o.equals(e)). + * Returns {@code true} if this collection contains the specified element. + * More formally, returns {@code true} if and only if this collection + * contains at least one element {@code e} such that + * {@code Objects.equals(o, e)}. * * @param o element whose presence in this collection is to be tested - * @return true if this collection contains the specified + * @return {@code true} if this collection contains the specified * element * @throws ClassCastException if the type of the specified element * is incompatible with this collection @@ -184,7 +184,7 @@ public interface Collection extends Iterable { * (unless this collection is an instance of some class that provides a * guarantee). * - * @return an Iterator over the elements in this collection + * @return an {@code Iterator} over the elements in this collection */ Iterator iterator(); @@ -216,9 +216,9 @@ public interface Collection extends Iterable { *

If this collection fits in the specified array with room to spare * (i.e., the array has more elements than this collection), the element * in the array immediately following the end of the collection is set to - * null. (This is useful in determining the length of this + * {@code null}. (This is useful in determining the length of this * collection only if the caller knows that this collection does - * not contain any null elements.) + * not contain any {@code null} elements.) * *

If this collection makes any guarantees as to what order its elements * are returned by its iterator, this method must return the elements in @@ -229,15 +229,15 @@ public interface Collection extends Iterable { * precise control over the runtime type of the output array, and may, * under certain circumstances, be used to save allocation costs. * - *

Suppose x is a collection known to contain only strings. + *

Suppose {@code x} is a collection known to contain only strings. * The following code can be used to dump the collection into a newly - * allocated array of String: + * allocated array of {@code String}: * *

      *     String[] y = x.toArray(new String[0]);
* - * Note that toArray(new Object[0]) is identical in function to - * toArray(). + * Note that {@code toArray(new Object[0])} is identical in function to + * {@code toArray()}. * * @param the runtime type of the array to contain the collection * @param a the array into which the elements of this collection are to be @@ -255,27 +255,27 @@ public interface Collection extends Iterable { /** * Ensures that this collection contains the specified element (optional - * operation). Returns true if this collection changed as a - * result of the call. (Returns false if this collection does + * operation). Returns {@code true} if this collection changed as a + * result of the call. (Returns {@code false} if this collection does * not permit duplicates and already contains the specified element.)

* * Collections that support this operation may place limitations on what * elements may be added to this collection. In particular, some - * collections will refuse to add null elements, and others will + * collections will refuse to add {@code null} elements, and others will * impose restrictions on the type of elements that may be added. * Collection classes should clearly specify in their documentation any * restrictions on what elements may be added.

* * If a collection refuses to add a particular element for any reason * other than that it already contains the element, it must throw - * an exception (rather than returning false). This preserves + * an exception (rather than returning {@code false}). This preserves * the invariant that a collection always contains the specified element * after this call returns. * * @param e element whose presence in this collection is to be ensured - * @return true if this collection changed as a result of the + * @return {@code true} if this collection changed as a result of the * call - * @throws UnsupportedOperationException if the add operation + * @throws UnsupportedOperationException if the {@code add} operation * is not supported by this collection * @throws ClassCastException if the class of the specified element * prevents it from being added to this collection @@ -291,21 +291,21 @@ public interface Collection extends Iterable { /** * Removes a single instance of the specified element from this * collection, if it is present (optional operation). More formally, - * removes an element e such that - * (o==null ? e==null : o.equals(e)), if + * removes an element {@code e} such that + * {@code Objects.equals(o, e)}, if * this collection contains one or more such elements. Returns - * true if this collection contained the specified element (or + * {@code true} if this collection contained the specified element (or * equivalently, if this collection changed as a result of the call). * * @param o element to be removed from this collection, if present - * @return true if an element was removed as a result of this call + * @return {@code true} if an element was removed as a result of this call * @throws ClassCastException if the type of the specified element * is incompatible with this collection * (optional) * @throws NullPointerException if the specified element is null and this * collection does not permit null elements * (optional) - * @throws UnsupportedOperationException if the remove operation + * @throws UnsupportedOperationException if the {@code remove} operation * is not supported by this collection */ boolean remove(Object o); @@ -314,11 +314,11 @@ public interface Collection extends Iterable { // Bulk Operations /** - * Returns true if this collection contains all of the elements + * Returns {@code true} if this collection contains all of the elements * in the specified collection. * * @param c collection to be checked for containment in this collection - * @return true if this collection contains all of the elements + * @return {@code true} if this collection contains all of the elements * in the specified collection * @throws ClassCastException if the types of one or more elements * in the specified collection are incompatible with this @@ -342,8 +342,8 @@ public interface Collection extends Iterable { * nonempty.) * * @param c collection containing elements to be added to this collection - * @return true if this collection changed as a result of the call - * @throws UnsupportedOperationException if the addAll operation + * @return {@code true} if this collection changed as a result of the call + * @throws UnsupportedOperationException if the {@code addAll} operation * is not supported by this collection * @throws ClassCastException if the class of an element of the specified * collection prevents it from being added to this collection @@ -366,9 +366,9 @@ public interface Collection extends Iterable { * collection. * * @param c collection containing elements to be removed from this collection - * @return true if this collection changed as a result of the + * @return {@code true} if this collection changed as a result of the * call - * @throws UnsupportedOperationException if the removeAll method + * @throws UnsupportedOperationException if the {@code removeAll} method * is not supported by this collection * @throws ClassCastException if the types of one or more elements * in this collection are incompatible with the specified @@ -426,8 +426,8 @@ public interface Collection extends Iterable { * specified collection. * * @param c collection containing elements to be retained in this collection - * @return true if this collection changed as a result of the call - * @throws UnsupportedOperationException if the retainAll operation + * @return {@code true} if this collection changed as a result of the call + * @throws UnsupportedOperationException if the {@code retainAll} operation * is not supported by this collection * @throws ClassCastException if the types of one or more elements * in this collection are incompatible with the specified @@ -447,7 +447,7 @@ public interface Collection extends Iterable { * Removes all of the elements from this collection (optional operation). * The collection will be empty after this method returns. * - * @throws UnsupportedOperationException if the clear operation + * @throws UnsupportedOperationException if the {@code clear} operation * is not supported by this collection */ void clear(); @@ -458,30 +458,30 @@ public interface Collection extends Iterable { /** * Compares the specified object with this collection for equality.

* - * While the Collection interface adds no stipulations to the - * general contract for the Object.equals, programmers who - * implement the Collection interface "directly" (in other words, - * create a class that is a Collection but is not a Set - * or a List) must exercise care if they choose to override the - * Object.equals. It is not necessary to do so, and the simplest - * course of action is to rely on Object's implementation, but + * While the {@code Collection} interface adds no stipulations to the + * general contract for the {@code Object.equals}, programmers who + * implement the {@code Collection} interface "directly" (in other words, + * create a class that is a {@code Collection} but is not a {@code Set} + * or a {@code List}) must exercise care if they choose to override the + * {@code Object.equals}. It is not necessary to do so, and the simplest + * course of action is to rely on {@code Object}'s implementation, but * the implementor may wish to implement a "value comparison" in place of - * the default "reference comparison." (The List and - * Set interfaces mandate such value comparisons.)

+ * the default "reference comparison." (The {@code List} and + * {@code Set} interfaces mandate such value comparisons.)

* - * The general contract for the Object.equals method states that - * equals must be symmetric (in other words, a.equals(b) if and - * only if b.equals(a)). The contracts for List.equals - * and Set.equals state that lists are only equal to other lists, - * and sets to other sets. Thus, a custom equals method for a - * collection class that implements neither the List nor - * Set interface must return false when this collection + * The general contract for the {@code Object.equals} method states that + * equals must be symmetric (in other words, {@code a.equals(b)} if and + * only if {@code b.equals(a)}). The contracts for {@code List.equals} + * and {@code Set.equals} state that lists are only equal to other lists, + * and sets to other sets. Thus, a custom {@code equals} method for a + * collection class that implements neither the {@code List} nor + * {@code Set} interface must return {@code false} when this collection * is compared to any list or set. (By the same logic, it is not possible - * to write a class that correctly implements both the Set and - * List interfaces.) + * to write a class that correctly implements both the {@code Set} and + * {@code List} interfaces.) * * @param o object to be compared for equality with this collection - * @return true if the specified object is equal to this + * @return {@code true} if the specified object is equal to this * collection * * @see Object#equals(Object) @@ -492,13 +492,13 @@ public interface Collection extends Iterable { /** * Returns the hash code value for this collection. While the - * Collection interface adds no stipulations to the general - * contract for the Object.hashCode method, programmers should - * take note that any class that overrides the Object.equals - * method must also override the Object.hashCode method in order - * to satisfy the general contract for the Object.hashCode method. - * In particular, c1.equals(c2) implies that - * c1.hashCode()==c2.hashCode(). + * {@code Collection} interface adds no stipulations to the general + * contract for the {@code Object.hashCode} method, programmers should + * take note that any class that overrides the {@code Object.equals} + * method must also override the {@code Object.hashCode} method in order + * to satisfy the general contract for the {@code Object.hashCode} method. + * In particular, {@code c1.equals(c2)} implies that + * {@code c1.hashCode()==c2.hashCode()}. * * @return the hash code value for this collection * diff --git a/jdk/src/java.base/share/classes/java/util/Collections.java b/jdk/src/java.base/share/classes/java/util/Collections.java index 6ae9a2feb16..7f9cb7c83f7 100644 --- a/jdk/src/java.base/share/classes/java/util/Collections.java +++ b/jdk/src/java.base/share/classes/java/util/Collections.java @@ -44,7 +44,7 @@ import java.util.stream.StreamSupport; * collections, "wrappers", which return a new collection backed by a * specified collection, and a few other odds and ends. * - *

The methods of this class all throw a NullPointerException + *

The methods of this class all throw a {@code NullPointerException} * if the collections or class objects provided to them are null. * *

The documentation for the polymorphic algorithms contained in this class @@ -52,17 +52,17 @@ import java.util.stream.StreamSupport; * descriptions should be regarded as implementation notes, rather than * parts of the specification. Implementors should feel free to * substitute other algorithms, so long as the specification itself is adhered - * to. (For example, the algorithm used by sort does not have to be + * to. (For example, the algorithm used by {@code sort} does not have to be * a mergesort, but it does have to be stable.) * *

The "destructive" algorithms contained in this class, that is, the * algorithms that modify the collection on which they operate, are specified - * to throw UnsupportedOperationException if the collection does not - * support the appropriate mutation primitive(s), such as the set + * to throw {@code UnsupportedOperationException} if the collection does not + * support the appropriate mutation primitive(s), such as the {@code set} * method. These algorithms may, but are not required to, throw this * exception if an invocation would have no effect on the collection. For - * example, invoking the sort method on an unmodifiable list that is - * already sorted may or may not throw UnsupportedOperationException. + * example, invoking the {@code sort} method on an unmodifiable list that is + * already sorted may or may not throw {@code UnsupportedOperationException}. * *

This class is a member of the * @@ -195,10 +195,10 @@ public class Collections { * @param list the list to be searched. * @param key the key to be searched for. * @return the index of the search key, if it is contained in the list; - * otherwise, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point is defined as the point at which the * key would be inserted into the list: the index of the first - * element greater than the key, or list.size() if all + * element greater than the key, or {@code list.size()} if all * elements in the list are less than the specified key. Note * that this guarantees that the return value will be >= 0 if * and only if the key is found. @@ -296,13 +296,13 @@ public class Collections { * @param list the list to be searched. * @param key the key to be searched for. * @param c the comparator by which the list is ordered. - * A null value indicates that the elements' + * A {@code null} value indicates that the elements' * {@linkplain Comparable natural ordering} should be used. * @return the index of the search key, if it is contained in the list; - * otherwise, (-(insertion point) - 1). The + * otherwise, (-(insertion point) - 1). The * insertion point is defined as the point at which the * key would be inserted into the list: the index of the first - * element greater than the key, or list.size() if all + * element greater than the key, or {@code list.size()} if all * elements in the list are less than the specified key. Note * that this guarantees that the return value will be >= 0 if * and only if the key is found. @@ -368,7 +368,7 @@ public class Collections { * * @param list the list whose elements are to be reversed. * @throws UnsupportedOperationException if the specified list or - * its list-iterator does not support the set operation. + * its list-iterator does not support the {@code set} operation. */ @SuppressWarnings({"rawtypes", "unchecked"}) public static void reverse(List list) { @@ -416,7 +416,7 @@ public class Collections { * * @param list the list to be shuffled. * @throws UnsupportedOperationException if the specified list or - * its list-iterator does not support the set operation. + * its list-iterator does not support the {@code set} operation. */ public static void shuffle(List list) { Random rnd = r; @@ -448,7 +448,7 @@ public class Collections { * @param list the list to be shuffled. * @param rnd the source of randomness to use to shuffle the list. * @throws UnsupportedOperationException if the specified list or its - * list-iterator does not support the set operation. + * list-iterator does not support the {@code set} operation. */ @SuppressWarnings({"rawtypes", "unchecked"}) public static void shuffle(List list, Random rnd) { @@ -483,7 +483,7 @@ public class Collections { * @param list The list in which to swap elements. * @param i the index of one element to be swapped. * @param j the index of the other element to be swapped. - * @throws IndexOutOfBoundsException if either i or j + * @throws IndexOutOfBoundsException if either {@code i} or {@code j} * is out of range (i < 0 || i >= list.size() * || j < 0 || j >= list.size()). * @since 1.4 @@ -516,7 +516,7 @@ public class Collections { * @param list the list to be filled with the specified element. * @param obj The element with which to fill the specified list. * @throws UnsupportedOperationException if the specified list or its - * list-iterator does not support the set operation. + * list-iterator does not support the {@code set} operation. */ public static void fill(List list, T obj) { int size = list.size(); @@ -548,7 +548,7 @@ public class Collections { * @throws IndexOutOfBoundsException if the destination list is too small * to contain the entire source List. * @throws UnsupportedOperationException if the destination list's - * list-iterator does not support the set operation. + * list-iterator does not support the {@code set} operation. */ public static void copy(List dest, List src) { int srcSize = src.size(); @@ -572,11 +572,11 @@ public class Collections { /** * Returns the minimum element of the given collection, according to the * natural ordering of its elements. All elements in the - * collection must implement the Comparable interface. + * collection must implement the {@code Comparable} interface. * Furthermore, all elements in the collection must be mutually - * comparable (that is, e1.compareTo(e2) must not throw a - * ClassCastException for any elements e1 and - * e2 in the collection).

+ * comparable (that is, {@code e1.compareTo(e2)} must not throw a + * {@code ClassCastException} for any elements {@code e1} and + * {@code e2} in the collection).

* * This method iterates over the entire collection, hence it requires * time proportional to the size of the collection. @@ -607,9 +607,9 @@ public class Collections { * Returns the minimum element of the given collection, according to the * order induced by the specified comparator. All elements in the * collection must be mutually comparable by the specified - * comparator (that is, comp.compare(e1, e2) must not throw a - * ClassCastException for any elements e1 and - * e2 in the collection).

+ * comparator (that is, {@code comp.compare(e1, e2)} must not throw a + * {@code ClassCastException} for any elements {@code e1} and + * {@code e2} in the collection).

* * This method iterates over the entire collection, hence it requires * time proportional to the size of the collection. @@ -617,7 +617,7 @@ public class Collections { * @param the class of the objects in the collection * @param coll the collection whose minimum element is to be determined. * @param comp the comparator with which to determine the minimum element. - * A null value indicates that the elements' natural + * A {@code null} value indicates that the elements' natural * ordering should be used. * @return the minimum element of the given collection, according * to the specified comparator. @@ -645,11 +645,11 @@ public class Collections { /** * Returns the maximum element of the given collection, according to the * natural ordering of its elements. All elements in the - * collection must implement the Comparable interface. + * collection must implement the {@code Comparable} interface. * Furthermore, all elements in the collection must be mutually - * comparable (that is, e1.compareTo(e2) must not throw a - * ClassCastException for any elements e1 and - * e2 in the collection).

+ * comparable (that is, {@code e1.compareTo(e2)} must not throw a + * {@code ClassCastException} for any elements {@code e1} and + * {@code e2} in the collection).

* * This method iterates over the entire collection, hence it requires * time proportional to the size of the collection. @@ -680,9 +680,9 @@ public class Collections { * Returns the maximum element of the given collection, according to the * order induced by the specified comparator. All elements in the * collection must be mutually comparable by the specified - * comparator (that is, comp.compare(e1, e2) must not throw a - * ClassCastException for any elements e1 and - * e2 in the collection).

+ * comparator (that is, {@code comp.compare(e1, e2)} must not throw a + * {@code ClassCastException} for any elements {@code e1} and + * {@code e2} in the collection).

* * This method iterates over the entire collection, hence it requires * time proportional to the size of the collection. @@ -690,7 +690,7 @@ public class Collections { * @param the class of the objects in the collection * @param coll the collection whose maximum element is to be determined. * @param comp the comparator with which to determine the maximum element. - * A null value indicates that the elements' natural + * A {@code null} value indicates that the elements' natural * ordering should be used. * @return the maximum element of the given collection, according * to the specified comparator. @@ -717,32 +717,32 @@ public class Collections { /** * Rotates the elements in the specified list by the specified distance. - * After calling this method, the element at index i will be - * the element previously at index (i - distance) mod - * list.size(), for all values of i between 0 - * and list.size()-1, inclusive. (This method has no effect on + * After calling this method, the element at index {@code i} will be + * the element previously at index {@code (i - distance)} mod + * {@code list.size()}, for all values of {@code i} between {@code 0} + * and {@code list.size()-1}, inclusive. (This method has no effect on * the size of the list.) * - *

For example, suppose list comprises [t, a, n, k, s]. - * After invoking Collections.rotate(list, 1) (or - * Collections.rotate(list, -4)), list will comprise - * [s, t, a, n, k]. + *

For example, suppose {@code list} comprises{@code [t, a, n, k, s]}. + * After invoking {@code Collections.rotate(list, 1)} (or + * {@code Collections.rotate(list, -4)}), {@code list} will comprise + * {@code [s, t, a, n, k]}. * *

Note that this method can usefully be applied to sublists to * move one or more elements within a list while preserving the * order of the remaining elements. For example, the following idiom - * moves the element at index j forward to position - * k (which must be greater than or equal to j): + * moves the element at index {@code j} forward to position + * {@code k} (which must be greater than or equal to {@code j}): *

      *     Collections.rotate(list.subList(j, k+1), -1);
      * 
- * To make this concrete, suppose list comprises - * [a, b, c, d, e]. To move the element at index 1 - * (b) forward two positions, perform the following invocation: + * To make this concrete, suppose {@code list} comprises + * {@code [a, b, c, d, e]}. To move the element at index {@code 1} + * ({@code b}) forward two positions, perform the following invocation: *
      *     Collections.rotate(l.subList(1, 4), -1);
      * 
- * The resulting list is [a, c, d, b, e]. + * The resulting list is {@code [a, c, d, b, e]}. * *

To move more than one element forward, increase the absolute value * of the rotation distance. To move elements backward, use a positive @@ -755,8 +755,8 @@ public class Collections { * element is swapped into the first element. If necessary, the process * is repeated on the second and successive elements, until the rotation * is complete. If the specified list is large and doesn't implement the - * RandomAccess interface, this implementation breaks the - * list into two sublist views around index -distance mod size. + * {@code RandomAccess} interface, this implementation breaks the + * list into two sublist views around index {@code -distance mod size}. * Then the {@link #reverse(List)} method is invoked on each sublist view, * and finally it is invoked on the entire list. For a more complete * description of both algorithms, see Section 2.3 of Jon Bentley's @@ -765,9 +765,9 @@ public class Collections { * @param list the list to be rotated. * @param distance the distance to rotate the list. There are no * constraints on this value; it may be zero, negative, or - * greater than list.size(). + * greater than {@code list.size()}. * @throws UnsupportedOperationException if the specified list or - * its list-iterator does not support the set operation. + * its list-iterator does not support the {@code set} operation. * @since 1.4 */ public static void rotate(List list, int distance) { @@ -817,21 +817,21 @@ public class Collections { /** * Replaces all occurrences of one specified value in a list with another. - * More formally, replaces with newVal each element e - * in list such that - * (oldVal==null ? e==null : oldVal.equals(e)). + * More formally, replaces with {@code newVal} each element {@code e} + * in {@code list} such that + * {@code (oldVal==null ? e==null : oldVal.equals(e))}. * (This method has no effect on the size of the list.) * * @param the class of the objects in the list * @param list the list in which replacement is to occur. * @param oldVal the old value to be replaced. - * @param newVal the new value with which oldVal is to be + * @param newVal the new value with which {@code oldVal} is to be * replaced. - * @return true if list contained one or more elements - * e such that - * (oldVal==null ? e==null : oldVal.equals(e)). + * @return {@code true} if {@code list} contained one or more elements + * {@code e} such that + * {@code (oldVal==null ? e==null : oldVal.equals(e))}. * @throws UnsupportedOperationException if the specified list or - * its list-iterator does not support the set operation. + * its list-iterator does not support the {@code set} operation. * @since 1.4 */ public static boolean replaceAll(List list, T oldVal, T newVal) { @@ -877,7 +877,7 @@ public class Collections { /** * Returns the starting position of the first occurrence of the specified * target list within the specified source list, or -1 if there is no - * such occurrence. More formally, returns the lowest index i + * such occurrence. More formally, returns the lowest index {@code i} * such that {@code source.subList(i, i+target.size()).equals(target)}, * or -1 if there is no such index. (Returns -1 if * {@code target.size() > source.size()}) @@ -887,8 +887,8 @@ public class Collections { * location in turn. * * @param source the list in which to search for the first occurrence - * of target. - * @param target the list to search for as a subList of source. + * of {@code target}. + * @param target the list to search for as a subList of {@code source}. * @return the starting position of the first occurrence of the specified * target list within the specified source list, or -1 if there * is no such occurrence. @@ -930,7 +930,7 @@ public class Collections { /** * Returns the starting position of the last occurrence of the specified * target list within the specified source list, or -1 if there is no such - * occurrence. More formally, returns the highest index i + * occurrence. More formally, returns the highest index {@code i} * such that {@code source.subList(i, i+target.size()).equals(target)}, * or -1 if there is no such index. (Returns -1 if * {@code target.size() > source.size()}) @@ -940,8 +940,8 @@ public class Collections { * location in turn. * * @param source the list in which to search for the last occurrence - * of target. - * @param target the list to search for as a subList of source. + * of {@code target}. + * @param target the list to search for as a subList of {@code source}. * @return the starting position of the last occurrence of the specified * target list within the specified source list, or -1 if there * is no such occurrence. @@ -993,11 +993,11 @@ public class Collections { * collections. Query operations on the returned collection "read through" * to the specified collection, and attempts to modify the returned * collection, whether direct or via its iterator, result in an - * UnsupportedOperationException.

+ * {@code UnsupportedOperationException}.

* * The returned collection does not pass the hashCode and equals * operations through to the backing collection, but relies on - * Object's equals and hashCode methods. This + * {@code Object}'s {@code equals} and {@code hashCode} methods. This * is necessary to preserve the contracts of these operations in the case * that the backing collection is a set or a list.

* @@ -1105,7 +1105,7 @@ public class Collections { * modules to provide users with "read-only" access to internal sets. * Query operations on the returned set "read through" to the specified * set, and attempts to modify the returned set, whether direct or via its - * iterator, result in an UnsupportedOperationException.

+ * iterator, result in an {@code UnsupportedOperationException}.

* * The returned set will be serializable if the specified set * is serializable. @@ -1136,8 +1136,8 @@ public class Collections { * sorted sets. Query operations on the returned sorted set "read * through" to the specified sorted set. Attempts to modify the returned * sorted set, whether direct, via its iterator, or via its - * subSet, headSet, or tailSet views, result in - * an UnsupportedOperationException.

+ * {@code subSet}, {@code headSet}, or {@code tailSet} views, result in + * an {@code UnsupportedOperationException}.

* * The returned sorted set will be serializable if the specified sorted set * is serializable. @@ -1273,7 +1273,7 @@ public class Collections { * lists. Query operations on the returned list "read through" to the * specified list, and attempts to modify the returned list, whether * direct or via its iterator, result in an - * UnsupportedOperationException.

+ * {@code UnsupportedOperationException}.

* * The returned list will be serializable if the specified list * is serializable. Similarly, the returned list will implement @@ -1419,7 +1419,7 @@ public class Collections { * maps. Query operations on the returned map "read through" * to the specified map, and attempts to modify the returned * map, whether direct or via its collection views, result in an - * UnsupportedOperationException.

+ * {@code UnsupportedOperationException}.

* * The returned map will be serializable if the specified map * is serializable. @@ -1769,8 +1769,8 @@ public class Collections { * sorted maps. Query operations on the returned sorted map "read through" * to the specified sorted map. Attempts to modify the returned * sorted map, whether direct, via its collection views, or via its - * subMap, headMap, or tailMap views, result in - * an UnsupportedOperationException.

+ * {@code subMap}, {@code headMap}, or {@code tailMap} views, result in + * an {@code UnsupportedOperationException}.

* * The returned sorted map will be serializable if the specified sorted map * is serializable. @@ -2148,8 +2148,8 @@ public class Collections { * through the returned sorted set (or its views).

* * It is imperative that the user manually synchronize on the returned - * sorted set when iterating over it or any of its subSet, - * headSet, or tailSet views. + * sorted set when iterating over it or any of its {@code subSet}, + * {@code headSet}, or {@code tailSet} views. *

      *  SortedSet s = Collections.synchronizedSortedSet(new TreeSet());
      *      ...
@@ -2700,8 +2700,8 @@ public class Collections {
      *
      * It is imperative that the user manually synchronize on the returned
      * sorted map when iterating over any of its collection views, or the
-     * collections views of any of its subMap, headMap or
-     * tailMap views.
+     * collections views of any of its {@code subMap}, {@code headMap} or
+     * {@code tailMap} views.
      * 
      *  SortedMap m = Collections.synchronizedSortedMap(new TreeMap());
      *      ...
@@ -4406,7 +4406,7 @@ public class Collections {
      * 
* * @implNote - * Implementations of this method need not create a separate List + * Implementations of this method need not create a separate {@code List} * object for each call. Using this method is likely to have comparable * cost to using the like-named field. (Unlike this method, the field does * not provide type safety.) @@ -4846,7 +4846,7 @@ public class Collections { * @param the class of the map keys * @param the class of the map values * @param key the sole key to be stored in the returned map. - * @param value the value to which the returned map maps key. + * @param value the value to which the returned map maps {@code key}. * @return an immutable map containing only the specified key-value * mapping. * @since 1.3 @@ -4964,17 +4964,17 @@ public class Collections { // Miscellaneous /** - * Returns an immutable list consisting of n copies of the + * Returns an immutable list consisting of {@code n} copies of the * specified object. The newly allocated data object is tiny (it contains * a single reference to the data object). This method is useful in - * combination with the List.addAll method to grow lists. + * combination with the {@code List.addAll} method to grow lists. * The returned list is serializable. * * @param the class of the object to copy and of the objects * in the returned list. * @param n the number of elements in the returned list. * @param o the element to appear repeatedly in the returned list. - * @return an immutable list consisting of n copies of the + * @return an immutable list consisting of {@code n} copies of the * specified object. * @throws IllegalArgumentException if {@code n < 0} * @see List#addAll(Collection) @@ -5095,7 +5095,7 @@ public class Collections { * @param the class of the objects compared by the comparator * @return A comparator that imposes the reverse of the natural * ordering on a collection of objects that implement - * the Comparable interface. + * the {@code Comparable} interface. * @see Comparable */ @SuppressWarnings("unchecked") @@ -5259,14 +5259,14 @@ public class Collections { /** * Returns the number of elements in the specified collection equal to the * specified object. More formally, returns the number of elements - * e in the collection such that - * (o == null ? e == null : o.equals(e)). + * {@code e} in the collection such that + * {@code Objects.equals(o, e)}. * * @param c the collection in which to determine the frequency - * of o + * of {@code o} * @param o the object whose frequency is to be determined * @return the number of elements in {@code c} equal to {@code o} - * @throws NullPointerException if c is null + * @throws NullPointerException if {@code c} is null * @since 1.5 */ public static int frequency(Collection c, Object o) { @@ -5377,7 +5377,7 @@ public class Collections { * Adds all of the specified elements to the specified collection. * Elements to be added may be specified individually or as an array. * The behavior of this convenience method is identical to that of - * c.addAll(Arrays.asList(elements)), but this method is likely + * {@code c.addAll(Arrays.asList(elements))}, but this method is likely * to run significantly faster under most implementations. * *

When elements are specified individually, this method provides a @@ -5387,16 +5387,16 @@ public class Collections { *

* * @param the class of the elements to add and of the collection - * @param c the collection into which elements are to be inserted - * @param elements the elements to insert into c - * @return true if the collection changed as a result of the call - * @throws UnsupportedOperationException if c does not support - * the add operation - * @throws NullPointerException if elements contains one or more - * null values and c does not permit null elements, or - * if c or elements are null + * @param c the collection into which {@code elements} are to be inserted + * @param elements the elements to insert into {@code c} + * @return {@code true} if the collection changed as a result of the call + * @throws UnsupportedOperationException if {@code c} does not support + * the {@code add} operation + * @throws NullPointerException if {@code elements} contains one or more + * null values and {@code c} does not permit null elements, or + * if {@code c} or {@code elements} are {@code null} * @throws IllegalArgumentException if some property of a value in - * elements prevents it from being added to c + * {@code elements} prevents it from being added to {@code c} * @see Collection#addAll(Collection) * @since 1.5 */ @@ -5418,9 +5418,9 @@ public class Collections { * HashMap} or {@link TreeMap}). * *

Each method invocation on the set returned by this method results in - * exactly one method invocation on the backing map or its keySet - * view, with one exception. The addAll method is implemented - * as a sequence of put invocations on the backing map. + * exactly one method invocation on the backing map or its {@code keySet} + * view, with one exception. The {@code addAll} method is implemented + * as a sequence of {@code put} invocations on the backing map. * *

The specified map must be empty at the time this method is invoked, * and should not be accessed directly after this method returns. These @@ -5436,7 +5436,7 @@ public class Collections { * returned set * @param map the backing map * @return the set backed by the map - * @throws IllegalArgumentException if map is not empty + * @throws IllegalArgumentException if {@code map} is not empty * @since 1.6 */ public static Set newSetFromMap(Map map) { @@ -5505,10 +5505,10 @@ public class Collections { /** * Returns a view of a {@link Deque} as a Last-in-first-out (Lifo) - * {@link Queue}. Method add is mapped to push, - * remove is mapped to pop and so on. This + * {@link Queue}. Method {@code add} is mapped to {@code push}, + * {@code remove} is mapped to {@code pop} and so on. This * view can be useful when you would like to use a method - * requiring a Queue but you need Lifo ordering. + * requiring a {@code Queue} but you need Lifo ordering. * *

Each method invocation on the queue returned by this method * results in exactly one method invocation on the backing deque, with diff --git a/jdk/src/java.base/share/classes/java/util/Comparator.java b/jdk/src/java.base/share/classes/java/util/Comparator.java index ecf8d64ea95..9afb1c4e4c9 100644 --- a/jdk/src/java.base/share/classes/java/util/Comparator.java +++ b/jdk/src/java.base/share/classes/java/util/Comparator.java @@ -42,20 +42,20 @@ import java.util.Comparators; * SortedMap sorted maps}), or to provide an ordering for collections of * objects that don't have a {@link Comparable natural ordering}.

* - * The ordering imposed by a comparator c on a set of elements - * S is said to be consistent with equals if and only if - * c.compare(e1, e2)==0 has the same boolean value as - * e1.equals(e2) for every e1 and e2 in - * S.

+ * The ordering imposed by a comparator {@code c} on a set of elements + * {@code S} is said to be consistent with equals if and only if + * {@code c.compare(e1, e2)==0} has the same boolean value as + * {@code e1.equals(e2)} for every {@code e1} and {@code e2} in + * {@code S}.

* * Caution should be exercised when using a comparator capable of imposing an * ordering inconsistent with equals to order a sorted set (or sorted map). - * Suppose a sorted set (or sorted map) with an explicit comparator c - * is used with elements (or keys) drawn from a set S. If the - * ordering imposed by c on S is inconsistent with equals, + * Suppose a sorted set (or sorted map) with an explicit comparator {@code c} + * is used with elements (or keys) drawn from a set {@code S}. If the + * ordering imposed by {@code c} on {@code S} is inconsistent with equals, * the sorted set (or sorted map) will behave "strangely." In particular the * sorted set (or sorted map) will violate the general contract for set (or - * map), which is defined in terms of equals.

+ * map), which is defined in terms of {@code equals}.

* * For example, suppose one adds two elements {@code a} and {@code b} such that * {@code (a.equals(b) && c.compare(a, b) != 0)} @@ -67,23 +67,23 @@ import java.util.Comparators; * {@link Set#add Set.add} method.

* * Note: It is generally a good idea for comparators to also implement - * java.io.Serializable, as they may be used as ordering methods in + * {@code java.io.Serializable}, as they may be used as ordering methods in * serializable data structures (like {@link TreeSet}, {@link TreeMap}). In * order for the data structure to serialize successfully, the comparator (if - * provided) must implement Serializable.

+ * provided) must implement {@code Serializable}.

* * For the mathematically inclined, the relation that defines the - * imposed ordering that a given comparator c imposes on a - * given set of objects S is:

+ * imposed ordering that a given comparator {@code c} imposes on a
+ * given set of objects {@code S} is:
  *       {(x, y) such that c.compare(x, y) <= 0}.
  * 
The quotient for this total order is:
  *       {(x, y) such that c.compare(x, y) == 0}.
  * 
* - * It follows immediately from the contract for compare that the - * quotient is an equivalence relation on S, and that the - * imposed ordering is a total order on S. When we say that - * the ordering imposed by c on S is consistent with + * It follows immediately from the contract for {@code compare} that the + * quotient is an equivalence relation on {@code S}, and that the + * imposed ordering is a total order on {@code S}. When we say that + * the ordering imposed by {@code c} on {@code S} is consistent with * equals, we mean that the quotient for the ordering is the equivalence * relation defined by the objects' {@link Object#equals(Object) * equals(Object)} method(s):
@@ -113,26 +113,26 @@ public interface Comparator {
      * to, or greater than the second.

* * In the foregoing description, the notation - * sgn(expression) designates the mathematical - * signum function, which is defined to return one of -1, - * 0, or 1 according to whether the value of + * {@code sgn(}expression{@code )} designates the mathematical + * signum function, which is defined to return one of {@code -1}, + * {@code 0}, or {@code 1} according to whether the value of * expression is negative, zero or positive.

* - * The implementor must ensure that sgn(compare(x, y)) == - * -sgn(compare(y, x)) for all x and y. (This - * implies that compare(x, y) must throw an exception if and only - * if compare(y, x) throws an exception.)

+ * The implementor must ensure that {@code sgn(compare(x, y)) == + * -sgn(compare(y, x))} for all {@code x} and {@code y}. (This + * implies that {@code compare(x, y)} must throw an exception if and only + * if {@code compare(y, x)} throws an exception.)

* * The implementor must also ensure that the relation is transitive: - * ((compare(x, y)>0) && (compare(y, z)>0)) implies - * compare(x, z)>0.

+ * {@code ((compare(x, y)>0) && (compare(y, z)>0))} implies + * {@code compare(x, z)>0}.

* - * Finally, the implementor must ensure that compare(x, y)==0 - * implies that sgn(compare(x, z))==sgn(compare(y, z)) for all - * z.

+ * Finally, the implementor must ensure that {@code compare(x, y)==0} + * implies that {@code sgn(compare(x, z))==sgn(compare(y, z))} for all + * {@code z}.

* * It is generally the case, but not strictly required that - * (compare(x, y)==0) == (x.equals(y)). Generally speaking, + * {@code (compare(x, y)==0) == (x.equals(y))}. Generally speaking, * any comparator that violates this condition should clearly indicate * this fact. The recommended language is "Note: this comparator * imposes orderings that are inconsistent with equals." @@ -153,19 +153,19 @@ public interface Comparator { * Indicates whether some other object is "equal to" this * comparator. This method must obey the general contract of * {@link Object#equals(Object)}. Additionally, this method can return - * true only if the specified object is also a comparator + * {@code true} only if the specified object is also a comparator * and it imposes the same ordering as this comparator. Thus, - * comp1.equals(comp2) implies that sgn(comp1.compare(o1, - * o2))==sgn(comp2.compare(o1, o2)) for every object reference - * o1 and o2.

+ * {@code comp1.equals(comp2)} implies that {@code sgn(comp1.compare(o1, + * o2))==sgn(comp2.compare(o1, o2))} for every object reference + * {@code o1} and {@code o2}.

* * Note that it is always safe not to override - * Object.equals(Object). However, overriding this method may, + * {@code Object.equals(Object)}. However, overriding this method may, * in some cases, improve performance by allowing programs to determine * that two distinct comparators impose the same order. * * @param obj the reference object with which to compare. - * @return true only if the specified object is also + * @return {@code true} only if the specified object is also * a comparator and it imposes the same ordering as this * comparator. * @see Object#equals(Object) diff --git a/jdk/src/java.base/share/classes/java/util/Dictionary.java b/jdk/src/java.base/share/classes/java/util/Dictionary.java index 5f439b3edda..4d89ec2dff5 100644 --- a/jdk/src/java.base/share/classes/java/util/Dictionary.java +++ b/jdk/src/java.base/share/classes/java/util/Dictionary.java @@ -26,14 +26,14 @@ package java.util; /** - * The Dictionary class is the abstract parent of any - * class, such as Hashtable, which maps keys to values. - * Every key and every value is an object. In any one Dictionary + * The {@code Dictionary} class is the abstract parent of any + * class, such as {@code Hashtable}, which maps keys to values. + * Every key and every value is an object. In any one {@code Dictionary} * object, every key is associated with at most one value. Given a - * Dictionary and a key, the associated element can be looked up. - * Any non-null object can be used as a key and as a value. + * {@code Dictionary} and a key, the associated element can be looked up. + * Any non-{@code null} object can be used as a key and as a value. *

- * As a rule, the equals method should be used by + * As a rule, the {@code equals} method should be used by * implementations of this class to decide if two keys are the same. *

* NOTE: This class is obsolete. New implementations should @@ -64,17 +64,17 @@ class Dictionary { /** * Tests if this dictionary maps no keys to value. The general contract - * for the isEmpty method is that the result is true if and only + * for the {@code isEmpty} method is that the result is true if and only * if this dictionary contains no entries. * - * @return true if this dictionary maps no keys to values; - * false otherwise. + * @return {@code true} if this dictionary maps no keys to values; + * {@code false} otherwise. */ abstract public boolean isEmpty(); /** * Returns an enumeration of the keys in this dictionary. The general - * contract for the keys method is that an Enumeration object + * contract for the keys method is that an {@code Enumeration} object * is returned that will generate all the keys for which this dictionary * contains entries. * @@ -86,8 +86,8 @@ class Dictionary { /** * Returns an enumeration of the values in this dictionary. The general - * contract for the elements method is that an - * Enumeration is returned that will generate all the elements + * contract for the {@code elements} method is that an + * {@code Enumeration} is returned that will generate all the elements * contained in entries in this dictionary. * * @return an enumeration of the values in this dictionary. @@ -98,58 +98,58 @@ class Dictionary { /** * Returns the value to which the key is mapped in this dictionary. - * The general contract for the isEmpty method is that if this + * The general contract for the {@code isEmpty} method is that if this * dictionary contains an entry for the specified key, the associated - * value is returned; otherwise, null is returned. + * value is returned; otherwise, {@code null} is returned. * * @return the value to which the key is mapped in this dictionary; * @param key a key in this dictionary. - * null if the key is not mapped to any value in + * {@code null} if the key is not mapped to any value in * this dictionary. - * @exception NullPointerException if the key is null. + * @exception NullPointerException if the {@code key} is {@code null}. * @see java.util.Dictionary#put(java.lang.Object, java.lang.Object) */ abstract public V get(Object key); /** - * Maps the specified key to the specified - * value in this dictionary. Neither the key nor the - * value can be null. + * Maps the specified {@code key} to the specified + * {@code value} in this dictionary. Neither the key nor the + * value can be {@code null}. *

* If this dictionary already contains an entry for the specified - * key, the value already in this dictionary for that - * key is returned, after modifying the entry to contain the + * {@code key}, the value already in this dictionary for that + * {@code key} is returned, after modifying the entry to contain the * new element.

If this dictionary does not already have an entry - * for the specified key, an entry is created for the - * specified key and value, and null is + * for the specified {@code key}, an entry is created for the + * specified {@code key} and {@code value}, and {@code null} is * returned. *

- * The value can be retrieved by calling the - * get method with a key that is equal to - * the original key. + * The {@code value} can be retrieved by calling the + * {@code get} method with a {@code key} that is equal to + * the original {@code key}. * * @param key the hashtable key. * @param value the value. - * @return the previous value to which the key was mapped - * in this dictionary, or null if the key did not + * @return the previous value to which the {@code key} was mapped + * in this dictionary, or {@code null} if the key did not * have a previous mapping. - * @exception NullPointerException if the key or - * value is null. + * @exception NullPointerException if the {@code key} or + * {@code value} is {@code null}. * @see java.lang.Object#equals(java.lang.Object) * @see java.util.Dictionary#get(java.lang.Object) */ abstract public V put(K key, V value); /** - * Removes the key (and its corresponding - * value) from this dictionary. This method does nothing - * if the key is not in this dictionary. + * Removes the {@code key} (and its corresponding + * {@code value}) from this dictionary. This method does nothing + * if the {@code key} is not in this dictionary. * * @param key the key that needs to be removed. - * @return the value to which the key had been mapped in this - * dictionary, or null if the key did not have a + * @return the value to which the {@code key} had been mapped in this + * dictionary, or {@code null} if the key did not have a * mapping. - * @exception NullPointerException if key is null. + * @exception NullPointerException if {@code key} is {@code null}. */ abstract public V remove(Object key); } diff --git a/jdk/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java b/jdk/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java index 0dcdf3762ce..ec016a59e58 100644 --- a/jdk/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java +++ b/jdk/src/java.base/share/classes/java/util/DuplicateFormatFlagsException.java @@ -29,7 +29,7 @@ package java.util; * Unchecked exception thrown when duplicate flags are provided in the format * specifier. * - *

Unless otherwise specified, passing a null argument to any + *

Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/EmptyStackException.java b/jdk/src/java.base/share/classes/java/util/EmptyStackException.java index ea1c49d723c..53dcacd5742 100644 --- a/jdk/src/java.base/share/classes/java/util/EmptyStackException.java +++ b/jdk/src/java.base/share/classes/java/util/EmptyStackException.java @@ -26,7 +26,7 @@ package java.util; /** - * Thrown by methods in the Stack class to indicate + * Thrown by methods in the {@code Stack} class to indicate * that the stack is empty. * * @author Jonathan Payne @@ -38,7 +38,7 @@ class EmptyStackException extends RuntimeException { private static final long serialVersionUID = 5084686378493302095L; /** - * Constructs a new EmptyStackException with null + * Constructs a new {@code EmptyStackException} with {@code null} * as its error message string. */ public EmptyStackException() { diff --git a/jdk/src/java.base/share/classes/java/util/EnumMap.java b/jdk/src/java.base/share/classes/java/util/EnumMap.java index b732ef0bf54..b99a93fda5f 100644 --- a/jdk/src/java.base/share/classes/java/util/EnumMap.java +++ b/jdk/src/java.base/share/classes/java/util/EnumMap.java @@ -50,7 +50,7 @@ import sun.misc.SharedSecrets; * presence of a null key or to remove one will, however, function properly. * Null values are permitted. - *

Like most collection implementations EnumMap is not + *

Like most collection implementations {@code EnumMap} is not * synchronized. If multiple threads access an enum map concurrently, and at * least one of the threads modifies the map, it should be synchronized * externally. This is typically accomplished by synchronizing on some @@ -80,7 +80,7 @@ public class EnumMap, V> extends AbstractMap implements java.io.Serializable, Cloneable { /** - * The Class object for the enum type of all the keys of this map. + * The {@code Class} object for the enum type of all the keys of this map. * * @serial */ @@ -131,7 +131,7 @@ public class EnumMap, V> extends AbstractMap * Creates an empty enum map with the specified key type. * * @param keyType the class object of the key type for this enum map - * @throws NullPointerException if keyType is null + * @throws NullPointerException if {@code keyType} is null */ public EnumMap(Class keyType) { this.keyType = keyType; @@ -144,7 +144,7 @@ public class EnumMap, V> extends AbstractMap * map, initially containing the same mappings (if any). * * @param m the enum map from which to initialize this enum map - * @throws NullPointerException if m is null + * @throws NullPointerException if {@code m} is null */ public EnumMap(EnumMap m) { keyType = m.keyType; @@ -155,15 +155,15 @@ public class EnumMap, V> extends AbstractMap /** * Creates an enum map initialized from the specified map. If the - * specified map is an EnumMap instance, this constructor behaves + * specified map is an {@code EnumMap} instance, this constructor behaves * identically to {@link #EnumMap(EnumMap)}. Otherwise, the specified map * must contain at least one mapping (in order to determine the new * enum map's key type). * * @param m the map from which to initialize this enum map - * @throws IllegalArgumentException if m is not an - * EnumMap instance and contains no mappings - * @throws NullPointerException if m is null + * @throws IllegalArgumentException if {@code m} is not an + * {@code EnumMap} instance and contains no mappings + * @throws NullPointerException if {@code m} is null */ public EnumMap(Map m) { if (m instanceof EnumMap) { @@ -194,11 +194,11 @@ public class EnumMap, V> extends AbstractMap } /** - * Returns true if this map maps one or more keys to the + * Returns {@code true} if this map maps one or more keys to the * specified value. * * @param value the value whose presence in this map is to be tested - * @return true if this map maps one or more keys to this value + * @return {@code true} if this map maps one or more keys to this value */ public boolean containsValue(Object value) { value = maskNull(value); @@ -211,11 +211,11 @@ public class EnumMap, V> extends AbstractMap } /** - * Returns true if this map contains a mapping for the specified + * Returns {@code true} if this map contains a mapping for the specified * key. * * @param key the key whose presence in this map is to be tested - * @return true if this map contains a mapping for the specified + * @return {@code true} if this map contains a mapping for the specified * key */ public boolean containsKey(Object key) { @@ -258,9 +258,9 @@ public class EnumMap, V> extends AbstractMap * @param value the value to be associated with the specified key * * @return the previous value associated with specified key, or - * null if there was no mapping for key. (A null + * {@code null} if there was no mapping for key. (A {@code null} * return can also indicate that the map previously associated - * null with the specified key.) + * {@code null} with the specified key.) * @throws NullPointerException if the specified key is null */ public V put(K key, V value) { @@ -279,9 +279,9 @@ public class EnumMap, V> extends AbstractMap * * @param key the key whose mapping is to be removed from the map * @return the previous value associated with specified key, or - * null if there was no entry for key. (A null + * {@code null} if there was no entry for key. (A {@code null} * return can also indicate that the map previously associated - * null with the specified key.) + * {@code null} with the specified key.) */ public V remove(Object key) { if (!isValidKey(key)) @@ -644,12 +644,12 @@ public class EnumMap, V> extends AbstractMap /** * Compares the specified object with this map for equality. Returns - * true if the given object is also a map and the two maps + * {@code true} if the given object is also a map and the two maps * represent the same mappings, as specified in the {@link * Map#equals(Object)} contract. * * @param o the object to be compared for equality with this map - * @return true 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 (this == o) @@ -758,7 +758,7 @@ public class EnumMap, V> extends AbstractMap private static final long serialVersionUID = 458661240069192865L; /** - * Save the state of the EnumMap instance to a stream (i.e., + * Save the state of the {@code EnumMap} instance to a stream (i.e., * serialize it). * * @serialData The size of the enum map (the number of key-value @@ -787,7 +787,7 @@ public class EnumMap, V> extends AbstractMap } /** - * Reconstitute the EnumMap instance from a stream (i.e., + * Reconstitute the {@code EnumMap} instance from a stream (i.e., * deserialize it). */ @SuppressWarnings("unchecked") diff --git a/jdk/src/java.base/share/classes/java/util/EnumSet.java b/jdk/src/java.base/share/classes/java/util/EnumSet.java index af409973fbb..b337e66450a 100644 --- a/jdk/src/java.base/share/classes/java/util/EnumSet.java +++ b/jdk/src/java.base/share/classes/java/util/EnumSet.java @@ -34,11 +34,11 @@ import sun.misc.SharedSecrets; * are represented internally as bit vectors. This representation is * extremely compact and efficient. The space and time performance of this * class should be good enough to allow its use as a high-quality, typesafe - * alternative to traditional int-based "bit flags." Even bulk - * operations (such as containsAll and retainAll) should + * alternative to traditional {@code int}-based "bit flags." Even bulk + * operations (such as {@code containsAll} and {@code retainAll}) should * run very quickly if their argument is also an enum set. * - *

The iterator returned by the iterator method traverses the + *

The iterator returned by the {@code iterator} method traverses the * elements in their natural order (the order in which the enum * constants are declared). The returned iterator is weakly * consistent: it will never throw {@link ConcurrentModificationException} @@ -50,7 +50,7 @@ import sun.misc.SharedSecrets; * presence of a null element or to remove one will, however, function * properly. * - *

Like most collection implementations, EnumSet is not + *

Like most collection implementations, {@code EnumSet} is not * synchronized. If multiple threads access an enum set concurrently, and at * least one of the threads modifies the set, it should be synchronized * externally. This is typically accomplished by synchronizing on some @@ -106,7 +106,7 @@ public abstract class EnumSet> extends AbstractSet * @param elementType the class object of the element type for this enum * set * @return An empty enum set of the specified type. - * @throws NullPointerException if elementType is null + * @throws NullPointerException if {@code elementType} is null */ public static > EnumSet noneOf(Class elementType) { Enum[] universe = getUniverse(elementType); @@ -127,7 +127,7 @@ public abstract class EnumSet> extends AbstractSet * @param elementType the class object of the element type for this enum * set * @return An enum set containing all the elements in the specified type. - * @throws NullPointerException if elementType is null + * @throws NullPointerException if {@code elementType} is null */ public static > EnumSet allOf(Class elementType) { EnumSet result = noneOf(elementType); @@ -148,7 +148,7 @@ public abstract class EnumSet> extends AbstractSet * @param The class of the elements in the set * @param s the enum set from which to initialize this enum set * @return A copy of the specified enum set. - * @throws NullPointerException if s is null + * @throws NullPointerException if {@code s} is null */ public static > EnumSet copyOf(EnumSet s) { return s.clone(); @@ -156,7 +156,7 @@ public abstract class EnumSet> extends AbstractSet /** * Creates an enum set initialized from the specified collection. If - * the specified collection is an EnumSet instance, this static + * the specified collection is an {@code EnumSet} instance, this static * factory method behaves identically to {@link #copyOf(EnumSet)}. * Otherwise, the specified collection must contain at least one element * (in order to determine the new enum set's element type). @@ -164,9 +164,9 @@ public abstract class EnumSet> extends AbstractSet * @param The class of the elements in the collection * @param c the collection from which to initialize this enum set * @return An enum set initialized from the given collection. - * @throws IllegalArgumentException if c is not an - * EnumSet instance and contains no elements - * @throws NullPointerException if c is null + * @throws IllegalArgumentException if {@code c} is not an + * {@code EnumSet} instance and contains no elements + * @throws NullPointerException if {@code c} is null */ public static > EnumSet copyOf(Collection c) { if (c instanceof EnumSet) { @@ -191,7 +191,7 @@ public abstract class EnumSet> extends AbstractSet * @param The class of the elements in the enum set * @param s the enum set from whose complement to initialize this enum set * @return The complement of the specified set in this set - * @throws NullPointerException if s is null + * @throws NullPointerException if {@code s} is null */ public static > EnumSet complementOf(EnumSet s) { EnumSet result = copyOf(s); @@ -210,7 +210,7 @@ public abstract class EnumSet> extends AbstractSet * * @param The class of the specified element and of the set * @param e the element that this set is to contain initially - * @throws NullPointerException if e is null + * @throws NullPointerException if {@code e} is null * @return an enum set initially containing the specified element */ public static > EnumSet of(E e) { @@ -332,7 +332,7 @@ public abstract class EnumSet> extends AbstractSet * @param first an element that the set is to contain initially * @param rest the remaining elements the set is to contain initially * @throws NullPointerException if any of the specified elements are null, - * or if rest is null + * or if {@code rest} is null * @return an enum set initially containing the specified elements */ @SafeVarargs diff --git a/jdk/src/java.base/share/classes/java/util/Enumeration.java b/jdk/src/java.base/share/classes/java/util/Enumeration.java index 93224a94066..2cf2a2708ce 100644 --- a/jdk/src/java.base/share/classes/java/util/Enumeration.java +++ b/jdk/src/java.base/share/classes/java/util/Enumeration.java @@ -28,10 +28,10 @@ package java.util; /** * An object that implements the Enumeration interface generates a * series of elements, one at a time. Successive calls to the - * nextElement method return successive elements of the + * {@code nextElement} method return successive elements of the * series. *

- * For example, to print all elements of a Vector<E> v: + * For example, to print all elements of a {@code Vector} v: *

  *   for (Enumeration<E> e = v.elements(); e.hasMoreElements();)
  *       System.out.println(e.nextElement());
@@ -39,7 +39,7 @@ package java.util; * Methods are provided to enumerate through the elements of a * vector, the keys of a hashtable, and the values in a hashtable. * Enumerations are also used to specify the input streams to a - * SequenceInputStream. + * {@code SequenceInputStream}. * * @apiNote * The functionality of this interface is duplicated by the {@link Iterator} @@ -65,9 +65,9 @@ public interface Enumeration { /** * Tests if this enumeration contains more elements. * - * @return true if and only if this enumeration object + * @return {@code true} if and only if this enumeration object * contains at least one more element to provide; - * false otherwise. + * {@code false} otherwise. */ boolean hasMoreElements(); diff --git a/jdk/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java b/jdk/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java index 58f593ebc21..664cd398554 100644 --- a/jdk/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java +++ b/jdk/src/java.base/share/classes/java/util/FormatFlagsConversionMismatchException.java @@ -28,7 +28,7 @@ package java.util; /** * Unchecked exception thrown when a conversion and flag are incompatible. * - *

Unless otherwise specified, passing a null argument to any + *

Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/Formattable.java b/jdk/src/java.base/share/classes/java/util/Formattable.java index fa87e9c7022..2caabaedfa8 100644 --- a/jdk/src/java.base/share/classes/java/util/Formattable.java +++ b/jdk/src/java.base/share/classes/java/util/Formattable.java @@ -28,8 +28,8 @@ package java.util; import java.io.IOException; /** - * The Formattable interface must be implemented by any class that - * needs to perform custom formatting using the 's' conversion + * The {@code Formattable} interface must be implemented by any class that + * needs to perform custom formatting using the {@code 's'} conversion * specifier of {@link java.util.Formatter}. This interface allows basic * control for formatting arbitrary objects. * @@ -110,7 +110,7 @@ import java.io.IOException; * safety is optional and may be enforced by classes that extend and implement * this interface. * - *

Unless otherwise specified, passing a null argument to + *

Unless otherwise specified, passing a {@code null} argument to * any method in this interface will cause a {@link * NullPointerException} to be thrown. * @@ -126,7 +126,7 @@ public interface Formattable { * {@link Formatter#out() formatter.out()} or {@link * Formatter#locale() formatter.locale()} to obtain the {@link * Appendable} or {@link Locale} used by this - * formatter respectively. + * {@code formatter} respectively. * * @param flags * The flags modify the output format. The value is interpreted as @@ -139,19 +139,19 @@ public interface Formattable { * @param width * The minimum number of characters to be written to the output. * If the length of the converted value is less than the - * width then the output will be padded by - * '  ' until the total number of characters + * {@code width} then the output will be padded by + * '  ' until the total number of characters * equals width. The padding is at the beginning by default. If * the {@link FormattableFlags#LEFT_JUSTIFY} flag is set then the - * padding will be at the end. If width is -1 + * padding will be at the end. If {@code width} is {@code -1} * then there is no minimum. * * @param precision * The maximum number of characters to be written to the output. * The precision is applied before the width, thus the output will - * be truncated to precision characters even if the - * width is greater than the precision. If - * precision is -1 then there is no explicit + * be truncated to {@code precision} characters even if the + * {@code width} is greater than the {@code precision}. If + * {@code precision} is {@code -1} then there is no explicit * limit on the number of characters. * * @throws IllegalFormatException diff --git a/jdk/src/java.base/share/classes/java/util/FormattableFlags.java b/jdk/src/java.base/share/classes/java/util/FormattableFlags.java index 11a10ddfc40..6c9962c3dba 100644 --- a/jdk/src/java.base/share/classes/java/util/FormattableFlags.java +++ b/jdk/src/java.base/share/classes/java/util/FormattableFlags.java @@ -39,12 +39,12 @@ public class FormattableFlags { private FormattableFlags() {} /** - * Left-justifies the output. Spaces ('\u0020') will be added + * Left-justifies the output. Spaces ('\u0020') will be added * at the end of the converted value as required to fill the minimum width * of the field. If this flag is not set then the output will be * right-justified. * - *

This flag corresponds to '-' ('\u002d') in + *

This flag corresponds to {@code '-'} ('\u002d') in * the format specifier. */ public static final int LEFT_JUSTIFY = 1<<0; // '-' @@ -52,23 +52,23 @@ public class FormattableFlags { /** * Converts the output to upper case according to the rules of the * {@linkplain java.util.Locale locale} given during creation of the - * formatter argument of the {@link Formattable#formatTo + * {@code formatter} argument of the {@link Formattable#formatTo * formatTo()} method. The output should be equivalent the following * invocation of {@link String#toUpperCase(java.util.Locale)} * *

      *     out.toUpperCase() 
* - *

This flag corresponds to 'S' ('\u0053') in + *

This flag corresponds to {@code 'S'} ('\u0053') in * the format specifier. */ public static final int UPPERCASE = 1<<1; // 'S' /** * Requires the output to use an alternate form. The definition of the - * form is specified by the Formattable. + * form is specified by the {@code Formattable}. * - *

This flag corresponds to '#' ('\u0023') in + *

This flag corresponds to {@code '#'} ('\u0023') in * the format specifier. */ public static final int ALTERNATE = 1<<2; // '#' diff --git a/jdk/src/java.base/share/classes/java/util/Formatter.java b/jdk/src/java.base/share/classes/java/util/Formatter.java index 62fbedd793a..14909eca9ad 100644 --- a/jdk/src/java.base/share/classes/java/util/Formatter.java +++ b/jdk/src/java.base/share/classes/java/util/Formatter.java @@ -267,7 +267,7 @@ import sun.misc.FormattedFloatingDecimal; * {@link Date} and {@link TemporalAccessor TemporalAccessor} * *

  • Percent - produces a literal {@code '%'} - * ('\u0025') + * ('\u0025') * *
  • Line Separator - produces the platform-specific line separator * @@ -356,7 +356,7 @@ import sun.misc.FormattedFloatingDecimal; * * {@code '%'} * percent - * The result is a literal {@code '%'} ('\u0025') + * The result is a literal {@code '%'} ('\u0025') * * {@code 'n'} * line separator @@ -644,7 +644,7 @@ import sun.misc.FormattedFloatingDecimal; * "{@code 1$}", the second by "{@code 2$}", etc. * *

    Another way to reference arguments by position is to use the - * {@code '<'} ('\u003c') flag, which causes the argument for + * {@code '<'} ('\u003c') flag, which causes the argument for * the previous format specifier to be re-used. For example, the following two * statements would produce identical strings: * @@ -701,7 +701,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'b'} - * '\u0062' + * '\u0062' * Produces either "{@code true}" or "{@code false}" as returned by * {@link Boolean#toString(boolean)}. * @@ -715,11 +715,11 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'B'} - * '\u0042' + * '\u0042' * The upper-case variant of {@code 'b'}. * *
    {@code 'h'} - * '\u0068' + * '\u0068' * Produces a string representing the hash code value of the object. * *

    If the argument, arg is {@code null}, then the @@ -730,11 +730,11 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *

    {@code 'H'} - * '\u0048' + * '\u0048' * The upper-case variant of {@code 'h'}. * *
    {@code 's'} - * '\u0073' + * '\u0073' * Produces a string. * *

    If the argument is {@code null}, then the result is @@ -748,7 +748,7 @@ import sun.misc.FormattedFloatingDecimal; * will be thrown. * *

    {@code 'S'} - * '\u0053' + * '\u0053' * The upper-case variant of {@code 's'}. * *
    @@ -758,15 +758,15 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code '-'} - * '\u002d' - * Left justifies the output. Spaces ('\u0020') will be + * '\u002d' + * Left justifies the output. Spaces ('\u0020') will be * added at the end of the converted value as required to fill the minimum * width of the field. If the width is not provided, then a {@link * MissingFormatWidthException} will be thrown. If this flag is not given * then the output will be right-justified. * *
    {@code '#'} - * '\u0023' + * '\u0023' * Requires the output use an alternate form. The definition of the * form is specified by the conversion. * @@ -775,7 +775,7 @@ import sun.misc.FormattedFloatingDecimal; *

    The width is the minimum number of characters to * be written to the * output. If the length of the converted value is less than the width then - * the output will be padded by '  ' ('\u0020') + * the output will be padded by '  ' ('\u0020') * until the total number of characters equals the width. The padding is on * the left by default. If the {@code '-'} flag is given, then the padding * will be on the right. If the width is not specified then there is no @@ -799,7 +799,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'c'} - * '\u0063' + * '\u0063' * Formats the argument as a Unicode character as described in Unicode Character * Representation. This may be more than one 16-bit {@code char} in @@ -809,7 +809,7 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'C'} - * '\u0043' + * '\u0043' * The upper-case variant of {@code 'c'}. * *
    @@ -859,7 +859,7 @@ import sun.misc.FormattedFloatingDecimal; * java.text.DecimalFormatSymbols#getDecimalSeparator decimal separator} is * substituted. * - *

  • If the {@code ','} ('\u002c') + *
  • If the {@code ','} ('\u002c') * flag is given, then the locale-specific {@linkplain * java.text.DecimalFormatSymbols#getGroupingSeparator grouping separator} is * inserted by scanning the integer part of the string from least significant @@ -873,15 +873,15 @@ import sun.misc.FormattedFloatingDecimal; * the length of the string is equal to the requested field width. * *
  • If the value is negative and the {@code '('} flag is given, then a - * {@code '('} ('\u0028') is prepended and a {@code ')'} - * ('\u0029') is appended. + * {@code '('} ('\u0028') is prepended and a {@code ')'} + * ('\u0029') is appended. * *
  • If the value is negative (or floating-point negative zero) and - * {@code '('} flag is not given, then a {@code '-'} ('\u002d') + * {@code '('} flag is not given, then a {@code '-'} ('\u002d') * is prepended. * *
  • If the {@code '+'} flag is given and the value is positive or zero (or - * floating-point positive zero), then a {@code '+'} ('\u002b') + * floating-point positive zero), then a {@code '+'} ('\u002b') * will be prepended. * * @@ -900,7 +900,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'd'} - * '\u0064' + * '\u0064' * Formats the argument as a decimal integer. The localization algorithm is applied. * @@ -911,7 +911,7 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'o'} - * '\u006f' + * '\u006f' * Formats the argument as an integer in base eight. No localization * is applied. * @@ -933,7 +933,7 @@ import sun.misc.FormattedFloatingDecimal; * thrown. * *
    {@code 'x'} - * '\u0078' + * '\u0078' * Formats the argument as an integer in base sixteen. No * localization is applied. * @@ -951,17 +951,17 @@ import sun.misc.FormattedFloatingDecimal; * the field width with leading zeros after the radix indicator or sign (if * present). * - *

    If {@code '('}, '  ', {@code '+'}, or + *

    If {@code '('}, '  ', {@code '+'}, or * {@code ','} flags are given then a {@link * FormatFlagsConversionMismatchException} will be thrown. * *

    {@code 'X'} - * '\u0058' + * '\u0058' * The upper-case variant of {@code 'x'}. The entire string * representing the number will be converted to {@linkplain * String#toUpperCase upper case} including the {@code 'x'} (if any) and * all hexadecimal digits {@code 'a'} - {@code 'f'} - * ('\u0061' - '\u0066'). + * ('\u0061' - '\u0066'). * *
    * @@ -980,24 +980,24 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code '+'} - * '\u002b' + * '\u002b' * Requires the output to include a positive sign for all positive * numbers. If this flag is not given then only negative values will * include a sign. * - *

    If both the {@code '+'} and '  ' flags are given + *

    If both the {@code '+'} and '  ' flags are given * then an {@link IllegalFormatFlagsException} will be thrown. * - *

    '  ' - * '\u0020' + *
    '  ' + * '\u0020' * Requires the output to include a single extra space - * ('\u0020') for non-negative values. + * ('\u0020') for non-negative values. * - *

    If both the {@code '+'} and '  ' flags are given + *

    If both the {@code '+'} and '  ' flags are given * then an {@link IllegalFormatFlagsException} will be thrown. * *

    {@code '0'} - * '\u0030' + * '\u0030' * Requires the output to be padded with leading {@linkplain * java.text.DecimalFormatSymbols#getZeroDigit zeros} to the minimum field * width following any sign or radix indicator except when converting NaN @@ -1008,17 +1008,17 @@ import sun.misc.FormattedFloatingDecimal; * {@link IllegalFormatFlagsException} will be thrown. * *
    {@code ','} - * '\u002c' + * '\u002c' * Requires the output to include the locale-specific {@linkplain * java.text.DecimalFormatSymbols#getGroupingSeparator group separators} as * described in the "group" section of the * localization algorithm. * *
    {@code '('} - * '\u0028' + * '\u0028' * Requires the output to prepend a {@code '('} - * ('\u0028') and append a {@code ')'} - * ('\u0029') to negative values. + * ('\u0028') and append a {@code ')'} + * ('\u0029') to negative values. * *
    * @@ -1029,7 +1029,7 @@ import sun.misc.FormattedFloatingDecimal; * *
  • The output is right-justified within the {@code width} * - *
  • Negative numbers begin with a {@code '-'} ('\u002d') + *
  • Negative numbers begin with a {@code '-'} ('\u002d') * *
  • Positive numbers and zero do not include a sign or extra leading * space @@ -1042,7 +1042,7 @@ import sun.misc.FormattedFloatingDecimal; * be written to the output. This includes any signs, digits, grouping * separators, radix indicator, and parentheses. If the length of the * converted value is less than the width then the output will be padded by - * spaces ('\u0020') until the total number of characters equals + * spaces ('\u0020') until the total number of characters equals * width. The padding is on the left by default. If {@code '-'} flag is * given then the padding will be on the right. If width is not specified then * there is no minimum. @@ -1058,7 +1058,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'd'} - * '\u0064' + * '\u0064' * Requires the output to be formatted as a decimal integer. The localization algorithm is applied. * @@ -1066,18 +1066,18 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'o'} - * '\u006f' + * '\u006f' * Requires the output to be formatted as an integer in base eight. * No localization is applied. * *

    If x is negative then the result will be a signed value - * beginning with {@code '-'} ('\u002d'). Signed output is + * beginning with {@code '-'} ('\u002d'). Signed output is * allowed for this type because unlike the primitive types it is not * possible to create an unsigned equivalent without assuming an explicit * data-type size. * *

    If x is positive or zero and the {@code '+'} flag is given - * then the result will begin with {@code '+'} ('\u002b'). + * then the result will begin with {@code '+'} ('\u002b'). * *

    If the {@code '#'} flag is given then the output will always begin * with {@code '0'} prefix. @@ -1089,18 +1089,18 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *

    {@code 'x'} - * '\u0078' + * '\u0078' * Requires the output to be formatted as an integer in base * sixteen. No localization is applied. * *

    If x is negative then the result will be a signed value - * beginning with {@code '-'} ('\u002d'). Signed output is + * beginning with {@code '-'} ('\u002d'). Signed output is * allowed for this type because unlike the primitive types it is not * possible to create an unsigned equivalent without assuming an explicit * data-type size. * *

    If x is positive or zero and the {@code '+'} flag is given - * then the result will begin with {@code '+'} ('\u002b'). + * then the result will begin with {@code '+'} ('\u002b'). * *

    If the {@code '#'} flag is given then the output will always begin * with the radix indicator {@code "0x"}. @@ -1113,12 +1113,12 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *

    {@code 'X'} - * '\u0058' + * '\u0058' * The upper-case variant of {@code 'x'}. The entire string * representing the number will be converted to {@linkplain * String#toUpperCase upper case} including the {@code 'x'} (if any) and * all hexadecimal digits {@code 'a'} - {@code 'f'} - * ('\u0061' - '\u0066'). + * ('\u0061' - '\u0066'). * *
    * @@ -1152,7 +1152,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'e'} - * '\u0065' + * '\u0065' * Requires the output to be formatted using computerized scientific notation. The localization algorithm is applied. @@ -1179,7 +1179,7 @@ import sun.misc.FormattedFloatingDecimal; * integer part of a, as a single decimal digit, followed by the * decimal separator followed by decimal digits representing the fractional * part of a, followed by the exponent symbol {@code 'e'} - * ('\u0065'), followed by the sign of the exponent, followed + * ('\u0065'), followed by the sign of the exponent, followed * by a representation of n as a decimal integer, as produced by the * method {@link Long#toString(long, int)}, and zero-padded to include at * least two digits. @@ -1200,12 +1200,12 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'E'} - * '\u0045' + * '\u0045' * The upper-case variant of {@code 'e'}. The exponent symbol - * will be {@code 'E'} ('\u0045'). + * will be {@code 'E'} ('\u0045'). * *
    {@code 'g'} - * '\u0067' + * '\u0067' * Requires the output to be formatted in general scientific notation * as described below. The localization * algorithm is applied. @@ -1230,11 +1230,11 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'G'} - * '\u0047' + * '\u0047' * The upper-case variant of {@code 'g'}. * *
    {@code 'f'} - * '\u0066' + * '\u0066' * Requires the output to be formatted using decimal * format. The localization algorithm is * applied. @@ -1266,7 +1266,7 @@ import sun.misc.FormattedFloatingDecimal; * appropriate. * *
    {@code 'a'} - * '\u0061' + * '\u0061' * Requires the output to be formatted in hexadecimal exponential * form. No localization is applied. * @@ -1274,11 +1274,11 @@ import sun.misc.FormattedFloatingDecimal; * (absolute value) of the argument x. * *

    If x is negative or a negative-zero value then the result - * will begin with {@code '-'} ('\u002d'). + * will begin with {@code '-'} ('\u002d'). * *

    If x is positive or a positive-zero value and the * {@code '+'} flag is given then the result will begin with {@code '+'} - * ('\u002b'). + * ('\u002b'). * *

    The formatting of the magnitude m depends upon its value. * @@ -1295,7 +1295,7 @@ import sun.misc.FormattedFloatingDecimal; * exponent fields. The significand is represented by the characters * {@code "0x1."} followed by the hexadecimal representation of the rest * of the significand as a fraction. The exponent is represented by - * {@code 'p'} ('\u0070') followed by a decimal string of the + * {@code 'p'} ('\u0070') followed by a decimal string of the * unbiased exponent as if produced by invoking {@link * Integer#toString(int) Integer.toString} on the exponent value. If the * precision is specified, the value is rounded to the given number of @@ -1319,12 +1319,12 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *

    {@code 'A'} - * '\u0041' + * '\u0041' * The upper-case variant of {@code 'a'}. The entire string * representing the number will be converted to upper case including the - * {@code 'x'} ('\u0078') and {@code 'p'} - * ('\u0070' and all hexadecimal digits {@code 'a'} - - * {@code 'f'} ('\u0061' - '\u0066'). + * {@code 'x'} ('\u0078') and {@code 'p'} + * ('\u0070' and all hexadecimal digits {@code 'a'} - + * {@code 'f'} ('\u0061' - '\u0066'). * *
    * @@ -1357,7 +1357,7 @@ import sun.misc.FormattedFloatingDecimal; * separators, decimal separators, exponential symbol, radix indicator, * parentheses, and strings representing infinity and NaN as applicable. If * the length of the converted value is less than the width then the output - * will be padded by spaces ('\u0020') until the total number of + * will be padded by spaces ('\u0020') until the total number of * characters equals width. The padding is on the left by default. If the * {@code '-'} flag is given then the padding will be on the right. If width * is not specified then there is no minimum. @@ -1386,7 +1386,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'e'} - * '\u0065' + * '\u0065' * Requires the output to be formatted using computerized scientific notation. The localization algorithm is applied. @@ -1409,7 +1409,7 @@ import sun.misc.FormattedFloatingDecimal; * integer part of a, as a single decimal digit, followed by the * decimal separator followed by decimal digits representing the fractional * part of a, followed by the exponent symbol {@code 'e'} - * ('\u0065'), followed by the sign of the exponent, followed + * ('\u0065'), followed by the sign of the exponent, followed * by a representation of n as a decimal integer, as produced by the * method {@link Long#toString(long, int)}, and zero-padded to include at * least two digits. @@ -1428,12 +1428,12 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'E'} - * '\u0045' + * '\u0045' * The upper-case variant of {@code 'e'}. The exponent symbol - * will be {@code 'E'} ('\u0045'). + * will be {@code 'E'} ('\u0045'). * *
    {@code 'g'} - * '\u0067' + * '\u0067' * Requires the output to be formatted in general scientific notation * as described below. The localization * algorithm is applied. @@ -1458,11 +1458,11 @@ import sun.misc.FormattedFloatingDecimal; * FormatFlagsConversionMismatchException} will be thrown. * *
    {@code 'G'} - * '\u0047' + * '\u0047' * The upper-case variant of {@code 'g'}. * *
    {@code 'f'} - * '\u0066' + * '\u0066' * Requires the output to be formatted using decimal * format. The localization algorithm is * applied. @@ -1510,10 +1510,10 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 't'} - * '\u0074' + * '\u0074' * Prefix for date and time conversion characters. *
    {@code 'T'} - * '\u0054' + * '\u0054' * The upper-case variant of {@code 't'}. * *
    @@ -1530,52 +1530,52 @@ import sun.misc.FormattedFloatingDecimal; * * * * * - * + * * * - * + * * * - * + * Java Language the pattern would be "C:\\\\*") * * *
    {@code 'H'} - * '\u0048' + * '\u0048' * Hour of the day for the 24-hour clock, formatted as two digits with * a leading zero as necessary i.e. {@code 00 - 23}. {@code 00} * corresponds to midnight. * *
    {@code 'I'} - * '\u0049' + * '\u0049' * Hour for the 12-hour clock, formatted as two digits with a leading * zero as necessary, i.e. {@code 01 - 12}. {@code 01} corresponds to * one o'clock (either morning or afternoon). * *
    {@code 'k'} - * '\u006b' + * '\u006b' * Hour of the day for the 24-hour clock, i.e. {@code 0 - 23}. * {@code 0} corresponds to midnight. * *
    {@code 'l'} - * '\u006c' + * '\u006c' * Hour for the 12-hour clock, i.e. {@code 1 - 12}. {@code 1} * corresponds to one o'clock (either morning or afternoon). * *
    {@code 'M'} - * '\u004d' + * '\u004d' * Minute within the hour formatted as two digits with a leading zero * as necessary, i.e. {@code 00 - 59}. * *
    {@code 'S'} - * '\u0053' + * '\u0053' * Seconds within the minute, formatted as two digits with a leading * zero as necessary, i.e. {@code 00 - 60} ("{@code 60}" is a special * value required to support leap seconds). * *
    {@code 'L'} - * '\u004c' + * '\u004c' * Millisecond within the second formatted as three digits with * leading zeros as necessary, i.e. {@code 000 - 999}. * *
    {@code 'N'} - * '\u004e' + * '\u004e' * Nanosecond within the second, formatted as nine digits with leading * zeros as necessary, i.e. {@code 000000000 - 999999999}. The precision * of this value is limited by the resolution of the underlying operating * system or hardware. * *
    {@code 'p'} - * '\u0070' + * '\u0070' * Locale-specific {@linkplain * java.text.DateFormatSymbols#getAmPmStrings morning or afternoon} marker * in lower case, e.g."{@code am}" or "{@code pm}". Use of the @@ -1585,7 +1585,7 @@ import sun.misc.FormattedFloatingDecimal; * upper-case output.) * *
    {@code 'z'} - * '\u007a' + * '\u007a' * RFC 822 * style numeric time zone offset from GMT, e.g. {@code -0800}. This * value will be adjusted as necessary for Daylight Saving Time. For @@ -1594,7 +1594,7 @@ import sun.misc.FormattedFloatingDecimal; * instance of the Java virtual machine. * *
    {@code 'Z'} - * '\u005a' + * '\u005a' * A string representing the abbreviation for the time zone. This * value will be adjusted as necessary for Daylight Saving Time. For * {@code long}, {@link Long}, and {@link Date} the time zone used is @@ -1603,13 +1603,13 @@ import sun.misc.FormattedFloatingDecimal; * supersede the locale of the argument (if any). * *
    {@code 's'} - * '\u0073' + * '\u0073' * Seconds since the beginning of the epoch starting at 1 January 1970 * {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE/1000} to * {@code Long.MAX_VALUE/1000}. * *
    {@code 'Q'} - * '\u004f' + * '\u004f' * Milliseconds since the beginning of the epoch starting at 1 January * 1970 {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE} to * {@code Long.MAX_VALUE}. The precision of this value is limited by @@ -1622,68 +1622,68 @@ import sun.misc.FormattedFloatingDecimal; * * * * * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * * - * + * * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * *
    {@code 'B'} - * '\u0042' + * '\u0042' * Locale-specific {@linkplain java.text.DateFormatSymbols#getMonths * full month name}, e.g. {@code "January"}, {@code "February"}. * *
    {@code 'b'} - * '\u0062' + * '\u0062' * Locale-specific {@linkplain * java.text.DateFormatSymbols#getShortMonths abbreviated month name}, * e.g. {@code "Jan"}, {@code "Feb"}. * *
    {@code 'h'} - * '\u0068' + * '\u0068' * Same as {@code 'b'}. * *
    {@code 'A'} - * '\u0041' + * '\u0041' * Locale-specific full name of the {@linkplain * java.text.DateFormatSymbols#getWeekdays day of the week}, * e.g. {@code "Sunday"}, {@code "Monday"} * *
    {@code 'a'} - * '\u0061' + * '\u0061' * Locale-specific short name of the {@linkplain * java.text.DateFormatSymbols#getShortWeekdays day of the week}, * e.g. {@code "Sun"}, {@code "Mon"} * *
    {@code 'C'} - * '\u0043' + * '\u0043' * Four-digit year divided by {@code 100}, formatted as two digits * with leading zero as necessary, i.e. {@code 00 - 99} * *
    {@code 'Y'} - * '\u0059' Year, formatted to at least + * '\u0059' Year, formatted to at least * four digits with leading zeros as necessary, e.g. {@code 0092} equals * {@code 92} CE for the Gregorian calendar. * *
    {@code 'y'} - * '\u0079' + * '\u0079' * Last two digits of the year, formatted with leading zeros as * necessary, i.e. {@code 00 - 99}. * *
    {@code 'j'} - * '\u006a' + * '\u006a' * Day of year, formatted as three digits with leading zeros as * necessary, e.g. {@code 001 - 366} for the Gregorian calendar. * {@code 001} corresponds to the first day of the year. * *
    {@code 'm'} - * '\u006d' + * '\u006d' * Month, formatted as two digits with leading zeros as necessary, * i.e. {@code 01 - 13}, where "{@code 01}" is the first month of the * year and ("{@code 13}" is a special value required to support lunar * calendars). * *
    {@code 'd'} - * '\u0064' + * '\u0064' * Day of month, formatted as two digits with leading zeros as * necessary, i.e. {@code 01 - 31}, where "{@code 01}" is the first day * of the month. * *
    {@code 'e'} - * '\u0065' + * '\u0065' * Day of month, formatted as two digits, i.e. {@code 1 - 31} where * "{@code 1}" is the first day of the month. * @@ -1695,30 +1695,30 @@ import sun.misc.FormattedFloatingDecimal; * * * * - * + * * * - * + * * * - * + * * * - * + * * * * @@ -437,8 +437,8 @@ import java.util.stream.StreamSupport; * *

    Note that a different set of metacharacters are in effect inside * a character class than outside a character class. For instance, the - * regular expression . loses its special meaning inside a - * character class, while the expression - becomes a range + * regular expression {@code .} loses its special meaning inside a + * character class, while the expression {@code -} becomes a range * forming metacharacter. * *

    Line terminators

    @@ -449,49 +449,49 @@ import java.util.stream.StreamSupport; * *
      * - *
    • A newline (line feed) character ('\n'), + *
    • A newline (line feed) character ({@code '\n'}), * *
    • A carriage-return character followed immediately by a newline - * character ("\r\n"), + * character ({@code "\r\n"}), * - *
    • A standalone carriage-return character ('\r'), + *
    • A standalone carriage-return character ({@code '\r'}), * - *
    • A next-line character ('\u0085'), + *
    • A next-line character ('\u0085'), * - *
    • A line-separator character ('\u2028'), or + *
    • A line-separator character ('\u2028'), or * - *
    • A paragraph-separator character ('\u2029). + *
    • A paragraph-separator character ('\u2029). * *
    *

    If {@link #UNIX_LINES} mode is activated, then the only line terminators * recognized are newline characters. * - *

    The regular expression . matches any character except a line + *

    The regular expression {@code .} matches any character except a line * terminator unless the {@link #DOTALL} flag is specified. * - *

    By default, the regular expressions ^ and $ ignore + *

    By default, the regular expressions {@code ^} and {@code $} ignore * line terminators and only match at the beginning and the end, respectively, * of the entire input sequence. If {@link #MULTILINE} mode is activated then - * ^ matches at the beginning of input and after any line terminator - * except at the end of input. When in {@link #MULTILINE} mode $ + * {@code ^} matches at the beginning of input and after any line terminator + * except at the end of input. When in {@link #MULTILINE} mode {@code $} * matches just before a line terminator or the end of the input sequence. * *

    Groups and capturing

    * *

    Group number

    *

    Capturing groups are numbered by counting their opening parentheses from - * left to right. In the expression ((A)(B(C))), for example, there + * left to right. In the expression {@code ((A)(B(C)))}, for example, there * are four such groups:

    * *
    {@code 'R'} - * '\u0052' + * '\u0052' * Time formatted for the 24-hour clock as {@code "%tH:%tM"} * *
    {@code 'T'} - * '\u0054' + * '\u0054' * Time formatted for the 24-hour clock as {@code "%tH:%tM:%tS"}. * *
    {@code 'r'} - * '\u0072' + * '\u0072' * Time formatted for the 12-hour clock as {@code "%tI:%tM:%tS * %Tp"}. The location of the morning or afternoon marker * ({@code '%Tp'}) may be locale-dependent. * *
    {@code 'D'} - * '\u0044' + * '\u0044' * Date formatted as {@code "%tm/%td/%ty"}. * *
    {@code 'F'} - * '\u0046' + * '\u0046' * ISO 8601 * complete date formatted as {@code "%tY-%tm-%td"}. * *
    {@code 'c'} - * '\u0063' + * '\u0063' * Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"}, * e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}. * @@ -1731,7 +1731,7 @@ import sun.misc.FormattedFloatingDecimal; *

    The width is the minimum number of characters to * be written to the output. If the length of the converted value is less than * the {@code width} then the output will be padded by spaces - * ('\u0020') until the total number of characters equals width. + * ('\u0020') until the total number of characters equals width. * The padding is on the left by default. If the {@code '-'} flag is given * then the padding will be on the right. If width is not specified then there * is no minimum. @@ -1746,12 +1746,12 @@ import sun.misc.FormattedFloatingDecimal; * * * * - * + * * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * * * * @@ -149,30 +149,30 @@ import java.util.stream.StreamSupport; * * * - * + * * - * - * - * - * - * + * + * + * + * + * * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * - * - * - * - * - * - * + * + * + * + * + * + * * * * @@ -208,13 +208,13 @@ import java.util.stream.StreamSupport; * * * - * + * * - * + * * - * + * * - * + * * * * @@ -237,77 +237,77 @@ import java.util.stream.StreamSupport; * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * * - * + * * + * \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029] + * * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * * @@ -315,59 +315,59 @@ import java.util.stream.StreamSupport; * * * - * + * * - * + * * * * * * - * + * * * - * + * * * * * * - * + * * - * - * - * - * + * + * + * + * * * * * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * * *
    {@code '%'} - * The result is a literal {@code '%'} ('\u0025') + * The result is a literal {@code '%'} ('\u0025') * *

    The width is the minimum number of characters to * be written to the output including the {@code '%'}. If the length of the * converted value is less than the {@code width} then the output will be - * padded by spaces ('\u0020') until the total number of + * padded by spaces ('\u0020') until the total number of * characters equals width. The padding is on the left. If width is not * specified then just the {@code '%'} is output. * @@ -1801,7 +1801,7 @@ import sun.misc.FormattedFloatingDecimal; * * *

  • Relative indexing is used when the format specifier contains a - * {@code '<'} ('\u003c') flag which causes the argument for + * {@code '<'} ('\u003c') flag which causes the argument for * the previous format specifier to be re-used. If there is no previous * argument, then a {@link MissingFormatArgumentException} is thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/FormatterClosedException.java b/jdk/src/java.base/share/classes/java/util/FormatterClosedException.java index b0aa872fa81..856dc974fc0 100644 --- a/jdk/src/java.base/share/classes/java/util/FormatterClosedException.java +++ b/jdk/src/java.base/share/classes/java/util/FormatterClosedException.java @@ -28,7 +28,7 @@ package java.util; /** * Unchecked exception thrown when the formatter has been closed. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/HashMap.java b/jdk/src/java.base/share/classes/java/util/HashMap.java index ea56781c628..17b58b150d1 100644 --- a/jdk/src/java.base/share/classes/java/util/HashMap.java +++ b/jdk/src/java.base/share/classes/java/util/HashMap.java @@ -36,24 +36,24 @@ import java.util.function.Consumer; import java.util.function.Function; /** - * Hash table based implementation of the Map interface. This + * Hash table based implementation of the {@code Map} interface. This * implementation provides all of the optional map operations, and permits - * null values and the null key. (The HashMap - * class is roughly equivalent to Hashtable, except that it is + * {@code null} values and the {@code null} key. (The {@code HashMap} + * class is roughly equivalent to {@code Hashtable}, except that it is * unsynchronized and permits nulls.) This class makes no guarantees as to * the order of the map; in particular, it does not guarantee that the order * will remain constant over time. * *

    This implementation provides constant-time performance for the basic - * operations (get and put), assuming the hash function + * operations ({@code get} and {@code put}), assuming the hash function * disperses the elements properly among the buckets. Iteration over * collection views requires time proportional to the "capacity" of the - * HashMap instance (the number of buckets) plus its size (the number + * {@code HashMap} instance (the number of buckets) plus its size (the number * of key-value mappings). Thus, it's very important not to set the initial * capacity too high (or the load factor too low) if iteration performance is * important. * - *

    An instance of HashMap has two parameters that affect its + *

    An instance of {@code HashMap} has two parameters that affect its * performance: initial capacity and load factor. The * capacity is the number of buckets in the hash table, and the initial * capacity is simply the capacity at the time the hash table is created. The @@ -67,15 +67,15 @@ import java.util.function.Function; *

    As a general rule, the default load factor (.75) offers a good * tradeoff between time and space costs. Higher values decrease the * space overhead but increase the lookup cost (reflected in most of - * the operations of the HashMap class, including - * get and put). The expected number of entries in + * the operations of the {@code HashMap} class, including + * {@code get} and {@code put}). The expected number of entries in * the map and its load factor should be taken into account when * setting its initial capacity, so as to minimize the number of * rehash operations. If the initial capacity is greater than the * maximum number of entries divided by the load factor, no rehash * operations will ever occur. * - *

    If many mappings are to be stored in a HashMap + *

    If many mappings are to be stored in a {@code HashMap} * instance, creating it with a sufficiently large capacity will allow * the mappings to be stored more efficiently than letting it perform * automatic rehashing as needed to grow the table. Note that using @@ -102,7 +102,7 @@ import java.util.function.Function; *

    The iterators returned by all of this class's "collection view methods" * are fail-fast: if the map is structurally modified at any time after * the iterator is created, in any way except through the iterator's own - * remove method, the iterator will throw a + * {@code remove} method, the iterator will throw a * {@link ConcurrentModificationException}. Thus, in the face of concurrent * modification, the iterator fails quickly and cleanly, rather than risking * arbitrary, non-deterministic behavior at an undetermined time in the @@ -111,7 +111,7 @@ import java.util.function.Function; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators * should be used only to detect bugs. @@ -435,7 +435,7 @@ public class HashMap extends AbstractMap /* ---------------- Public operations -------------- */ /** - * Constructs an empty HashMap with the specified initial + * Constructs an empty {@code HashMap} with the specified initial * capacity and load factor. * * @param initialCapacity the initial capacity @@ -457,7 +457,7 @@ public class HashMap extends AbstractMap } /** - * Constructs an empty HashMap with the specified initial + * Constructs an empty {@code HashMap} with the specified initial * capacity and the default load factor (0.75). * * @param initialCapacity the initial capacity. @@ -468,7 +468,7 @@ public class HashMap extends AbstractMap } /** - * Constructs an empty HashMap with the default initial capacity + * Constructs an empty {@code HashMap} with the default initial capacity * (16) and the default load factor (0.75). */ public HashMap() { @@ -476,10 +476,10 @@ public class HashMap extends AbstractMap } /** - * Constructs a new HashMap with the same mappings as the - * specified Map. The HashMap is created with + * Constructs a new {@code HashMap} with the same mappings as the + * specified {@code Map}. The {@code HashMap} is created with * default load factor (0.75) and an initial capacity sufficient to - * hold the mappings in the specified Map. + * hold the mappings in the specified {@code Map}. * * @param m the map whose mappings are to be placed in this map * @throws NullPointerException if the specified map is null @@ -526,9 +526,9 @@ public class HashMap extends AbstractMap } /** - * Returns true if this map contains no key-value mappings. + * Returns {@code true} if this map contains no key-value mappings. * - * @return true if this map contains no key-value mappings + * @return {@code true} if this map contains no key-value mappings */ public boolean isEmpty() { return size == 0; @@ -584,11 +584,11 @@ public class HashMap extends AbstractMap } /** - * Returns true if this map contains a mapping for the + * Returns {@code true} if this map contains a mapping for the * specified key. * * @param key The key whose presence in this map is to be tested - * @return true if this map contains a mapping for the specified + * @return {@code true} if this map contains a mapping for the specified * key. */ public boolean containsKey(Object key) { @@ -602,10 +602,10 @@ public class HashMap extends AbstractMap * * @param key key with which the specified value is to be associated * @param value value to be associated with the specified key - * @return the previous value associated with key, or - * null if there was no mapping for key. - * (A null return can also indicate that the map - * previously associated null with key.) + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with {@code key}.) */ public V put(K key, V value) { return putVal(hash(key), key, value, false, true); @@ -788,10 +788,10 @@ public class HashMap extends AbstractMap * Removes the mapping for the specified key from this map if present. * * @param key key whose mapping is to be removed from the map - * @return the previous value associated with key, or - * null if there was no mapping for key. - * (A null return can also indicate that the map - * previously associated null with key.) + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with {@code key}.) */ public V remove(Object key) { Node e; @@ -865,11 +865,11 @@ public class HashMap extends AbstractMap } /** - * Returns true if this map maps one or more keys to the + * Returns {@code true} if this map maps one or more keys to the * specified value. * * @param value value whose presence in this map is to be tested - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified value */ public boolean containsValue(Object value) { @@ -891,12 +891,12 @@ public class HashMap extends AbstractMap * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation), the results of + * the iterator's own {@code remove} operation), the results of * the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the map, via the - * Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or addAll + * {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or {@code addAll} * operations. * * @return a set view of the keys contained in this map @@ -938,13 +938,13 @@ public class HashMap extends AbstractMap * The collection is backed by the map, so changes to the map are * reflected in the collection, and vice-versa. If the map is * modified while an iteration over the collection is in progress - * (except through the iterator's own remove operation), + * (except through the iterator's own {@code remove} operation), * the results of the iteration are undefined. The collection * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll and clear operations. It does not - * support the add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll} and {@code clear} operations. It does not + * support the {@code add} or {@code addAll} operations. * * @return a view of the values contained in this map */ @@ -982,14 +982,14 @@ public class HashMap extends AbstractMap * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation, or through the - * setValue operation on a map entry returned by the + * the iterator's own {@code remove} operation, or through the + * {@code setValue} operation on a map entry returned by the * iterator) the results of the iteration are undefined. The set * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Set.remove, removeAll, retainAll and - * clear operations. It does not support the - * add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Set.remove}, {@code removeAll}, {@code retainAll} and + * {@code clear} operations. It does not support the + * {@code add} or {@code addAll} operations. * * @return a set view of the mappings contained in this map */ @@ -1357,7 +1357,7 @@ public class HashMap extends AbstractMap // Cloning and serialization /** - * Returns a shallow copy of this HashMap instance: the keys and + * Returns a shallow copy of this {@code HashMap} instance: the keys and * values themselves are not cloned. * * @return a shallow copy of this map @@ -1386,7 +1386,7 @@ public class HashMap extends AbstractMap } /** - * Save the state of the HashMap instance to a stream (i.e., + * Save the state of the {@code HashMap} instance to a stream (i.e., * serialize it). * * @serialData The capacity of the HashMap (the length of the diff --git a/jdk/src/java.base/share/classes/java/util/HashSet.java b/jdk/src/java.base/share/classes/java/util/HashSet.java index 4d4e8bdc2aa..172cb37ad06 100644 --- a/jdk/src/java.base/share/classes/java/util/HashSet.java +++ b/jdk/src/java.base/share/classes/java/util/HashSet.java @@ -28,18 +28,18 @@ package java.util; import java.io.InvalidObjectException; /** - * This class implements the Set interface, backed by a hash table - * (actually a HashMap instance). It makes no guarantees as to the + * This class implements the {@code Set} interface, backed by a hash table + * (actually a {@code HashMap} instance). It makes no guarantees as to the * iteration order of the set; in particular, it does not guarantee that the - * order will remain constant over time. This class permits the null + * order will remain constant over time. This class permits the {@code null} * element. * *

    This class offers constant time performance for the basic operations - * (add, remove, contains and size), + * ({@code add}, {@code remove}, {@code contains} and {@code size}), * assuming the hash function disperses the elements properly among the * buckets. Iterating over this set requires time proportional to the sum of - * the HashSet instance's size (the number of elements) plus the - * "capacity" of the backing HashMap instance (the number of + * the {@code HashSet} instance's size (the number of elements) plus the + * "capacity" of the backing {@code HashMap} instance (the number of * buckets). Thus, it's very important not to set the initial capacity too * high (or the load factor too low) if iteration performance is important. * @@ -55,9 +55,9 @@ import java.io.InvalidObjectException; * unsynchronized access to the set:

      *   Set s = Collections.synchronizedSet(new HashSet(...));
    * - *

    The iterators returned by this class's iterator method are + *

    The iterators returned by this class's {@code iterator} method are * fail-fast: if the set is modified at any time after the iterator is - * created, in any way except through the iterator's own remove + * created, in any way except through the iterator's own {@code remove} * method, the Iterator throws a {@link ConcurrentModificationException}. * Thus, in the face of concurrent modification, the iterator fails quickly * and cleanly, rather than risking arbitrary, non-deterministic behavior at @@ -66,7 +66,7 @@ import java.io.InvalidObjectException; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators * should be used only to detect bugs. @@ -98,7 +98,7 @@ public class HashSet private static final Object PRESENT = new Object(); /** - * Constructs a new, empty set; the backing HashMap instance has + * Constructs a new, empty set; the backing {@code HashMap} instance has * default initial capacity (16) and load factor (0.75). */ public HashSet() { @@ -107,7 +107,7 @@ public class HashSet /** * Constructs a new set containing the elements in the specified - * collection. The HashMap is created with default load factor + * collection. The {@code HashMap} is created with default load factor * (0.75) and an initial capacity sufficient to contain the elements in * the specified collection. * @@ -120,7 +120,7 @@ public class HashSet } /** - * Constructs a new, empty set; the backing HashMap instance has + * Constructs a new, empty set; the backing {@code HashMap} instance has * the specified initial capacity and the specified load factor. * * @param initialCapacity the initial capacity of the hash map @@ -133,7 +133,7 @@ public class HashSet } /** - * Constructs a new, empty set; the backing HashMap instance has + * Constructs a new, empty set; the backing {@code HashMap} instance has * the specified initial capacity and default load factor (0.75). * * @param initialCapacity the initial capacity of the hash table @@ -182,22 +182,22 @@ public class HashSet } /** - * Returns true if this set contains no elements. + * Returns {@code true} if this set contains no elements. * - * @return true if this set contains no elements + * @return {@code true} if this set contains no elements */ public boolean isEmpty() { return map.isEmpty(); } /** - * Returns true if this set contains the specified element. - * More formally, returns true if and only if this set - * contains an element e such that - * (o==null ? e==null : o.equals(e)). + * Returns {@code true} if this set contains the specified element. + * More formally, returns {@code true} if and only if this set + * contains an element {@code e} such that + * {@code Objects.equals(o, e)}. * * @param o element whose presence in this set is to be tested - * @return true if this set contains the specified element + * @return {@code true} if this set contains the specified element */ public boolean contains(Object o) { return map.containsKey(o); @@ -205,14 +205,14 @@ public class HashSet /** * Adds the specified element to this set if it is not already present. - * More formally, adds the specified element e to this set if - * this set contains no element e2 such that - * (e==null ? e2==null : e.equals(e2)). + * More formally, adds the specified element {@code e} to this set if + * this set contains no element {@code e2} such that + * {@code Objects.equals(e, e2)}. * If this set already contains the element, the call leaves the set - * unchanged and returns false. + * unchanged and returns {@code false}. * * @param e element to be added to this set - * @return true if this set did not already contain the specified + * @return {@code true} if this set did not already contain the specified * element */ public boolean add(E e) { @@ -221,15 +221,15 @@ public class HashSet /** * Removes the specified element from this set if it is present. - * More formally, removes an element e such that - * (o==null ? e==null : o.equals(e)), - * if this set contains such an element. Returns true if + * More formally, removes an element {@code e} such that + * {@code Objects.equals(o, e)}, + * if this set contains such an element. Returns {@code true} if * this set contained the element (or equivalently, if this set * changed as a result of the call). (This set will not contain the * element once the call returns.) * * @param o object to be removed from this set, if present - * @return true if the set contained the specified element + * @return {@code true} if the set contained the specified element */ public boolean remove(Object o) { return map.remove(o)==PRESENT; @@ -244,7 +244,7 @@ public class HashSet } /** - * Returns a shallow copy of this HashSet instance: the elements + * Returns a shallow copy of this {@code HashSet} instance: the elements * themselves are not cloned. * * @return a shallow copy of this set @@ -261,10 +261,10 @@ public class HashSet } /** - * Save the state of this HashSet instance to a stream (that is, + * Save the state of this {@code HashSet} instance to a stream (that is, * serialize it). * - * @serialData The capacity of the backing HashMap instance + * @serialData The capacity of the backing {@code HashMap} instance * (int), and its load factor (float) are emitted, followed by * the size of the set (the number of elements it contains) * (int), followed by all of its elements (each an Object) in @@ -288,7 +288,7 @@ public class HashSet } /** - * Reconstitute the HashSet instance from a stream (that is, + * Reconstitute the {@code HashSet} instance from a stream (that is, * deserialize it). */ private void readObject(java.io.ObjectInputStream s) diff --git a/jdk/src/java.base/share/classes/java/util/Hashtable.java b/jdk/src/java.base/share/classes/java/util/Hashtable.java index 9501ee9727c..6ad2f3a933c 100644 --- a/jdk/src/java.base/share/classes/java/util/Hashtable.java +++ b/jdk/src/java.base/share/classes/java/util/Hashtable.java @@ -32,13 +32,13 @@ import java.util.function.BiFunction; /** * This class implements a hash table, which maps keys to values. Any - * non-null object can be used as a key or as a value.

    + * non-{@code null} object can be used as a key or as a value.

    * * To successfully store and retrieve objects from a hashtable, the - * objects used as keys must implement the hashCode - * method and the equals method.

    + * objects used as keys must implement the {@code hashCode} + * method and the {@code equals} method.

    * - * An instance of Hashtable has two parameters that affect its + * An instance of {@code Hashtable} has two parameters that affect its * performance: initial capacity and load factor. The * capacity is the number of buckets in the hash table, and the * initial capacity is simply the capacity at the time the hash table @@ -53,16 +53,16 @@ import java.util.function.BiFunction; * Generally, the default load factor (.75) offers a good tradeoff between * time and space costs. Higher values decrease the space overhead but * increase the time cost to look up an entry (which is reflected in most - * Hashtable operations, including get and put).

    + * {@code Hashtable} operations, including {@code get} and {@code put}).

    * * The initial capacity controls a tradeoff between wasted space and the - * need for rehash operations, which are time-consuming. - * No rehash operations will ever occur if the initial + * need for {@code rehash} operations, which are time-consuming. + * No {@code rehash} operations will ever occur if the initial * capacity is greater than the maximum number of entries the - * Hashtable will contain divided by its load factor. However, + * {@code Hashtable} will contain divided by its load factor. However, * setting the initial capacity too high can waste space.

    * - * If many entries are to be made into a Hashtable, + * If many entries are to be made into a {@code Hashtable}, * creating it with a sufficiently large capacity may allow the * entries to be inserted more efficiently than letting it perform * automatic rehashing as needed to grow the table.

    @@ -83,11 +83,11 @@ import java.util.function.BiFunction; * System.out.println("two = " + n); * }} * - *

    The iterators returned by the iterator method of the collections + *

    The iterators returned by the {@code iterator} method of the collections * returned by all of this class's "collection view methods" are * fail-fast: if the Hashtable is structurally modified at any time * after the iterator is created, in any way except through the iterator's own - * remove method, the iterator will throw a {@link + * {@code remove} method, the iterator will throw a {@link * ConcurrentModificationException}. Thus, in the face of concurrent * modification, the iterator fails quickly and cleanly, rather than risking * arbitrary, non-deterministic behavior at an undetermined time in the future. @@ -99,7 +99,7 @@ import java.util.function.BiFunction; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators * should be used only to detect bugs. @@ -241,8 +241,8 @@ public class Hashtable /** * Tests if this hashtable maps no keys to values. * - * @return true if this hashtable maps no keys to values; - * false otherwise. + * @return {@code true} if this hashtable maps no keys to values; + * {@code false} otherwise. */ public synchronized boolean isEmpty() { return count == 0; @@ -290,11 +290,11 @@ public class Hashtable * {@link Map} interface in the collections framework). * * @param value a value to search for - * @return true if and only if some key maps to the - * value argument in this hashtable as - * determined by the equals method; - * false otherwise. - * @exception NullPointerException if the value is null + * @return {@code true} if and only if some key maps to the + * {@code value} argument in this hashtable as + * determined by the {@code equals} method; + * {@code false} otherwise. + * @exception NullPointerException if the value is {@code null} */ public synchronized boolean contains(Object value) { if (value == null) { @@ -319,9 +319,9 @@ public class Hashtable * #contains contains} (which predates the {@link Map} interface). * * @param value value whose presence in this hashtable is to be tested - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified value - * @throws NullPointerException if the value is null + * @throws NullPointerException if the value is {@code null} * @since 1.2 */ public boolean containsValue(Object value) { @@ -332,10 +332,10 @@ public class Hashtable * Tests if the specified object is a key in this hashtable. * * @param key possible key - * @return true if and only if the specified object + * @return {@code true} if and only if the specified object * is a key in this hashtable, as determined by the - * equals method; false otherwise. - * @throws NullPointerException if the key is null + * {@code equals} method; {@code false} otherwise. + * @throws NullPointerException if the key is {@code null} * @see #contains(Object) */ public synchronized boolean containsKey(Object key) { @@ -444,19 +444,19 @@ public class Hashtable } /** - * Maps the specified key to the specified - * value in this hashtable. Neither the key nor the - * value can be null.

    + * Maps the specified {@code key} to the specified + * {@code value} in this hashtable. Neither the key nor the + * value can be {@code null}.

    * - * The value can be retrieved by calling the get method + * The value can be retrieved by calling the {@code get} method * with a key that is equal to the original key. * * @param key the hashtable key * @param value the value * @return the previous value of the specified key in this hashtable, - * or null if it did not have one + * or {@code null} if it did not have one * @exception NullPointerException if the key or value is - * null + * {@code null} * @see Object#equals(Object) * @see #get(Object) */ @@ -490,8 +490,8 @@ public class Hashtable * * @param key the key that needs to be removed * @return the value to which the key had been mapped in this hashtable, - * or null if the key did not have a mapping - * @throws NullPointerException if the key is null + * or {@code null} if the key did not have a mapping + * @throws NullPointerException if the key is {@code null} */ public synchronized V remove(Object key) { Entry tab[] = table; @@ -568,11 +568,11 @@ public class Hashtable } /** - * Returns a string representation of this Hashtable object + * Returns a string representation of this {@code Hashtable} object * in the form of a set of entries, enclosed in braces and separated - * by the ASCII characters "" (comma and space). Each - * entry is rendered as the key, an equals sign =, and the - * associated element, where the toString method is used to + * by the ASCII characters "" (comma and space). Each + * entry is rendered as the key, an equals sign {@code =}, and the + * associated element, where the {@code toString} method is used to * convert the key and element to strings. * * @return a string representation of this hashtable @@ -633,12 +633,12 @@ public class Hashtable * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation), the results of + * the iterator's own {@code remove} operation), the results of * the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the map, via the - * Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or addAll + * {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or {@code addAll} * operations. * * @since 1.2 @@ -672,14 +672,14 @@ public class Hashtable * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation, or through the - * setValue operation on a map entry returned by the + * the iterator's own {@code remove} operation, or through the + * {@code setValue} operation on a map entry returned by the * iterator) the results of the iteration are undefined. The set * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Set.remove, removeAll, retainAll and - * clear operations. It does not support the - * add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Set.remove}, {@code removeAll}, {@code retainAll} and + * {@code clear} operations. It does not support the + * {@code add} or {@code addAll} operations. * * @since 1.2 */ @@ -754,13 +754,13 @@ public class Hashtable * The collection is backed by the map, so changes to the map are * reflected in the collection, and vice-versa. If the map is * modified while an iteration over the collection is in progress - * (except through the iterator's own remove operation), + * (except through the iterator's own {@code remove} operation), * the results of the iteration are undefined. The collection * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll and clear operations. It does not - * support the add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll} and {@code clear} operations. It does not + * support the {@code add} or {@code addAll} operations. * * @since 1.2 */ diff --git a/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java b/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java index d4ad6006c92..efd759f59a5 100644 --- a/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/IdentityHashMap.java @@ -31,18 +31,18 @@ import java.util.function.BiFunction; import java.util.function.Consumer; /** - * This class implements the Map interface with a hash table, using + * This class implements the {@code Map} interface with a hash table, using * reference-equality in place of object-equality when comparing keys (and - * values). In other words, in an IdentityHashMap, two keys - * k1 and k2 are considered equal if and only if - * (k1==k2). (In normal Map implementations (like - * HashMap) two keys k1 and k2 are considered equal - * if and only if (k1==null ? k2==null : k1.equals(k2)).) + * values). In other words, in an {@code IdentityHashMap}, two keys + * {@code k1} and {@code k2} are considered equal if and only if + * {@code (k1==k2)}. (In normal {@code Map} implementations (like + * {@code HashMap}) two keys {@code k1} and {@code k2} are considered equal + * if and only if {@code (k1==null ? k2==null : k1.equals(k2))}.) * - *

    This class is not a general-purpose Map - * implementation! While this class implements the Map interface, it - * intentionally violates Map's general contract, which mandates the - * use of the equals method when comparing objects. This class is + *

    This class is not a general-purpose {@code Map} + * implementation! While this class implements the {@code Map} interface, it + * intentionally violates {@code Map's} general contract, which mandates the + * use of the {@code equals} method when comparing objects. This class is * designed for use only in the rare cases wherein reference-equality * semantics are required. * @@ -56,12 +56,12 @@ import java.util.function.Consumer; * each object in the program being debugged. * *

    This class provides all of the optional map operations, and permits - * null values and the null key. This class makes no + * {@code null} values and the {@code null} key. This class makes no * guarantees as to the order of the map; in particular, it does not guarantee * that the order will remain constant over time. * *

    This class provides constant-time performance for the basic - * operations (get and put), assuming the system + * operations ({@code get} and {@code put}), assuming the system * identity hash function ({@link System#identityHashCode(Object)}) * disperses elements properly among the buckets. * @@ -96,11 +96,11 @@ import java.util.function.Consumer; * unsynchronized access to the map:

      *   Map m = Collections.synchronizedMap(new IdentityHashMap(...));
    * - *

    The iterators returned by the iterator method of the + *

    The iterators returned by the {@code iterator} method of the * collections returned by all of this class's "collection view * methods" are fail-fast: if the map is structurally modified * at any time after the iterator is created, in any way except - * through the iterator's own remove method, the iterator + * through the iterator's own {@code remove} method, the iterator * will throw a {@link ConcurrentModificationException}. Thus, in the * face of concurrent modification, the iterator fails quickly and * cleanly, rather than risking arbitrary, non-deterministic behavior @@ -109,7 +109,7 @@ import java.util.function.Consumer; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: fail-fast iterators should be used only * to detect bugs. @@ -217,7 +217,7 @@ public class IdentityHashMap * somewhat time-consuming. * * @param expectedMaxSize the expected maximum size of the map - * @throws IllegalArgumentException if expectedMaxSize is negative + * @throws IllegalArgumentException if {@code expectedMaxSize} is negative */ public IdentityHashMap(int expectedMaxSize) { if (expectedMaxSize < 0) @@ -277,10 +277,10 @@ public class IdentityHashMap } /** - * Returns true if this identity hash map contains no key-value + * Returns {@code true} if this identity hash map contains no key-value * mappings. * - * @return true if this identity hash map contains no key-value + * @return {@code true} if this identity hash map contains no key-value * mappings */ public boolean isEmpty() { @@ -341,7 +341,7 @@ public class IdentityHashMap * hash map. * * @param key possible key - * @return true if the specified object reference is a key + * @return {@code true} if the specified object reference is a key * in this map * @see #containsValue(Object) */ @@ -365,7 +365,7 @@ public class IdentityHashMap * hash map. * * @param value value whose presence in this map is to be tested - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified object reference * @see #containsKey(Object) */ @@ -383,7 +383,7 @@ public class IdentityHashMap * * @param key possible key * @param value possible value - * @return true if and only if the specified key-value + * @return {@code true} if and only if the specified key-value * mapping is in the map */ private boolean containsMapping(Object key, Object value) { @@ -408,10 +408,10 @@ public class IdentityHashMap * * @param key the key with which the specified value is to be associated * @param value the value to be associated with the specified key - * @return the previous value associated with key, or - * null if there was no mapping for key. - * (A null return can also indicate that the map - * previously associated null with key.) + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with {@code key}.) * @see Object#equals(Object) * @see #get(Object) * @see #containsKey(Object) @@ -510,10 +510,10 @@ public class IdentityHashMap * Removes the mapping for this key from this map if present. * * @param key key whose mapping is to be removed from the map - * @return the previous value associated with key, or - * null if there was no mapping for key. - * (A null return can also indicate that the map - * previously associated null with key.) + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with {@code key}.) */ public V remove(Object key) { Object k = maskNull(key); @@ -544,7 +544,7 @@ public class IdentityHashMap * * @param key possible key * @param value possible value - * @return true if and only if the specified key-value + * @return {@code true} if and only if the specified key-value * mapping was in the map */ private boolean removeMapping(Object key, Object value) { @@ -621,19 +621,19 @@ public class IdentityHashMap /** * Compares the specified object with this map for equality. Returns - * true if the given object is also a map and the two maps + * {@code true} if the given object is also a map and the two maps * represent identical object-reference mappings. More formally, this - * map is equal to another map m if and only if - * this.entrySet().equals(m.entrySet()). + * map is equal to another map {@code m} if and only if + * {@code this.entrySet().equals(m.entrySet())}. * *

    Owing to the reference-equality-based semantics of this map it is * possible that the symmetry and transitivity requirements of the - * Object.equals contract may be violated if this map is compared - * to a normal map. However, the Object.equals contract is - * guaranteed to hold among IdentityHashMap instances. + * {@code Object.equals} contract may be violated if this map is compared + * to a normal map. However, the {@code Object.equals} contract is + * guaranteed to hold among {@code IdentityHashMap} instances. * * @param o object to be compared for equality with this map - * @return true if the specified object is equal to this map + * @return {@code true} if the specified object is equal to this map * @see Object#equals(Object) */ public boolean equals(Object o) { @@ -662,17 +662,17 @@ public class IdentityHashMap /** * 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 - * entrySet() view. This ensures that m1.equals(m2) - * implies that m1.hashCode()==m2.hashCode() for any two - * IdentityHashMap instances m1 and m2, as + * {@code entrySet()} view. This ensures that {@code m1.equals(m2)} + * implies that {@code m1.hashCode()==m2.hashCode()} for any two + * {@code IdentityHashMap} instances {@code m1} and {@code m2}, as * required by the general contract of {@link Object#hashCode}. * *

    Owing to the reference-equality-based semantics of the - * Map.Entry instances in the set returned by this map's - * entrySet method, it is possible that the contractual - * requirement of Object.hashCode mentioned in the previous + * {@code Map.Entry} instances in the set returned by this map's + * {@code entrySet} method, it is possible that the contractual + * requirement of {@code Object.hashCode} mentioned in the previous * paragraph will be violated if one of the two objects being compared is - * an IdentityHashMap instance and the other is a normal map. + * an {@code IdentityHashMap} instance and the other is a normal map. * * @return the hash code value for this map * @see Object#equals(Object) @@ -930,32 +930,32 @@ public class IdentityHashMap * the set, and vice-versa. If the map is modified while an iteration * over the set is in progress, the results of the iteration are * undefined. The set supports element removal, which removes the - * corresponding mapping from the map, via the Iterator.remove, - * Set.remove, removeAll, retainAll, and - * clear methods. It does not support the add or - * addAll methods. + * corresponding mapping from the map, via the {@code Iterator.remove}, + * {@code Set.remove}, {@code removeAll}, {@code retainAll}, and + * {@code clear} methods. It does not support the {@code add} or + * {@code addAll} methods. * *

    While the object returned by this method implements the - * Set interface, it does not obey Set's general + * {@code Set} interface, it does not obey {@code Set's} general * contract. Like its backing map, the set returned by this method * defines element equality as reference-equality rather than - * object-equality. This affects the behavior of its contains, - * remove, containsAll, equals, and - * hashCode methods. + * object-equality. This affects the behavior of its {@code contains}, + * {@code remove}, {@code containsAll}, {@code equals}, and + * {@code hashCode} methods. * - *

    The equals method of the returned set returns true + *

    The {@code equals} method of the returned set returns {@code true} * only if the specified object is a set containing exactly the same * object references as the returned set. The symmetry and transitivity - * requirements of the Object.equals contract may be violated if + * requirements of the {@code Object.equals} contract may be violated if * the set returned by this method is compared to a normal set. However, - * the Object.equals contract is guaranteed to hold among sets + * the {@code Object.equals} contract is guaranteed to hold among sets * returned by this method. * - *

    The hashCode method of the returned set returns the sum of + *

    The {@code hashCode} method of the returned set returns the sum of * the identity hashcodes of the elements in the set, rather than * the sum of their hashcodes. This is mandated by the change in the - * semantics of the equals method, in order to enforce the - * general contract of the Object.hashCode method among sets + * semantics of the {@code equals} method, in order to enforce the + * general contract of the {@code Object.hashCode} method among sets * returned by this method. * * @return an identity-based set view of the keys contained in this map @@ -1054,18 +1054,18 @@ public class IdentityHashMap * modified while an iteration over the collection is in progress, * the results of the iteration are undefined. The collection * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll and clear methods. It does not - * support the add or addAll methods. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll} and {@code clear} methods. It does not + * support the {@code add} or {@code addAll} methods. * *

    While the object returned by this method implements the - * Collection interface, it does not obey - * Collection's general contract. Like its backing map, + * {@code Collection} interface, it does not obey + * {@code Collection's} general contract. Like its backing map, * the collection returned by this method defines element equality as * reference-equality rather than object-equality. This affects the - * behavior of its contains, remove and - * containsAll methods. + * behavior of its {@code contains}, {@code remove} and + * {@code containsAll} methods. */ public Collection values() { Collection vs = values; @@ -1136,36 +1136,36 @@ public class IdentityHashMap /** * Returns a {@link Set} view of the mappings contained in this map. * Each element in the returned set is a reference-equality-based - * Map.Entry. The set is backed by the map, so changes + * {@code Map.Entry}. The set is backed by the map, so changes * to the map are reflected in the set, and vice-versa. If the * map is modified while an iteration over the set is in progress, * the results of the iteration are undefined. The set supports * element removal, which removes the corresponding mapping from - * the map, via the Iterator.remove, Set.remove, - * removeAll, retainAll and clear - * methods. It does not support the add or - * addAll methods. + * the map, via the {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll} and {@code clear} + * methods. It does not support the {@code add} or + * {@code addAll} methods. * - *

    Like the backing map, the Map.Entry objects in the set + *

    Like the backing map, the {@code Map.Entry} objects in the set * returned by this method define key and value equality as * reference-equality rather than object-equality. This affects the - * behavior of the equals and hashCode methods of these - * Map.Entry objects. A reference-equality based Map.Entry - * e is equal to an object o if and only if o is a - * Map.Entry and e.getKey()==o.getKey() && - * e.getValue()==o.getValue(). To accommodate these equals - * semantics, the hashCode method returns - * System.identityHashCode(e.getKey()) ^ - * System.identityHashCode(e.getValue()). + * behavior of the {@code equals} and {@code hashCode} methods of these + * {@code Map.Entry} objects. A reference-equality based {@code Map.Entry + * e} is equal to an object {@code o} if and only if {@code o} is a + * {@code Map.Entry} and {@code e.getKey()==o.getKey() && + * e.getValue()==o.getValue()}. To accommodate these equals + * semantics, the {@code hashCode} method returns + * {@code System.identityHashCode(e.getKey()) ^ + * System.identityHashCode(e.getValue())}. * *

    Owing to the reference-equality-based semantics of the - * Map.Entry instances in the set returned by this method, + * {@code Map.Entry} instances in the set returned by this method, * it is possible that the symmetry and transitivity requirements of * the {@link Object#equals(Object)} contract may be violated if any of * the entries in the set is compared to a normal map entry, or if * the set returned by this method is compared to a set of normal map * entries (such as would be returned by a call to this method on a normal - * map). However, the Object.equals contract is guaranteed to + * map). However, the {@code Object.equals} contract is guaranteed to * hold among identity-based map entries, and among sets of such entries. * * @@ -1260,11 +1260,11 @@ public class IdentityHashMap private static final long serialVersionUID = 8188218128353913216L; /** - * Saves the state of the IdentityHashMap instance to a stream + * Saves the state of the {@code IdentityHashMap} instance to a stream * (i.e., serializes it). * * @serialData The size of the HashMap (the number of key-value - * mappings) (int), followed by the key (Object) and + * mappings) ({@code int}), followed by the key (Object) and * value (Object) for each key-value mapping represented by the * IdentityHashMap. The key-value mappings are emitted in no * particular order. @@ -1289,7 +1289,7 @@ public class IdentityHashMap } /** - * Reconstitutes the IdentityHashMap instance from a stream (i.e., + * Reconstitutes the {@code IdentityHashMap} instance from a stream (i.e., * deserializes it). */ private void readObject(java.io.ObjectInputStream s) diff --git a/jdk/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java b/jdk/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java index 02add449476..d79d4997d7d 100644 --- a/jdk/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java +++ b/jdk/src/java.base/share/classes/java/util/IllegalFormatCodePointException.java @@ -30,7 +30,7 @@ package java.util; * point as defined by {@link Character#isValidCodePoint} is passed to the * {@link Formatter}. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/IllegalFormatConversionException.java b/jdk/src/java.base/share/classes/java/util/IllegalFormatConversionException.java index a9b006f51c0..09ee5c45cd0 100644 --- a/jdk/src/java.base/share/classes/java/util/IllegalFormatConversionException.java +++ b/jdk/src/java.base/share/classes/java/util/IllegalFormatConversionException.java @@ -29,7 +29,7 @@ package java.util; * Unchecked exception thrown when the argument corresponding to the format * specifier is of an incompatible type. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java b/jdk/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java index 6b8223a4b3f..5374f59aeab 100644 --- a/jdk/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java +++ b/jdk/src/java.base/share/classes/java/util/IllegalFormatFlagsException.java @@ -28,7 +28,7 @@ package java.util; /** * Unchecked exception thrown when an illegal combination flags is given. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java b/jdk/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java index 41cbbb7fecf..bc9c6217ae2 100644 --- a/jdk/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java +++ b/jdk/src/java.base/share/classes/java/util/IllegalFormatPrecisionException.java @@ -27,7 +27,7 @@ package java.util; /** * Unchecked exception thrown when the precision is a negative value other than - * -1, the conversion does not support a precision, or the value is + * {@code -1}, the conversion does not support a precision, or the value is * otherwise unsupported. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/util/IllegalFormatWidthException.java b/jdk/src/java.base/share/classes/java/util/IllegalFormatWidthException.java index 08ae47dcf7b..c7b7823c53e 100644 --- a/jdk/src/java.base/share/classes/java/util/IllegalFormatWidthException.java +++ b/jdk/src/java.base/share/classes/java/util/IllegalFormatWidthException.java @@ -27,7 +27,7 @@ package java.util; /** * Unchecked exception thrown when the format width is a negative value other - * than -1 or is otherwise unsupported. + * than {@code -1} or is otherwise unsupported. * * @since 1.5 */ diff --git a/jdk/src/java.base/share/classes/java/util/InputMismatchException.java b/jdk/src/java.base/share/classes/java/util/InputMismatchException.java index e4d1ce34bed..c101c65da19 100644 --- a/jdk/src/java.base/share/classes/java/util/InputMismatchException.java +++ b/jdk/src/java.base/share/classes/java/util/InputMismatchException.java @@ -26,7 +26,7 @@ package java.util; /** - * Thrown by a Scanner to indicate that the token + * Thrown by a {@code Scanner} to indicate that the token * retrieved does not match the pattern for the expected type, or * that the token is out of range for the expected type. * @@ -39,7 +39,7 @@ class InputMismatchException extends NoSuchElementException { private static final long serialVersionUID = 8811230760997066428L; /** - * Constructs an InputMismatchException with null + * Constructs an {@code InputMismatchException} with {@code null} * as its error message string. */ public InputMismatchException() { @@ -47,9 +47,9 @@ class InputMismatchException extends NoSuchElementException { } /** - * Constructs an InputMismatchException, saving a reference - * to the error message string s for later retrieval by the - * getMessage method. + * Constructs an {@code InputMismatchException}, saving a reference + * to the error message string {@code s} for later retrieval by the + * {@code getMessage} method. * * @param s the detail message. */ diff --git a/jdk/src/java.base/share/classes/java/util/JumboEnumSet.java b/jdk/src/java.base/share/classes/java/util/JumboEnumSet.java index 67985118269..20e8222ccc1 100644 --- a/jdk/src/java.base/share/classes/java/util/JumboEnumSet.java +++ b/jdk/src/java.base/share/classes/java/util/JumboEnumSet.java @@ -163,19 +163,19 @@ class JumboEnumSet> extends EnumSet { } /** - * Returns true if this set contains no elements. + * Returns {@code true} if this set contains no elements. * - * @return true if this set contains no elements + * @return {@code true} if this set contains no elements */ public boolean isEmpty() { return size == 0; } /** - * Returns true if this set contains the specified element. + * Returns {@code true} if this set contains the specified element. * * @param e element to be checked for containment in this collection - * @return true if this set contains the specified element + * @return {@code true} if this set contains the specified element */ public boolean contains(Object e) { if (e == null) @@ -194,9 +194,9 @@ class JumboEnumSet> extends EnumSet { * Adds the specified element to this set if it is not already present. * * @param e element to be added to this set - * @return true if the set changed as a result of the call + * @return {@code true} if the set changed as a result of the call * - * @throws NullPointerException if e is null + * @throws NullPointerException if {@code e} is null */ public boolean add(E e) { typeCheck(e); @@ -216,7 +216,7 @@ class JumboEnumSet> extends EnumSet { * Removes the specified element from this set if it is present. * * @param e element to be removed from this set, if present - * @return true if the set contained the specified element + * @return {@code true} if the set contained the specified element */ public boolean remove(Object e) { if (e == null) @@ -238,11 +238,11 @@ class JumboEnumSet> extends EnumSet { // Bulk Operations /** - * Returns true if this set contains all of the elements + * Returns {@code true} if this set contains all of the elements * in the specified collection. * * @param c collection to be checked for containment in this set - * @return true if this set contains all of the elements + * @return {@code true} if this set contains all of the elements * in the specified collection * @throws NullPointerException if the specified collection is null */ @@ -264,7 +264,7 @@ class JumboEnumSet> extends EnumSet { * Adds all of the elements in the specified collection to this set. * * @param c collection whose elements are to be added to this set - * @return true if this set changed as a result of the call + * @return {@code true} if this set changed as a result of the call * @throws NullPointerException if the specified collection or any of * its elements are null */ @@ -291,7 +291,7 @@ class JumboEnumSet> extends EnumSet { * the specified collection. * * @param c elements to be removed from this set - * @return true if this set changed as a result of the call + * @return {@code true} if this set changed as a result of the call * @throws NullPointerException if the specified collection is null */ public boolean removeAll(Collection c) { @@ -312,7 +312,7 @@ class JumboEnumSet> extends EnumSet { * specified collection. * * @param c elements to be retained in this set - * @return true if this set changed as a result of the call + * @return {@code true} if this set changed as a result of the call * @throws NullPointerException if the specified collection is null */ public boolean retainAll(Collection c) { @@ -341,12 +341,12 @@ class JumboEnumSet> extends EnumSet { /** * Compares the specified object with this set for equality. Returns - * true 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. * * @param o object to be compared for equality with this set - * @return true 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 instanceof JumboEnumSet)) diff --git a/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java b/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java index b8d3fdb40ad..15ade87276e 100644 --- a/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/LinkedHashMap.java @@ -31,15 +31,15 @@ import java.util.function.BiFunction; import java.io.IOException; /** - *

    Hash table and linked list implementation of the Map interface, + *

    Hash table and linked list implementation of the {@code Map} interface, * with predictable iteration order. This implementation differs from - * HashMap in that it maintains a doubly-linked list running through + * {@code HashMap} in that it maintains a doubly-linked list running through * all of its entries. This linked list defines the iteration ordering, * which is normally the order in which keys were inserted into the map * (insertion-order). Note that insertion order is not affected - * if a key is re-inserted into the map. (A key k is - * reinserted into a map m if m.put(k, v) is invoked when - * m.containsKey(k) would return true immediately prior to + * if a key is re-inserted into the map. (A key {@code k} is + * reinserted into a map {@code m} if {@code m.put(k, v)} is invoked when + * {@code m.containsKey(k)} would return {@code true} immediately prior to * the invocation.) * *

    This implementation spares its clients from the unspecified, generally @@ -78,23 +78,23 @@ import java.io.IOException; * impose a policy for removing stale mappings automatically when new mappings * are added to the map. * - *

    This class provides all of the optional Map operations, and - * permits null elements. Like HashMap, it provides constant-time - * performance for the basic operations (add, contains and - * remove), assuming the hash function disperses elements + *

    This class provides all of the optional {@code Map} operations, and + * permits null elements. Like {@code HashMap}, it provides constant-time + * performance for the basic operations ({@code add}, {@code contains} and + * {@code remove}), assuming the hash function disperses elements * properly among the buckets. Performance is likely to be just slightly - * below that of HashMap, due to the added expense of maintaining the + * below that of {@code HashMap}, due to the added expense of maintaining the * linked list, with one exception: Iteration over the collection-views - * of a LinkedHashMap requires time proportional to the size - * of the map, regardless of its capacity. Iteration over a HashMap + * of a {@code LinkedHashMap} requires time proportional to the size + * of the map, regardless of its capacity. Iteration over a {@code HashMap} * is likely to be more expensive, requiring time proportional to its * capacity. * *

    A linked hash map has two parameters that affect its performance: * initial capacity and load factor. They are defined precisely - * as for HashMap. Note, however, that the penalty for choosing an + * as for {@code HashMap}. Note, however, that the penalty for choosing an * excessively high value for initial capacity is less severe for this class - * than for HashMap, as iteration times for this class are unaffected + * than for {@code HashMap}, as iteration times for this class are unaffected * by capacity. * *

    Note that this implementation is not synchronized. @@ -114,14 +114,14 @@ import java.io.IOException; * iteration order. In insertion-ordered linked hash maps, merely changing * the value associated with a key that is already contained in the map is not * a structural modification. In access-ordered linked hash maps, - * merely querying the map with get is a structural modification. + * merely querying the map with {@code get} is a structural modification. * ) * - *

    The iterators returned by the iterator method of the collections + *

    The iterators returned by the {@code iterator} method of the collections * returned by all of this class's collection view methods are * fail-fast: if the map is structurally modified at any time after * the iterator is created, in any way except through the iterator's own - * remove method, the iterator will throw a {@link + * {@code remove} method, the iterator will throw a {@link * ConcurrentModificationException}. Thus, in the face of concurrent * modification, the iterator fails quickly and cleanly, rather than risking * arbitrary, non-deterministic behavior at an undetermined time in the future. @@ -129,7 +129,7 @@ import java.io.IOException; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators * should be used only to detect bugs. @@ -209,8 +209,8 @@ public class LinkedHashMap transient LinkedHashMap.Entry tail; /** - * The iteration ordering method for this linked hash map: true - * for access-order, false for insertion-order. + * The iteration ordering method for this linked hash map: {@code true} + * for access-order, {@code false} for insertion-order. * * @serial */ @@ -335,7 +335,7 @@ public class LinkedHashMap } /** - * Constructs an empty insertion-ordered LinkedHashMap instance + * Constructs an empty insertion-ordered {@code LinkedHashMap} instance * with the specified initial capacity and load factor. * * @param initialCapacity the initial capacity @@ -349,7 +349,7 @@ public class LinkedHashMap } /** - * Constructs an empty insertion-ordered LinkedHashMap instance + * Constructs an empty insertion-ordered {@code LinkedHashMap} instance * with the specified initial capacity and a default load factor (0.75). * * @param initialCapacity the initial capacity @@ -361,7 +361,7 @@ public class LinkedHashMap } /** - * Constructs an empty insertion-ordered LinkedHashMap instance + * Constructs an empty insertion-ordered {@code LinkedHashMap} instance * with the default initial capacity (16) and load factor (0.75). */ public LinkedHashMap() { @@ -370,8 +370,8 @@ public class LinkedHashMap } /** - * Constructs an insertion-ordered LinkedHashMap instance with - * the same mappings as the specified map. The LinkedHashMap + * Constructs an insertion-ordered {@code LinkedHashMap} instance with + * the same mappings as the specified map. The {@code LinkedHashMap} * instance is created with a default load factor (0.75) and an initial * capacity sufficient to hold the mappings in the specified map. * @@ -385,13 +385,13 @@ public class LinkedHashMap } /** - * Constructs an empty LinkedHashMap instance with the + * Constructs an empty {@code LinkedHashMap} instance with the * specified initial capacity, load factor and ordering mode. * * @param initialCapacity the initial capacity * @param loadFactor the load factor - * @param accessOrder the ordering mode - true for - * access-order, false for insertion-order + * @param accessOrder the ordering mode - {@code true} for + * access-order, {@code false} for insertion-order * @throws IllegalArgumentException if the initial capacity is negative * or the load factor is nonpositive */ @@ -404,11 +404,11 @@ public class LinkedHashMap /** - * Returns true if this map maps one or more keys to the + * Returns {@code true} if this map maps one or more keys to the * specified value. * * @param value value whose presence in this map is to be tested - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified value */ public boolean containsValue(Object value) { @@ -465,8 +465,8 @@ public class LinkedHashMap } /** - * Returns true if this map should remove its eldest entry. - * This method is invoked by put and putAll after + * Returns {@code true} if this map should remove its eldest entry. + * This method is invoked by {@code put} and {@code putAll} after * inserting a new entry into the map. It provides the implementor * with the opportunity to remove the eldest entry each time a new one * is added. This is useful if the map represents a cache: it allows @@ -487,23 +487,23 @@ public class LinkedHashMap * instead allowing the map to modify itself as directed by its * return value. It is permitted for this method to modify * the map directly, but if it does so, it must return - * false (indicating that the map should not attempt any - * further modification). The effects of returning true + * {@code false} (indicating that the map should not attempt any + * further modification). The effects of returning {@code true} * after modifying the map from within this method are unspecified. * - *

    This implementation merely returns false (so that this + *

    This implementation merely returns {@code false} (so that this * map acts like a normal map - the eldest element is never removed). * * @param eldest The least recently inserted entry in the map, or if * this is an access-ordered map, the least recently accessed * entry. This is the entry that will be removed it this - * method returns true. If the map was empty prior - * to the put or putAll invocation resulting + * method returns {@code true}. If the map was empty prior + * to the {@code put} or {@code putAll} invocation resulting * in this invocation, this will be the entry that was just * inserted; in other words, if the map contains a single * entry, the eldest entry is also the newest. - * @return true if the eldest entry should be removed - * from the map; false if it should be retained. + * @return {@code true} if the eldest entry should be removed + * from the map; {@code false} if it should be retained. */ protected boolean removeEldestEntry(Map.Entry eldest) { return false; @@ -514,12 +514,12 @@ public class LinkedHashMap * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation), the results of + * the iterator's own {@code remove} operation), the results of * the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the map, via the - * Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or addAll + * {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or {@code addAll} * operations. * Its {@link Spliterator} typically provides faster sequential * performance but much poorer parallel performance than that of @@ -563,13 +563,13 @@ public class LinkedHashMap * The collection is backed by the map, so changes to the map are * reflected in the collection, and vice-versa. If the map is * modified while an iteration over the collection is in progress - * (except through the iterator's own remove operation), + * (except through the iterator's own {@code remove} operation), * the results of the iteration are undefined. The collection * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll and clear operations. It does not - * support the add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll} and {@code clear} operations. It does not + * support the {@code add} or {@code addAll} operations. * Its {@link Spliterator} typically provides faster sequential * performance but much poorer parallel performance than that of * {@code HashMap}. @@ -608,14 +608,14 @@ public class LinkedHashMap * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation, or through the - * setValue operation on a map entry returned by the + * the iterator's own {@code remove} operation, or through the + * {@code setValue} operation on a map entry returned by the * iterator) the results of the iteration are undefined. The set * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Set.remove, removeAll, retainAll and - * clear operations. It does not support the - * add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Set.remove}, {@code removeAll}, {@code retainAll} and + * {@code clear} operations. It does not support the + * {@code add} or {@code addAll} operations. * Its {@link Spliterator} typically provides faster sequential * performance but much poorer parallel performance than that of * {@code HashMap}. diff --git a/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java b/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java index 08606cfe4cf..c0e1f2eb8e4 100644 --- a/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java +++ b/jdk/src/java.base/share/classes/java/util/LinkedHashSet.java @@ -26,15 +26,15 @@ package java.util; /** - *

    Hash table and linked list implementation of the Set interface, + *

    Hash table and linked list implementation of the {@code Set} interface, * with predictable iteration order. This implementation differs from - * HashSet in that it maintains a doubly-linked list running through + * {@code HashSet} in that it maintains a doubly-linked list running through * all of its entries. This linked list defines the iteration ordering, * which is the order in which elements were inserted into the set * (insertion-order). Note that insertion order is not affected - * if an element is re-inserted into the set. (An element e - * is reinserted into a set s if s.add(e) is invoked when - * s.contains(e) would return true immediately prior to + * if an element is re-inserted into the set. (An element {@code e} + * is reinserted into a set {@code s} if {@code s.add(e)} is invoked when + * {@code s.contains(e)} would return {@code true} immediately prior to * the invocation.) * *

    This implementation spares its clients from the unspecified, generally @@ -53,22 +53,22 @@ package java.util; * the copy. (Clients generally appreciate having things returned in the same * order they were presented.) * - *

    This class provides all of the optional Set operations, and - * permits null elements. Like HashSet, it provides constant-time - * performance for the basic operations (add, contains and - * remove), assuming the hash function disperses elements + *

    This class provides all of the optional {@code Set} operations, and + * permits null elements. Like {@code HashSet}, it provides constant-time + * performance for the basic operations ({@code add}, {@code contains} and + * {@code remove}), assuming the hash function disperses elements * properly among the buckets. Performance is likely to be just slightly - * below that of HashSet, due to the added expense of maintaining the - * linked list, with one exception: Iteration over a LinkedHashSet + * below that of {@code HashSet}, due to the added expense of maintaining the + * linked list, with one exception: Iteration over a {@code LinkedHashSet} * requires time proportional to the size of the set, regardless of - * its capacity. Iteration over a HashSet is likely to be more + * its capacity. Iteration over a {@code HashSet} is likely to be more * expensive, requiring time proportional to its capacity. * *

    A linked hash set has two parameters that affect its performance: * initial capacity and load factor. They are defined precisely - * as for HashSet. Note, however, that the penalty for choosing an + * as for {@code HashSet}. Note, however, that the penalty for choosing an * excessively high value for initial capacity is less severe for this class - * than for HashSet, as iteration times for this class are unaffected + * than for {@code HashSet}, as iteration times for this class are unaffected * by capacity. * *

    Note that this implementation is not synchronized. @@ -83,9 +83,9 @@ package java.util; * unsynchronized access to the set:

      *   Set s = Collections.synchronizedSet(new LinkedHashSet(...));
    * - *

    The iterators returned by this class's iterator method are + *

    The iterators returned by this class's {@code iterator} method are * fail-fast: if the set is modified at any time after the iterator - * is created, in any way except through the iterator's own remove + * is created, in any way except through the iterator's own {@code remove} * method, the iterator will throw a {@link ConcurrentModificationException}. * Thus, in the face of concurrent modification, the iterator fails quickly * and cleanly, rather than risking arbitrary, non-deterministic behavior at @@ -94,7 +94,7 @@ package java.util; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators * should be used only to detect bugs. diff --git a/jdk/src/java.base/share/classes/java/util/LinkedList.java b/jdk/src/java.base/share/classes/java/util/LinkedList.java index e2e57e8d5a2..2d21ff145c3 100644 --- a/jdk/src/java.base/share/classes/java/util/LinkedList.java +++ b/jdk/src/java.base/share/classes/java/util/LinkedList.java @@ -312,7 +312,7 @@ public class LinkedList * 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 - * (o==null ? e==null : o.equals(e)). + * {@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 @@ -348,7 +348,7 @@ public class LinkedList * if it is present. If this list does not contain the element, it is * unchanged. More formally, removes the element with the lowest index * {@code i} such that - * (o==null ? get(i)==null : o.equals(get(i))) + * {@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). @@ -589,7 +589,7 @@ public class LinkedList * 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 - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -618,7 +618,7 @@ public class LinkedList * 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 - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for diff --git a/jdk/src/java.base/share/classes/java/util/List.java b/jdk/src/java.base/share/classes/java/util/List.java index 80fe4be9229..6e3751fa046 100644 --- a/jdk/src/java.base/share/classes/java/util/List.java +++ b/jdk/src/java.base/share/classes/java/util/List.java @@ -34,50 +34,50 @@ import java.util.function.UnaryOperator; * the list), and search for elements in the list.

    * * Unlike sets, lists typically allow duplicate elements. More formally, - * lists typically allow pairs of elements e1 and e2 - * such that e1.equals(e2), and they typically allow multiple + * lists typically allow pairs of elements {@code e1} and {@code e2} + * such that {@code e1.equals(e2)}, and they typically allow multiple * null elements if they allow null elements at all. It is not inconceivable * that someone might wish to implement a list that prohibits duplicates, by * throwing runtime exceptions when the user attempts to insert them, but we * expect this usage to be rare.

    * - * The List interface places additional stipulations, beyond those - * specified in the Collection interface, on the contracts of the - * iterator, add, remove, equals, and - * hashCode methods. Declarations for other inherited methods are + * The {@code List} interface places additional stipulations, beyond those + * specified in the {@code Collection} interface, on the contracts of the + * {@code iterator}, {@code add}, {@code remove}, {@code equals}, and + * {@code hashCode} methods. Declarations for other inherited methods are * also included here for convenience.

    * - * The List interface provides four methods for positional (indexed) + * The {@code List} interface provides four methods for positional (indexed) * access to list elements. Lists (like Java arrays) are zero based. Note * that these operations may execute in time proportional to the index value - * for some implementations (the LinkedList class, for + * for some implementations (the {@code LinkedList} class, for * example). Thus, iterating over the elements in a list is typically * preferable to indexing through it if the caller does not know the * implementation.

    * - * The List interface provides a special iterator, called a - * ListIterator, that allows element insertion and replacement, and + * The {@code List} interface provides a special iterator, called a + * {@code ListIterator}, that allows element insertion and replacement, and * bidirectional access in addition to the normal operations that the - * Iterator interface provides. A method is provided to obtain a + * {@code Iterator} interface provides. A method is provided to obtain a * list iterator that starts at a specified position in the list.

    * - * The List interface provides two methods to search for a specified + * The {@code List} interface provides two methods to search for a specified * object. From a performance standpoint, these methods should be used with * caution. In many implementations they will perform costly linear * searches.

    * - * The List interface provides two methods to efficiently insert and + * The {@code List} interface provides two methods to efficiently insert and * remove multiple elements at an arbitrary point in the list.

    * * Note: While it is permissible for lists to contain themselves as elements, - * extreme caution is advised: the equals and hashCode + * extreme caution is advised: the {@code equals} and {@code hashCode} * methods are no longer well defined on such a list. * *

    Some list implementations have restrictions on the elements that * they may contain. For example, some implementations prohibit null elements, * and some have restrictions on the types of their elements. Attempting to * add an ineligible element throws an unchecked exception, typically - * NullPointerException or ClassCastException. Attempting + * {@code NullPointerException} or {@code ClassCastException}. Attempting * to query the presence of an ineligible element may throw an exception, * or it may simply return false; some implementations will exhibit the former * behavior and some will exhibit the latter. More generally, attempting an @@ -113,28 +113,28 @@ public interface List extends Collection { /** * Returns the number of elements in this list. If this list contains - * more than Integer.MAX_VALUE elements, returns - * Integer.MAX_VALUE. + * more than {@code Integer.MAX_VALUE} elements, returns + * {@code Integer.MAX_VALUE}. * * @return the number of elements in this list */ int size(); /** - * Returns true if this list contains no elements. + * Returns {@code true} if this list contains no elements. * - * @return true if this list contains no elements + * @return {@code true} if this list contains no elements */ boolean isEmpty(); /** - * Returns true if this list contains the specified element. - * More formally, returns true if and only if this list contains - * at least one element e such that - * (o==null ? e==null : o.equals(e)). + * 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 + * {@code Objects.equals(o, e)}. * * @param o element whose presence in this list is to be tested - * @return true if this list contains the specified element + * @return {@code true} if this list contains the specified element * @throws ClassCastException if the type of the specified element * is incompatible with this list * (optional) @@ -179,7 +179,7 @@ public interface List extends Collection { * *

    If the list fits in the specified array with room to spare (i.e., * the array has more elements than the list), the element in the array - * immediately following the end of the list is set to null. + * immediately following the end of the list is set to {@code null}. * (This is useful in determining the length of the list only if * the caller knows that the list does not contain any null elements.) * @@ -188,16 +188,16 @@ public interface List extends Collection { * precise control over the runtime type of the output array, and may, * under certain circumstances, be used to save allocation costs. * - *

    Suppose x is a list known to contain only strings. + *

    Suppose {@code x} is a list known to contain only strings. * The following code can be used to dump the list into a newly - * allocated array of String: + * allocated array of {@code String}: * *

    {@code
          *     String[] y = x.toArray(new String[0]);
          * }
    * - * Note that toArray(new Object[0]) is identical in function to - * toArray(). + * Note that {@code toArray(new Object[0])} is identical in function to + * {@code toArray()}. * * @param a the array into which the elements of this list are to * be stored, if it is big enough; otherwise, a new array of the @@ -225,8 +225,8 @@ public interface List extends Collection { * on what elements may be added. * * @param e element to be appended to this list - * @return true (as specified by {@link Collection#add}) - * @throws UnsupportedOperationException if the add operation + * @return {@code true} (as specified by {@link Collection#add}) + * @throws UnsupportedOperationException if the {@code add} operation * is not supported by this list * @throws ClassCastException if the class of the specified element * prevents it from being added to this list @@ -241,21 +241,21 @@ public interface List extends Collection { * Removes the first occurrence of the specified element from this list, * if it is present (optional operation). If this list does not contain * the element, it is unchanged. More formally, removes the element with - * the lowest index i such that - * (o==null ? get(i)==null : o.equals(get(i))) - * (if such an element exists). Returns true if this list + * the lowest index {@code i} such that + * {@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). * * @param o element to be removed from this list, if present - * @return true if this list contained the specified element + * @return {@code true} if this list contained the specified element * @throws ClassCastException if the type of the specified element * is incompatible with this list * (optional) * @throws NullPointerException if the specified element is null and this * list does not permit null elements * (optional) - * @throws UnsupportedOperationException if the remove operation + * @throws UnsupportedOperationException if the {@code remove} operation * is not supported by this list */ boolean remove(Object o); @@ -264,11 +264,11 @@ public interface List extends Collection { // Bulk Modification Operations /** - * Returns true if this list contains all of the elements of the + * Returns {@code true} if this list contains all of the elements of the * specified collection. * * @param c collection to be checked for containment in this list - * @return true if this list contains all of the elements of the + * @return {@code true} if this list contains all of the elements of the * specified collection * @throws ClassCastException if the types of one or more elements * in the specified collection are incompatible with this @@ -292,8 +292,8 @@ public interface List extends Collection { * specified collection is this list, and it's nonempty.) * * @param c collection containing elements to be added to this list - * @return true if this list changed as a result of the call - * @throws UnsupportedOperationException if the addAll operation + * @return {@code true} if this list changed as a result of the call + * @throws UnsupportedOperationException if the {@code addAll} operation * is not supported by this list * @throws ClassCastException if the class of an element of the specified * collection prevents it from being added to this list @@ -320,8 +320,8 @@ public interface List extends Collection { * @param index index at which to insert the first element from the * specified collection * @param c collection containing elements to be added to this list - * @return true if this list changed as a result of the call - * @throws UnsupportedOperationException if the addAll operation + * @return {@code true} if this list changed as a result of the call + * @throws UnsupportedOperationException if the {@code addAll} operation * is not supported by this list * @throws ClassCastException if the class of an element of the specified * collection prevents it from being added to this list @@ -331,7 +331,7 @@ public interface List extends Collection { * @throws IllegalArgumentException if some property of an element of the * specified collection prevents it from being added to this list * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index > size()) + * ({@code index < 0 || index > size()}) */ boolean addAll(int index, Collection c); @@ -340,8 +340,8 @@ public interface List extends Collection { * specified collection (optional operation). * * @param c collection containing elements to be removed from this list - * @return true if this list changed as a result of the call - * @throws UnsupportedOperationException if the removeAll operation + * @return {@code true} if this list changed as a result of the call + * @throws UnsupportedOperationException if the {@code removeAll} operation * is not supported by this list * @throws ClassCastException if the class of an element of this list * is incompatible with the specified collection @@ -362,8 +362,8 @@ public interface List extends Collection { * specified collection. * * @param c collection containing elements to be retained in this list - * @return true if this list changed as a result of the call - * @throws UnsupportedOperationException if the retainAll operation + * @return {@code true} if this list changed as a result of the call + * @throws UnsupportedOperationException if the {@code retainAll} operation * is not supported by this list * @throws ClassCastException if the class of an element of this list * is incompatible with the specified collection @@ -487,7 +487,7 @@ public interface List extends Collection { * Removes all of the elements from this list (optional operation). * The list will be empty after this call returns. * - * @throws UnsupportedOperationException if the clear operation + * @throws UnsupportedOperationException if the {@code clear} operation * is not supported by this list */ void clear(); @@ -497,17 +497,17 @@ public interface List extends Collection { /** * Compares the specified object with this list for equality. Returns - * true if and only if the specified object is also a list, both + * {@code true} if and only if the specified object is also a list, both * lists have the same size, and all corresponding pairs of elements in - * the two lists are equal. (Two elements e1 and - * e2 are equal if (e1==null ? e2==null : - * e1.equals(e2)).) In other words, two lists are defined to be + * the two lists are equal. (Two elements {@code e1} and + * {@code e2} are equal if {@code Objects.equals(e1, e2)}.) + * In other words, two lists are defined to be * equal if they contain the same elements in the same order. This * definition ensures that the equals method works properly across - * different implementations of the List interface. + * different implementations of the {@code List} interface. * * @param o the object to be compared for equality with this list - * @return true if the specified object is equal to this list + * @return {@code true} if the specified object is equal to this list */ boolean equals(Object o); @@ -519,9 +519,9 @@ public interface List extends Collection { * for (E e : list) * hashCode = 31*hashCode + (e==null ? 0 : e.hashCode()); * } - * This ensures that list1.equals(list2) implies that - * list1.hashCode()==list2.hashCode() for any two lists, - * list1 and list2, as required by the general + * This ensures that {@code list1.equals(list2)} implies that + * {@code list1.hashCode()==list2.hashCode()} for any two lists, + * {@code list1} and {@code list2}, as required by the general * contract of {@link Object#hashCode}. * * @return the hash code value for this list @@ -539,7 +539,7 @@ public interface List extends Collection { * @param index index of the element to return * @return the element at the specified position in this list * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index >= size()) + * ({@code index < 0 || index >= size()}) */ E get(int index); @@ -550,7 +550,7 @@ public interface List extends Collection { * @param index index of the element to replace * @param element element to be stored at the specified position * @return the element previously at the specified position - * @throws UnsupportedOperationException if the set operation + * @throws UnsupportedOperationException if the {@code set} operation * is not supported by this list * @throws ClassCastException if the class of the specified element * prevents it from being added to this list @@ -559,7 +559,7 @@ public interface List extends Collection { * @throws IllegalArgumentException if some property of the specified * element prevents it from being added to this list * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index >= size()) + * ({@code index < 0 || index >= size()}) */ E set(int index, E element); @@ -571,7 +571,7 @@ public interface List extends Collection { * * @param index index at which the specified element is to be inserted * @param element element to be inserted - * @throws UnsupportedOperationException if the add operation + * @throws UnsupportedOperationException if the {@code add} operation * is not supported by this list * @throws ClassCastException if the class of the specified element * prevents it from being added to this list @@ -580,7 +580,7 @@ public interface List extends Collection { * @throws IllegalArgumentException if some property of the specified * element prevents it from being added to this list * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index > size()) + * ({@code index < 0 || index > size()}) */ void add(int index, E element); @@ -592,10 +592,10 @@ public interface List extends Collection { * * @param index the index of the element to be removed * @return the element previously at the specified position - * @throws UnsupportedOperationException if the remove operation + * @throws UnsupportedOperationException if the {@code remove} operation * is not supported by this list * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index >= size()) + * ({@code index < 0 || index >= size()}) */ E remove(int index); @@ -605,8 +605,8 @@ public interface List extends Collection { /** * 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 i such that - * (o==null ? get(i)==null : o.equals(get(i))), + * More formally, returns the lowest index {@code i} such that + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -624,8 +624,8 @@ public interface List extends Collection { /** * 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 i such that - * (o==null ? get(i)==null : o.equals(get(i))), + * More formally, returns the highest index {@code i} such that + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -673,8 +673,8 @@ public interface List extends Collection { /** * Returns a view of the portion of this list between the specified - * fromIndex, inclusive, and toIndex, exclusive. (If - * fromIndex and toIndex are equal, the returned list is + * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If + * {@code fromIndex} and {@code toIndex} are equal, the returned list is * empty.) The returned list is backed by this list, so non-structural * changes in the returned list are reflected in this list, and vice-versa. * The returned list supports all of the optional list operations supported @@ -688,9 +688,9 @@ public interface List extends Collection { *
    {@code
          *      list.subList(from, to).clear();
          * }
    - * Similar idioms may be constructed for indexOf and - * lastIndexOf, and all of the algorithms in the - * Collections class can be applied to a subList.

    + * Similar idioms may be constructed for {@code indexOf} and + * {@code lastIndexOf}, and all of the algorithms in the + * {@code Collections} class can be applied to a subList.

    * * The semantics of the list returned by this method become undefined if * the backing list (i.e., this list) is structurally modified in @@ -702,8 +702,8 @@ public interface List extends Collection { * @param toIndex high endpoint (exclusive) of the subList * @return a view of the specified range within this list * @throws IndexOutOfBoundsException for an illegal endpoint index value - * (fromIndex < 0 || toIndex > size || - * fromIndex > toIndex) + * ({@code fromIndex < 0 || toIndex > size || + * fromIndex > toIndex}) */ List subList(int fromIndex, int toIndex); diff --git a/jdk/src/java.base/share/classes/java/util/Locale.java b/jdk/src/java.base/share/classes/java/util/Locale.java index e3b12c5769c..e785677b3fc 100644 --- a/jdk/src/java.base/share/classes/java/util/Locale.java +++ b/jdk/src/java.base/share/classes/java/util/Locale.java @@ -413,24 +413,24 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; * *

    For compatibility reasons, two * non-conforming locales are treated as special cases. These are - * ja_JP_JP and th_TH_TH. These are ill-formed + * {@code ja_JP_JP} and {@code th_TH_TH}. These are ill-formed * in BCP 47 since the variants are too short. To ease migration to BCP 47, * these are treated specially during construction. These two cases (and only * these) cause a constructor to generate an extension, all other values behave * exactly as they did prior to Java 7. * - *

    Java has used ja_JP_JP to represent Japanese as used in + *

    Java has used {@code ja_JP_JP} to represent Japanese as used in * Japan together with the Japanese Imperial calendar. This is now * representable using a Unicode locale extension, by specifying the - * Unicode locale key ca (for "calendar") and type - * japanese. When the Locale constructor is called with the + * Unicode locale key {@code ca} (for "calendar") and type + * {@code japanese}. When the Locale constructor is called with the * arguments "ja", "JP", "JP", the extension "u-ca-japanese" is * automatically added. * - *

    Java has used th_TH_TH to represent Thai as used in + *

    Java has used {@code th_TH_TH} to represent Thai as used in * Thailand together with Thai digits. This is also now representable using * a Unicode locale extension, by specifying the Unicode locale key - * nu (for "number") and value thai. When the Locale + * {@code nu} (for "number") and value {@code thai}. When the Locale * constructor is called with the arguments "th", "TH", "TH", the * extension "u-nu-thai" is automatically added. * @@ -446,9 +446,9 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter; *

    Legacy language codes
    * *

    Locale's constructor has always converted three language codes to - * their earlier, obsoleted forms: he maps to iw, - * yi maps to ji, and id maps to - * in. This continues to be the case, in order to not break + * their earlier, obsoleted forms: {@code he} maps to {@code iw}, + * {@code yi} maps to {@code ji}, and {@code id} maps to + * {@code in}. This continues to be the case, in order to not break * backwards compatibility. * *

    The APIs added in 1.7 map between the old and new language codes, @@ -1272,14 +1272,14 @@ public final class Locale implements Cloneable, Serializable { * {@link #toLanguageTag}. * *

    Examples:

      - *
    • en
    • - *
    • de_DE
    • - *
    • _GB
    • - *
    • en_US_WIN
    • - *
    • de__POSIX
    • - *
    • zh_CN_#Hans
    • - *
    • zh_TW_#Hant-x-java
    • - *
    • th_TH_TH_#u-nu-thai
    + *
  • {@code en}
  • + *
  • {@code de_DE}
  • + *
  • {@code _GB}
  • + *
  • {@code en_US_WIN}
  • + *
  • {@code de__POSIX}
  • + *
  • {@code zh_CN_#Hans}
  • + *
  • {@code zh_TW_#Hant-x-java}
  • + *
  • {@code th_TH_TH_#u-nu-thai}
  • * * @return A string representation of the Locale, for debugging. * @see #getDisplayName diff --git a/jdk/src/java.base/share/classes/java/util/Map.java b/jdk/src/java.base/share/classes/java/util/Map.java index cf9448b0306..9d79c6ce7a9 100644 --- a/jdk/src/java.base/share/classes/java/util/Map.java +++ b/jdk/src/java.base/share/classes/java/util/Map.java @@ -34,29 +34,29 @@ import java.io.Serializable; * An object that maps keys to values. A map cannot contain duplicate keys; * each key can map to at most one value. * - *

    This interface takes the place of the Dictionary class, which + *

    This interface takes the place of the {@code Dictionary} class, which * was a totally abstract class rather than an interface. * - *

    The Map interface provides three collection views, which + *

    The {@code Map} interface provides three collection views, which * allow a map's contents to be viewed as a set of keys, collection of values, * or set of key-value mappings. The order of a map is defined as * the order in which the iterators on the map's collection views return their - * elements. Some map implementations, like the TreeMap class, make - * specific guarantees as to their order; others, like the HashMap + * elements. Some map implementations, like the {@code TreeMap} class, make + * specific guarantees as to their order; others, like the {@code HashMap} * class, do not. * *

    Note: great care must be exercised if mutable objects are used as map * keys. The behavior of a map is not specified if the value of an object is - * changed in a manner that affects equals comparisons while the + * changed in a manner that affects {@code equals} comparisons while the * object is a key in the map. A special case of this prohibition is that it * is not permissible for a map to contain itself as a key. While it is * permissible for a map to contain itself as a value, extreme caution is - * advised: the equals and hashCode methods are no longer + * advised: the {@code equals} and {@code hashCode} methods are no longer * well defined on such a map. * *

    All general-purpose map implementation classes should provide two * "standard" constructors: a void (no arguments) constructor which creates an - * empty map, and a constructor with a single argument of type Map, + * empty map, and a constructor with a single argument of type {@code Map}, * which creates a new map with the same key-value mappings as its argument. * In effect, the latter constructor allows the user to copy any map, * producing an equivalent map of the desired class. There is no way to @@ -65,9 +65,9 @@ import java.io.Serializable; * *

    The "destructive" methods contained in this interface, that is, the * methods that modify the map on which they operate, are specified to throw - * UnsupportedOperationException if this map does not support the + * {@code UnsupportedOperationException} if this map does not support the * operation. If this is the case, these methods may, but are not required - * to, throw an UnsupportedOperationException if the invocation would + * to, throw an {@code UnsupportedOperationException} if the invocation would * have no effect on the map. For example, invoking the {@link #putAll(Map)} * method on an unmodifiable map may, but is not required to, throw the * exception if the map whose mappings are to be "superimposed" is empty. @@ -76,7 +76,7 @@ import java.io.Serializable; * may contain. For example, some implementations prohibit null keys and * values, and some have restrictions on the types of their keys. Attempting * to insert an ineligible key or value throws an unchecked exception, - * typically NullPointerException or ClassCastException. + * typically {@code NullPointerException} or {@code ClassCastException}. * Attempting to query the presence of an ineligible key or value may throw an * exception, or it may simply return false; some implementations will exhibit * the former behavior and some will exhibit the latter. More generally, @@ -89,13 +89,13 @@ import java.io.Serializable; *

    Many methods in Collections Framework interfaces are defined * in terms of the {@link Object#equals(Object) equals} method. For * example, the specification for the {@link #containsKey(Object) - * containsKey(Object key)} method says: "returns true if and - * only if this map contains a mapping for a key k such that - * (key==null ? k==null : key.equals(k))." This specification should - * not be construed to imply that invoking Map.containsKey - * with a non-null argument key will cause key.equals(k) to - * be invoked for any key k. Implementations are free to - * implement optimizations whereby the equals invocation is avoided, + * containsKey(Object key)} method says: "returns {@code true} if and + * only if this map contains a mapping for a key {@code k} such that + * {@code (key==null ? k==null : key.equals(k))}." This specification should + * not be construed to imply that invoking {@code Map.containsKey} + * with a non-null argument {@code key} will cause {@code key.equals(k)} to + * be invoked for any key {@code k}. Implementations are free to + * implement optimizations whereby the {@code equals} invocation is avoided, * for example, by first comparing the hash codes of the two keys. (The * {@link Object#hashCode()} specification guarantees that two objects with * unequal hash codes cannot be equal.) More generally, implementations of @@ -131,29 +131,29 @@ public interface Map { /** * Returns the number of key-value mappings in this map. If the - * map contains more than Integer.MAX_VALUE elements, returns - * Integer.MAX_VALUE. + * map contains more than {@code Integer.MAX_VALUE} elements, returns + * {@code Integer.MAX_VALUE}. * * @return the number of key-value mappings in this map */ int size(); /** - * Returns true if this map contains no key-value mappings. + * Returns {@code true} if this map contains no key-value mappings. * - * @return true if this map contains no key-value mappings + * @return {@code true} if this map contains no key-value mappings */ boolean isEmpty(); /** - * Returns true if this map contains a mapping for the specified - * key. More formally, returns true if and only if - * this map contains a mapping for a key k such that - * (key==null ? k==null : key.equals(k)). (There can be + * Returns {@code true} if this map contains a mapping for the specified + * key. More formally, returns {@code true} if and only if + * this map contains a mapping for a key {@code k} such that + * {@code Objects.equals(key, k)}. (There can be * at most one such mapping.) * * @param key key whose presence in this map is to be tested - * @return true if this map contains a mapping for the specified + * @return {@code true} if this map contains a mapping for the specified * key * @throws ClassCastException if the key is of an inappropriate type for * this map @@ -165,15 +165,15 @@ public interface Map { boolean containsKey(Object key); /** - * Returns true if this map maps one or more keys to the - * specified value. More formally, returns true if and only if - * this map contains at least one mapping to a value v such that - * (value==null ? v==null : value.equals(v)). This operation + * Returns {@code true} if this map maps one or more keys to the + * specified value. More formally, returns {@code true} if and only if + * this map contains at least one mapping to a value {@code v} such that + * {@code Objects.equals(value, v)}. This operation * will probably require time linear in the map size for most - * implementations of the Map interface. + * implementations of the {@code Map} interface. * * @param value value whose presence in this map is to be tested - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified value * @throws ClassCastException if the value is of an inappropriate type for * this map @@ -189,8 +189,9 @@ public interface Map { * or {@code null} if this map contains no mapping for the key. * *

    More formally, if this map contains a mapping from a key - * {@code k} to a value {@code v} such that {@code (key==null ? k==null : - * key.equals(k))}, then this method returns {@code v}; otherwise + * {@code k} to a value {@code v} such that + * {@code Objects.equals(key, k)}, + * then this method returns {@code v}; otherwise * it returns {@code null}. (There can be at most one such mapping.) * *

    If this map permits null values, then a return value of @@ -217,18 +218,18 @@ public interface Map { * Associates the specified value with the specified key in this map * (optional operation). If the map previously contained a mapping for * the key, the old value is replaced by the specified value. (A map - * m is said to contain a mapping for a key k if and only + * {@code m} is said to contain a mapping for a key {@code k} if and only * if {@link #containsKey(Object) m.containsKey(k)} would return - * true.) + * {@code true}.) * * @param key key with which the specified value is to be associated * @param value value to be associated with the specified key - * @return the previous value associated with key, or - * null if there was no mapping for key. - * (A null return can also indicate that the map - * previously associated null with key, - * if the implementation supports null values.) - * @throws UnsupportedOperationException if the put operation + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with {@code key}, + * if the implementation supports {@code null} values.) + * @throws UnsupportedOperationException if the {@code put} operation * is not supported by this map * @throws ClassCastException if the class of the specified key or value * prevents it from being stored in this map @@ -242,25 +243,25 @@ public interface Map { /** * Removes the mapping for a key from this map if it is present * (optional operation). More formally, if this map contains a mapping - * from key k to value v such that - * (key==null ? k==null : key.equals(k)), that mapping + * from key {@code k} to value {@code v} such that + * {@code Objects.equals(key, k)}, that mapping * is removed. (The map can contain at most one such mapping.) * *

    Returns the value to which this map previously associated the key, - * or null if the map contained no mapping for the key. + * or {@code null} if the map contained no mapping for the key. * *

    If this map permits null values, then a return value of - * null does not necessarily indicate that the map + * {@code null} does not necessarily indicate that the map * contained no mapping for the key; it's also possible that the map - * explicitly mapped the key to null. + * explicitly mapped the key to {@code null}. * *

    The map will not contain a mapping for the specified key once the * call returns. * * @param key key whose mapping is to be removed from the map - * @return the previous value associated with key, or - * null if there was no mapping for key. - * @throws UnsupportedOperationException if the remove operation + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * @throws UnsupportedOperationException if the {@code remove} operation * is not supported by this map * @throws ClassCastException if the key is of an inappropriate type for * this map @@ -278,12 +279,12 @@ public interface Map { * Copies all of the mappings from the specified map to this map * (optional operation). The effect of this call is equivalent to that * of calling {@link #put(Object,Object) put(k, v)} on this map once - * for each mapping from key k to value v in the + * for each mapping from key {@code k} to value {@code v} in the * specified map. The behavior of this operation is undefined if the * specified map is modified while the operation is in progress. * * @param m mappings to be stored in this map - * @throws UnsupportedOperationException if the putAll operation + * @throws UnsupportedOperationException if the {@code putAll} operation * is not supported by this map * @throws ClassCastException if the class of a key or value in the * specified map prevents it from being stored in this map @@ -299,7 +300,7 @@ public interface Map { * Removes all of the mappings from this map (optional operation). * The map will be empty after this call returns. * - * @throws UnsupportedOperationException if the clear operation + * @throws UnsupportedOperationException if the {@code clear} operation * is not supported by this map */ void clear(); @@ -312,12 +313,12 @@ public interface Map { * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation), the results of + * the iterator's own {@code remove} operation), the results of * the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the map, via the - * Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or addAll + * {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or {@code addAll} * operations. * * @return a set view of the keys contained in this map @@ -329,13 +330,13 @@ public interface Map { * The collection is backed by the map, so changes to the map are * reflected in the collection, and vice-versa. If the map is * modified while an iteration over the collection is in progress - * (except through the iterator's own remove operation), + * (except through the iterator's own {@code remove} operation), * the results of the iteration are undefined. The collection * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll and clear operations. It does not - * support the add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll} and {@code clear} operations. It does not + * support the {@code add} or {@code addAll} operations. * * @return a collection view of the values contained in this map */ @@ -346,28 +347,28 @@ public interface Map { * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation, or through the - * setValue operation on a map entry returned by the + * the iterator's own {@code remove} operation, or through the + * {@code setValue} operation on a map entry returned by the * iterator) the results of the iteration are undefined. The set * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Set.remove, removeAll, retainAll and - * clear operations. It does not support the - * add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Set.remove}, {@code removeAll}, {@code retainAll} and + * {@code clear} operations. It does not support the + * {@code add} or {@code addAll} operations. * * @return a set view of the mappings contained in this map */ Set> entrySet(); /** - * A map entry (key-value pair). The Map.entrySet method returns + * A map entry (key-value pair). The {@code Map.entrySet} method returns * a collection-view of the map, whose elements are of this class. The * only way to obtain a reference to a map entry is from the - * iterator of this collection-view. These Map.Entry objects are + * iterator of this collection-view. These {@code Map.Entry} objects are * valid only for the duration of the iteration; more formally, * the behavior of a map entry is undefined if the backing map has been * modified after the entry was returned by the iterator, except through - * the setValue operation on the map entry. + * the {@code setValue} operation on the map entry. * * @see Map#entrySet() * @since 1.2 @@ -386,7 +387,7 @@ public interface Map { /** * Returns the value corresponding to this entry. If the mapping * has been removed from the backing map (by the iterator's - * remove operation), the results of this call are undefined. + * {@code remove} operation), the results of this call are undefined. * * @return the value corresponding to this entry * @throws IllegalStateException implementations may, but are not @@ -399,11 +400,11 @@ public interface Map { * Replaces the value corresponding to this entry with the specified * value (optional operation). (Writes through to the map.) The * behavior of this call is undefined if the mapping has already been - * removed from the map (by the iterator's remove operation). + * removed from the map (by the iterator's {@code remove} operation). * * @param value new value to be stored in this entry * @return old value corresponding to the entry - * @throws UnsupportedOperationException if the put operation + * @throws UnsupportedOperationException if the {@code put} operation * is not supported by the backing map * @throws ClassCastException if the class of the specified value * prevents it from being stored in the backing map @@ -419,34 +420,34 @@ public interface Map { /** * Compares the specified object with this entry for equality. - * Returns true if the given object is also a map entry and + * Returns {@code true} if the given object is also a map entry and * the two entries represent the same mapping. More formally, two - * entries e1 and e2 represent the same mapping + * entries {@code e1} and {@code e2} represent the same mapping * if

              *     (e1.getKey()==null ?
              *      e2.getKey()==null : e1.getKey().equals(e2.getKey()))  &&
              *     (e1.getValue()==null ?
              *      e2.getValue()==null : e1.getValue().equals(e2.getValue()))
              * 
    - * This ensures that the equals method works properly across - * different implementations of the Map.Entry interface. + * This ensures that the {@code equals} method works properly across + * different implementations of the {@code Map.Entry} interface. * * @param o object to be compared for equality with this map entry - * @return true if the specified object is equal to this map + * @return {@code true} if the specified object is equal to this map * entry */ boolean equals(Object o); /** * Returns the hash code value for this map entry. The hash code - * of a map entry e is defined to be:
    +         * of a map entry {@code e} is defined to be: 
              *     (e.getKey()==null   ? 0 : e.getKey().hashCode()) ^
              *     (e.getValue()==null ? 0 : e.getValue().hashCode())
              * 
    - * This ensures that e1.equals(e2) implies that - * e1.hashCode()==e2.hashCode() for any two Entries - * e1 and e2, as required by the general - * contract of Object.hashCode. + * This ensures that {@code e1.equals(e2)} implies that + * {@code e1.hashCode()==e2.hashCode()} for any two Entries + * {@code e1} and {@code e2}, as required by the general + * contract of {@code Object.hashCode}. * * @return the hash code value for this map entry * @see Object#hashCode() @@ -532,24 +533,24 @@ public interface Map { /** * Compares the specified object with this map for equality. Returns - * true if the given object is also a map and the two maps - * represent the same mappings. More formally, two maps m1 and - * m2 represent the same mappings if - * m1.entrySet().equals(m2.entrySet()). This ensures that the - * equals method works properly across different implementations - * of the Map 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. * * @param o object to be compared for equality with this map - * @return true if the specified object is equal to this map + * @return {@code true} if the specified object is equal to this map */ boolean equals(Object o); /** * 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 - * entrySet() view. This ensures that m1.equals(m2) - * implies that m1.hashCode()==m2.hashCode() for any two maps - * m1 and m2, 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}. * * @return the hash code value for this map diff --git a/jdk/src/java.base/share/classes/java/util/MissingFormatArgumentException.java b/jdk/src/java.base/share/classes/java/util/MissingFormatArgumentException.java index 79b04a304a7..926a6975f7c 100644 --- a/jdk/src/java.base/share/classes/java/util/MissingFormatArgumentException.java +++ b/jdk/src/java.base/share/classes/java/util/MissingFormatArgumentException.java @@ -30,7 +30,7 @@ package java.util; * have a corresponding argument or if an argument index refers to an argument * that does not exist. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/MissingFormatWidthException.java b/jdk/src/java.base/share/classes/java/util/MissingFormatWidthException.java index 9650fe2b3e3..e7486952995 100644 --- a/jdk/src/java.base/share/classes/java/util/MissingFormatWidthException.java +++ b/jdk/src/java.base/share/classes/java/util/MissingFormatWidthException.java @@ -28,7 +28,7 @@ package java.util; /** * Unchecked exception thrown when the format width is required. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/MissingResourceException.java b/jdk/src/java.base/share/classes/java/util/MissingResourceException.java index 56027398e06..3e09dfa8b9d 100644 --- a/jdk/src/java.base/share/classes/java/util/MissingResourceException.java +++ b/jdk/src/java.base/share/classes/java/util/MissingResourceException.java @@ -64,10 +64,10 @@ class MissingResourceException extends RuntimeException { } /** - * Constructs a MissingResourceException with - * message, className, key, - * and cause. This constructor is package private for - * use by ResourceBundle.getBundle. + * Constructs a {@code MissingResourceException} with + * {@code message}, {@code className}, {@code key}, + * and {@code cause}. This constructor is package private for + * use by {@code ResourceBundle.getBundle}. * * @param message * the detail message diff --git a/jdk/src/java.base/share/classes/java/util/NoSuchElementException.java b/jdk/src/java.base/share/classes/java/util/NoSuchElementException.java index 0469cd9a84c..6ce6c28eb37 100644 --- a/jdk/src/java.base/share/classes/java/util/NoSuchElementException.java +++ b/jdk/src/java.base/share/classes/java/util/NoSuchElementException.java @@ -39,7 +39,7 @@ class NoSuchElementException extends RuntimeException { private static final long serialVersionUID = 6769829250639411880L; /** - * Constructs a NoSuchElementException with null + * Constructs a {@code NoSuchElementException} with {@code null} * as its error message string. */ public NoSuchElementException() { @@ -47,9 +47,9 @@ class NoSuchElementException extends RuntimeException { } /** - * Constructs a NoSuchElementException, saving a reference - * to the error message string s for later retrieval by the - * getMessage method. + * Constructs a {@code NoSuchElementException}, saving a reference + * to the error message string {@code s} for later retrieval by the + * {@code getMessage} method. * * @param s the detail message. */ diff --git a/jdk/src/java.base/share/classes/java/util/Observable.java b/jdk/src/java.base/share/classes/java/util/Observable.java index af39bdac9de..cff9e1f4d7b 100644 --- a/jdk/src/java.base/share/classes/java/util/Observable.java +++ b/jdk/src/java.base/share/classes/java/util/Observable.java @@ -31,11 +31,11 @@ package java.util; * object that the application wants to have observed. *

    * An observable object can have one or more observers. An observer - * may be any object that implements interface Observer. After an + * may be any object that implements interface {@code Observer}. After an * observable instance changes, an application calling the - * Observable's notifyObservers method + * {@code Observable}'s {@code notifyObservers} method * causes all of its observers to be notified of the change by a call - * to their update method. + * to their {@code update} method. *

    * The order in which notifications will be delivered is unspecified. * The default implementation provided in the Observable class will @@ -45,12 +45,12 @@ package java.util; * subclass follows this order, as they choose. *

    * Note that this notification mechanism has nothing to do with threads - * and is completely separate from the wait and notify - * mechanism of class Object. + * and is completely separate from the {@code wait} and {@code notify} + * mechanism of class {@code Object}. *

    * When an observable object is newly created, its set of observers is * empty. Two observers are considered the same if and only if the - * equals method returns true for them. + * {@code equals} method returns true for them. * * @author Chris Warth * @see java.util.Observable#notifyObservers() @@ -88,7 +88,7 @@ public class Observable { /** * Deletes an observer from the set of observers of this object. - * Passing null to this method will have no effect. + * Passing {@code null} to this method will have no effect. * @param o the observer to be deleted. */ public synchronized void deleteObserver(Observer o) { @@ -97,15 +97,15 @@ public class Observable { /** * If this object has changed, as indicated by the - * hasChanged method, then notify all of its observers - * and then call the clearChanged method to + * {@code hasChanged} method, then notify all of its observers + * and then call the {@code clearChanged} method to * indicate that this object has no longer changed. *

    - * Each observer has its update method called with two - * arguments: this observable object and null. In other + * Each observer has its {@code update} method called with two + * arguments: this observable object and {@code null}. In other * words, this method is equivalent to: - *

    - * notifyObservers(null)
    + *
    {@code + * notifyObservers(null)}
    * * @see java.util.Observable#clearChanged() * @see java.util.Observable#hasChanged() @@ -117,12 +117,12 @@ public class Observable { /** * If this object has changed, as indicated by the - * hasChanged method, then notify all of its observers - * and then call the clearChanged method to indicate + * {@code hasChanged} method, then notify all of its observers + * and then call the {@code clearChanged} method to indicate * that this object has no longer changed. *

    - * Each observer has its update method called with two - * arguments: this observable object and the arg argument. + * Each observer has its {@code update} method called with two + * arguments: this observable object and the {@code arg} argument. * * @param arg any object. * @see java.util.Observable#clearChanged() @@ -167,8 +167,8 @@ public class Observable { } /** - * Marks this Observable object as having been changed; the - * hasChanged method will now return true. + * Marks this {@code Observable} object as having been changed; the + * {@code hasChanged} method will now return {@code true}. */ protected synchronized void setChanged() { changed = true; @@ -177,9 +177,9 @@ public class Observable { /** * Indicates that this object has no longer changed, or that it has * already notified all of its observers of its most recent change, - * so that the hasChanged method will now return false. + * so that the {@code hasChanged} method will now return {@code false}. * This method is called automatically by the - * notifyObservers methods. + * {@code notifyObservers} methods. * * @see java.util.Observable#notifyObservers() * @see java.util.Observable#notifyObservers(java.lang.Object) @@ -191,10 +191,10 @@ public class Observable { /** * Tests if this object has changed. * - * @return true if and only if the setChanged + * @return {@code true} if and only if the {@code setChanged} * method has been called more recently than the - * clearChanged method on this object; - * false otherwise. + * {@code clearChanged} method on this object; + * {@code false} otherwise. * @see java.util.Observable#clearChanged() * @see java.util.Observable#setChanged() */ @@ -203,7 +203,7 @@ public class Observable { } /** - * Returns the number of observers of this Observable object. + * Returns the number of observers of this {@code Observable} object. * * @return the number of observers of this object. */ diff --git a/jdk/src/java.base/share/classes/java/util/Observer.java b/jdk/src/java.base/share/classes/java/util/Observer.java index e9694fe732d..2db27b44a2d 100644 --- a/jdk/src/java.base/share/classes/java/util/Observer.java +++ b/jdk/src/java.base/share/classes/java/util/Observer.java @@ -25,7 +25,7 @@ package java.util; /** - * A class can implement the Observer interface when it + * A class can implement the {@code Observer} interface when it * wants to be informed of changes in observable objects. * * @author Chris Warth @@ -35,12 +35,12 @@ package java.util; public interface Observer { /** * This method is called whenever the observed object is changed. An - * application calls an Observable object's - * notifyObservers method to have all the object's + * application calls an {@code Observable} object's + * {@code notifyObservers} method to have all the object's * observers notified of the change. * * @param o the observable object. - * @param arg an argument passed to the notifyObservers + * @param arg an argument passed to the {@code notifyObservers} * method. */ void update(Observable o, Object arg); diff --git a/jdk/src/java.base/share/classes/java/util/Properties.java b/jdk/src/java.base/share/classes/java/util/Properties.java index 0d983e52f96..1eddbab3740 100644 --- a/jdk/src/java.base/share/classes/java/util/Properties.java +++ b/jdk/src/java.base/share/classes/java/util/Properties.java @@ -60,12 +60,12 @@ import jdk.internal.util.xml.PropertiesDefaultHandler; * object that contains a non-{@code String} key. * *

    - * The {@link #load(java.io.Reader) load(Reader)} / + * The {@link #load(java.io.Reader) load(Reader)} {@code /} * {@link #store(java.io.Writer, java.lang.String) store(Writer, String)} * methods load and store properties from and to a character based stream * in a simple line-oriented format specified below. * - * The {@link #load(java.io.InputStream) load(InputStream)} / + * The {@link #load(java.io.InputStream) load(InputStream)} {@code /} * {@link #store(java.io.OutputStream, java.lang.String) store(OutputStream, String)} * methods work the same way as the load(Reader)/store(Writer, String) pair, except * the input/output stream is encoded in ISO 8859-1 character encoding. @@ -105,7 +105,7 @@ import jdk.internal.util.xml.PropertiesDefaultHandler; *

    * *

    This class is thread-safe: multiple threads can share a single - * Properties object without the need for external synchronization. + * {@code Properties} object without the need for external synchronization. * * @author Arthur van Hoff * @author Michael McCloskey @@ -144,13 +144,13 @@ class Properties extends Hashtable { } /** - * Calls the Hashtable method {@code put}. Provided for - * parallelism with the getProperty method. Enforces use of + * Calls the {@code Hashtable} method {@code put}. Provided for + * parallelism with the {@code getProperty} method. Enforces use of * strings for property keys and values. The value returned is the - * result of the Hashtable call to {@code put}. + * result of the {@code Hashtable} call to {@code put}. * * @param key the key to be placed into this property list. - * @param value the value corresponding to key. + * @param value the value corresponding to {@code key}. * @return the previous value of the specified key in this property * list, or {@code null} if it did not have one. * @see #getProperty @@ -756,7 +756,7 @@ class Properties extends Hashtable { * @param writer an output character stream writer. * @param comments a description of the property list. * @exception IOException if writing this property list to the specified - * output stream throws an IOException. + * output stream throws an {@code IOException}. * @exception ClassCastException if this {@code Properties} object * contains any keys or values that are not {@code Strings}. * @exception NullPointerException if {@code writer} is null. @@ -803,7 +803,7 @@ class Properties extends Hashtable { * @param out an output stream. * @param comments a description of the property list. * @exception IOException if writing this property list to the specified - * output stream throws an IOException. + * output stream throws an {@code IOException}. * @exception ClassCastException if this {@code Properties} object * contains any keys or values that are not {@code Strings}. * @exception NullPointerException if {@code out} is null. @@ -860,7 +860,7 @@ class Properties extends Hashtable { * * @param in the input stream from which to read the XML document. * @throws IOException if reading from the specified input stream - * results in an IOException. + * results in an {@code IOException}. * @throws java.io.UnsupportedEncodingException if the document's encoding * declaration can be read and it specifies an encoding that is not * supported @@ -885,15 +885,15 @@ class Properties extends Hashtable { * Emits an XML document representing all of the properties contained * in this table. * - *

    An invocation of this method of the form props.storeToXML(os, - * comment) behaves in exactly the same way as the invocation - * props.storeToXML(os, comment, "UTF-8");. + *

    An invocation of this method of the form {@code props.storeToXML(os, + * comment)} behaves in exactly the same way as the invocation + * {@code props.storeToXML(os, comment, "UTF-8");}. * * @param os the output stream on which to emit the XML document. * @param comment a description of the property list, or {@code null} * if no comment is desired. * @throws IOException if writing to the specified output stream - * results in an IOException. + * results in an {@code IOException}. * @throws NullPointerException if {@code os} is null. * @throws ClassCastException if this {@code Properties} object * contains any keys or values that are not @@ -933,7 +933,7 @@ class Properties extends Hashtable { * character encoding * * @throws IOException if writing to the specified output stream - * results in an IOException. + * results in an {@code IOException}. * @throws java.io.UnsupportedEncodingException if the encoding is not * supported by the implementation. * @throws NullPointerException if {@code os} is {@code null}, @@ -1016,10 +1016,10 @@ class Properties extends Hashtable { * including distinct keys in the default property list if a key * of the same name has not already been found from the main * properties list. Properties whose key or value is not - * of type String are omitted. + * of type {@code String} are omitted. *

    - * The returned set is not backed by the Properties object. - * Changes to this Properties are not reflected in the set, + * The returned set is not backed by the {@code Properties} object. + * Changes to this {@code Properties} are not reflected in the set, * or vice versa. * * @return a set of keys in this property list where diff --git a/jdk/src/java.base/share/classes/java/util/RandomAccess.java b/jdk/src/java.base/share/classes/java/util/RandomAccess.java index 09ce29edce3..a4d489313de 100644 --- a/jdk/src/java.base/share/classes/java/util/RandomAccess.java +++ b/jdk/src/java.base/share/classes/java/util/RandomAccess.java @@ -26,27 +26,27 @@ package java.util; /** - * Marker interface used by List implementations to indicate that + * Marker interface used by {@code List} implementations to indicate that * they support fast (generally constant time) random access. The primary * purpose of this interface is to allow generic algorithms to alter their * behavior to provide good performance when applied to either random or * sequential access lists. * *

    The best algorithms for manipulating random access lists (such as - * ArrayList) can produce quadratic behavior when applied to - * sequential access lists (such as LinkedList). Generic list + * {@code ArrayList}) can produce quadratic behavior when applied to + * sequential access lists (such as {@code LinkedList}). Generic list * algorithms are encouraged to check whether the given list is an - * instanceof this interface before applying an algorithm that would + * {@code instanceof} this interface before applying an algorithm that would * provide poor performance if it were applied to a sequential access list, * and to alter their behavior if necessary to guarantee acceptable * performance. * *

    It is recognized that the distinction between random and sequential - * access is often fuzzy. For example, some List implementations + * access is often fuzzy. For example, some {@code List} implementations * provide asymptotically linear access times if they get huge, but constant - * access times in practice. Such a List implementation + * access times in practice. Such a {@code List} implementation * should generally implement this interface. As a rule of thumb, a - * List implementation should implement this interface if, + * {@code List} implementation should implement this interface if, * for typical instances of the class, this loop: *

      *     for (int i=0, n=list.size(); i < n; i++)
    diff --git a/jdk/src/java.base/share/classes/java/util/RegularEnumSet.java b/jdk/src/java.base/share/classes/java/util/RegularEnumSet.java
    index 31a63f15cc4..eef447eeb48 100644
    --- a/jdk/src/java.base/share/classes/java/util/RegularEnumSet.java
    +++ b/jdk/src/java.base/share/classes/java/util/RegularEnumSet.java
    @@ -123,19 +123,19 @@ class RegularEnumSet> extends EnumSet {
         }
     
         /**
    -     * Returns true if this set contains no elements.
    +     * Returns {@code true} if this set contains no elements.
          *
    -     * @return true if this set contains no elements
    +     * @return {@code true} if this set contains no elements
          */
         public boolean isEmpty() {
             return elements == 0;
         }
     
         /**
    -     * Returns true if this set contains the specified element.
    +     * Returns {@code true} if this set contains the specified element.
          *
          * @param e element to be checked for containment in this collection
    -     * @return true if this set contains the specified element
    +     * @return {@code true} if this set contains the specified element
          */
         public boolean contains(Object e) {
             if (e == null)
    @@ -153,9 +153,9 @@ class RegularEnumSet> extends EnumSet {
          * Adds the specified element to this set if it is not already present.
          *
          * @param e element to be added to this set
    -     * @return true if the set changed as a result of the call
    +     * @return {@code true} if the set changed as a result of the call
          *
    -     * @throws NullPointerException if e is null
    +     * @throws NullPointerException if {@code e} is null
          */
         public boolean add(E e) {
             typeCheck(e);
    @@ -169,7 +169,7 @@ class RegularEnumSet> extends EnumSet {
          * Removes the specified element from this set if it is present.
          *
          * @param e element to be removed from this set, if present
    -     * @return true if the set contained the specified element
    +     * @return {@code true} if the set contained the specified element
          */
         public boolean remove(Object e) {
             if (e == null)
    @@ -186,11 +186,11 @@ class RegularEnumSet> extends EnumSet {
         // Bulk Operations
     
         /**
    -     * Returns true if this set contains all of the elements
    +     * Returns {@code true} if this set contains all of the elements
          * in the specified collection.
          *
          * @param c collection to be checked for containment in this set
    -     * @return true if this set contains all of the elements
    +     * @return {@code true} if this set contains all of the elements
          *        in the specified collection
          * @throws NullPointerException if the specified collection is null
          */
    @@ -209,7 +209,7 @@ class RegularEnumSet> extends EnumSet {
          * Adds all of the elements in the specified collection to this set.
          *
          * @param c collection whose elements are to be added to this set
    -     * @return true if this set changed as a result of the call
    +     * @return {@code true} if this set changed as a result of the call
          * @throws NullPointerException if the specified collection or any
          *     of its elements are null
          */
    @@ -236,7 +236,7 @@ class RegularEnumSet> extends EnumSet {
          * the specified collection.
          *
          * @param c elements to be removed from this set
    -     * @return true if this set changed as a result of the call
    +     * @return {@code true} if this set changed as a result of the call
          * @throws NullPointerException if the specified collection is null
          */
         public boolean removeAll(Collection c) {
    @@ -257,7 +257,7 @@ class RegularEnumSet> extends EnumSet {
          * specified collection.
          *
          * @param c elements to be retained in this set
    -     * @return true if this set changed as a result of the call
    +     * @return {@code true} if this set changed as a result of the call
          * @throws NullPointerException if the specified collection is null
          */
         public boolean retainAll(Collection c) {
    @@ -285,12 +285,12 @@ class RegularEnumSet> extends EnumSet {
     
         /**
          * Compares the specified object with this set for equality.  Returns
    -     * true 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.
          *
          * @param o object to be compared for equality with this set
    -     * @return true 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 instanceof RegularEnumSet))
    diff --git a/jdk/src/java.base/share/classes/java/util/Scanner.java b/jdk/src/java.base/share/classes/java/util/Scanner.java
    index 68396488f1c..6577cabe582 100644
    --- a/jdk/src/java.base/share/classes/java/util/Scanner.java
    +++ b/jdk/src/java.base/share/classes/java/util/Scanner.java
    @@ -42,20 +42,20 @@ import sun.misc.LRUCache;
      * A simple text scanner which can parse primitive types and strings using
      * regular expressions.
      *
    - * 

    A Scanner breaks its input into tokens using a + *

    A {@code Scanner} breaks its input into tokens using a * delimiter pattern, which by default matches whitespace. The resulting * tokens may then be converted into values of different types using the - * various next methods. + * various {@code next} methods. * *

    For example, this code allows a user to read a number from - * System.in: + * {@code System.in}: *

    {@code
      *     Scanner sc = new Scanner(System.in);
      *     int i = sc.nextInt();
      * }
    * - *

    As another example, this code allows long types to be - * assigned from entries in a file myNumbers: + *

    As another example, this code allows {@code long} types to be + * assigned from entries in a file {@code myNumbers}: *

    {@code
      *      Scanner sc = new Scanner(new File("myNumbers"));
      *      while (sc.hasNextLong()) {
    @@ -106,10 +106,10 @@ import sun.misc.LRUCache;
      * 

    The {@link #next} and {@link #hasNext} methods and their * primitive-type companion methods (such as {@link #nextInt} and * {@link #hasNextInt}) first skip any input that matches the delimiter - * pattern, and then attempt to return the next token. Both hasNext - * and next methods may block waiting for further input. Whether a - * hasNext method blocks has no connection to whether or not its - * associated next method will block. + * pattern, and then attempt to return the next token. Both {@code hasNext} + * and {@code next} methods may block waiting for further input. Whether a + * {@code hasNext} method blocks has no connection to whether or not its + * associated {@code next} method will block. * *

    The {@link #findInLine}, {@link #findWithinHorizon}, and {@link #skip} * methods operate independently of the delimiter pattern. These methods will @@ -122,32 +122,32 @@ import sun.misc.LRUCache; * retrieved or skipped via some other method. * *

    Depending upon the type of delimiting pattern, empty tokens may be - * returned. For example, the pattern "\\s+" will return no empty + * returned. For example, the pattern {@code "\\s+"} will return no empty * tokens since it matches multiple instances of the delimiter. The delimiting - * pattern "\\s" could return empty tokens since it only passes one + * pattern {@code "\\s"} could return empty tokens since it only passes one * space at a time. * *

    A scanner can read text from any object which implements the {@link * java.lang.Readable} interface. If an invocation of the underlying * readable's {@link java.lang.Readable#read} method throws an {@link * java.io.IOException} then the scanner assumes that the end of the input - * has been reached. The most recent IOException thrown by the + * has been reached. The most recent {@code IOException} thrown by the * underlying readable can be retrieved via the {@link #ioException} method. * - *

    When a Scanner is closed, it will close its input source + *

    When a {@code Scanner} is closed, it will close its input source * if the source implements the {@link java.io.Closeable} interface. * - *

    A Scanner is not safe for multithreaded use without + *

    A {@code Scanner} is not safe for multithreaded use without * external synchronization. * - *

    Unless otherwise mentioned, passing a null parameter into - * any method of a Scanner will cause a - * NullPointerException to be thrown. + *

    Unless otherwise mentioned, passing a {@code null} parameter into + * any method of a {@code Scanner} will cause a + * {@code NullPointerException} to be thrown. * *

    A scanner will default to interpreting numbers as decimal unless a * different radix has been set by using the {@link #useRadix} method. The * {@link #reset} method will reset the value of the scanner's radix to - * 10 regardless of whether it was previously changed. + * {@code 10} regardless of whether it was previously changed. * *

    Localized numbers

    * @@ -162,50 +162,50 @@ import sun.misc.LRUCache; * *

    The localized formats are defined in terms of the following parameters, * which for a particular locale are taken from that locale's {@link - * java.text.DecimalFormat DecimalFormat} object, df, and its and + * java.text.DecimalFormat DecimalFormat} object, {@code df}, and its and * {@link java.text.DecimalFormatSymbols DecimalFormatSymbols} object, - * dfs. + * {@code dfs}. * *

    *
    LocalGroupSeparator   *
    The character used to separate thousands groups, - * i.e., dfs.{@link + * i.e., {@code dfs.}{@link * java.text.DecimalFormatSymbols#getGroupingSeparator * getGroupingSeparator()} *
    LocalDecimalSeparator   *
    The character used for the decimal point, - * i.e., dfs.{@link + * i.e., {@code dfs.}{@link * java.text.DecimalFormatSymbols#getDecimalSeparator * getDecimalSeparator()} *
    LocalPositivePrefix   *
    The string that appears before a positive number (may - * be empty), i.e., df.{@link + * be empty), i.e., {@code df.}{@link * java.text.DecimalFormat#getPositivePrefix * getPositivePrefix()} *
    LocalPositiveSuffix   *
    The string that appears after a positive number (may be - * empty), i.e., df.{@link + * empty), i.e., {@code df.}{@link * java.text.DecimalFormat#getPositiveSuffix * getPositiveSuffix()} *
    LocalNegativePrefix   *
    The string that appears before a negative number (may - * be empty), i.e., df.{@link + * be empty), i.e., {@code df.}{@link * java.text.DecimalFormat#getNegativePrefix * getNegativePrefix()} *
    LocalNegativeSuffix   *
    The string that appears after a negative number (may be - * empty), i.e., df.{@link + * empty), i.e., {@code df.}{@link * java.text.DecimalFormat#getNegativeSuffix * getNegativeSuffix()} *
    LocalNaN   *
    The string that represents not-a-number for * floating-point values, - * i.e., dfs.{@link + * i.e., {@code dfs.}{@link * java.text.DecimalFormatSymbols#getNaN * getNaN()} *
    LocalInfinity   *
    The string that represents infinity for floating-point - * values, i.e., dfs.{@link + * values, i.e., {@code dfs.}{@link * java.text.DecimalFormatSymbols#getInfinity * getInfinity()} *
    @@ -219,82 +219,82 @@ import sun.misc.LRUCache; *
    *
    NonAsciiDigit: *
    A non-ASCII character c for which - * {@link java.lang.Character#isDigit Character.isDigit}(c) + * {@link java.lang.Character#isDigit Character.isDigit}{@code (c)} * returns true * *
    Non0Digit: - *
    [1-Rmax] | NonASCIIDigit + *
    {@code [1-}Rmax{@code ] | }NonASCIIDigit * *
    Digit: - *
    [0-Rmax] | NonASCIIDigit + *
    {@code [0-}Rmax{@code ] | }NonASCIIDigit * *
    GroupedNumeral: - *
    Non0Digit - * Digit? - * Digit? - *
        LocalGroupSeparator + *
    Non0Digit + * Digit{@code ? + * }Digit{@code ?} + *
        LocalGroupSeparator * Digit * Digit - * Digit )+ ) + * Digit{@code )+ )} * *
    Numeral: - *
    ( ( Digit+ ) - * | GroupedNumeral ) + *
    {@code ( ( }Digit{@code + ) + * | }GroupedNumeral{@code )} * *
    Integer: - *
    ( [-+]? ( Numeral - * ) ) - *
    | LocalPositivePrefix Numeral + *
    {@code ( [-+]? ( }Numeral{@code + * ) )} + *
    {@code | }LocalPositivePrefix Numeral * LocalPositiveSuffix - *
    | LocalNegativePrefix Numeral + *
    {@code | }LocalNegativePrefix Numeral * LocalNegativeSuffix * *
    DecimalNumeral: *
    Numeral - *
    | Numeral + *
    {@code | }Numeral * LocalDecimalSeparator - * Digit* - *
    | LocalDecimalSeparator - * Digit+ + * Digit{@code *} + *
    {@code | }LocalDecimalSeparator + * Digit{@code +} * *
    Exponent: - *
    ( [eE] [+-]? Digit+ ) + *
    {@code ( [eE] [+-]? }Digit{@code + )} * *
    Decimal: - *
    ( [-+]? DecimalNumeral - * Exponent? ) - *
    | LocalPositivePrefix + *
    {@code ( [-+]? }DecimalNumeral + * Exponent{@code ? )} + *
    {@code | }LocalPositivePrefix * DecimalNumeral * LocalPositiveSuffix - * Exponent? - *
    | LocalNegativePrefix + * Exponent{@code ?} + *
    {@code | }LocalNegativePrefix * DecimalNumeral * LocalNegativeSuffix - * Exponent? + * Exponent{@code ?} * *
    HexFloat: - *
    [-+]? 0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+ - * ([pP][-+]?[0-9]+)? + *
    {@code [-+]? 0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+ + * ([pP][-+]?[0-9]+)?} * *
    NonNumber: - *
    NaN - * | LocalNan + *
    {@code NaN + * | }LocalNan{@code * | Infinity - * | LocalInfinity + * | }LocalInfinity * *
    SignedNonNumber: - *
    ( [-+]? NonNumber ) - *
    | LocalPositivePrefix + *
    {@code ( [-+]? }NonNumber{@code )} + *
    {@code | }LocalPositivePrefix * NonNumber * LocalPositiveSuffix - *
    | LocalNegativePrefix + *
    {@code | }LocalNegativePrefix * NonNumber * LocalNegativeSuffix * *
    Float: *
    Decimal - * | HexFloat - * | SignedNonNumber + * {@code | }HexFloat + * {@code | }SignedNonNumber * *
    *

    Whitespace is not significant in the above regular expressions. @@ -521,7 +521,7 @@ public final class Scanner implements Iterator, Closeable { // Constructors /** - * Constructs a Scanner that returns values scanned + * Constructs a {@code Scanner} that returns values scanned * from the specified source delimited by the specified pattern. * * @param source A character source implementing the Readable interface @@ -541,7 +541,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified source. * * @param source A character source implementing the {@link Readable} @@ -552,7 +552,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified input stream. Bytes from the stream are converted * into characters using the underlying platform's * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}. @@ -564,7 +564,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified input stream. Bytes from the stream are converted * into characters using the specified charset. * @@ -599,7 +599,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified file. Bytes from the file are converted into * characters using the underlying platform's * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}. @@ -612,7 +612,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified file. Bytes from the file are converted into * characters using the specified charset. * @@ -650,7 +650,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified file. Bytes from the file are converted into * characters using the underlying platform's * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}. @@ -669,7 +669,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified file. Bytes from the file are converted into * characters using the specified charset. * @@ -693,7 +693,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified string. * * @param source A string to scan @@ -703,7 +703,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified channel. Bytes from the source are converted into * characters using the underlying platform's * {@linkplain java.nio.charset.Charset#defaultCharset() default charset}. @@ -720,7 +720,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Constructs a new Scanner that produces values scanned + * Constructs a new {@code Scanner} that produces values scanned * from the specified channel. Bytes from the source are converted into * characters using the specified charset. * @@ -1077,7 +1077,7 @@ public final class Scanner implements Iterator, Closeable { * *

    If this scanner has not yet been closed then if its underlying * {@linkplain java.lang.Readable readable} also implements the {@link - * java.io.Closeable} interface then the readable's close method + * java.io.Closeable} interface then the readable's {@code close} method * will be invoked. If this scanner is already closed then invoking this * method will have no effect. * @@ -1101,9 +1101,9 @@ public final class Scanner implements Iterator, Closeable { } /** - * Returns the IOException last thrown by this - * Scanner's underlying Readable. This method - * returns null if no such exception exists. + * Returns the {@code IOException} last thrown by this + * {@code Scanner}'s underlying {@code Readable}. This method + * returns {@code null} if no such exception exists. * * @return the last exception thrown by this scanner's readable */ @@ -1112,7 +1112,7 @@ public final class Scanner implements Iterator, Closeable { } /** - * Returns the Pattern this Scanner is currently + * Returns the {@code Pattern} this {@code Scanner} is currently * using to match delimiters. * * @return this scanner's delimiting pattern. @@ -1134,11 +1134,11 @@ public final class Scanner implements Iterator, Closeable { /** * Sets this scanner's delimiting pattern to a pattern constructed from - * the specified String. + * the specified {@code String}. * *

    An invocation of this method of the form - * useDelimiter(pattern) behaves in exactly the same way as the - * invocation useDelimiter(Pattern.compile(pattern)). + * {@code useDelimiter(pattern)} behaves in exactly the same way as the + * invocation {@code useDelimiter(Pattern.compile(pattern))}. * *

    Invoking the {@link #reset} method will set the scanner's delimiter * to the default. @@ -1236,12 +1236,12 @@ public final class Scanner implements Iterator, Closeable { * number matching regular expressions; see * localized numbers above. * - *

    If the radix is less than Character.MIN_RADIX - * or greater than Character.MAX_RADIX, then an - * IllegalArgumentException is thrown. + *

    If the radix is less than {@code Character.MIN_RADIX} + * or greater than {@code Character.MAX_RADIX}, then an + * {@code IllegalArgumentException} is thrown. * *

    Invoking the {@link #reset} method will set the scanner's radix to - * 10. + * {@code 10}. * * @param radix The radix to use when scanning numbers * @return this scanner @@ -1271,15 +1271,15 @@ public final class Scanner implements Iterator, Closeable { /** * Returns the match result of the last scanning operation performed - * by this scanner. This method throws IllegalStateException + * by this scanner. This method throws {@code IllegalStateException} * if no match has been performed, or if the last match was * not successful. * - *

    The various nextmethods of Scanner + *

    The various {@code next}methods of {@code Scanner} * make a match result available if they complete without throwing an * exception. For instance, after an invocation of the {@link #nextInt} * method that returned an int, this method returns a - * MatchResult for the search of the + * {@code MatchResult} for the search of the * Integer regular expression * defined above. Similarly the {@link #findInLine}, * {@link #findWithinHorizon}, and {@link #skip} methods will make a @@ -1295,8 +1295,8 @@ public final class Scanner implements Iterator, Closeable { } /** - *

    Returns the string representation of this Scanner. The - * string representation of a Scanner contains information + *

    Returns the string representation of this {@code Scanner}. The + * string representation of a {@code Scanner} contains information * that may be useful for debugging. The exact format is unspecified. * * @return The string representation of this scanner @@ -1347,7 +1347,7 @@ public final class Scanner implements Iterator, Closeable { * A complete token is preceded and followed by input that matches * the delimiter pattern. This method may block while waiting for input * to scan, even if a previous invocation of {@link #hasNext} returned - * true. + * {@code true}. * * @return the next token * @throws NoSuchElementException if no more tokens are available @@ -1374,7 +1374,7 @@ public final class Scanner implements Iterator, Closeable { /** * The remove operation is not supported by this implementation of - * Iterator. + * {@code Iterator}. * * @throws UnsupportedOperationException if this method is invoked. * @see java.util.Iterator @@ -1387,9 +1387,9 @@ public final class Scanner implements Iterator, Closeable { * Returns true if the next token matches the pattern constructed from the * specified string. The scanner does not advance past any input. * - *

    An invocation of this method of the form hasNext(pattern) + *

    An invocation of this method of the form {@code hasNext(pattern)} * behaves in exactly the same way as the invocation - * hasNext(Pattern.compile(pattern)). + * {@code hasNext(Pattern.compile(pattern))}. * * @param pattern a string specifying the pattern to scan * @return true if and only if this scanner has another token matching @@ -1405,9 +1405,9 @@ public final class Scanner implements Iterator, Closeable { * specified string. If the match is successful, the scanner advances * past the input that matched the pattern. * - *

    An invocation of this method of the form next(pattern) + *

    An invocation of this method of the form {@code next(pattern)} * behaves in exactly the same way as the invocation - * next(Pattern.compile(pattern)). + * {@code next(Pattern.compile(pattern))}. * * @param pattern a string specifying the pattern to scan * @return the next token @@ -1452,7 +1452,7 @@ public final class Scanner implements Iterator, Closeable { /** * Returns the next token if it matches the specified pattern. This * method may block while waiting for input to scan, even if a previous - * invocation of {@link #hasNext(Pattern)} returned true. + * invocation of {@link #hasNext(Pattern)} returned {@code true}. * If the match is successful, the scanner advances past the input that * matched the pattern. * @@ -1554,9 +1554,9 @@ public final class Scanner implements Iterator, Closeable { * Attempts to find the next occurrence of a pattern constructed from the * specified string, ignoring delimiters. * - *

    An invocation of this method of the form findInLine(pattern) + *

    An invocation of this method of the form {@code findInLine(pattern)} * behaves in exactly the same way as the invocation - * findInLine(Pattern.compile(pattern)). + * {@code findInLine(Pattern.compile(pattern))}. * * @param pattern a string specifying the pattern to search for * @return the text that matched the specified pattern @@ -1572,7 +1572,7 @@ public final class Scanner implements Iterator, Closeable { * scanner advances past the input that matched and returns the string that * matched the pattern. * If no such pattern is detected in the input up to the next line - * separator, then null is returned and the scanner's + * separator, then {@code null} is returned and the scanner's * position is unchanged. This method may block waiting for input that * matches the pattern. * @@ -1621,9 +1621,9 @@ public final class Scanner implements Iterator, Closeable { * specified string, ignoring delimiters. * *

    An invocation of this method of the form - * findWithinHorizon(pattern) behaves in exactly the same way as + * {@code findWithinHorizon(pattern)} behaves in exactly the same way as * the invocation - * findWithinHorizon(Pattern.compile(pattern, horizon)). + * {@code findWithinHorizon(Pattern.compile(pattern, horizon))}. * * @param pattern a string specifying the pattern to search for * @param horizon the search horizon @@ -1645,14 +1645,14 @@ public final class Scanner implements Iterator, Closeable { * null is returned and the scanner's position remains unchanged. This * method may block waiting for input that matches the pattern. * - *

    A scanner will never search more than horizon code + *

    A scanner will never search more than {@code horizon} code * points beyond its current position. Note that a match may be clipped * by the horizon; that is, an arbitrary match result may have been * different if the horizon had been larger. The scanner treats the * horizon as a transparent, non-anchoring bound (see {@link * Matcher#useTransparentBounds} and {@link Matcher#useAnchoringBounds}). * - *

    If horizon is 0, then the horizon is ignored and + *

    If horizon is {@code 0}, then the horizon is ignored and * this method continues to search through the input looking for the * specified pattern without bound. In this case it may buffer all of * the input searching for the pattern. @@ -1696,7 +1696,7 @@ public final class Scanner implements Iterator, Closeable { * *

    If a match to the specified pattern is not found at the * current position, then no input is skipped and a - * NoSuchElementException is thrown. + * {@code NoSuchElementException} is thrown. * *

    Since this method seeks to match the specified pattern starting at * the scanner's current position, patterns that can match a lot of @@ -1704,8 +1704,8 @@ public final class Scanner implements Iterator, Closeable { * amount of input. * *

    Note that it is possible to skip something without risking a - * NoSuchElementException by using a pattern that can - * match nothing, e.g., sc.skip("[ \t]*"). + * {@code NoSuchElementException} by using a pattern that can + * match nothing, e.g., {@code sc.skip("[ \t]*")}. * * @param pattern a string specifying the pattern to skip over * @return this scanner @@ -1737,9 +1737,9 @@ public final class Scanner implements Iterator, Closeable { * Skips input that matches a pattern constructed from the specified * string. * - *

    An invocation of this method of the form skip(pattern) + *

    An invocation of this method of the form {@code skip(pattern)} * behaves in exactly the same way as the invocation - * skip(Pattern.compile(pattern)). + * {@code skip(Pattern.compile(pattern))}. * * @param pattern a string specifying the pattern to skip over * @return this scanner @@ -1767,7 +1767,7 @@ public final class Scanner implements Iterator, Closeable { /** * Scans the next token of the input into a boolean value and returns - * that value. This method will throw InputMismatchException + * that value. This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid boolean value. * If the match is successful, the scanner advances past the input that * matched. @@ -1822,14 +1822,14 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a byte. + * Scans the next token of the input as a {@code byte}. * *

    An invocation of this method of the form - * nextByte() behaves in exactly the same way as the - * invocation nextByte(radix), where radix + * {@code nextByte()} behaves in exactly the same way as the + * invocation {@code nextByte(radix)}, where {@code radix} * is the default radix of this scanner. * - * @return the byte scanned from the input + * @return the {@code byte} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -1841,15 +1841,15 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a byte. - * This method will throw InputMismatchException + * Scans the next token of the input as a {@code byte}. + * This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid byte value as * described below. If the translation is successful, the scanner advances * past the input that matched. * *

    If the next token matches the Integer regular expression defined - * above then the token is converted into a byte value as if by + * above then the token is converted into a {@code byte} value as if by * removing all locale specific prefixes, group separators, and locale * specific suffixes, then mapping non-ASCII digits into ASCII * digits via {@link Character#digit Character.digit}, prepending a @@ -1859,7 +1859,7 @@ public final class Scanner implements Iterator, Closeable { * specified radix. * * @param radix the radix used to interpret the token as a byte value - * @return the byte scanned from the input + * @return the {@code byte} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -1928,14 +1928,14 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a short. + * Scans the next token of the input as a {@code short}. * *

    An invocation of this method of the form - * nextShort() behaves in exactly the same way as the - * invocation nextShort(radix), where radix + * {@code nextShort()} behaves in exactly the same way as the + * invocation {@code nextShort(radix)}, where {@code radix} * is the default radix of this scanner. * - * @return the short scanned from the input + * @return the {@code short} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -1947,15 +1947,15 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a short. - * This method will throw InputMismatchException + * Scans the next token of the input as a {@code short}. + * This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid short value as * described below. If the translation is successful, the scanner advances * past the input that matched. * *

    If the next token matches the Integer regular expression defined - * above then the token is converted into a short value as if by + * above then the token is converted into a {@code short} value as if by * removing all locale specific prefixes, group separators, and locale * specific suffixes, then mapping non-ASCII digits into ASCII * digits via {@link Character#digit Character.digit}, prepending a @@ -1965,7 +1965,7 @@ public final class Scanner implements Iterator, Closeable { * specified radix. * * @param radix the radix used to interpret the token as a short value - * @return the short scanned from the input + * @return the {@code short} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2058,14 +2058,14 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as an int. + * Scans the next token of the input as an {@code int}. * *

    An invocation of this method of the form - * nextInt() behaves in exactly the same way as the - * invocation nextInt(radix), where radix + * {@code nextInt()} behaves in exactly the same way as the + * invocation {@code nextInt(radix)}, where {@code radix} * is the default radix of this scanner. * - * @return the int scanned from the input + * @return the {@code int} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2077,15 +2077,15 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as an int. - * This method will throw InputMismatchException + * Scans the next token of the input as an {@code int}. + * This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid int value as * described below. If the translation is successful, the scanner advances * past the input that matched. * *

    If the next token matches the Integer regular expression defined - * above then the token is converted into an int value as if by + * above then the token is converted into an {@code int} value as if by * removing all locale specific prefixes, group separators, and locale * specific suffixes, then mapping non-ASCII digits into ASCII * digits via {@link Character#digit Character.digit}, prepending a @@ -2095,7 +2095,7 @@ public final class Scanner implements Iterator, Closeable { * specified radix. * * @param radix the radix used to interpret the token as an int value - * @return the int scanned from the input + * @return the {@code int} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2164,14 +2164,14 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a long. + * Scans the next token of the input as a {@code long}. * *

    An invocation of this method of the form - * nextLong() behaves in exactly the same way as the - * invocation nextLong(radix), where radix + * {@code nextLong()} behaves in exactly the same way as the + * invocation {@code nextLong(radix)}, where {@code radix} * is the default radix of this scanner. * - * @return the long scanned from the input + * @return the {@code long} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2183,15 +2183,15 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a long. - * This method will throw InputMismatchException + * Scans the next token of the input as a {@code long}. + * This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid long value as * described below. If the translation is successful, the scanner advances * past the input that matched. * *

    If the next token matches the Integer regular expression defined - * above then the token is converted into a long value as if by + * above then the token is converted into a {@code long} value as if by * removing all locale specific prefixes, group separators, and locale * specific suffixes, then mapping non-ASCII digits into ASCII * digits via {@link Character#digit Character.digit}, prepending a @@ -2201,7 +2201,7 @@ public final class Scanner implements Iterator, Closeable { * specified radix. * * @param radix the radix used to interpret the token as an int value - * @return the long scanned from the input + * @return the {@code long} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2306,15 +2306,15 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a float. - * This method will throw InputMismatchException + * Scans the next token of the input as a {@code float}. + * This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid float value as * described below. If the translation is successful, the scanner advances * past the input that matched. * *

    If the next token matches the Float regular expression defined above - * then the token is converted into a float value as if by + * then the token is converted into a {@code float} value as if by * removing all locale specific prefixes, group separators, and locale * specific suffixes, then mapping non-ASCII digits into ASCII * digits via {@link Character#digit Character.digit}, prepending a @@ -2325,7 +2325,7 @@ public final class Scanner implements Iterator, Closeable { * is passed to {@link Float#parseFloat(String) Float.parseFloat} as * appropriate. * - * @return the float scanned from the input + * @return the {@code float} scanned from the input * @throws InputMismatchException * if the next token does not match the Float * regular expression, or is out of range @@ -2373,15 +2373,15 @@ public final class Scanner implements Iterator, Closeable { } /** - * Scans the next token of the input as a double. - * This method will throw InputMismatchException + * Scans the next token of the input as a {@code double}. + * This method will throw {@code InputMismatchException} * if the next token cannot be translated into a valid double value. * If the translation is successful, the scanner advances past the input * that matched. * *

    If the next token matches the Float regular expression defined above - * then the token is converted into a double value as if by + * then the token is converted into a {@code double} value as if by * removing all locale specific prefixes, group separators, and locale * specific suffixes, then mapping non-ASCII digits into ASCII * digits via {@link Character#digit Character.digit}, prepending a @@ -2392,7 +2392,7 @@ public final class Scanner implements Iterator, Closeable { * is passed to {@link Double#parseDouble(String) Double.parseDouble} as * appropriate. * - * @return the double scanned from the input + * @return the {@code double} scanned from the input * @throws InputMismatchException * if the next token does not match the Float * regular expression, or is out of range @@ -2421,12 +2421,12 @@ public final class Scanner implements Iterator, Closeable { /** * Returns true if the next token in this scanner's input can be - * interpreted as a BigInteger in the default radix using the + * interpreted as a {@code BigInteger} in the default radix using the * {@link #nextBigInteger} method. The scanner does not advance past any * input. * * @return true if and only if this scanner's next token is a valid - * BigInteger + * {@code BigInteger} * @throws IllegalStateException if this scanner is closed */ public boolean hasNextBigInteger() { @@ -2435,13 +2435,13 @@ public final class Scanner implements Iterator, Closeable { /** * Returns true if the next token in this scanner's input can be - * interpreted as a BigInteger in the specified radix using + * interpreted as a {@code BigInteger} in the specified radix using * the {@link #nextBigInteger} method. The scanner does not advance past * any input. * * @param radix the radix used to interpret the token as an integer * @return true if and only if this scanner's next token is a valid - * BigInteger + * {@code BigInteger} * @throws IllegalStateException if this scanner is closed */ public boolean hasNextBigInteger(int radix) { @@ -2465,11 +2465,11 @@ public final class Scanner implements Iterator, Closeable { * BigInteger}. * *

    An invocation of this method of the form - * nextBigInteger() behaves in exactly the same way as the - * invocation nextBigInteger(radix), where radix + * {@code nextBigInteger()} behaves in exactly the same way as the + * invocation {@code nextBigInteger(radix)}, where {@code radix} * is the default radix of this scanner. * - * @return the BigInteger scanned from the input + * @return the {@code BigInteger} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2486,7 +2486,7 @@ public final class Scanner implements Iterator, Closeable { * *

    If the next token matches the Integer regular expression defined - * above then the token is converted into a BigInteger value as if + * above then the token is converted into a {@code BigInteger} value as if * by removing all group separators, mapping non-ASCII digits into ASCII * digits via the {@link Character#digit Character.digit}, and passing the * resulting string to the {@link @@ -2494,7 +2494,7 @@ public final class Scanner implements Iterator, Closeable { * BigInteger(String, int)} constructor with the specified radix. * * @param radix the radix used to interpret the token - * @return the BigInteger scanned from the input + * @return the {@code BigInteger} scanned from the input * @throws InputMismatchException * if the next token does not match the Integer * regular expression, or is out of range @@ -2525,12 +2525,12 @@ public final class Scanner implements Iterator, Closeable { /** * Returns true if the next token in this scanner's input can be - * interpreted as a BigDecimal using the + * interpreted as a {@code BigDecimal} using the * {@link #nextBigDecimal} method. The scanner does not advance past any * input. * * @return true if and only if this scanner's next token is a valid - * BigDecimal + * {@code BigDecimal} * @throws IllegalStateException if this scanner is closed */ public boolean hasNextBigDecimal() { @@ -2553,14 +2553,14 @@ public final class Scanner implements Iterator, Closeable { * *

    If the next token matches the Decimal regular expression defined - * above then the token is converted into a BigDecimal value as if + * above then the token is converted into a {@code BigDecimal} value as if * by removing all group separators, mapping non-ASCII digits into ASCII * digits via the {@link Character#digit Character.digit}, and passing the * resulting string to the {@link * java.math.BigDecimal#BigDecimal(java.lang.String) BigDecimal(String)} * constructor. * - * @return the BigDecimal scanned from the input + * @return the {@code BigDecimal} scanned from the input * @throws InputMismatchException * if the next token does not match the Decimal * regular expression, or is out of range @@ -2594,7 +2594,7 @@ public final class Scanner implements Iterator, Closeable { * #useDelimiter}, {@link #useLocale}, or {@link #useRadix}. * *

    An invocation of this method of the form - * scanner.reset() behaves in exactly the same way as the + * {@code scanner.reset()} behaves in exactly the same way as the * invocation * *

    {@code
    diff --git a/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java b/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java
    index e0335f676fe..42db72d2d48 100644
    --- a/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java
    +++ b/jdk/src/java.base/share/classes/java/util/ServiceConfigurationError.java
    @@ -65,7 +65,7 @@ public class ServiceConfigurationError
         /**
          * Constructs a new instance with the specified message.
          *
    -     * @param  msg  The message, or null if there is no message
    +     * @param  msg  The message, or {@code null} if there is no message
          *
          */
         public ServiceConfigurationError(String msg) {
    @@ -75,9 +75,9 @@ public class ServiceConfigurationError
         /**
          * Constructs a new instance with the specified message and cause.
          *
    -     * @param  msg  The message, or null if there is no message
    +     * @param  msg  The message, or {@code null} if there is no message
          *
    -     * @param  cause  The cause, or null if the cause is nonexistent
    +     * @param  cause  The cause, or {@code null} if the cause is nonexistent
          *                or unknown
          */
         public ServiceConfigurationError(String msg, Throwable cause) {
    diff --git a/jdk/src/java.base/share/classes/java/util/Set.java b/jdk/src/java.base/share/classes/java/util/Set.java
    index 2703049b30d..93d008c20f1 100644
    --- a/jdk/src/java.base/share/classes/java/util/Set.java
    +++ b/jdk/src/java.base/share/classes/java/util/Set.java
    @@ -27,16 +27,16 @@ package java.util;
     
     /**
      * A collection that contains no duplicate elements.  More formally, sets
    - * contain no pair of elements e1 and e2 such that
    - * e1.equals(e2), and at most one null element.  As implied by
    + * contain no pair of elements {@code e1} and {@code e2} such that
    + * {@code e1.equals(e2)}, and at most one null element.  As implied by
      * its name, this interface models the mathematical set abstraction.
      *
    - * 

    The Set interface places additional stipulations, beyond those - * inherited from the Collection interface, on the contracts of all - * constructors and on the contracts of the add, equals and - * hashCode methods. Declarations for other inherited methods are + *

    The {@code Set} interface places additional stipulations, beyond those + * inherited from the {@code Collection} interface, on the contracts of all + * constructors and on the contracts of the {@code add}, {@code equals} and + * {@code hashCode} methods. Declarations for other inherited methods are * also included here for convenience. (The specifications accompanying these - * declarations have been tailored to the Set interface, but they do + * declarations have been tailored to the {@code Set} interface, but they do * not contain any additional stipulations.) * *

    The additional stipulation on constructors is, not surprisingly, @@ -45,7 +45,7 @@ package java.util; * *

    Note: Great care must be exercised if mutable objects are used as set * elements. The behavior of a set is not specified if the value of an object - * is changed in a manner that affects equals comparisons while the + * is changed in a manner that affects {@code equals} comparisons while the * object is an element in the set. A special case of this prohibition is * that it is not permissible for a set to contain itself as an element. * @@ -53,7 +53,7 @@ package java.util; * they may contain. For example, some implementations prohibit null elements, * and some have restrictions on the types of their elements. Attempting to * add an ineligible element throws an unchecked exception, typically - * NullPointerException or ClassCastException. Attempting + * {@code NullPointerException} or {@code ClassCastException}. Attempting * to query the presence of an ineligible element may throw an exception, * or it may simply return false; some implementations will exhibit the former * behavior and some will exhibit the latter. More generally, attempting an @@ -87,28 +87,28 @@ public interface Set extends Collection { /** * Returns the number of elements in this set (its cardinality). If this - * set contains more than Integer.MAX_VALUE elements, returns - * Integer.MAX_VALUE. + * set contains more than {@code Integer.MAX_VALUE} elements, returns + * {@code Integer.MAX_VALUE}. * * @return the number of elements in this set (its cardinality) */ int size(); /** - * Returns true if this set contains no elements. + * Returns {@code true} if this set contains no elements. * - * @return true if this set contains no elements + * @return {@code true} if this set contains no elements */ boolean isEmpty(); /** - * Returns true if this set contains the specified element. - * More formally, returns true if and only if this set - * contains an element e such that - * (o==null ? e==null : o.equals(e)). + * Returns {@code true} if this set contains the specified element. + * More formally, returns {@code true} if and only if this set + * contains an element {@code e} such that + * {@code Objects.equals(o, e)}. * * @param o element whose presence in this set is to be tested - * @return true if this set contains the specified element + * @return {@code true} if this set contains the specified element * @throws ClassCastException if the type of the specified element * is incompatible with this set * (optional) @@ -155,7 +155,7 @@ public interface Set extends Collection { *

    If this set fits in the specified array with room to spare * (i.e., the array has more elements than this set), the element in * the array immediately following the end of the set is set to - * null. (This is useful in determining the length of this + * {@code null}. (This is useful in determining the length of this * set only if the caller knows that this set does not contain * any null elements.) * @@ -168,15 +168,15 @@ public interface Set extends Collection { * precise control over the runtime type of the output array, and may, * under certain circumstances, be used to save allocation costs. * - *

    Suppose x is a set known to contain only strings. + *

    Suppose {@code x} is a set known to contain only strings. * The following code can be used to dump the set into a newly allocated - * array of String: + * array of {@code String}: * *

          *     String[] y = x.toArray(new String[0]);
    * - * Note that toArray(new Object[0]) is identical in function to - * toArray(). + * Note that {@code toArray(new Object[0])} is identical in function to + * {@code toArray()}. * * @param a the array into which the elements of this set are to be * stored, if it is big enough; otherwise, a new array of the same @@ -195,25 +195,25 @@ public interface Set extends Collection { /** * Adds the specified element to this set if it is not already present * (optional operation). More formally, adds the specified element - * e to this set if the set contains no element e2 + * {@code e} to this set if the set contains no element {@code e2} * such that - * (e==null ? e2==null : e.equals(e2)). + * {@code Objects.equals(e, e2)}. * If this set already contains the element, the call leaves the set - * unchanged and returns false. In combination with the + * unchanged and returns {@code false}. In combination with the * restriction on constructors, this ensures that sets never contain * duplicate elements. * *

    The stipulation above does not imply that sets must accept all * elements; sets may refuse to add any particular element, including - * null, and throw an exception, as described in the + * {@code null}, and throw an exception, as described in the * specification for {@link Collection#add Collection.add}. * Individual set implementations should clearly document any * restrictions on the elements that they may contain. * * @param e element to be added to this set - * @return true if this set did not already contain the specified + * @return {@code true} if this set did not already contain the specified * element - * @throws UnsupportedOperationException if the add operation + * @throws UnsupportedOperationException if the {@code add} operation * is not supported by this set * @throws ClassCastException if the class of the specified element * prevents it from being added to this set @@ -227,23 +227,23 @@ public interface Set extends Collection { /** * Removes the specified element from this set if it is present - * (optional operation). More formally, removes an element e + * (optional operation). More formally, removes an element {@code e} * such that - * (o==null ? e==null : o.equals(e)), if - * this set contains such an element. Returns true if this set + * {@code Objects.equals(o, e)}, if + * this set contains such an element. Returns {@code true} if this set * contained the element (or equivalently, if this set changed as a * result of the call). (This set will not contain the element once the * call returns.) * * @param o object to be removed from this set, if present - * @return true if this set contained the specified element + * @return {@code true} if this set contained the specified element * @throws ClassCastException if the type of the specified element * is incompatible with this set * (optional) * @throws NullPointerException if the specified element is null and this * set does not permit null elements * (optional) - * @throws UnsupportedOperationException if the remove operation + * @throws UnsupportedOperationException if the {@code remove} operation * is not supported by this set */ boolean remove(Object o); @@ -252,12 +252,12 @@ public interface Set extends Collection { // Bulk Operations /** - * Returns true if this set contains all of the elements of the + * Returns {@code true} if this set contains all of the elements of the * specified collection. If the specified collection is also a set, this - * method returns true if it is a subset of this set. + * method returns {@code true} if it is a subset of this set. * * @param c collection to be checked for containment in this set - * @return true if this set contains all of the elements of the + * @return {@code true} if this set contains all of the elements of the * specified collection * @throws ClassCastException if the types of one or more elements * in the specified collection are incompatible with this @@ -275,15 +275,15 @@ public interface Set extends Collection { /** * Adds all of the elements in the specified collection to this set if * they're not already present (optional operation). If the specified - * collection is also a set, the addAll operation effectively + * collection is also a set, the {@code addAll} operation effectively * modifies this set so that its value is the union of the two * sets. The behavior of this operation is undefined if the specified * collection is modified while the operation is in progress. * * @param c collection containing elements to be added to this set - * @return true if this set changed as a result of the call + * @return {@code true} if this set changed as a result of the call * - * @throws UnsupportedOperationException if the addAll operation + * @throws UnsupportedOperationException if the {@code addAll} operation * is not supported by this set * @throws ClassCastException if the class of an element of the * specified collection prevents it from being added to this set @@ -305,8 +305,8 @@ public interface Set extends Collection { * intersection of the two sets. * * @param c collection containing elements to be retained in this set - * @return true if this set changed as a result of the call - * @throws UnsupportedOperationException if the retainAll operation + * @return {@code true} if this set changed as a result of the call + * @throws UnsupportedOperationException if the {@code retainAll} operation * is not supported by this set * @throws ClassCastException if the class of an element of this set * is incompatible with the specified collection @@ -327,8 +327,8 @@ public interface Set extends Collection { * the two sets. * * @param c collection containing elements to be removed from this set - * @return true if this set changed as a result of the call - * @throws UnsupportedOperationException if the removeAll 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 @@ -346,7 +346,7 @@ public interface Set extends Collection { * Removes all of the elements from this set (optional operation). * The set will be empty after this call returns. * - * @throws UnsupportedOperationException if the clear method + * @throws UnsupportedOperationException if the {@code clear} method * is not supported by this set */ void clear(); @@ -356,7 +356,7 @@ public interface Set extends Collection { /** * Compares the specified object with this set for equality. Returns - * true if the specified object is also a set, the two sets + * {@code true} if the specified object is also a set, the two sets * have the same size, and every member of the specified set is * contained in this set (or equivalently, every member of this set is * contained in the specified set). This definition ensures that the @@ -364,17 +364,17 @@ public interface Set extends Collection { * set interface. * * @param o object to be compared for equality with this set - * @return true if the specified object is equal to this set + * @return {@code true} if the specified object is equal to this set */ boolean equals(Object o); /** * 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 null element is defined to be zero. - * This ensures that s1.equals(s2) implies that - * s1.hashCode()==s2.hashCode() for any two sets s1 - * and s2, 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}. * * @return the hash code value for this set diff --git a/jdk/src/java.base/share/classes/java/util/SortedSet.java b/jdk/src/java.base/share/classes/java/util/SortedSet.java index 3ea932949a3..5eb7f76117d 100644 --- a/jdk/src/java.base/share/classes/java/util/SortedSet.java +++ b/jdk/src/java.base/share/classes/java/util/SortedSet.java @@ -34,38 +34,38 @@ package java.util; * to take advantage of the ordering. (This interface is the set * analogue of {@link SortedMap}.) * - *

    All elements inserted into a sorted set must implement the Comparable + *

    All elements inserted into a sorted set must implement the {@code Comparable} * interface (or be accepted by the specified comparator). Furthermore, all - * such elements must be mutually comparable: e1.compareTo(e2) - * (or comparator.compare(e1, e2)) must not throw a - * ClassCastException for any elements e1 and e2 in + * such elements must be mutually comparable: {@code e1.compareTo(e2)} + * (or {@code comparator.compare(e1, e2)}) must not throw a + * {@code ClassCastException} for any elements {@code e1} and {@code e2} in * the sorted set. Attempts to violate this restriction will cause the * offending method or constructor invocation to throw a - * ClassCastException. + * {@code ClassCastException}. * *

    Note that the ordering maintained by a sorted set (whether or not an * explicit comparator is provided) must be consistent with equals if - * the sorted set is to correctly implement the Set interface. (See - * the Comparable interface or Comparator interface for a + * the sorted set is to correctly implement the {@code Set} interface. (See + * the {@code Comparable} interface or {@code Comparator} interface for a * precise definition of consistent with equals.) This is so because - * the Set interface is defined in terms of the equals + * the {@code Set} interface is defined in terms of the {@code equals} * operation, but a sorted set performs all element comparisons using its - * compareTo (or compare) method, so two elements that are + * {@code compareTo} (or {@code compare}) method, so two elements that are * deemed equal by this method are, from the standpoint of the sorted set, * equal. The behavior of a sorted set is well-defined even if its * ordering is inconsistent with equals; it just fails to obey the general - * contract of the Set interface. + * contract of the {@code Set} interface. * *

    All general-purpose sorted set implementation classes should * provide four "standard" constructors: 1) A void (no arguments) * constructor, which creates an empty sorted set sorted according to * the natural ordering of its elements. 2) A constructor with a - * single argument of type Comparator, which creates an empty + * single argument of type {@code Comparator}, which creates an empty * sorted set sorted according to the specified comparator. 3) A - * constructor with a single argument of type Collection, + * constructor with a single argument of type {@code Collection}, * which creates a new sorted set with the same elements as its * argument, sorted according to the natural ordering of the elements. - * 4) A constructor with a single argument of type SortedSet, + * 4) A constructor with a single argument of type {@code SortedSet}, * which creates a new sorted set with the same elements and the same * ordering as the input sorted set. There is no way to enforce this * recommendation, as interfaces cannot contain constructors. @@ -75,17 +75,17 @@ package java.util; * endpoint but not their high endpoint (where applicable). * If you need a closed range (which includes both endpoints), and * the element type allows for calculation of the successor of a given - * value, merely request the subrange from lowEndpoint to - * successor(highEndpoint). For example, suppose that s + * value, merely request the subrange from {@code lowEndpoint} to + * {@code successor(highEndpoint)}. For example, suppose that {@code s} * is a sorted set of strings. The following idiom obtains a view - * containing all of the strings in s from low to - * high, inclusive:

    + * containing all of the strings in {@code s} from {@code low} to
    + * {@code high}, inclusive:
      *   SortedSet<String> sub = s.subSet(low, high+"\0");
    * * A similar technique can be used to generate an open range (which * contains neither endpoint). The following idiom obtains a view - * containing all of the Strings in s from low to - * high, exclusive:
    + * containing all of the Strings in {@code s} from {@code low} to
    + * {@code high}, exclusive:
      *   SortedSet<String> sub = s.subSet(low+"\0", high);
    * *

    This interface is a member of the @@ -108,98 +108,98 @@ package java.util; public interface SortedSet extends Set { /** * Returns the comparator used to order the elements in this set, - * or null if this set uses the {@linkplain Comparable + * or {@code null} if this set uses the {@linkplain Comparable * natural ordering} of its elements. * * @return the comparator used to order the elements in this set, - * or null if this set uses the natural ordering + * or {@code null} if this set uses the natural ordering * of its elements */ Comparator comparator(); /** * Returns a view of the portion of this set whose elements range - * from fromElement, inclusive, to toElement, - * exclusive. (If fromElement and toElement are + * from {@code fromElement}, inclusive, to {@code toElement}, + * exclusive. (If {@code fromElement} and {@code toElement} are * equal, the returned set is empty.) The returned set is backed * by this set, so changes in the returned set are reflected in * this set, and vice-versa. The returned set supports all * optional set operations that this set supports. * - *

    The returned set will throw an IllegalArgumentException + *

    The returned set will throw an {@code IllegalArgumentException} * on an attempt to insert an element outside its range. * * @param fromElement low endpoint (inclusive) of the returned set * @param toElement high endpoint (exclusive) of the returned set * @return a view of the portion of this set whose elements range from - * fromElement, inclusive, to toElement, exclusive - * @throws ClassCastException if fromElement and - * toElement cannot be compared to one another using this + * {@code fromElement}, inclusive, to {@code toElement}, exclusive + * @throws ClassCastException if {@code fromElement} and + * {@code toElement} cannot be compared to one another using this * set's comparator (or, if the set has no comparator, using * natural ordering). Implementations may, but are not required - * to, throw this exception if fromElement or - * toElement cannot be compared to elements currently in + * to, throw this exception if {@code fromElement} or + * {@code toElement} cannot be compared to elements currently in * the set. - * @throws NullPointerException if fromElement or - * toElement is null and this set does not permit null + * @throws NullPointerException if {@code fromElement} or + * {@code toElement} is null and this set does not permit null * elements - * @throws IllegalArgumentException if fromElement is - * greater than toElement; or if this set itself - * has a restricted range, and fromElement or - * toElement lies outside the bounds of the range + * @throws IllegalArgumentException if {@code fromElement} is + * greater than {@code toElement}; or if this set itself + * has a restricted range, and {@code fromElement} or + * {@code toElement} lies outside the bounds of the range */ SortedSet subSet(E fromElement, E toElement); /** * Returns a view of the portion of this set whose elements are - * strictly less than toElement. The returned set is + * strictly less than {@code toElement}. The returned set is * backed by this set, so changes in the returned set are * reflected in this set, and vice-versa. The returned set * supports all optional set operations that this set supports. * - *

    The returned set will throw an IllegalArgumentException + *

    The returned set will throw an {@code IllegalArgumentException} * on an attempt to insert an element outside its range. * * @param toElement high endpoint (exclusive) of the returned set * @return a view of the portion of this set whose elements are strictly - * less than toElement - * @throws ClassCastException if toElement is not compatible + * less than {@code toElement} + * @throws ClassCastException if {@code toElement} is not compatible * with this set's comparator (or, if the set has no comparator, - * if toElement does not implement {@link Comparable}). + * if {@code toElement} does not implement {@link Comparable}). * Implementations may, but are not required to, throw this - * exception if toElement cannot be compared to elements + * exception if {@code toElement} cannot be compared to elements * currently in the set. - * @throws NullPointerException if toElement is null and + * @throws NullPointerException if {@code toElement} is null and * this set does not permit null elements * @throws IllegalArgumentException if this set itself has a - * restricted range, and toElement lies outside the + * restricted range, and {@code toElement} lies outside the * bounds of the range */ SortedSet headSet(E toElement); /** * Returns a view of the portion of this set whose elements are - * greater than or equal to fromElement. The returned + * greater than or equal to {@code fromElement}. The returned * set is backed by this set, so changes in the returned set are * reflected in this set, and vice-versa. The returned set * supports all optional set operations that this set supports. * - *

    The returned set will throw an IllegalArgumentException + *

    The returned set will throw an {@code IllegalArgumentException} * on an attempt to insert an element outside its range. * * @param fromElement low endpoint (inclusive) of the returned set * @return a view of the portion of this set whose elements are greater - * than or equal to fromElement - * @throws ClassCastException if fromElement is not compatible + * than or equal to {@code fromElement} + * @throws ClassCastException if {@code fromElement} is not compatible * with this set's comparator (or, if the set has no comparator, - * if fromElement does not implement {@link Comparable}). + * if {@code fromElement} does not implement {@link Comparable}). * Implementations may, but are not required to, throw this - * exception if fromElement cannot be compared to elements + * exception if {@code fromElement} cannot be compared to elements * currently in the set. - * @throws NullPointerException if fromElement is null + * @throws NullPointerException if {@code fromElement} is null * and this set does not permit null elements * @throws IllegalArgumentException if this set itself has a - * restricted range, and fromElement lies outside the + * restricted range, and {@code fromElement} lies outside the * bounds of the range */ SortedSet tailSet(E fromElement); diff --git a/jdk/src/java.base/share/classes/java/util/Stack.java b/jdk/src/java.base/share/classes/java/util/Stack.java index 540ac2d3a7c..2573276372f 100644 --- a/jdk/src/java.base/share/classes/java/util/Stack.java +++ b/jdk/src/java.base/share/classes/java/util/Stack.java @@ -26,12 +26,12 @@ package java.util; /** - * The Stack class represents a last-in-first-out - * (LIFO) stack of objects. It extends class Vector with five + * The {@code Stack} class represents a last-in-first-out + * (LIFO) stack of objects. It extends class {@code Vector} with five * operations that allow a vector to be treated as a stack. The usual - * push and pop operations are provided, as well as a - * method to peek at the top item on the stack, a method to test - * for whether the stack is empty, and a method to search + * {@code push} and {@code pop} operations are provided, as well as a + * method to {@code peek} at the top item on the stack, a method to test + * for whether the stack is {@code empty}, and a method to {@code search} * the stack for an item and discover how far it is from the top. *

    * When a stack is first created, it contains no items. @@ -60,7 +60,7 @@ class Stack extends Vector { * addElement(item)

    * * @param item the item to be pushed onto this stack. - * @return the item argument. + * @return the {@code item} argument. * @see java.util.Vector#addElement */ public E push(E item) { @@ -74,7 +74,7 @@ class Stack extends Vector { * object as the value of this function. * * @return The object at the top of this stack (the last item - * of the Vector object). + * of the {@code Vector} object). * @throws EmptyStackException if this stack is empty. */ public synchronized E pop() { @@ -92,7 +92,7 @@ class Stack extends Vector { * from the stack. * * @return the object at the top of this stack (the last item - * of the Vector object). + * of the {@code Vector} object). * @throws EmptyStackException if this stack is empty. */ public synchronized E peek() { @@ -106,8 +106,8 @@ class Stack extends Vector { /** * Tests if this stack is empty. * - * @return true if and only if this stack contains - * no items; false otherwise. + * @return {@code true} if and only if this stack contains + * no items; {@code false} otherwise. */ public boolean empty() { return size() == 0; @@ -115,16 +115,16 @@ class Stack extends Vector { /** * Returns the 1-based position where an object is on this stack. - * If the object o occurs as an item in this stack, this + * If the object {@code o} occurs as an item in this stack, this * method returns the distance from the top of the stack of the * occurrence nearest the top of the stack; the topmost item on the - * stack is considered to be at distance 1. The equals - * method is used to compare o to the + * stack is considered to be at distance {@code 1}. The {@code equals} + * method is used to compare {@code o} to the * items in this stack. * * @param o the desired object. * @return the 1-based position from the top of the stack where - * the object is located; the return value -1 + * the object is located; the return value {@code -1} * indicates that the object is not on the stack. */ public synchronized int search(Object o) { diff --git a/jdk/src/java.base/share/classes/java/util/StringTokenizer.java b/jdk/src/java.base/share/classes/java/util/StringTokenizer.java index f9a4b467eb3..5d55ae01e33 100644 --- a/jdk/src/java.base/share/classes/java/util/StringTokenizer.java +++ b/jdk/src/java.base/share/classes/java/util/StringTokenizer.java @@ -30,32 +30,32 @@ import java.lang.*; /** * The string tokenizer class allows an application to break a * string into tokens. The tokenization method is much simpler than - * the one used by the StreamTokenizer class. The - * StringTokenizer methods do not distinguish among + * the one used by the {@code StreamTokenizer} class. The + * {@code StringTokenizer} methods do not distinguish among * identifiers, numbers, and quoted strings, nor do they recognize * and skip comments. *

    * The set of delimiters (the characters that separate tokens) may * be specified either at creation time or on a per-token basis. *

    - * An instance of StringTokenizer behaves in one of two + * An instance of {@code StringTokenizer} behaves in one of two * ways, depending on whether it was created with the - * returnDelims flag having the value true - * or false: + * {@code returnDelims} flag having the value {@code true} + * or {@code false}: *

      - *
    • If the flag is false, delimiter characters serve to + *
    • If the flag is {@code false}, delimiter characters serve to * separate tokens. A token is a maximal sequence of consecutive * characters that are not delimiters. - *
    • If the flag is true, delimiter characters are themselves + *
    • If the flag is {@code true}, delimiter characters are themselves * considered to be tokens. A token is thus either one delimiter * character, or a maximal sequence of consecutive characters that are * not delimiters. *

    - * A StringTokenizer object internally maintains a current + * A {@code StringTokenizer} object internally maintains a current * position within the string to be tokenized. Some operations advance this * current position past the characters processed.

    * A token is returned by taking a substring of the string that was used to - * create the StringTokenizer object. + * create the {@code StringTokenizer} object. *

    * The following is one example of the use of the tokenizer. The code: *

    @@ -74,12 +74,12 @@ import java.lang.*;
      * 
    * *

    - * StringTokenizer is a legacy class that is retained for + * {@code StringTokenizer} is a legacy class that is retained for * compatibility reasons although its use is discouraged in new code. It is - * recommended that anyone seeking this functionality use the split - * method of String or the java.util.regex package instead. + * recommended that anyone seeking this functionality use the {@code split} + * method of {@code String} or the java.util.regex package instead. *

    - * The following example illustrates how the String.split + * The following example illustrates how the {@code String.split} * method can be used to break up a string into its basic tokens: *

      *     String[] result = "this is a test".split("\\s");
    @@ -171,25 +171,25 @@ class StringTokenizer implements Enumeration {
     
         /**
          * Constructs a string tokenizer for the specified string. All
    -     * characters in the delim argument are the delimiters
    +     * characters in the {@code delim} argument are the delimiters
          * for separating tokens.
          * 

    - * If the returnDelims flag is true, then + * If the {@code returnDelims} flag is {@code true}, then * the delimiter characters are also returned as tokens. Each * delimiter is returned as a string of length one. If the flag is - * false, the delimiter characters are skipped and only + * {@code false}, the delimiter characters are skipped and only * serve as separators between tokens. *

    - * Note that if delim is null, this constructor does + * Note that if {@code delim} is {@code null}, this constructor does * not throw an exception. However, trying to invoke other methods on the - * resulting StringTokenizer may result in a - * NullPointerException. + * resulting {@code StringTokenizer} may result in a + * {@code NullPointerException}. * * @param str a string to be parsed. * @param delim the delimiters. * @param returnDelims flag indicating whether to return the delimiters * as tokens. - * @exception NullPointerException if str is null + * @exception NullPointerException if str is {@code null} */ public StringTokenizer(String str, String delim, boolean returnDelims) { currentPosition = 0; @@ -204,18 +204,18 @@ class StringTokenizer implements Enumeration { /** * Constructs a string tokenizer for the specified string. The - * characters in the delim argument are the delimiters + * characters in the {@code delim} argument are the delimiters * for separating tokens. Delimiter characters themselves will not * be treated as tokens. *

    - * Note that if delim is null, this constructor does + * Note that if {@code delim} is {@code null}, this constructor does * not throw an exception. However, trying to invoke other methods on the - * resulting StringTokenizer may result in a - * NullPointerException. + * resulting {@code StringTokenizer} may result in a + * {@code NullPointerException}. * * @param str a string to be parsed. * @param delim the delimiters. - * @exception NullPointerException if str is null + * @exception NullPointerException if str is {@code null} */ public StringTokenizer(String str, String delim) { this(str, delim, false); @@ -230,7 +230,7 @@ class StringTokenizer implements Enumeration { * not be treated as tokens. * * @param str a string to be parsed. - * @exception NullPointerException if str is null + * @exception NullPointerException if str is {@code null} */ public StringTokenizer(String str) { this(str, " \t\n\r\f", false); @@ -307,11 +307,11 @@ class StringTokenizer implements Enumeration { /** * Tests if there are more tokens available from this tokenizer's string. - * If this method returns true, then a subsequent call to - * nextToken with no argument will successfully return a token. + * If this method returns {@code true}, then a subsequent call to + * {@code nextToken} with no argument will successfully return a token. * - * @return true if and only if there is at least one token - * in the string after the current position; false + * @return {@code true} if and only if there is at least one token + * in the string after the current position; {@code false} * otherwise. */ public boolean hasMoreTokens() { @@ -355,8 +355,8 @@ class StringTokenizer implements Enumeration { /** * Returns the next token in this string tokenizer's string. First, * the set of characters considered to be delimiters by this - * StringTokenizer object is changed to be the characters in - * the string delim. Then the next token in the string + * {@code StringTokenizer} object is changed to be the characters in + * the string {@code delim}. Then the next token in the string * after the current position is returned. The current position is * advanced beyond the recognized token. The new delimiter set * remains the default after this call. @@ -365,7 +365,7 @@ class StringTokenizer implements Enumeration { * @return the next token, after switching to the new delimiter set. * @exception NoSuchElementException if there are no more tokens in this * tokenizer's string. - * @exception NullPointerException if delim is null + * @exception NullPointerException if delim is {@code null} */ public String nextToken(String delim) { delimiters = delim; @@ -378,12 +378,12 @@ class StringTokenizer implements Enumeration { } /** - * Returns the same value as the hasMoreTokens + * Returns the same value as the {@code hasMoreTokens} * method. It exists so that this class can implement the - * Enumeration interface. + * {@code Enumeration} interface. * - * @return true if there are more tokens; - * false otherwise. + * @return {@code true} if there are more tokens; + * {@code false} otherwise. * @see java.util.Enumeration * @see java.util.StringTokenizer#hasMoreTokens() */ @@ -392,10 +392,10 @@ class StringTokenizer implements Enumeration { } /** - * Returns the same value as the nextToken method, - * except that its declared return value is Object rather than - * String. It exists so that this class can implement the - * Enumeration interface. + * Returns the same value as the {@code nextToken} method, + * except that its declared return value is {@code Object} rather than + * {@code String}. It exists so that this class can implement the + * {@code Enumeration} interface. * * @return the next token in the string. * @exception NoSuchElementException if there are no more tokens in this @@ -409,7 +409,7 @@ class StringTokenizer implements Enumeration { /** * Calculates the number of times that this tokenizer's - * nextToken method can be called before it generates an + * {@code nextToken} method can be called before it generates an * exception. The current position is not advanced. * * @return the number of tokens remaining in the string using the current diff --git a/jdk/src/java.base/share/classes/java/util/Timer.java b/jdk/src/java.base/share/classes/java/util/Timer.java index df18d79a601..9310b0825e1 100644 --- a/jdk/src/java.base/share/classes/java/util/Timer.java +++ b/jdk/src/java.base/share/classes/java/util/Timer.java @@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicInteger; * background thread. Tasks may be scheduled for one-time execution, or for * repeated execution at regular intervals. * - *

    Corresponding to each Timer object is a single background + *

    Corresponding to each {@code Timer} object is a single background * thread that is used to execute all of the timer's tasks, sequentially. * Timer tasks should complete quickly. If a timer task takes excessive time * to complete, it "hogs" the timer's task execution thread. This can, in @@ -40,26 +40,26 @@ import java.util.concurrent.atomic.AtomicInteger; * execute in rapid succession when (and if) the offending task finally * completes. * - *

    After the last live reference to a Timer object goes away + *

    After the last live reference to a {@code Timer} object goes away * and all outstanding tasks have completed execution, the timer's task * execution thread terminates gracefully (and becomes subject to garbage * collection). However, this can take arbitrarily long to occur. By * default, the task execution thread does not run as a daemon thread, * so it is capable of keeping an application from terminating. If a caller * wants to terminate a timer's task execution thread rapidly, the caller - * should invoke the timer's cancel method. + * should invoke the timer's {@code cancel} method. * *

    If the timer's task execution thread terminates unexpectedly, for - * example, because its stop method is invoked, any further + * example, because its {@code stop} method is invoked, any further * attempt to schedule a task on the timer will result in an - * IllegalStateException, as if the timer's cancel + * {@code IllegalStateException}, as if the timer's {@code cancel} * method had been invoked. * *

    This class is thread-safe: multiple threads can share a single - * Timer object without the need for external synchronization. + * {@code Timer} object without the need for external synchronization. * *

    This class does not offer real-time guarantees: it schedules - * tasks using the Object.wait(long) method. + * tasks using the {@code Object.wait(long)} method. * *

    Java 5.0 introduced the {@code java.util.concurrent} package and * one of the concurrency utilities therein is the {@link @@ -181,8 +181,8 @@ public class Timer { * * @param task task to be scheduled. * @param delay delay in milliseconds before task is to be executed. - * @throws IllegalArgumentException if delay is negative, or - * delay + System.currentTimeMillis() is negative. + * @throws IllegalArgumentException if {@code delay} is negative, or + * {@code delay + System.currentTimeMillis()} is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} is null @@ -199,7 +199,7 @@ public class Timer { * * @param task task to be scheduled. * @param time time at which task is to be executed. - * @throws IllegalArgumentException if time.getTime() is negative. + * @throws IllegalArgumentException if {@code time.getTime()} is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} or {@code time} is null @@ -219,7 +219,7 @@ public class Timer { * background activity), subsequent executions will be delayed as well. * In the long run, the frequency of execution will generally be slightly * lower than the reciprocal of the specified period (assuming the system - * clock underlying Object.wait(long) is accurate). + * clock underlying {@code Object.wait(long)} is accurate). * *

    Fixed-delay execution is appropriate for recurring activities * that require "smoothness." In other words, it is appropriate for @@ -259,7 +259,7 @@ public class Timer { * background activity), subsequent executions will be delayed as well. * In the long run, the frequency of execution will generally be slightly * lower than the reciprocal of the specified period (assuming the system - * clock underlying Object.wait(long) is accurate). As a + * clock underlying {@code Object.wait(long)} is accurate). As a * consequence of the above, if the scheduled first time is in the past, * it is scheduled for immediate execution. * @@ -298,7 +298,7 @@ public class Timer { * activity), two or more executions will occur in rapid succession to * "catch up." In the long run, the frequency of execution will be * exactly the reciprocal of the specified period (assuming the system - * clock underlying Object.wait(long) is accurate). + * clock underlying {@code Object.wait(long)} is accurate). * *

    Fixed-rate execution is appropriate for recurring activities that * are sensitive to absolute time, such as ringing a chime every @@ -339,7 +339,7 @@ public class Timer { * activity), two or more executions will occur in rapid succession to * "catch up." In the long run, the frequency of execution will be * exactly the reciprocal of the specified period (assuming the system - * clock underlying Object.wait(long) is accurate). As a + * clock underlying {@code Object.wait(long)} is accurate). As a * consequence of the above, if the scheduled first time is in the past, * then any "missed" executions will be scheduled for immediate "catch up" * execution. @@ -378,7 +378,7 @@ public class Timer { * in Date.getTime() format. This method checks timer state, task state, * and initial execution time, but not period. * - * @throws IllegalArgumentException if time is negative. + * @throws IllegalArgumentException if {@code time} is negative. * @throws IllegalStateException if task was already scheduled or * cancelled, timer was cancelled, or timer thread terminated. * @throws NullPointerException if {@code task} is null diff --git a/jdk/src/java.base/share/classes/java/util/TimerTask.java b/jdk/src/java.base/share/classes/java/util/TimerTask.java index fe89656a9e4..6703cc0604e 100644 --- a/jdk/src/java.base/share/classes/java/util/TimerTask.java +++ b/jdk/src/java.base/share/classes/java/util/TimerTask.java @@ -102,7 +102,7 @@ public abstract class TimerTask implements Runnable { * will never run again. (If the task is running when this call occurs, * the task will run to completion, but will never run again.) * - *

    Note that calling this method from within the run method of + *

    Note that calling this method from within the {@code run} method of * a repeating timer task absolutely guarantees that the timer task will * not run again. * @@ -114,7 +114,7 @@ public abstract class TimerTask implements Runnable { * Returns false if the task was scheduled for one-time execution * and has already run, or if the task was never scheduled, or if * the task was already cancelled. (Loosely speaking, this method - * returns true if it prevents one or more scheduled + * returns {@code true} if it prevents one or more scheduled * executions from taking place.) */ public boolean cancel() { diff --git a/jdk/src/java.base/share/classes/java/util/TreeSet.java b/jdk/src/java.base/share/classes/java/util/TreeSet.java index f71a6164bcf..b80021e738e 100644 --- a/jdk/src/java.base/share/classes/java/util/TreeSet.java +++ b/jdk/src/java.base/share/classes/java/util/TreeSet.java @@ -220,7 +220,7 @@ public class TreeSet extends AbstractSet * Returns {@code true} if this set contains the specified element. * More formally, returns {@code true} if and only if this set * contains an element {@code e} such that - * (o==null ? e==null : o.equals(e)). + * {@code Objects.equals(o, e)}. * * @param o object to be checked for containment in this set * @return {@code true} if this set contains the specified element @@ -238,7 +238,7 @@ public class TreeSet extends AbstractSet * Adds the specified element to this set if it is not already present. * More formally, adds the specified element {@code e} to this set if * the set contains no element {@code e2} such that - * (e==null ? e2==null : e.equals(e2)). + * {@code Objects.equals(e, e2)}. * If this set already contains the element, the call leaves the set * unchanged and returns {@code false}. * @@ -258,7 +258,7 @@ public class TreeSet extends AbstractSet /** * Removes the specified element from this set if it is present. * More formally, removes an element {@code e} such that - * (o==null ? e==null : o.equals(e)), + * {@code Objects.equals(o, e)}, * if this set contains such an element. Returns {@code true} if * this set contained the element (or equivalently, if this set * changed as a result of the call). (This set will not contain the diff --git a/jdk/src/java.base/share/classes/java/util/UnknownFormatConversionException.java b/jdk/src/java.base/share/classes/java/util/UnknownFormatConversionException.java index 9ef964dc1c5..1278c6e678e 100644 --- a/jdk/src/java.base/share/classes/java/util/UnknownFormatConversionException.java +++ b/jdk/src/java.base/share/classes/java/util/UnknownFormatConversionException.java @@ -28,7 +28,7 @@ package java.util; /** * Unchecked exception thrown when an unknown conversion is given. * - *

    Unless otherwise specified, passing a null argument to + *

    Unless otherwise specified, passing a {@code null} argument to * any method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java b/jdk/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java index 764fe6d2347..8549566ce2c 100644 --- a/jdk/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java +++ b/jdk/src/java.base/share/classes/java/util/UnknownFormatFlagsException.java @@ -28,7 +28,7 @@ package java.util; /** * Unchecked exception thrown when an unknown flag is given. * - *

    Unless otherwise specified, passing a null argument to any + *

    Unless otherwise specified, passing a {@code null} argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * diff --git a/jdk/src/java.base/share/classes/java/util/Vector.java b/jdk/src/java.base/share/classes/java/util/Vector.java index 815a6469e73..6e833f7dd6a 100644 --- a/jdk/src/java.base/share/classes/java/util/Vector.java +++ b/jdk/src/java.base/share/classes/java/util/Vector.java @@ -365,7 +365,7 @@ public class Vector * Returns {@code true} if this vector contains the specified element. * More formally, returns {@code true} if and only if this vector * contains at least one element {@code e} such that - * (o==null ? e==null : o.equals(e)). + * {@code Objects.equals(o, e)}. * * @param o element whose presence in this vector is to be tested * @return {@code true} if this vector contains the specified element @@ -378,7 +378,7 @@ public class Vector * Returns the index of the first occurrence of the specified element * in this vector, or -1 if this vector does not contain the element. * More formally, returns the lowest index {@code i} such that - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -394,7 +394,7 @@ public class Vector * this vector, searching forwards from {@code index}, or returns -1 if * the element is not found. * More formally, returns the lowest index {@code i} such that - * (i >= index && (o==null ? get(i)==null : o.equals(get(i)))), + * {@code (i >= index && Objects.equals(o, get(i)))}, * or -1 if there is no such index. * * @param o element to search for @@ -422,7 +422,7 @@ public class Vector * Returns the index of the last occurrence of the specified element * in this vector, or -1 if this vector does not contain the element. * More formally, returns the highest index {@code i} such that - * (o==null ? get(i)==null : o.equals(get(i))), + * {@code Objects.equals(o, get(i))}, * or -1 if there is no such index. * * @param o element to search for @@ -438,7 +438,7 @@ public class Vector * this vector, searching backwards from {@code index}, or returns -1 if * the element is not found. * More formally, returns the highest index {@code i} such that - * (i <= index && (o==null ? get(i)==null : o.equals(get(i)))), + * {@code (i <= index && Objects.equals(o, get(i)))}, * or -1 if there is no such index. * * @param o element to search for @@ -798,7 +798,7 @@ public class Vector * Removes the first occurrence of the specified element in this Vector * If the Vector does not contain the element, it is unchanged. More * formally, removes the element with the lowest index i such that - * {@code (o==null ? get(i)==null : o.equals(get(i)))} (if such + * {@code Objects.equals(o, get(i))} (if such * an element exists). * * @param o element to be removed from this Vector, if present @@ -991,8 +991,8 @@ public class Vector * true if and only if the specified Object is also a List, both Lists * have the same size, and all corresponding pairs of elements in the two * Lists are equal. (Two elements {@code e1} and - * {@code e2} are equal if {@code (e1==null ? e2==null : - * e1.equals(e2))}.) In other words, two Lists are defined to be + * {@code e2} are equal if {@code Objects.equals(e1, e2)}.) + * In other words, two Lists are defined to be * equal if they contain the same elements in the same order. * * @param o the Object to be compared for equality with this Vector diff --git a/jdk/src/java.base/share/classes/java/util/WeakHashMap.java b/jdk/src/java.base/share/classes/java/util/WeakHashMap.java index 4dd8e99053d..c89567a320a 100644 --- a/jdk/src/java.base/share/classes/java/util/WeakHashMap.java +++ b/jdk/src/java.base/share/classes/java/util/WeakHashMap.java @@ -34,79 +34,79 @@ import java.util.function.Consumer; /** - * Hash table based implementation of the Map interface, with + * Hash table based implementation of the {@code Map} interface, with * weak keys. - * An entry in a WeakHashMap will automatically be removed when + * An entry in a {@code WeakHashMap} will automatically be removed when * its key is no longer in ordinary use. More precisely, the presence of a * mapping for a given key will not prevent the key from being discarded by the * garbage collector, that is, made finalizable, finalized, and then reclaimed. * When a key has been discarded its entry is effectively removed from the map, - * so this class behaves somewhat differently from other Map + * so this class behaves somewhat differently from other {@code Map} * implementations. * *

    Both null values and the null key are supported. This class has - * performance characteristics similar to those of the HashMap + * performance characteristics similar to those of the {@code HashMap} * class, and has the same efficiency parameters of initial capacity * and load factor. * *

    Like most collection classes, this class is not synchronized. - * A synchronized WeakHashMap may be constructed using the + * A synchronized {@code WeakHashMap} may be constructed using the * {@link Collections#synchronizedMap Collections.synchronizedMap} * method. * *

    This class is intended primarily for use with key objects whose - * equals methods test for object identity using the - * == operator. Once such a key is discarded it can never be + * {@code equals} methods test for object identity using the + * {@code ==} operator. Once such a key is discarded it can never be * recreated, so it is impossible to do a lookup of that key in a - * WeakHashMap at some later time and be surprised that its entry + * {@code WeakHashMap} at some later time and be surprised that its entry * has been removed. This class will work perfectly well with key objects - * whose equals methods are not based upon object identity, such - * as String instances. With such recreatable key objects, - * however, the automatic removal of WeakHashMap entries whose + * whose {@code equals} methods are not based upon object identity, such + * as {@code String} instances. With such recreatable key objects, + * however, the automatic removal of {@code WeakHashMap} entries whose * keys have been discarded may prove to be confusing. * - *

    The behavior of the WeakHashMap class depends in part upon + *

    The behavior of the {@code WeakHashMap} class depends in part upon * the actions of the garbage collector, so several familiar (though not - * required) Map invariants do not hold for this class. Because + * required) {@code Map} invariants do not hold for this class. Because * the garbage collector may discard keys at any time, a - * WeakHashMap may behave as though an unknown thread is silently + * {@code WeakHashMap} may behave as though an unknown thread is silently * removing entries. In particular, even if you synchronize on a - * WeakHashMap instance and invoke none of its mutator methods, it - * is possible for the size method to return smaller values over - * time, for the isEmpty method to return false and - * then true, for the containsKey method to return - * true and later false for a given key, for the - * get method to return a value for a given key but later return - * null, for the put method to return - * null and the remove method to return - * false for a key that previously appeared to be in the map, and + * {@code WeakHashMap} instance and invoke none of its mutator methods, it + * is possible for the {@code size} method to return smaller values over + * time, for the {@code isEmpty} method to return {@code false} and + * then {@code true}, for the {@code containsKey} method to return + * {@code true} and later {@code false} for a given key, for the + * {@code get} method to return a value for a given key but later return + * {@code null}, for the {@code put} method to return + * {@code null} and the {@code remove} method to return + * {@code false} for a key that previously appeared to be in the map, and * for successive examinations of the key set, the value collection, and * the entry set to yield successively smaller numbers of elements. * - *

    Each key object in a WeakHashMap is stored indirectly as + *

    Each key object in a {@code WeakHashMap} is stored indirectly as * the referent of a weak reference. Therefore a key will automatically be * removed only after the weak references to it, both inside and outside of the * map, have been cleared by the garbage collector. * *

    Implementation note: The value objects in a - * WeakHashMap are held by ordinary strong references. Thus care + * {@code WeakHashMap} are held by ordinary strong references. Thus care * should be taken to ensure that value objects do not strongly refer to their * own keys, either directly or indirectly, since that will prevent the keys * from being discarded. Note that a value object may refer indirectly to its - * key via the WeakHashMap itself; that is, a value object may + * key via the {@code WeakHashMap} itself; that is, a value object may * strongly refer to some other key object whose associated value object, in * turn, strongly refers to the key of the first value object. If the values * in the map do not rely on the map holding strong references to them, one way * to deal with this is to wrap values themselves within - * WeakReferences before - * inserting, as in: m.put(key, new WeakReference(value)), - * and then unwrapping upon each get. + * {@code WeakReferences} before + * inserting, as in: {@code m.put(key, new WeakReference(value))}, + * and then unwrapping upon each {@code get}. * - *

    The iterators returned by the iterator method of the collections + *

    The iterators returned by the {@code iterator} method of the collections * returned by all of this class's "collection view methods" are * fail-fast: if the map is structurally modified at any time after the * iterator is created, in any way except through the iterator's own - * remove method, the iterator will throw a {@link + * {@code remove} method, the iterator will throw a {@link * ConcurrentModificationException}. Thus, in the face of concurrent * modification, the iterator fails quickly and cleanly, rather than risking * arbitrary, non-deterministic behavior at an undetermined time in the future. @@ -114,7 +114,7 @@ import java.util.function.Consumer; *

    Note that the fail-fast behavior of an iterator cannot be guaranteed * as it is, generally speaking, impossible to make any hard guarantees in the * presence of unsynchronized concurrent modification. Fail-fast iterators - * throw ConcurrentModificationException on a best-effort basis. + * throw {@code ConcurrentModificationException} on a best-effort basis. * Therefore, it would be wrong to write a program that depended on this * exception for its correctness: the fail-fast behavior of iterators * should be used only to detect bugs. @@ -196,11 +196,11 @@ public class WeakHashMap } /** - * Constructs a new, empty WeakHashMap with the given initial + * Constructs a new, empty {@code WeakHashMap} with the given initial * capacity and the given load factor. * - * @param initialCapacity The initial capacity of the WeakHashMap - * @param loadFactor The load factor of the WeakHashMap + * @param initialCapacity The initial capacity of the {@code WeakHashMap} + * @param loadFactor The load factor of the {@code WeakHashMap} * @throws IllegalArgumentException if the initial capacity is negative, * or if the load factor is nonpositive. */ @@ -223,10 +223,10 @@ public class WeakHashMap } /** - * Constructs a new, empty WeakHashMap with the given initial + * Constructs a new, empty {@code WeakHashMap} with the given initial * capacity and the default load factor (0.75). * - * @param initialCapacity The initial capacity of the WeakHashMap + * @param initialCapacity The initial capacity of the {@code WeakHashMap} * @throws IllegalArgumentException if the initial capacity is negative */ public WeakHashMap(int initialCapacity) { @@ -234,7 +234,7 @@ public class WeakHashMap } /** - * Constructs a new, empty WeakHashMap with the default initial + * Constructs a new, empty {@code WeakHashMap} with the default initial * capacity (16) and load factor (0.75). */ public WeakHashMap() { @@ -242,8 +242,8 @@ public class WeakHashMap } /** - * Constructs a new WeakHashMap with the same mappings as the - * specified map. The WeakHashMap is created with the default + * Constructs a new {@code WeakHashMap} with the same mappings as the + * specified map. The {@code WeakHashMap} is created with the default * load factor (0.75) and an initial capacity sufficient to hold the * mappings in the specified map. * @@ -365,7 +365,7 @@ public class WeakHashMap } /** - * Returns true if this map contains no key-value mappings. + * Returns {@code true} if this map contains no key-value mappings. * This result is a snapshot, and may not reflect unprocessed * entries that will be removed before next attempted access * because they are no longer referenced. @@ -379,8 +379,9 @@ public class WeakHashMap * or {@code null} if this map contains no mapping for the key. * *

    More formally, if this map contains a mapping from a key - * {@code k} to a value {@code v} such that {@code (key==null ? k==null : - * key.equals(k))}, then this method returns {@code v}; otherwise + * {@code k} to a value {@code v} such that + * {@code Objects.equals(key, k)}, + * then this method returns {@code v}; otherwise * it returns {@code null}. (There can be at most one such mapping.) * *

    A return value of {@code null} does not necessarily @@ -406,12 +407,12 @@ public class WeakHashMap } /** - * Returns true if this map contains a mapping for the + * Returns {@code true} if this map contains a mapping for the * specified key. * * @param key The key whose presence in this map is to be tested - * @return true if there is a mapping for key; - * false otherwise + * @return {@code true} if there is a mapping for {@code key}; + * {@code false} otherwise */ public boolean containsKey(Object key) { return getEntry(key) != null; @@ -439,10 +440,10 @@ public class WeakHashMap * * @param key key with which the specified value is to be associated. * @param value value to be associated with the specified key. - * @return the previous value associated with key, or - * null if there was no mapping for key. - * (A null return can also indicate that the map - * previously associated null with key.) + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key}. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with {@code key}.) */ public V put(K key, V value) { Object k = maskNull(key); @@ -568,23 +569,23 @@ public class WeakHashMap /** * Removes the mapping for a key from this weak hash map if it is present. - * More formally, if this map contains a mapping from key k to - * value v such that (key==null ? k==null : + * More formally, if this map contains a mapping from key {@code k} to + * value {@code v} such that (key==null ? k==null : * key.equals(k)), that mapping is removed. (The map can contain * at most one such mapping.) * *

    Returns the value to which this map previously associated the key, - * or null if the map contained no mapping for the key. A - * return value of null does not necessarily indicate + * or {@code null} if the map contained no mapping for the key. A + * return value of {@code null} does not necessarily indicate * that the map contained no mapping for the key; it's also possible - * that the map explicitly mapped the key to null. + * that the map explicitly mapped the key to {@code null}. * *

    The map will not contain a mapping for the specified key once the * call returns. * * @param key key whose mapping is to be removed from the map - * @return the previous value associated with key, or - * null if there was no mapping for key + * @return the previous value associated with {@code key}, or + * {@code null} if there was no mapping for {@code key} */ public V remove(Object key) { Object k = maskNull(key); @@ -664,11 +665,11 @@ public class WeakHashMap } /** - * Returns true if this map maps one or more keys to the + * Returns {@code true} if this map maps one or more keys to the * specified value. * * @param value value whose presence in this map is to be tested - * @return true if this map maps one or more keys to the + * @return {@code true} if this map maps one or more keys to the * specified value */ public boolean containsValue(Object value) { @@ -855,12 +856,12 @@ public class WeakHashMap * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation), the results of + * the iterator's own {@code remove} operation), the results of * the iteration are undefined. The set supports element removal, * which removes the corresponding mapping from the map, via the - * Iterator.remove, Set.remove, - * removeAll, retainAll, and clear - * operations. It does not support the add or addAll + * {@code Iterator.remove}, {@code Set.remove}, + * {@code removeAll}, {@code retainAll}, and {@code clear} + * operations. It does not support the {@code add} or {@code addAll} * operations. */ public Set keySet() { @@ -904,13 +905,13 @@ public class WeakHashMap * The collection is backed by the map, so changes to the map are * reflected in the collection, and vice-versa. If the map is * modified while an iteration over the collection is in progress - * (except through the iterator's own remove operation), + * (except through the iterator's own {@code remove} operation), * the results of the iteration are undefined. The collection * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Collection.remove, removeAll, - * retainAll and clear operations. It does not - * support the add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Collection.remove}, {@code removeAll}, + * {@code retainAll} and {@code clear} operations. It does not + * support the {@code add} or {@code addAll} operations. */ public Collection values() { Collection vs = values; @@ -944,14 +945,14 @@ public class WeakHashMap * The set is backed by the map, so changes to the map are * reflected in the set, and vice-versa. If the map is modified * while an iteration over the set is in progress (except through - * the iterator's own remove operation, or through the - * setValue operation on a map entry returned by the + * the iterator's own {@code remove} operation, or through the + * {@code setValue} operation on a map entry returned by the * iterator) the results of the iteration are undefined. The set * supports element removal, which removes the corresponding - * mapping from the map, via the Iterator.remove, - * Set.remove, removeAll, retainAll and - * clear operations. It does not support the - * add or addAll operations. + * mapping from the map, via the {@code Iterator.remove}, + * {@code Set.remove}, {@code removeAll}, {@code retainAll} and + * {@code clear} operations. It does not support the + * {@code add} or {@code addAll} operations. */ public Set> entrySet() { Set> es = entrySet; diff --git a/jdk/src/java.base/share/classes/java/util/regex/MatchResult.java b/jdk/src/java.base/share/classes/java/util/regex/MatchResult.java index 4f42eae970d..1e696384787 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/MatchResult.java +++ b/jdk/src/java.base/share/classes/java/util/regex/MatchResult.java @@ -31,7 +31,7 @@ package java.util.regex; *

    This interface contains query methods used to determine the * results of a match against a regular expression. The match boundaries, * groups and group boundaries can be seen but not modified through - * a MatchResult. + * a {@code MatchResult}. * * @author Michael McCloskey * @see Matcher @@ -56,14 +56,14 @@ public interface MatchResult { * *

    Capturing groups are indexed from left * to right, starting at one. Group zero denotes the entire pattern, so - * the expression m.start(0) is equivalent to - * m.start().

    + * the expression m.{@code start(0)} is equivalent to + * m.{@code start()}.

    * * @param group * The index of a capturing group in this matcher's pattern * * @return The index of the first character captured by the group, - * or -1 if the match was successful but the group + * or {@code -1} if the match was successful but the group * itself did not match anything * * @throws IllegalStateException @@ -93,14 +93,14 @@ public interface MatchResult { * *

    Capturing groups are indexed from left * to right, starting at one. Group zero denotes the entire pattern, so - * the expression m.end(0) is equivalent to - * m.end().

    + * the expression m.{@code end(0)} is equivalent to + * m.{@code end()}.

    * * @param group * The index of a capturing group in this matcher's pattern * * @return The offset after the last character captured by the group, - * or -1 if the match was successful + * or {@code -1} if the match was successful * but the group itself did not match anything * * @throws IllegalStateException @@ -117,11 +117,11 @@ public interface MatchResult { * Returns the input subsequence matched by the previous match. * *

    For a matcher m with input sequence s, - * the expressions m.group() and - * s.substring(m.start(), m.end()) + * the expressions m.{@code group()} and + * s.{@code substring(}m.{@code start(),} m.{@code end())} * are equivalent.

    * - *

    Note that some patterns, for example a*, match the empty + *

    Note that some patterns, for example {@code a*}, match the empty * string. This method will return the empty string when the pattern * successfully matches the empty string in the input.

    * @@ -139,18 +139,19 @@ public interface MatchResult { * previous match operation. * *

    For a matcher m, input sequence s, and group index - * g, the expressions m.group(g) and - * s.substring(m.start(g), m.end(g)) + * g, the expressions m.{@code group(}g{@code )} and + * s.{@code substring(}m.{@code start(}g{@code + * ),} m.{@code end(}g{@code ))} * are equivalent.

    * *

    Capturing groups are indexed from left * to right, starting at one. Group zero denotes the entire pattern, so - * the expression m.group(0) is equivalent to m.group(). + * the expression {@code m.group(0)} is equivalent to {@code m.group()}. *

    * *

    If the match was successful but the group specified failed to match - * any part of the input sequence, then null is returned. Note - * that some groups, for example (a*), match the empty string. + * any part of the input sequence, then {@code null} is returned. Note + * that some groups, for example {@code (a*)}, match the empty string. * This method will return the empty string when such a group successfully * matches the empty string in the input.

    * @@ -158,7 +159,7 @@ public interface MatchResult { * The index of a capturing group in this matcher's pattern * * @return The (possibly empty) subsequence captured by the group - * during the previous match, or null if the group + * during the previous match, or {@code null} if the group * failed to match part of the input * * @throws IllegalStateException diff --git a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java index 2340e728537..f8231e83e53 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java +++ b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java @@ -258,7 +258,7 @@ public final class Matcher implements MatchResult { * The result is unaffected by subsequent operations performed upon this * matcher. * - * @return a MatchResult with the state of this matcher + * @return a {@code MatchResult} with the state of this matcher * @since 1.5 */ public MatchResult toMatchResult() { @@ -347,7 +347,7 @@ public final class Matcher implements MatchResult { } /** - * Changes the Pattern that this Matcher uses to + * Changes the {@code Pattern} that this {@code Matcher} uses to * find matches with. * *

    This method causes this matcher to lose information @@ -359,7 +359,7 @@ public final class Matcher implements MatchResult { * The new pattern used by this matcher * @return This matcher * @throws IllegalArgumentException - * If newPattern is null + * If newPattern is {@code null} * @since 1.5 */ public Matcher usePattern(Pattern newPattern) { @@ -444,14 +444,14 @@ public final class Matcher implements MatchResult { * *

    Capturing groups are indexed from left * to right, starting at one. Group zero denotes the entire pattern, so - * the expression m.start(0) is equivalent to - * m.start().

    + * the expression m.{@code start(0)} is equivalent to + * m.{@code start()}.

    * * @param group * The index of a capturing group in this matcher's pattern * * @return The index of the first character captured by the group, - * or -1 if the match was successful but the group + * or {@code -1} if the match was successful but the group * itself did not match anything * * @throws IllegalStateException @@ -516,14 +516,14 @@ public final class Matcher implements MatchResult { * *

    Capturing groups are indexed from left * to right, starting at one. Group zero denotes the entire pattern, so - * the expression m.end(0) is equivalent to - * m.end().

    + * the expression m.{@code end(0)} is equivalent to + * m.{@code end()}.

    * * @param group * The index of a capturing group in this matcher's pattern * * @return The offset after the last character captured by the group, - * or -1 if the match was successful + * or {@code -1} if the match was successful * but the group itself did not match anything * * @throws IllegalStateException @@ -571,11 +571,11 @@ public final class Matcher implements MatchResult { * Returns the input subsequence matched by the previous match. * *

    For a matcher m with input sequence s, - * the expressions m.group() and - * s.substring(m.start(), m.end()) + * the expressions m.{@code group()} and + * s.{@code substring(}m.{@code start(),} m.{@code end())} * are equivalent.

    * - *

    Note that some patterns, for example a*, match the empty + *

    Note that some patterns, for example {@code a*}, match the empty * string. This method will return the empty string when the pattern * successfully matches the empty string in the input.

    * @@ -595,18 +595,19 @@ public final class Matcher implements MatchResult { * previous match operation. * *

    For a matcher m, input sequence s, and group index - * g, the expressions m.group(g) and - * s.substring(m.start(g), m.end(g)) + * g, the expressions m.{@code group(}g{@code )} and + * s.{@code substring(}m.{@code start(}g{@code + * ),} m.{@code end(}g{@code ))} * are equivalent.

    * *

    Capturing groups are indexed from left * to right, starting at one. Group zero denotes the entire pattern, so - * the expression m.group(0) is equivalent to m.group(). + * the expression {@code m.group(0)} is equivalent to {@code m.group()}. *

    * *

    If the match was successful but the group specified failed to match - * any part of the input sequence, then null is returned. Note - * that some groups, for example (a*), match the empty string. + * any part of the input sequence, then {@code null} is returned. Note + * that some groups, for example {@code (a*)}, match the empty string. * This method will return the empty string when such a group successfully * matches the empty string in the input.

    * @@ -614,7 +615,7 @@ public final class Matcher implements MatchResult { * The index of a capturing group in this matcher's pattern * * @return The (possibly empty) subsequence captured by the group - * during the previous match, or null if the group + * during the previous match, or {@code null} if the group * failed to match part of the input * * @throws IllegalStateException @@ -641,8 +642,8 @@ public final class Matcher implements MatchResult { * match operation. * *

    If the match was successful but the group specified failed to match - * any part of the input sequence, then null is returned. Note - * that some groups, for example (a*), match the empty string. + * any part of the input sequence, then {@code null} is returned. Note + * that some groups, for example {@code (a*)}, match the empty string. * This method will return the empty string when such a group successfully * matches the empty string in the input.

    * @@ -650,7 +651,7 @@ public final class Matcher implements MatchResult { * The name of a named-capturing group in this matcher's pattern * * @return The (possibly empty) subsequence captured by the named group - * during the previous match, or null if the group + * during the previous match, or {@code null} if the group * failed to match part of the input * * @throws IllegalStateException @@ -689,9 +690,9 @@ public final class Matcher implements MatchResult { * Attempts to match the entire region against the pattern. * *

    If the match succeeds then more information can be obtained via the - * start, end, and group methods.

    + * {@code start}, {@code end}, and {@code group} methods.

    * - * @return true if, and only if, the entire region sequence + * @return {@code true} if, and only if, the entire region sequence * matches this matcher's pattern */ public boolean matches() { @@ -708,9 +709,9 @@ public final class Matcher implements MatchResult { * match. * *

    If the match succeeds then more information can be obtained via the - * start, end, and group methods.

    + * {@code start}, {@code end}, and {@code group} methods.

    * - * @return true if, and only if, a subsequence of the input + * @return {@code true} if, and only if, a subsequence of the input * sequence matches this matcher's pattern */ public boolean find() { @@ -737,7 +738,7 @@ public final class Matcher implements MatchResult { * index. * *

    If the match succeeds then more information can be obtained via the - * start, end, and group methods, and subsequent + * {@code start}, {@code end}, and {@code group} methods, and subsequent * invocations of the {@link #find()} method will start at the first * character not matched by this match.

    * @@ -746,7 +747,7 @@ public final class Matcher implements MatchResult { * If start is less than zero or if start is greater than the * length of the input sequence. * - * @return true if, and only if, a subsequence of the input + * @return {@code true} if, and only if, a subsequence of the input * sequence starting at the given index matches this matcher's * pattern */ @@ -767,9 +768,9 @@ public final class Matcher implements MatchResult { * require that the entire region be matched. * *

    If the match succeeds then more information can be obtained via the - * start, end, and group methods.

    + * {@code start}, {@code end}, and {@code group} methods.

    * - * @return true if, and only if, a prefix of the input + * @return {@code true} if, and only if, a prefix of the input * sequence matches this matcher's pattern */ public boolean lookingAt() { @@ -777,14 +778,14 @@ public final class Matcher implements MatchResult { } /** - * Returns a literal replacement String for the specified - * String. + * Returns a literal replacement {@code String} for the specified + * {@code String}. * - * This method produces a String that will work - * as a literal replacement s in the - * appendReplacement method of the {@link Matcher} class. - * The String produced will match the sequence of characters - * in s treated as a literal sequence. Slashes ('\') and + * This method produces a {@code String} that will work + * as a literal replacement {@code s} in the + * {@code appendReplacement} method of the {@link Matcher} class. + * The {@code String} produced will match the sequence of characters + * in {@code s} treated as a literal sequence. Slashes ('\') and * dollar signs ('$') will be given no special meaning. * * @param s The string to be literalized @@ -816,7 +817,7 @@ public final class Matcher implements MatchResult { * append position, and appends them to the given string buffer. It * stops after reading the last character preceding the previous match, * that is, the character at index {@link - * #start()} - 1.

    + * #start()} {@code -} {@code 1}.

    * *
  • It appends the given replacement string to the string buffer. *

  • @@ -829,21 +830,21 @@ public final class Matcher implements MatchResult { * *

    The replacement string may contain references to subsequences * captured during the previous match: Each occurrence of - * ${name} or $g + * ${name} or {@code $}g * will be replaced by the result of evaluating the corresponding * {@link #group(String) group(name)} or {@link #group(int) group(g)} - * respectively. For $g, - * the first number after the $ is always treated as part of + * respectively. For {@code $}g, + * the first number after the {@code $} is always treated as part of * the group reference. Subsequent numbers are incorporated into g if * they would form a legal group reference. Only the numerals '0' * through '9' are considered as potential components of the group - * reference. If the second group matched the string "foo", for - * example, then passing the replacement string "$2bar" would - * cause "foobar" to be appended to the string buffer. A dollar - * sign ($) may be included as a literal in the replacement - * string by preceding it with a backslash (\$). + * reference. If the second group matched the string {@code "foo"}, for + * example, then passing the replacement string {@code "$2bar"} would + * cause {@code "foobar"} to be appended to the string buffer. A dollar + * sign ({@code $}) may be included as a literal in the replacement + * string by preceding it with a backslash ({@code \$}). * - *

    Note that backslashes (\) and dollar signs ($) in + *

    Note that backslashes ({@code \}) and dollar signs ({@code $}) in * the replacement string may cause the results to be different than if it * were being treated as a literal replacement string. Dollar signs may be * treated as references to captured subsequences as described above, and @@ -852,8 +853,8 @@ public final class Matcher implements MatchResult { * *

    This method is intended to be used in a loop together with the * {@link #appendTail appendTail} and {@link #find find} methods. The - * following code, for example, writes one dog two dogs in the - * yard to the standard-output stream:

    + * following code, for example, writes {@code one dog two dogs in the + * yard} to the standard-output stream:

    * *
          * Pattern p = Pattern.compile("cat");
    @@ -911,7 +912,7 @@ public final class Matcher implements MatchResult {
          *   append position, and appends them to the given string builder.  It
          *   stops after reading the last character preceding the previous match,
          *   that is, the character at index {@link
    -     *   #start()} - 1.  

    + * #start()} {@code -} {@code 1}.

    * *
  • It appends the given replacement string to the string builder. *

  • @@ -924,19 +925,19 @@ public final class Matcher implements MatchResult { * *

    The replacement string may contain references to subsequences * captured during the previous match: Each occurrence of - * $g will be replaced by the result of - * evaluating {@link #group(int) group}(g). - * The first number after the $ is always treated as part of + * {@code $}g will be replaced by the result of + * evaluating {@link #group(int) group}{@code (}g{@code )}. + * The first number after the {@code $} is always treated as part of * the group reference. Subsequent numbers are incorporated into g if * they would form a legal group reference. Only the numerals '0' * through '9' are considered as potential components of the group - * reference. If the second group matched the string "foo", for - * example, then passing the replacement string "$2bar" would - * cause "foobar" to be appended to the string builder. A dollar - * sign ($) may be included as a literal in the replacement - * string by preceding it with a backslash (\$). + * reference. If the second group matched the string {@code "foo"}, for + * example, then passing the replacement string {@code "$2bar"} would + * cause {@code "foobar"} to be appended to the string builder. A dollar + * sign ({@code $}) may be included as a literal in the replacement + * string by preceding it with a backslash ({@code \$}). * - *

    Note that backslashes (\) and dollar signs ($) in + *

    Note that backslashes ({@code \}) and dollar signs ({@code $}) in * the replacement string may cause the results to be different than if it * were being treated as a literal replacement string. Dollar signs may be * treated as references to captured subsequences as described above, and @@ -945,8 +946,8 @@ public final class Matcher implements MatchResult { * *

    This method is intended to be used in a loop together with the * {@link #appendTail appendTail} and {@link #find find} methods. The - * following code, for example, writes one dog two dogs in the - * yard to the standard-output stream:

    + * following code, for example, writes {@code one dog two dogs in the + * yard} to the standard-output stream:

    * *
          * Pattern p = Pattern.compile("cat");
    @@ -1134,17 +1135,17 @@ public final class Matcher implements MatchResult {
          * string may contain references to captured subsequences as in the {@link
          * #appendReplacement appendReplacement} method.
          *
    -     * 

    Note that backslashes (\) and dollar signs ($) in + *

    Note that backslashes ({@code \}) and dollar signs ({@code $}) in * the replacement string may cause the results to be different than if it * were being treated as a literal replacement string. Dollar signs may be * treated as references to captured subsequences as described above, and * backslashes are used to escape literal characters in the replacement * string. * - *

    Given the regular expression a*b, the input - * "aabfooaabfooabfoob", and the replacement string - * "-", an invocation of this method on a matcher for that - * expression would yield the string "-foo-foo-foo-". + *

    Given the regular expression {@code a*b}, the input + * {@code "aabfooaabfooabfoob"}, and the replacement string + * {@code "-"}, an invocation of this method on a matcher for that + * expression would yield the string {@code "-foo-foo-foo-"}. * *

    Invoking this method changes this matcher's state. If the matcher * is to be used in further matching operations then it should first be @@ -1186,18 +1187,18 @@ public final class Matcher implements MatchResult { * references to captured subsequences as in the {@link #appendReplacement * appendReplacement} method. * - *

    Note that backslashes (\) and dollar signs ($) in + *

    Note that backslashes ({@code \}) and dollar signs ({@code $}) in * a replacement string may cause the results to be different than if it * were being treated as a literal replacement string. Dollar signs may be * treated as references to captured subsequences as described above, and * backslashes are used to escape literal characters in the replacement * string. * - *

    Given the regular expression dog, the input - * "zzzdogzzzdogzzz", and the function + *

    Given the regular expression {@code dog}, the input + * {@code "zzzdogzzzdogzzz"}, and the function * {@code mr -> mr.group().toUpperCase()}, an invocation of this method on * a matcher for that expression would yield the string - * "zzzDOGzzzDOGzzz". + * {@code "zzzDOGzzzDOGzzz"}. * *

    Invoking this method changes this matcher's state. If the matcher * is to be used in further matching operations then it should first be @@ -1360,17 +1361,17 @@ public final class Matcher implements MatchResult { * string may contain references to captured subsequences as in the {@link * #appendReplacement appendReplacement} method. * - *

    Note that backslashes (\) and dollar signs ($) in + *

    Note that backslashes ({@code \}) and dollar signs ({@code $}) in * the replacement string may cause the results to be different than if it * were being treated as a literal replacement string. Dollar signs may be * treated as references to captured subsequences as described above, and * backslashes are used to escape literal characters in the replacement * string. * - *

    Given the regular expression dog, the input - * "zzzdogzzzdogzzz", and the replacement string - * "cat", an invocation of this method on a matcher for that - * expression would yield the string "zzzcatzzzdogzzz".

    + *

    Given the regular expression {@code dog}, the input + * {@code "zzzdogzzzdogzzz"}, and the replacement string + * {@code "cat"}, an invocation of this method on a matcher for that + * expression would yield the string {@code "zzzcatzzzdogzzz"}.

    * *

    Invoking this method changes this matcher's state. If the matcher * is to be used in further matching operations then it should first be @@ -1408,18 +1409,18 @@ public final class Matcher implements MatchResult { * references to captured subsequences as in the {@link #appendReplacement * appendReplacement} method. * - *

    Note that backslashes (\) and dollar signs ($) in + *

    Note that backslashes ({@code \}) and dollar signs ({@code $}) in * the replacement string may cause the results to be different than if it * were being treated as a literal replacement string. Dollar signs may be * treated as references to captured subsequences as described above, and * backslashes are used to escape literal characters in the replacement * string. * - *

    Given the regular expression dog, the input - * "zzzdogzzzdogzzz", and the function + *

    Given the regular expression {@code dog}, the input + * {@code "zzzdogzzzdogzzz"}, and the function * {@code mr -> mr.group().toUpperCase()}, an invocation of this method on * a matcher for that expression would yield the string - * "zzzDOGzzzdogzzz". + * {@code "zzzDOGzzzdogzzz"}. * *

    Invoking this method changes this matcher's state. If the matcher * is to be used in further matching operations then it should first be @@ -1471,8 +1472,8 @@ public final class Matcher implements MatchResult { * Sets the limits of this matcher's region. The region is the part of the * input sequence that will be searched to find a match. Invoking this * method resets the matcher, and then sets the region to start at the - * index specified by the start parameter and end at the - * index specified by the end parameter. + * index specified by the {@code start} parameter and end at the + * index specified by the {@code end} parameter. * *

    Depending on the transparency and anchoring being used (see * {@link #useTransparentBounds useTransparentBounds} and @@ -1534,8 +1535,8 @@ public final class Matcher implements MatchResult { /** * Queries the transparency of region bounds for this matcher. * - *

    This method returns true if this matcher uses - * transparent bounds, false if it uses opaque + *

    This method returns {@code true} if this matcher uses + * transparent bounds, {@code false} if it uses opaque * bounds. * *

    See {@link #useTransparentBounds useTransparentBounds} for a @@ -1543,8 +1544,8 @@ public final class Matcher implements MatchResult { * *

    By default, a matcher uses opaque region boundaries. * - * @return true iff this matcher is using transparent bounds, - * false otherwise. + * @return {@code true} iff this matcher is using transparent bounds, + * {@code false} otherwise. * @see java.util.regex.Matcher#useTransparentBounds(boolean) * @since 1.5 */ @@ -1555,9 +1556,9 @@ public final class Matcher implements MatchResult { /** * Sets the transparency of region bounds for this matcher. * - *

    Invoking this method with an argument of true will set this + *

    Invoking this method with an argument of {@code true} will set this * matcher to use transparent bounds. If the boolean - * argument is false, then opaque bounds will be used. + * argument is {@code false}, then opaque bounds will be used. * *

    Using transparent bounds, the boundaries of this * matcher's region are transparent to lookahead, lookbehind, @@ -1586,16 +1587,16 @@ public final class Matcher implements MatchResult { /** * Queries the anchoring of region bounds for this matcher. * - *

    This method returns true if this matcher uses - * anchoring bounds, false otherwise. + *

    This method returns {@code true} if this matcher uses + * anchoring bounds, {@code false} otherwise. * *

    See {@link #useAnchoringBounds useAnchoringBounds} for a * description of anchoring bounds. * *

    By default, a matcher uses anchoring region boundaries. * - * @return true iff this matcher is using anchoring bounds, - * false otherwise. + * @return {@code true} iff this matcher is using anchoring bounds, + * {@code false} otherwise. * @see java.util.regex.Matcher#useAnchoringBounds(boolean) * @since 1.5 */ @@ -1606,9 +1607,9 @@ public final class Matcher implements MatchResult { /** * Sets the anchoring of region bounds for this matcher. * - *

    Invoking this method with an argument of true will set this + *

    Invoking this method with an argument of {@code true} will set this * matcher to use anchoring bounds. If the boolean - * argument is false, then non-anchoring bounds will be + * argument is {@code false}, then non-anchoring bounds will be * used. * *

    Using anchoring bounds, the boundaries of this @@ -1631,7 +1632,7 @@ public final class Matcher implements MatchResult { /** *

    Returns the string representation of this matcher. The - * string representation of a Matcher contains information + * string representation of a {@code Matcher} contains information * that may be useful for debugging. The exact format is unspecified. * * @return The string representation of this matcher diff --git a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java index 4dbb8356895..756567d0ff8 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java +++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java @@ -88,40 +88,40 @@ import java.util.stream.StreamSupport; * *

    xThe character x
    \\
    {@code \\}The backslash character
    \0nThe character with octal value 0n - * (0 <= n <= 7)
    \0nnThe character with octal value 0nn - * (0 <= n <= 7)
    \0mnnThe character with octal value 0mnn - * (0 <= m <= 3, - * 0 <= n <= 7)
    \xhhThe character with hexadecimal value 0xhh
    \uhhhhThe character with hexadecimal value 0xhhhh
    \x{h...h}The character with hexadecimal value 0xh...h + *
    {@code \0}nThe character with octal value {@code 0}n + * (0 {@code <=} n {@code <=} 7)
    {@code \0}nnThe character with octal value {@code 0}nn + * (0 {@code <=} n {@code <=} 7)
    {@code \0}mnnThe character with octal value {@code 0}mnn + * (0 {@code <=} m {@code <=} 3, + * 0 {@code <=} n {@code <=} 7)
    {@code \x}hhThe character with hexadecimal value {@code 0x}hh
    \uhhhhThe character with hexadecimal value {@code 0x}hhhh
    \x{h...h}The character with hexadecimal value {@code 0x}h...h * ({@link java.lang.Character#MIN_CODE_POINT Character.MIN_CODE_POINT} - *  <= 0xh...h <=  + *  <= {@code 0x}h...h <=  * {@link java.lang.Character#MAX_CODE_POINT Character.MAX_CODE_POINT})
    \tThe tab character ('\u0009')
    \nThe newline (line feed) character ('\u000A')
    \rThe carriage-return character ('\u000D')
    \fThe form-feed character ('\u000C')
    \aThe alert (bell) character ('\u0007')
    \eThe escape character ('\u001B')
    \cx
    {@code \t}The tab character ('\u0009')
    {@code \n}The newline (line feed) character ('\u000A')
    {@code \r}The carriage-return character ('\u000D')
    {@code \f}The form-feed character ('\u000C')
    {@code \a}The alert (bell) character ('\u0007')
    {@code \e}The escape character ('\u001B')
    {@code \c}xThe control character corresponding to x
     
    Predefined character classes
    .
    {@code .}Any character (may or may not match line terminators)
    \dA digit: [0-9]
    \DA non-digit: [^0-9]
    \h
    {@code \d}A digit: {@code [0-9]}
    {@code \D}A non-digit: {@code [^0-9]}
    {@code \h}A horizontal whitespace character: - * [ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]
    \HA non-horizontal whitespace character: [^\h]
    \sA whitespace character: [ \t\n\x0B\f\r]
    \SA non-whitespace character: [^\s]
    \vA vertical whitespace character: [\n\x0B\f\r\x85\u2028\u2029] + * [ \t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]
    {@code \H}A non-horizontal whitespace character: {@code [^\h]}
    {@code \s}A whitespace character: {@code [ \t\n\x0B\f\r]}
    {@code \S}A non-whitespace character: {@code [^\s]}
    {@code \v}A vertical whitespace character: [\n\x0B\f\r\x85\u2028\u2029] *
    \VA non-vertical whitespace character: [^\v]
    \wA word character: [a-zA-Z_0-9]
    \WA non-word character: [^\w]
    {@code \V}A non-vertical whitespace character: {@code [^\v]}
    {@code \w}A word character: {@code [a-zA-Z_0-9]}
    {@code \W}A non-word character: {@code [^\w]}
     
    POSIX character classes (US-ASCII only)
     
    java.lang.Character classes (simple java character type)
    \p{javaLowerCase}
    {@code \p{javaLowerCase}}Equivalent to java.lang.Character.isLowerCase()
    \p{javaUpperCase}
    {@code \p{javaUpperCase}}Equivalent to java.lang.Character.isUpperCase()
    \p{javaWhitespace}
    {@code \p{javaWhitespace}}Equivalent to java.lang.Character.isWhitespace()
    \p{javaMirrored}
    {@code \p{javaMirrored}}Equivalent to java.lang.Character.isMirrored()
     
     
    Boundary matchers
    ^
    {@code ^}The beginning of a line
    $
    {@code $}The end of a line
    \b
    {@code \b}A word boundary
    \B
    {@code \B}A non-word boundary
    \A
    {@code \A}The beginning of the input
    \G
    {@code \G}The end of the previous match
    \Z
    {@code \Z}The end of the input but for the final * terminator, if any
    \z
    {@code \z}The end of the input
     
    Linebreak matcher
    \R
    {@code \R}Any Unicode linebreak sequence, is equivalent to - * \u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029] - *
     
    Greedy quantifiers
    X?
    X{@code ?}X, once or not at all
    X*
    X{@code *}X, zero or more times
    X+
    X{@code +}X, one or more times
    X{n}
    X{n}X, exactly n times
    X{n,}
    X{n{@code ,}}X, at least n times
    X{n,m}
    X{n{@code ,}m}X, at least n but not more than m times
     
    Reluctant quantifiers
    X??
    X{@code ??}X, once or not at all
    X*?
    X{@code *?}X, zero or more times
    X+?
    X{@code +?}X, one or more times
    X{n}?
    X{n}?X, exactly n times
    X{n,}?
    X{n,}?X, at least n times
    X{n,m}?
    X{n{@code ,}m}?X, at least n but not more than m times
     
    Possessive quantifiers
    X?+
    X{@code ?+}X, once or not at all
    X*+
    X{@code *+}X, zero or more times
    X++
    X{@code ++}X, one or more times
    X{n}+
    X{n}+X, exactly n times
    X{n,}+
    X{n,}+X, at least n times
    X{n,m}+
    X{n{@code ,}m}+X, at least n but not more than m times
     
    XYX followed by Y
    X|Y
    X{@code |}YEither X or Y
    (X)
    {@code (}X{@code )}X, as a capturing group
     
    Back references
    \n
    {@code \}nWhatever the nth * capturing group matched
    \k<name>
    {@code \}k<name>Whatever the * named-capturing group "name" matched
     
    Quotation
    \
    {@code \}Nothing, but quotes the following character
    \QNothing, but quotes all characters until \E
    \ENothing, but ends quoting started by \Q
    {@code \Q}Nothing, but quotes all characters until {@code \E}
    {@code \E}Nothing, but ends quoting started by {@code \Q}
     
    Special constructs (named-capturing and non-capturing)
    (?<name>X)
    (?<name>X{@code )}X, as a named-capturing group
    (?:X)
    {@code (?:}X{@code )}X, as a non-capturing group
    (?idmsuxU-idmsuxU) 
    (?idmsuxU-idmsuxU) Nothing, but turns match flags i * d m s * u x U * on - off
    (?idmsux-idmsux:X)  
    (?idmsux-idmsux:X{@code )}  X, as a non-capturing group with the * given flags i d * m s u * x on - off
    (?=X)
    {@code (?=}X{@code )}X, via zero-width positive lookahead
    (?!X)
    {@code (?!}X{@code )}X, via zero-width negative lookahead
    (?<=X)
    {@code (?<=}X{@code )}X, via zero-width positive lookbehind
    (?<!X)
    {@code (?X{@code )}X, via zero-width negative lookbehind
    (?>X)
    {@code (?>}X{@code )}X, as an independent, non-capturing group
    @@ -377,10 +377,10 @@ import java.util.stream.StreamSupport; * *

    Backslashes, escapes, and quoting

    * - *

    The backslash character ('\') serves to introduce escaped + *

    The backslash character ({@code '\'}) serves to introduce escaped * constructs, as defined in the table above, as well as to quote characters * that otherwise would be interpreted as unescaped constructs. Thus the - * expression \\ matches a single backslash and \{ matches a + * expression {@code \\} matches a single backslash and \{ matches a * left brace. * *

    It is an error to use a backslash prior to any alphabetic character that @@ -396,18 +396,18 @@ import java.util.stream.StreamSupport; * It is therefore necessary to double backslashes in string * literals that represent regular expressions to protect them from * interpretation by the Java bytecode compiler. The string literal - * "\b", for example, matches a single backspace character when - * interpreted as a regular expression, while "\\b" matches a - * word boundary. The string literal "\(hello\)" is illegal + * "\b", for example, matches a single backspace character when + * interpreted as a regular expression, while {@code "\\b"} matches a + * word boundary. The string literal {@code "\(hello\)"} is illegal * and leads to a compile-time error; in order to match the string - * (hello) the string literal "\\(hello\\)" + * {@code (hello)} the string literal {@code "\\(hello\\)"} * must be used. * *

    Character Classes

    * *

    Character classes may appear within other character classes, and * may be composed by the union operator (implicit) and the intersection - * operator (&&). + * operator ({@code &&}). * The union operator denotes a class that contains every character that is * in at least one of its operand classes. The intersection operator * denotes a class that contains every character that is in both of its @@ -420,16 +420,16 @@ import java.util.stream.StreamSupport; * summary="Precedence of character class operators."> *

    1    Literal escape    \x
    {@code \x}
    2    Grouping[...]
    {@code [...]}
    3    Rangea-z
    {@code a-z}
    4    Union[a-e][i-u]
    {@code [a-e][i-u]}
    5    Intersection{@code [a-z&&[aeiou]]}
    * - * + * * - * + * * - * + * * - * + * *
    1    ((A)(B(C)))
    {@code ((A)(B(C)))}
    2    (A)
    {@code (A)}
    3    (B(C))
    {@code (B(C))}
    4    (C)
    {@code (C)}
    * *

    Group zero always stands for the entire expression. @@ -502,31 +502,31 @@ import java.util.stream.StreamSupport; * may also be retrieved from the matcher once the match operation is complete. * *

    Group name

    - *

    A capturing group can also be assigned a "name", a named-capturing group, + *

    A capturing group can also be assigned a "name", a {@code named-capturing group}, * and then be back-referenced later by the "name". Group names are composed of - * the following characters. The first character must be a letter. + * the following characters. The first character must be a {@code letter}. * *

      - *
    • The uppercase letters 'A' through 'Z' - * ('\u0041' through '\u005a'), - *
    • The lowercase letters 'a' through 'z' - * ('\u0061' through '\u007a'), - *
    • The digits '0' through '9' - * ('\u0030' through '\u0039'), + *
    • The uppercase letters {@code 'A'} through {@code 'Z'} + * ('\u0041' through '\u005a'), + *
    • The lowercase letters {@code 'a'} through {@code 'z'} + * ('\u0061' through '\u007a'), + *
    • The digits {@code '0'} through {@code '9'} + * ('\u0030' through '\u0039'), *
    * - *

    A named-capturing group is still numbered as described in + *

    A {@code named-capturing group} is still numbered as described in * Group number. * *

    The captured input associated with a group is always the subsequence * that the group most recently matched. If a group is evaluated a second time * because of quantification then its previously-captured value, if any, will * be retained if the second evaluation fails. Matching the string - * "aba" against the expression (a(b)?)+, for example, leaves - * group two set to "b". All captured input is discarded at the + * {@code "aba"} against the expression {@code (a(b)?)+}, for example, leaves + * group two set to {@code "b"}. All captured input is discarded at the * beginning of each match. * - *

    Groups beginning with (? are either pure, non-capturing groups + *

    Groups beginning with {@code (?} are either pure, non-capturing groups * that do not capture text and do not count towards the group total, or * named-capturing group. * @@ -537,26 +537,26 @@ import java.util.stream.StreamSupport; * Standard #18: Unicode Regular Expression, plus RL2.1 * Canonical Equivalents. *

    - * Unicode escape sequences such as \u2014 in Java source code + * Unicode escape sequences such as \u2014 in Java source code * are processed as described in section 3.3 of * The Java™ Language Specification. * Such escape sequences are also implemented directly by the regular-expression * parser so that Unicode escapes can be used in expressions that are read from - * files or from the keyboard. Thus the strings "\u2014" and - * "\\u2014", while not equal, compile into the same pattern, which - * matches the character with hexadecimal value 0x2014. + * files or from the keyboard. Thus the strings "\u2014" and + * {@code "\\u2014"}, while not equal, compile into the same pattern, which + * matches the character with hexadecimal value {@code 0x2014}. *

    * A Unicode character can also be represented in a regular-expression by * using its Hex notation(hexadecimal code point value) directly as described in construct - * \x{...}, for example a supplementary character U+2011F - * can be specified as \x{2011F}, instead of two consecutive + * \x{...}, for example a supplementary character U+2011F + * can be specified as \x{2011F}, instead of two consecutive * Unicode escape sequences of the surrogate pair - * \uD840\uDD1F. + * \uD840\uDD1F. *

    * Unicode scripts, blocks, categories and binary properties are written with - * the \p and \P constructs as in Perl. - * \p{prop} matches if - * the input has the property prop, while \P{prop} + * the {@code \p} and {@code \P} constructs as in Perl. + * \p{prop} matches if + * the input has the property prop, while \P{prop} * does not match if the input has that property. *

    * Scripts, blocks, categories and binary properties can be used both inside @@ -567,7 +567,7 @@ import java.util.stream.StreamSupport; * {@code IsHiragana}, or by using the {@code script} keyword (or its short * form {@code sc}) as in {@code script=Hiragana} or {@code sc=Hiragana}. *

    - * The script names supported by Pattern are the valid script names + * The script names supported by {@code Pattern} are the valid script names * accepted and defined by * {@link java.lang.Character.UnicodeScript#forName(String) UnicodeScript.forName}. * @@ -576,7 +576,7 @@ import java.util.stream.StreamSupport; * {@code InMongolian}, or by using the keyword {@code block} (or its short * form {@code blk}) as in {@code block=Mongolian} or {@code blk=Mongolian}. *

    - * The block names supported by Pattern are the valid block names + * The block names supported by {@code Pattern} are the valid block names * accepted and defined by * {@link java.lang.Character.UnicodeBlock#forName(String) UnicodeBlock.forName}. *

    @@ -595,7 +595,7 @@ import java.util.stream.StreamSupport; *

    * * Binary properties are specified with the prefix {@code Is}, as in - * {@code IsAlphabetic}. The supported binary properties by Pattern + * {@code IsAlphabetic}. The supported binary properties by {@code Pattern} * are *

      *
    • Alphabetic @@ -625,88 +625,88 @@ import java.util.stream.StreamSupport; *
    ClassesMatches
    \p{Lower}A lowercase character:\p{IsLowercase}
    \p{Upper}An uppercase character:\p{IsUppercase}
    \p{ASCII}All ASCII:[\x00-\x7F]
    \p{Alpha}An alphabetic character:\p{IsAlphabetic}
    \p{Digit}A decimal digit character:p{IsDigit}
    \p{Alnum}An alphanumeric character:[\p{IsAlphabetic}\p{IsDigit}]
    \p{Punct}A punctuation character:p{IsPunctuation}
    \p{Graph}A visible character: [^\p{IsWhite_Space}\p{gc=Cc}\p{gc=Cs}\p{gc=Cn}]
    \p{Print}
    {@code \p{Lower}}A lowercase character:{@code \p{IsLowercase}}
    {@code \p{Upper}}An uppercase character:{@code \p{IsUppercase}}
    {@code \p{ASCII}}All ASCII:{@code [\x00-\x7F]}
    {@code \p{Alpha}}An alphabetic character:{@code \p{IsAlphabetic}}
    {@code \p{Digit}}A decimal digit character:{@code p{IsDigit}}
    {@code \p{Alnum}}An alphanumeric character:{@code [\p{IsAlphabetic}\p{IsDigit}]}
    {@code \p{Punct}}A punctuation character:{@code p{IsPunctuation}}
    {@code \p{Graph}}A visible character: {@code [^\p{IsWhite_Space}\p{gc=Cc}\p{gc=Cs}\p{gc=Cn}]}
    {@code \p{Print}}A printable character: {@code [\p{Graph}\p{Blank}&&[^\p{Cntrl}]]}
    \p{Blank}
    {@code \p{Blank}}A space or a tab: {@code [\p{IsWhite_Space}&&[^\p{gc=Zl}\p{gc=Zp}\x0a\x0b\x0c\x0d\x85]]}
    \p{Cntrl}A control character: \p{gc=Cc}
    \p{XDigit}A hexadecimal digit: [\p{gc=Nd}\p{IsHex_Digit}]
    \p{Space}A whitespace character:\p{IsWhite_Space}
    \dA digit: \p{IsDigit}
    \DA non-digit: [^\d]
    \sA whitespace character: \p{IsWhite_Space}
    \SA non-whitespace character: [^\s]
    \wA word character: [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}\p{IsJoin_Control}]
    \WA non-word character: [^\w]
    {@code \p{Cntrl}}A control character: {@code \p{gc=Cc}}
    {@code \p{XDigit}}A hexadecimal digit: {@code [\p{gc=Nd}\p{IsHex_Digit}]}
    {@code \p{Space}}A whitespace character:{@code \p{IsWhite_Space}}
    {@code \d}A digit: {@code \p{IsDigit}}
    {@code \D}A non-digit: {@code [^\d]}
    {@code \s}A whitespace character: {@code \p{IsWhite_Space}}
    {@code \S}A non-whitespace character: {@code [^\s]}
    {@code \w}A word character: {@code [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}\p{IsJoin_Control}]}
    {@code \W}A non-word character: {@code [^\w]}
    *

    * * Categories that behave like the java.lang.Character * boolean ismethodname methods (except for the deprecated ones) are - * available through the same \p{prop} syntax where - * the specified property has the name javamethodname. + * available through the same \p{prop} syntax where + * the specified property has the name javamethodname. * *

    Comparison to Perl 5

    * - *

    The Pattern engine performs traditional NFA-based matching + *

    The {@code Pattern} engine performs traditional NFA-based matching * with ordered alternation as occurs in Perl 5. * *

    Perl constructs not supported by this class:

    * *
      *
    • Predefined character classes (Unicode character) - *

      \X    Match Unicode + *

      \X    Match Unicode * * extended grapheme cluster *

    • * - *
    • The backreference constructs, \g{n} for + *

    • The backreference constructs, \g{n} for * the nthcapturing group and - * \g{name} for + * \g{name} for * named-capturing group. *

    • * - *
    • The named character construct, \N{name} + *

    • The named character construct, \N{name} * for a Unicode character by its name. *

    • * *
    • The conditional constructs - * (?(condition)X) and - * (?(condition)X|Y), + * {@code (?(}condition{@code )}X{@code )} and + * {@code (?(}condition{@code )}X{@code |}Y{@code )}, *

    • * - *
    • The embedded code constructs (?{code}) - * and (??{code}),

    • + *
    • The embedded code constructs (?{code}) + * and (??{code}),

    • * - *
    • The embedded comment syntax (?#comment), and

    • + *
    • The embedded comment syntax {@code (?#comment)}, and

    • * - *
    • The preprocessing operations \l \u, - * \L, and \U.

    • + *
    • The preprocessing operations {@code \l} \u, + * {@code \L}, and {@code \U}.

    • * *
    * @@ -723,19 +723,19 @@ import java.util.stream.StreamSupport; * *
      * - *
    • In Perl, \1 through \9 are always interpreted - * as back references; a backslash-escaped number greater than 9 is + *

    • In Perl, {@code \1} through {@code \9} are always interpreted + * as back references; a backslash-escaped number greater than {@code 9} is * treated as a back reference if at least that many subexpressions exist, * otherwise it is interpreted, if possible, as an octal escape. In this * class octal escapes must always begin with a zero. In this class, - * \1 through \9 are always interpreted as back + * {@code \1} through {@code \9} are always interpreted as back * references, and a larger number is accepted as a back reference if at * least that many subexpressions exist at that point in the regular * expression, otherwise the parser will drop digits until the number is * smaller or equal to the existing number of groups or it is one digit. *

    • * - *
    • Perl uses the g flag to request a match that resumes + *

    • Perl uses the {@code g} flag to request a match that resumes * where the last match left off. This functionality is provided implicitly * by the {@link Matcher} class: Repeated invocations of the {@link * Matcher#find find} method will resume where the last match left off, @@ -786,11 +786,11 @@ public final class Pattern /** * Enables Unix lines mode. * - *

      In this mode, only the '\n' line terminator is recognized - * in the behavior of ., ^, and $. + *

      In this mode, only the {@code '\n'} line terminator is recognized + * in the behavior of {@code .}, {@code ^}, and {@code $}. * *

      Unix lines mode can also be enabled via the embedded flag - * expression (?d). + * expression {@code (?d)}. */ public static final int UNIX_LINES = 0x01; @@ -803,7 +803,7 @@ public final class Pattern * #UNICODE_CASE} flag in conjunction with this flag. * *

      Case-insensitive matching can also be enabled via the embedded flag - * expression (?i). + * expression {@code (?i)}. * *

      Specifying this flag may impose a slight performance penalty.

      */ @@ -813,23 +813,23 @@ public final class Pattern * Permits whitespace and comments in pattern. * *

      In this mode, whitespace is ignored, and embedded comments starting - * with # are ignored until the end of a line. + * with {@code #} are ignored until the end of a line. * *

      Comments mode can also be enabled via the embedded flag - * expression (?x). + * expression {@code (?x)}. */ public static final int COMMENTS = 0x04; /** * Enables multiline mode. * - *

      In multiline mode the expressions ^ and $ match + *

      In multiline mode the expressions {@code ^} and {@code $} match * just after or just before, respectively, a line terminator or the end of * the input sequence. By default these expressions only match at the * beginning and the end of the entire input sequence. * *

      Multiline mode can also be enabled via the embedded flag - * expression (?m).

      + * expression {@code (?m)}.

      */ public static final int MULTILINE = 0x08; @@ -853,12 +853,12 @@ public final class Pattern /** * Enables dotall mode. * - *

      In dotall mode, the expression . matches any character, + *

      In dotall mode, the expression {@code .} matches any character, * including a line terminator. By default this expression does not match * line terminators. * *

      Dotall mode can also be enabled via the embedded flag - * expression (?s). (The s is a mnemonic for + * expression {@code (?s)}. (The {@code s} is a mnemonic for * "single-line" mode, which is what this is called in Perl.)

      */ public static final int DOTALL = 0x20; @@ -873,7 +873,7 @@ public final class Pattern * matched. * *

      Unicode-aware case folding can also be enabled via the embedded flag - * expression (?u). + * expression {@code (?u)}. * *

      Specifying this flag may impose a performance penalty.

      */ @@ -884,8 +884,8 @@ public final class Pattern * *

      When this flag is specified then two characters will be considered * to match if, and only if, their full canonical decompositions match. - * The expression "a\u030A", for example, will match the - * string "\u00E5" when this flag is specified. By default, + * The expression "a\u030A", for example, will match the + * string "\u00E5" when this flag is specified. By default, * matching does not take canonical equivalence into account. * *

      There is no embedded flag character for enabling canonical @@ -907,7 +907,7 @@ public final class Pattern * Annex C: Compatibility Properties. *

      * The UNICODE_CHARACTER_CLASS mode can also be enabled via the embedded - * flag expression (?U). + * flag expression {@code (?U)}. *

      * The flag implies UNICODE_CASE, that is, it enables Unicode-aware case * folding. @@ -1052,7 +1052,7 @@ public final class Pattern * @return the given regular expression compiled into a pattern with the given flags * @throws IllegalArgumentException * If bit values other than those corresponding to the defined - * match flags are set in flags + * match flags are set in {@code flags} * * @throws PatternSyntaxException * If the expression's syntax is invalid @@ -1158,7 +1158,7 @@ public final class Pattern * of the resulting array. A zero-width match at the beginning however * never produces such empty leading substring. * - *

      The limit parameter controls the number of times the + *

      The {@code limit} parameter controls the number of times the * pattern is applied and therefore affects the length of the resulting * array. If the limit n is greater than zero then the pattern * will be applied at most n - 1 times, the array's @@ -1169,7 +1169,7 @@ public final class Pattern * the pattern will be applied as many times as possible, the array can * have any length, and trailing empty strings will be discarded. * - *

      The input "boo:and:foo", for example, yields the following + *

      The input {@code "boo:and:foo"}, for example, yields the following * results with these parameters: * *

      Result     * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * * * - * + * *
      :2{ "boo", "and:foo" }
      {@code { "boo", "and:foo" }}
      :5{ "boo", "and", "foo" }
      {@code { "boo", "and", "foo" }}
      :-2{ "boo", "and", "foo" }
      {@code { "boo", "and", "foo" }}
      o5{ "b", "", ":and:f", "", "" }
      {@code { "b", "", ":and:f", "", "" }}
      o-2{ "b", "", ":and:f", "", "" }
      {@code { "b", "", ":and:f", "", "" }}
      o0{ "b", "", ":and:f" }
      {@code { "b", "", ":and:f" }}
      * * @param input @@ -1256,7 +1256,7 @@ public final class Pattern * sequence and a limit argument of zero. Trailing empty strings are * therefore not included in the resulting array.

      * - *

      The input "boo:and:foo", for example, yields the following + *

      The input {@code "boo:and:foo"}, for example, yields the following * results with these expressions: * *

      * * - * + * * - * + * *
      Regex    Result
      :{ "boo", "and", "foo" }
      {@code { "boo", "and", "foo" }}
      o{ "b", "", ":and:f" }
      {@code { "b", "", ":and:f" }}
      * * @@ -1281,12 +1281,12 @@ public final class Pattern } /** - * Returns a literal pattern String for the specified - * String. + * Returns a literal pattern {@code String} for the specified + * {@code String}. * - *

      This method produces a String that can be used to - * create a Pattern that would match the string - * s as if it were a literal pattern.

      Metacharacters + *

      This method produces a {@code String} that can be used to + * create a {@code Pattern} that would match the string + * {@code s} as if it were a literal pattern.

      Metacharacters * or escape sequences in the input sequence will be given no special * meaning. * diff --git a/jdk/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java b/jdk/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java index f7b767a75ba..94d7abc78a5 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java +++ b/jdk/src/java.base/share/classes/java/util/regex/PatternSyntaxException.java @@ -57,7 +57,7 @@ public class PatternSyntaxException * * @param index * The approximate index in the pattern of the error, - * or -1 if the index is not known + * or {@code -1} if the index is not known */ public PatternSyntaxException(String desc, String regex, int index) { this.desc = desc; @@ -69,7 +69,7 @@ public class PatternSyntaxException * Retrieves the error index. * * @return The approximate index in the pattern of the error, - * or -1 if the index is not known + * or {@code -1} if the index is not known */ public int getIndex() { return index; diff --git a/jdk/src/java.base/share/classes/java/util/regex/package-info.java b/jdk/src/java.base/share/classes/java/util/regex/package-info.java index 2907f10c003..86136637c56 100644 --- a/jdk/src/java.base/share/classes/java/util/regex/package-info.java +++ b/jdk/src/java.base/share/classes/java/util/regex/package-info.java @@ -37,7 +37,7 @@ * interface in order to support matching against characters from a * wide variety of input sources.

      * - *

      Unless otherwise noted, passing a null argument to a + *

      Unless otherwise noted, passing a null argument to a * method in any class or interface in this package will cause a * {@link java.lang.NullPointerException NullPointerException} to be * thrown. From cdb7f50a4bc9f0bef9f9eee632541034a86ea9a4 Mon Sep 17 00:00:00 2001 From: Vinnie Ryan Date: Wed, 12 Aug 2015 14:38:09 +0100 Subject: [PATCH 54/71] 8133318: Exclude intermittent failing PKCS11 tests on Solaris SPARC 11.1 and earlier Reviewed-by: mullan --- jdk/test/sun/security/pkcs11/PKCS11Test.java | 14 + .../pkcs11/Signature/ByteBuffers.java | 18 +- .../pkcs11/Signature/ReinitSignature.java | 318 +++++++++++++++++- .../security/pkcs11/Signature/TestDSA.java | 17 +- .../pkcs11/Signature/TestDSAKeyLength.java | 17 +- .../pkcs11/Signature/TestRSAKeyLength.java | 18 +- .../sun/security/pkcs11/ec/TestCurves.java | 17 +- .../sun/security/pkcs11/ec/TestECDSA.java | 15 + .../sun/security/pkcs11/rsa/TestCACerts.java | 16 + .../security/pkcs11/rsa/TestSignatures.java | 18 +- 10 files changed, 461 insertions(+), 7 deletions(-) diff --git a/jdk/test/sun/security/pkcs11/PKCS11Test.java b/jdk/test/sun/security/pkcs11/PKCS11Test.java index 14238ac641d..1b4c281048a 100644 --- a/jdk/test/sun/security/pkcs11/PKCS11Test.java +++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java @@ -630,4 +630,18 @@ public abstract class PKCS11Test { return algorithms; } + /** + * Get the identifier for the operating system distribution + */ + public String getDistro() { + + try (BufferedReader in = + new BufferedReader(new InputStreamReader( + Runtime.getRuntime().exec("uname -v").getInputStream()))) { + + return in.readLine(); + } catch (Exception e) { + return ""; + } + } } diff --git a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java index 8a76866f73f..d45063a8eda 100644 --- a/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java +++ b/jdk/test/sun/security/pkcs11/Signature/ByteBuffers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,22 @@ public class ByteBuffers extends PKCS11Test { } public void main(Provider p) throws Exception { + + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris provider (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + Random random = new Random(); int n = 10 * 1024; byte[] t = new byte[n]; diff --git a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java index d5ace8b9602..0f51ffaa096 100644 --- a/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java +++ b/jdk/test/sun/security/pkcs11/Signature/ReinitSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,306 @@ * @author Andreas Sterbenz * @library .. * @key randomness + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature + * @run main ReinitSignature */ import java.util.*; @@ -41,6 +341,22 @@ public class ReinitSignature extends PKCS11Test { } public void main(Provider p) throws Exception { + + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p); kpg.initialize(512); KeyPair kp = kpg.generateKeyPair(); diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java index 9f8c099f4c2..2b81bb3a333 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestDSA.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -110,6 +110,21 @@ public class TestDSA extends PKCS11Test { System.out.println("Testing provider " + provider + "..."); + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (provider.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + if (provider.getService("Signature", "SHA1withDSA") == null) { System.out.println("DSA not supported, skipping"); return; diff --git a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java index 0287e7d028f..efe97077628 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestDSAKeyLength.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,6 +46,21 @@ public class TestDSAKeyLength extends PKCS11Test { return; } + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (provider.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA", "SUN"); kpg.initialize(2048, new SecureRandom()); KeyPair pair = kpg.generateKeyPair(); diff --git a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java index 9d6f62a8a1c..0b79e68d20c 100644 --- a/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java +++ b/jdk/test/sun/security/pkcs11/Signature/TestRSAKeyLength.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,22 @@ public class TestRSAKeyLength extends PKCS11Test { main(new TestRSAKeyLength()); } public void main(Provider p) throws Exception { + + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + boolean isValidKeyLength[] = { true, true, true, false, false }; String algos[] = { "SHA1withRSA", "SHA224withRSA", "SHA256withRSA", "SHA384withRSA", "SHA512withRSA" }; diff --git a/jdk/test/sun/security/pkcs11/ec/TestCurves.java b/jdk/test/sun/security/pkcs11/ec/TestCurves.java index 6451e41514b..3ada7788cf9 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestCurves.java +++ b/jdk/test/sun/security/pkcs11/ec/TestCurves.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 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 @@ -58,6 +58,21 @@ public class TestCurves extends PKCS11Test { return; } + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + // Check if this is sparc for later failure avoidance. boolean sparc = false; if (System.getProperty("os.arch").equals("sparcv9")) { diff --git a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java index b811b44c6ef..b1bd35f4783 100644 --- a/jdk/test/sun/security/pkcs11/ec/TestECDSA.java +++ b/jdk/test/sun/security/pkcs11/ec/TestECDSA.java @@ -123,6 +123,21 @@ public class TestECDSA extends PKCS11Test { return; } + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (provider.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + /* * PKCS11Test.main will remove this provider if needed */ diff --git a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java index 32f3a4677ac..cd845c68201 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestCACerts.java @@ -47,6 +47,22 @@ public class TestCACerts extends PKCS11Test { } public void main(Provider p) throws Exception { + + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + long start = System.currentTimeMillis(); Providers.setAt(p, 1); try { diff --git a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java index b27de0a9b77..a6070ea675d 100644 --- a/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java +++ b/jdk/test/sun/security/pkcs11/rsa/TestSignatures.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,6 +97,22 @@ public class TestSignatures extends PKCS11Test { } public void main(Provider p) throws Exception { + + /* + * Use Solaris SPARC 11.2 or later to avoid an intermittent failure + * when running SunPKCS11-Solaris (8044554) + */ + if (p.getName().equals("SunPKCS11-Solaris") && + System.getProperty("os.name").equals("SunOS") && + System.getProperty("os.arch").equals("sparcv9") && + System.getProperty("os.version").compareTo("5.11") <= 0 && + getDistro().compareTo("11.2") < 0) { + + System.out.println("SunPKCS11-Solaris provider requires " + + "Solaris SPARC 11.2 or later, skipping"); + return; + } + long start = System.currentTimeMillis(); provider = p; data = new byte[2048]; From 5924c95500701a62db27179596e103621470f538 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Wed, 12 Aug 2015 07:55:24 -0700 Subject: [PATCH 55/71] 8132539: (fs) Files.lines(path).collect() returns wrong value in JDK 9 with certain files Do not use the Spliterator approach for lines() if the FileChannel size is thought to be zero. Reviewed-by: chegar --- .../share/classes/java/nio/file/Files.java | 4 +++- jdk/test/java/nio/file/Files/StreamTest.java | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/nio/file/Files.java b/jdk/src/java.base/share/classes/java/nio/file/Files.java index 079361eb088..6f968297631 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Files.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java @@ -3835,7 +3835,9 @@ public final class Files { // 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 s = new FileChannelLinesSpliterator(fc, cs, 0, (int) length); return StreamSupport.stream(s, false) .onClose(Files.asUncheckedRunnable(fc)); diff --git a/jdk/test/java/nio/file/Files/StreamTest.java b/jdk/test/java/nio/file/Files/StreamTest.java index 0259fac221a..c21faf96627 100644 --- a/jdk/test/java/nio/file/Files/StreamTest.java +++ b/jdk/test/java/nio/file/Files/StreamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,7 @@ */ /* @test - * @bug 8006884 8019526 + * @bug 8006884 8019526 8132539 * @library .. * @build PassThroughFileSystem FaultyFileSystem * @run testng StreamTest @@ -685,4 +685,18 @@ public class StreamTest { // expected } } + + public void testProcFile() throws IOException { + if (System.getProperty("os.name").equals("Linux")) { + Path path = Paths.get("/proc/cpuinfo"); + if (Files.exists(path)) { + String NEW_LINE = System.getProperty("line.separator"); + String s = + Files.lines(path).collect(Collectors.joining(NEW_LINE)); + if (s.length() == 0) { + fail("Files.lines(\"" + path + "\") returns no data"); + } + } + } + } } From 6b0aff010f4a7e3d5fc35f8369b18ed1444141d5 Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov Date: Wed, 12 Aug 2015 22:24:26 +0300 Subject: [PATCH 56/71] 8133232: [fs] Regex has redundant | in the char class Reviewed-by: bpb, rriggs --- .../unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java b/jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java index 20e077cbdc3..9eb683b2bd7 100644 --- a/jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java +++ b/jdk/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java @@ -159,7 +159,7 @@ class MimeTypesFileTypeDetector extends AbstractFileTypeDetector { final String EXTEQUAL = "exts="; String extRegex = "\\b" + EXTEQUAL + - "(\"[\\p{Graph}|\\p{Blank}]+?\"|\\p{Graph}+\\b)"; + "(\"[\\p{Graph}\\p{Blank}]+?\"|\\p{Graph}+\\b)"; Pattern extPattern = Pattern.compile(extRegex); Matcher extMatcher = extPattern.matcher(entry); @@ -169,7 +169,7 @@ class MimeTypesFileTypeDetector extends AbstractFileTypeDetector { if (exts.charAt(0) == '"') { exts = exts.substring(1, exts.length() - 1); } - String[] extList = exts.split("[\\p{Blank}|\\p{Punct}]+"); + String[] extList = exts.split("[\\p{Blank}\\p{Punct}]+"); for (String ext : extList) { putIfAbsent(ext, type); } From ec15b70de5b6685b65e409347aa7f3001b6f0e4d Mon Sep 17 00:00:00 2001 From: Rajan Halade Date: Thu, 13 Aug 2015 06:42:05 +0300 Subject: [PATCH 57/71] 8048624: Tests for SealedObject Reviewed-by: valeriep --- .../SealedObject/TestSealedObjectNull.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 jdk/test/javax/crypto/SealedObject/TestSealedObjectNull.java diff --git a/jdk/test/javax/crypto/SealedObject/TestSealedObjectNull.java b/jdk/test/javax/crypto/SealedObject/TestSealedObjectNull.java new file mode 100644 index 00000000000..4b6eff27cfb --- /dev/null +++ b/jdk/test/javax/crypto/SealedObject/TestSealedObjectNull.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.IOException; +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NullCipher; +import javax.crypto.SealedObject; + +/* + * @test + * @bug 8048624 + * @summary This test instantiate a NullCipher, seal and unseal a String + * object using the SealedObject with the initialized NullCipher, + * and then compare the String content. + */ +public class TestSealedObjectNull { + + private static final String SEAL_STR = "Any String!@#$%^"; + + public static void main(String[] args) throws IOException, + IllegalBlockSizeException, ClassNotFoundException, + BadPaddingException { + Cipher nullCipher = new NullCipher(); + + // Seal + SealedObject so = new SealedObject(SEAL_STR, nullCipher); + + // Unseal and compare + if (!(SEAL_STR.equals(so.getObject(nullCipher)))) { + throw new RuntimeException("Unseal and compare failed."); + } + + System.out.println("Test passed."); + } +} From 48b997d5b3c153940f022496e7c849c8b0965dd0 Mon Sep 17 00:00:00 2001 From: Amy Lu Date: Thu, 13 Aug 2015 09:35:45 +0300 Subject: [PATCH 58/71] 8079769: tools/pack200/PackTestZip64.java may timeout at preparing the large test file Reviewed-by: ksrini --- jdk/test/tools/pack200/PackTestZip64.java | 15 ++++++--- .../tools/pack200/PackTestZip64Manual.java | 33 +++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 jdk/test/tools/pack200/PackTestZip64Manual.java diff --git a/jdk/test/tools/pack200/PackTestZip64.java b/jdk/test/tools/pack200/PackTestZip64.java index 2c7d1a93e8f..d952549cc20 100644 --- a/jdk/test/tools/pack200/PackTestZip64.java +++ b/jdk/test/tools/pack200/PackTestZip64.java @@ -37,10 +37,13 @@ import java.util.zip.ZipEntry; * @compile -XDignore.symbol.file Utils.java PackTestZip64.java * @run main PackTestZip64 * @author kizune - * @key intermittent */ public class PackTestZip64 { + + private static final boolean bigJarEnabled + = Boolean.getBoolean("PackTestZip64.enableBigJar"); + public static void main(String... args) throws Exception { testPacking(); Utils.cleanup(); @@ -50,10 +53,14 @@ public class PackTestZip64 { private static final byte[] BUFFER = new byte[1024]; static void testPacking() throws IOException { - // make a copy of the test specimen to local directory File testFile = new File("tools_java.jar"); - // Add a large number of small files to the golden jar - generateLargeJar(testFile, Utils.getGoldenJar()); + if (bigJarEnabled) { + // Add a large number of small files to the golden jar + generateLargeJar(testFile, Utils.getGoldenJar()); + } else { + // make a copy of the test specimen to local directory + Utils.copyFile(Utils.getGoldenJar(), testFile); + } List cmdsList = new ArrayList<>(); diff --git a/jdk/test/tools/pack200/PackTestZip64Manual.java b/jdk/test/tools/pack200/PackTestZip64Manual.java new file mode 100644 index 00000000000..38e4101ac3b --- /dev/null +++ b/jdk/test/tools/pack200/PackTestZip64Manual.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8029646 + * @summary tests that native unpacker produces the same result as Java one + * @compile -XDignore.symbol.file Utils.java PackTestZip64.java + * @run main/manual/othervm -DPackTestZip64.enableBigJar=true PackTestZip64 + */ + +public class PackTestZip64Manual { +} From 6b4c93503533ca04b56bc5b917fe8c5ef8ef1edb Mon Sep 17 00:00:00 2001 From: Alexander Stepanov Date: Thu, 13 Aug 2015 12:40:07 +0300 Subject: [PATCH 59/71] 8133459: replace tags (obsolete in html5) in java.nio docs Reviewed-by: lancea --- .../share/classes/java/nio/Buffer.java | 26 +-- .../share/classes/java/nio/ByteOrder.java | 6 +- .../classes/java/nio/MappedByteBuffer.java | 6 +- .../java/nio/X-Buffer-bin.java.template | 4 +- .../classes/java/nio/X-Buffer.java.template | 181 +++++++++--------- .../nio/channels/AsynchronousByteChannel.java | 12 +- .../AsynchronousServerSocketChannel.java | 8 +- .../channels/AsynchronousSocketChannel.java | 20 +- .../classes/java/nio/channels/Channel.java | 2 +- .../java/nio/channels/DatagramChannel.java | 8 +- .../java/nio/channels/FileChannel.java | 74 +++---- .../classes/java/nio/channels/FileLock.java | 20 +- .../nio/channels/GatheringByteChannel.java | 18 +- .../nio/channels/InterruptibleChannel.java | 2 +- .../nio/channels/ReadableByteChannel.java | 10 +- .../nio/channels/ScatteringByteChannel.java | 22 +-- .../java/nio/channels/SelectableChannel.java | 32 ++-- .../java/nio/channels/SelectionKey.java | 50 ++--- .../classes/java/nio/channels/Selector.java | 4 +- .../nio/channels/ServerSocketChannel.java | 4 +- .../java/nio/channels/SocketChannel.java | 30 +-- .../nio/channels/WritableByteChannel.java | 8 +- .../java/nio/channels/package-info.java | 80 ++++---- .../spi/AbstractInterruptibleChannel.java | 12 +- .../spi/AbstractSelectableChannel.java | 4 +- .../nio/channels/spi/AbstractSelector.java | 6 +- .../spi/AsynchronousChannelProvider.java | 8 +- .../nio/channels/spi/SelectorProvider.java | 16 +- .../nio/charset/Charset-X-Coder.java.template | 66 +++---- .../classes/java/nio/charset/Charset.java | 94 ++++----- .../classes/java/nio/charset/CoderResult.java | 24 +-- .../java/nio/charset/package-info.java | 6 +- .../java/nio/charset/spi/CharsetProvider.java | 14 +- .../share/classes/java/nio/exceptions | 2 +- .../classes/java/nio/file/FileSystem.java | 20 +- .../share/classes/java/nio/file/Files.java | 20 +- .../java/nio/file/InvalidPathException.java | 16 +- .../share/classes/java/nio/file/Path.java | 9 +- .../share/classes/java/nio/file/Paths.java | 6 +- .../file/attribute/AclFileAttributeView.java | 4 +- .../attribute/FileOwnerAttributeView.java | 4 +- .../attribute/PosixFileAttributeView.java | 9 +- .../UserDefinedFileAttributeView.java | 10 +- .../attribute/UserPrincipalLookupService.java | 6 +- .../UserPrincipalNotFoundException.java | 2 +- .../java/nio/file/attribute/package-info.java | 20 +- .../java/nio/file/spi/FileSystemProvider.java | 10 +- .../java/nio/file/spi/FileTypeDetector.java | 2 +- .../java/nio/file/spi/package-info.java | 4 +- .../share/classes/java/nio/package-info.java | 24 +-- .../share/classes/sun/nio/ByteBuffered.java | 16 +- .../sun/nio/ch/AllocatedNativeObject.java | 4 +- .../classes/com/sun/nio/sctp/SctpChannel.java | 12 +- 53 files changed, 543 insertions(+), 534 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/nio/Buffer.java b/jdk/src/java.base/share/classes/java/nio/Buffer.java index ba72f285a8f..8669242c195 100644 --- a/jdk/src/java.base/share/classes/java/nio/Buffer.java +++ b/jdk/src/java.base/share/classes/java/nio/Buffer.java @@ -96,10 +96,10 @@ import jdk.internal.HotSpotIntrinsicCandidate; * capacity values: * *

      - * 0 <= - * mark <= - * position <= - * limit <= + * {@code 0} {@code <=} + * mark {@code <=} + * position {@code <=} + * limit {@code <=} * capacity *
      * @@ -229,7 +229,7 @@ public abstract class Buffer { * The new buffer's capacity, in $type$s * * @throws IllegalArgumentException - * If the capacity 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 @@ public abstract class Buffer { * @return This buffer * * @throws IllegalArgumentException - * If the preconditions on newPosition 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 @@ public abstract class Buffer { * @return This buffer * * @throws IllegalArgumentException - * If the preconditions on newLimit 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 @@ public abstract class Buffer { * Tells whether there are any elements between the current position and * the limit. * - * @return true 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 @@ public abstract class Buffer { /** * Tells whether or not this buffer is read-only. * - * @return true 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 @@ public abstract class Buffer { * Tells whether or not this buffer is backed by an accessible * array. * - *

      If this method returns true then the {@link #array() array} + *

      If this method returns {@code true} then the {@link #array() array} * and {@link #arrayOffset() arrayOffset} methods may safely be invoked. *

      * - * @return true 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 @@ public abstract class Buffer { * element of the buffer  (optional operation). * *

      If this buffer is backed by an array then buffer position p - * corresponds to array index p + arrayOffset(). + * corresponds to array index p + {@code arrayOffset()}. * *

      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 @@ public abstract class Buffer { * Tells whether or not this buffer is * direct. * - * @return true if, and only if, this buffer is direct + * @return {@code true} if, and only if, this buffer is direct * * @since 1.6 */ diff --git a/jdk/src/java.base/share/classes/java/nio/ByteOrder.java b/jdk/src/java.base/share/classes/java/nio/ByteOrder.java index a20cacce8f9..97dc16b3909 100644 --- a/jdk/src/java.base/share/classes/java/nio/ByteOrder.java +++ b/jdk/src/java.base/share/classes/java/nio/ByteOrder.java @@ -75,9 +75,9 @@ public final class ByteOrder { /** * Constructs a string describing this object. * - *

      This method returns the string "BIG_ENDIAN" for {@link - * #BIG_ENDIAN} and "LITTLE_ENDIAN" for {@link #LITTLE_ENDIAN}. - *

      + *

      This method returns the string + * {@code "BIG_ENDIAN"} for {@link #BIG_ENDIAN} and + * {@code "LITTLE_ENDIAN"} for {@link #LITTLE_ENDIAN}. * * @return The specified string */ diff --git a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java index 5331cb372da..953a78b8206 100644 --- a/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java +++ b/jdk/src/java.base/share/classes/java/nio/MappedByteBuffer.java @@ -116,10 +116,10 @@ public abstract class MappedByteBuffer * Tells whether or not this buffer's content is resident in physical * memory. * - *

      A return value of true implies that it is highly likely + *

      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 false 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 @@ public abstract class MappedByteBuffer * underlying operating system may have paged out some of the buffer's data * by the time that an invocation of this method returns.

      * - * @return true 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() { diff --git a/jdk/src/java.base/share/classes/java/nio/X-Buffer-bin.java.template b/jdk/src/java.base/share/classes/java/nio/X-Buffer-bin.java.template index 44d2c4e3172..3473e2d824d 100644 --- a/jdk/src/java.base/share/classes/java/nio/X-Buffer-bin.java.template +++ b/jdk/src/java.base/share/classes/java/nio/X-Buffer-bin.java.template @@ -78,7 +78,7 @@ class XXX { * @return The $type$ value at the given index * * @throws IndexOutOfBoundsException - * If index is negative + * If {@code index} is negative * or not smaller than the buffer's limit, * minus $nbytesButOne$ */ @@ -100,7 +100,7 @@ class XXX { * @return This buffer * * @throws IndexOutOfBoundsException - * If index is negative + * If {@code index} is negative * or not smaller than the buffer's limit, * minus $nbytesButOne$ * diff --git a/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template b/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template index 78afa40a506..d34f975526c 100644 --- a/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template +++ b/jdk/src/java.base/share/classes/java/nio/X-Buffer.java.template @@ -133,7 +133,7 @@ import java.util.stream.$Streamtype$Stream; *

      Access to binary data

      * *

      This class defines methods for reading and writing values of all other - * primitive types, except boolean. 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 @@ import java.util.stream.$Streamtype$Stream; * void {@link #putFloat(float) putFloat(float f)} * void {@link #putFloat(int,float) putFloat(int index, float f)} * - *

      Corresponding methods are defined for the types char, - * short, int, long, and double. The index + *

      Corresponding methods are defined for the types {@code char, + * short, int, long}, and {@code double}. The index * parameters of the absolute get and put methods are in terms of * bytes rather than of the type being read or written. * @@ -167,8 +167,7 @@ import java.util.stream.$Streamtype$Stream; * #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 char, short, int, long, and - * double. + * the types {@code char, short, int, long}, and {@code double}. * *

      View buffers have three important advantages over the families of * type-specific get and put methods described above: @@ -196,7 +195,7 @@ import java.util.stream.$Streamtype$Stream; * *

      Like a byte buffer, $a$ $type$ buffer is either direct or non-direct. A - * $type$ buffer created via the wrap 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 @@ import java.util.stream.$Streamtype$Stream; * *

      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 {@link java.util.regex}. + * example in the regular-expression package {@link java.util.regex}. *

      * #end[char] @@ -306,7 +305,7 @@ public abstract class $Type$Buffer * @return The new $type$ buffer * * @throws IllegalArgumentException - * If the capacity 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 @@ public abstract class $Type$Buffer * @return The new $type$ buffer * * @throws IllegalArgumentException - * If the capacity 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 @@ public abstract class $Type$Buffer *

      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 - * array.length, its position will be offset, its limit - * will be offset + length, 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 @@ public abstract class $Type$Buffer * * @param offset * The offset of the subarray to be used; must be non-negative and - * no larger than array.length. 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 - * array.length - offset. - * The new buffer's limit will be set to offset + length. + * {@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 offset and length + * 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 @@ public abstract class $Type$Buffer *

      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 - * array.length, 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 @@ public abstract class $Type$Buffer * *

      The content of the new, read-only buffer will be the content of the * given character sequence. The buffer's capacity will be - * csq.length(), its position will be start, its limit - * will be end, and its mark will be undefined.

      + * {@code csq.length()}, its position will be {@code start}, its limit + * will be {@code end}, and its mark will be undefined.

      * * @param csq * The character sequence from which the new character buffer is to @@ -467,19 +466,19 @@ public abstract class $Type$Buffer * * @param start * The index of the first character to be used; - * must be non-negative and no larger than csq.length(). + * 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 start and no larger - * than csq.length(). + * 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 start and end + * 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 @@ public abstract class $Type$Buffer * *

      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 - * csq.length(), its position will be zero, and its mark will be + * {@code csq.length()}, its position will be zero, and its mark will be * undefined.

      * * @param csq @@ -624,7 +623,7 @@ public abstract class $Type$Buffer * @return The $type$ at the given index * * @throws IndexOutOfBoundsException - * If index 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 @@ public abstract class $Type$Buffer * @return This buffer * * @throws IndexOutOfBoundsException - * If index is negative + * If {@code index} is negative * or not smaller than the buffer's limit * * @throws ReadOnlyBufferException @@ -674,17 +673,17 @@ public abstract class $Type$Buffer *

      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 - * length > remaining(), then no + * {@code length} {@code >} {@code remaining()}, then no * $type$s are transferred and a {@link BufferUnderflowException} is * thrown. * - *

      Otherwise, this method copies length $type$s from this + *

      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 length. + * buffer is then incremented by {@code length}. * *

      In other words, an invocation of this method of the form - * src.get(dst, off, len) has exactly the same effect as + * src.get(dst, off, len) has exactly the same effect as * the loop * *

      {@code
      @@ -701,21 +700,21 @@ public abstract class $Type$Buffer
            * @param  offset
            *         The offset within the array of the first $type$ to be
            *         written; must be non-negative and no larger than
      -     *         dst.length
      +     *         {@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
      -     *         dst.length - offset
      +     *         {@code dst.length - offset}
            *
            * @return  This buffer
            *
            * @throws  BufferUnderflowException
      -     *          If there are fewer than length $type$s
      +     *          If there are fewer than {@code length} $type$s
            *          remaining in this buffer
            *
            * @throws  IndexOutOfBoundsException
      -     *          If the preconditions on the offset and length
      +     *          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 @@ public abstract class $Type$Buffer
            *
            * 

      This method transfers $type$s from this buffer into the given * destination array. An invocation of this method of the form - * src.get(a) behaves in exactly the same way as the invocation + * {@code src.get(a)} behaves in exactly the same way as the invocation * *

            *     src.get(a, 0, a.length) 
      @@ -744,7 +743,7 @@ public abstract class $Type$Buffer * @return This buffer * * @throws BufferUnderflowException - * If there are fewer than length $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 @@ public abstract class $Type$Buffer *

      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 - * src.remaining() > remaining(), + * {@code src.remaining()} {@code >} {@code remaining()}, * then no $type$s are transferred and a {@link * BufferOverflowException} is thrown. * *

      Otherwise, this method copies - * n = src.remaining() $type$s from the given + * n = {@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 n. * *

      In other words, an invocation of this method of the form - * dst.put(src) has exactly the same effect as the loop + * {@code dst.put(src)} has exactly the same effect as the loop * *

            *     while (src.hasRemaining())
      @@ -814,17 +813,17 @@ public abstract class $Type$Buffer
            * 

      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 - * length > remaining(), then no + * {@code length} {@code >} {@code remaining()}, then no * $type$s are transferred and a {@link BufferOverflowException} is * thrown. * - *

      Otherwise, this method copies length $type$s from the + *

      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 length. + * is then incremented by {@code length}. * *

      In other words, an invocation of this method of the form - * dst.put(src, off, len) has exactly the same effect as + * dst.put(src, off, len) has exactly the same effect as * the loop * *

      {@code
      @@ -840,12 +839,12 @@ public abstract class $Type$Buffer
            *
            * @param  offset
            *         The offset within the array of the first $type$ to be read;
      -     *         must be non-negative and no larger than array.length
      +     *         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
      -     *         array.length - offset
      +     *         {@code array.length - offset}
            *
            * @return  This buffer
            *
      @@ -853,7 +852,7 @@ public abstract class $Type$Buffer
            *          If there is insufficient space in this buffer
            *
            * @throws  IndexOutOfBoundsException
      -     *          If the preconditions on the offset and length
      +     *          If the preconditions on the {@code offset} and {@code length}
            *          parameters do not hold
            *
            * @throws  ReadOnlyBufferException
      @@ -874,7 +873,7 @@ public abstract class $Type$Buffer
            *
            * 

      This method transfers the entire content of the given source * $type$ array into this buffer. An invocation of this method of the - * form dst.put(a) behaves in exactly the same way as the + * form {@code dst.put(a)} behaves in exactly the same way as the * invocation * *

      @@ -903,18 +902,18 @@ public abstract class $Type$Buffer
            * 

      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 - * end - start > remaining(), + * end - start {@code >} {@code remaining()}, * then no $type$s are transferred and a {@link * BufferOverflowException} is thrown. * *

      Otherwise, this method copies - * n = end - start $type$s + * n = {@code end} - {@code start} $type$s * from the given string into this buffer, starting at the given - * start 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 n. * *

      In other words, an invocation of this method of the form - * dst.put(src, start, end) has exactly the same effect + * dst.put(src, start, end) has exactly the same effect * as the loop * *

      {@code
      @@ -931,12 +930,12 @@ public abstract class $Type$Buffer
            * @param  start
            *         The offset within the string of the first $type$ to be read;
            *         must be non-negative and no larger than
      -     *         string.length()
      +     *         {@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
      -     *         string.length()
      +     *         {@code string.length()}
            *
            * @return  This buffer
            *
      @@ -944,7 +943,7 @@ public abstract class $Type$Buffer
            *          If there is insufficient space in this buffer
            *
            * @throws  IndexOutOfBoundsException
      -     *          If the preconditions on the start and end
      +     *          If the preconditions on the {@code start} and {@code end}
            *          parameters do not hold
            *
            * @throws  ReadOnlyBufferException
      @@ -966,7 +965,7 @@ public abstract class $Type$Buffer
            *
            * 

      This method transfers the entire content of the given source string * into this buffer. An invocation of this method of the form - * dst.put(s) behaves in exactly the same way as the invocation + * {@code dst.put(s)} behaves in exactly the same way as the invocation * *

            *     dst.put(s, 0, s.length()) 
      @@ -995,11 +994,11 @@ public abstract class $Type$Buffer * Tells whether or not this buffer is backed by an accessible $type$ * array. * - *

      If this method returns true then the {@link #array() array} + *

      If this method returns {@code true} then the {@link #array() array} * and {@link #arrayOffset() arrayOffset} methods may safely be invoked. *

      * - * @return true 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 @@ public abstract class $Type$Buffer * element of the buffer  (optional operation). * *

      If this buffer is backed by an array then buffer position p - * corresponds to array index p + arrayOffset(). + * corresponds to array index p + {@code arrayOffset()}. * *

      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 @@ public abstract class $Type$Buffer * *

      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 p = position() is copied + * $type$ at index p = {@code position()} is copied * to index zero, the $type$ at index p + 1 is copied * to index one, and so forth until the $type$ at index - * limit() - 1 is copied to index - * n = limit() - 1 - p. + * {@code limit()} - 1 is copied to index + * n = {@code limit()} - {@code 1} - p. * The buffer's position is then set to n+1 and its limit is set to * its capacity. The mark, if defined, is discarded. * @@ -1183,7 +1182,7 @@ public abstract class $Type$Buffer * *

      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 buf: + * from one channel to another via the buffer {@code buf}: * *

      {@code
            *   buf.clear();          // Prepare buffer for use
      @@ -1206,7 +1205,7 @@ public abstract class $Type$Buffer
           /**
            * Tells whether or not this $type$ buffer is direct.
            *
      -     * @return  true 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 @@ public abstract class $Type$Buffer
            * Returns the current hash code of this buffer.
            *
            * 

      The hash code of a $type$ buffer depends only upon its remaining - * elements; that is, upon the elements from position() up to, and - * including, the element at limit() - 1. + * elements; that is, upon the elements from {@code position()} up to, and + * including, the element at {@code limit()} - {@code 1}. * *

      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 @@ public abstract class $Type$Buffer * * @param ob The object to which this buffer is to be compared * - * @return true 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 @@ public abstract class $Type$Buffer * *

      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 limit() - 1. Invoking this method does not + * at index {@code limit()} - 1. Invoking this method does not * change the buffer's position.

      * * @return The specified string @@ -1388,7 +1387,7 @@ public abstract class $Type$Buffer *

      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 - * remaining().

      + * {@code remaining()}.

      * * @return The length of this character buffer */ @@ -1402,13 +1401,13 @@ public abstract class $Type$Buffer * * @param index * The index of the character to be read, relative to the position; - * must be non-negative and smaller than remaining() + * must be non-negative and smaller than {@code remaining()} * * @return The character at index - * position() + index + * position() + index * * @throws IndexOutOfBoundsException - * If the preconditions on index 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 @@ public abstract class $Type$Buffer * 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 - * position() + start, and its limit will be - * position() + end. The new buffer will be + * {@code position()} + {@code start}, and its limit will be + * {@code position()} + {@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.

      * * @param start * The index, relative to the current position, of the first * character in the subsequence; must be non-negative and no larger - * than remaining() + * 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 start and no larger than - * remaining() + * smaller than {@code start} and no larger than + * {@code remaining()} * * @return The new character buffer * * @throws IndexOutOfBoundsException - * If the preconditions on start and end + * If the preconditions on {@code start} and {@code end} * do not hold */ public abstract CharBuffer subSequence(int start, int end); @@ -1453,21 +1452,21 @@ public abstract class $Type$Buffer * Appends the specified character sequence to this * buffer  (optional operation). * - *

      An invocation of this method of the form dst.append(csq) + *

      An invocation of this method of the form {@code dst.append(csq)} * behaves in exactly the same way as the invocation * *

            *     dst.put(csq.toString()) 
      * - *

      Depending on the specification of toString for the - * character sequence csq, the entire sequence may not be + *

      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 csq is - * null, then the four characters "null" 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 @@ public abstract class $Type$Buffer * Appends a subsequence of the specified character sequence to this * buffer  (optional operation). * - *

      An invocation of this method of the form dst.append(csq, start, - * end) when csq is not null, behaves in exactly the + *

      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 * *

      @@ -1500,9 +1499,9 @@ public abstract class $Type$Buffer
            *
            * @param  csq
            *         The character sequence from which a subsequence will be
      -     *         appended.  If csq is null, then characters
      -     *         will be appended as if csq contained the four
      -     *         characters "null".
      +     *         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 @@ public abstract class $Type$Buffer
            *          If there is insufficient space in this buffer
            *
            * @throws  IndexOutOfBoundsException
      -     *          If start or end are negative, start
      -     *          is greater than end, or end is greater than
      -     *          csq.length()
      +     *          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 @@ public abstract class $Type$Buffer
            * Appends the specified $type$  to this
            * buffer  (optional operation).
            *
      -     * 

      An invocation of this method of the form dst.append($x$) + *

      An invocation of this method of the form {@code dst.append($x$)} * behaves in exactly the same way as the invocation * *

      @@ -1562,7 +1561,7 @@ public abstract class $Type$Buffer
            * Retrieves this buffer's byte order.
            *
            * 

      The byte order of $a$ $type$ buffer created by allocation or by - * wrapping an existing $type$ 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 view of a byte buffer is that of the diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java index b96a2391151..56003d53ec7 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousByteChannel.java @@ -70,13 +70,13 @@ public interface AsynchronousByteChannel * {@code 0} without initiating an I/O operation. * *

      Suppose that a byte sequence of length n is read, where - * 0 < n <= r. + * {@code 0} {@code <} n {@code <=} r. * This byte sequence will be transferred into the buffer so that the first * byte in the sequence is at index p and the last byte is at index - * p + n - 1, + * p {@code +} n {@code -} {@code 1}, * where p is the buffer's position at the moment the read is * performed. Upon completion the buffer's position will be equal to - * p + n; its limit will not have changed. + * p {@code +} n; its limit will not have changed. * *

      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 @@ public interface AsynchronousByteChannel * {@code 0} without initiating an I/O operation. * *

      Suppose that a byte sequence of length n is written, where - * 0 < n <= r. + * {@code 0} {@code <} n {@code <=} r. * This byte sequence will be transferred from the buffer starting at index * p, where p is the buffer's position at the moment the * write is performed; the index of the last byte written will be - * p + n - 1. + * p {@code +} n {@code -} {@code 1}. * Upon completion the buffer's position will be equal to - * p + n; its limit will not have changed. + * p {@code +} n; its limit will not have changed. * *

      Buffers are not safe for use by multiple concurrent threads so care * should be taken to not access the buffer until the operation has diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java index 29ecbd626ac..44a2460426f 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java @@ -41,7 +41,7 @@ import java.io.IOException; * 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 accept 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. * *

      Channels of this type are safe for use by multiple concurrent threads @@ -122,13 +122,13 @@ public abstract class AsynchronousServerSocketChannel * 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 null 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 default group. * * @param group * The group to which the newly constructed channel should be bound, - * or null for the default group + * or {@code null} for the default group * * @return A new asynchronous server socket channel * @@ -176,7 +176,7 @@ public abstract class AsynchronousServerSocketChannel *

      * * @param local - * The local address to bind the socket, or null to bind + * The local address to bind the socket, or {@code null} to bind * to an automatically assigned socket address * * @return This channel diff --git a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java index 1ed1e8602aa..d5e2abeb63a 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java @@ -452,11 +452,11 @@ public abstract class AsynchronousSocketChannel * at the moment that the read is attempted. * *

      Suppose that a byte sequence of length n is read, where - * 0 < n <= r. - * Up to the first dsts[offset].remaining() bytes of this sequence - * are transferred into buffer dsts[offset], up to the next - * dsts[offset+1].remaining() bytes are transferred into buffer - * dsts[offset+1], and so forth, until the entire byte sequence + * {@code 0} {@code <} n {@code <=} r. + * 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 @@ public abstract class AsynchronousSocketChannel * at the moment that the write is attempted. * *

      Suppose that a byte sequence of length n is written, where - * 0 < n <= r. - * Up to the first srcs[offset].remaining() bytes of this sequence - * are written from buffer srcs[offset], up to the next - * srcs[offset+1].remaining() bytes are written from buffer - * srcs[offset+1], and so forth, until the entire byte sequence is + * {@code 0} {@code <} n {@code <=} r. + * 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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/Channel.java b/jdk/src/java.base/share/classes/java/nio/channels/Channel.java index 663d0e098b2..5cca15e0b5d 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/Channel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/Channel.java @@ -58,7 +58,7 @@ public interface Channel extends Closeable { /** * Tells whether or not this channel is open. * - * @return true if, and only if, this channel is open + * @return {@code true} if, and only if, this channel is open */ public boolean isOpen(); diff --git a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java index b85c98c59c7..0b3278bf356 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/DatagramChannel.java @@ -187,8 +187,8 @@ public abstract class DatagramChannel * operations. * *

      Datagram channels support reading and writing, so this method - * returns ({@link SelectionKey#OP_READ} | {@link - * SelectionKey#OP_WRITE}).

      + * returns {@code (}{@link SelectionKey#OP_READ} {@code |} {@link + * SelectionKey#OP_WRITE}{@code )}. * * @return The valid-operation set */ @@ -341,7 +341,7 @@ public abstract class DatagramChannel * 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 - * null. + * {@code null}. * *

      The datagram is transferred into the given byte buffer starting at * its current position, as if by a regular {@link @@ -371,7 +371,7 @@ public abstract class DatagramChannel * The buffer into which the datagram is to be transferred * * @return The datagram's source address, - * or null 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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java index eb3934d3dea..066ef8a9fa9 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java @@ -63,7 +63,7 @@ import java.util.Collections; * *

    • A region of a file may be {@link #map mapped} * directly into memory; for large files this is often much more efficient - * than invoking the usual read or write methods. + * than invoking the usual {@code read} or {@code write} methods. *

    • * *
    • Updates made to a file may be {@link #force forced @@ -107,10 +107,10 @@ import java.util.Collections; * 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 getChannel 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 getChannel + * 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 @@ import java.util.Collections; * 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 "r" and will be open for reading and writing - * if the instance was created with mode "rw". + * was created with mode {@code "r"} and will be open for reading and writing + * if the instance was created with mode {@code "rw"}. * *

      A file channel that is open for writing may be in * append mode, 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 true 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 @@ public abstract class FileChannel *

      If the file does not reside on a local device then no such guarantee * is made. * - *

      The metaData parameter can be used to limit the number of + *

      The {@code metaData} parameter can be used to limit the number of * I/O operations that this method is required to perform. Passing - * false for this parameter indicates that only updates to the - * file's content need be written to storage; passing true + * {@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 @@ public abstract class FileChannel * force changes made to the buffer's content to be written.

      * * @param metaData - * If true 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 @@ public abstract class FileChannel * Transfers bytes from this channel's file to the given writable byte * channel. * - *

      An attempt is made to read up to count bytes starting at - * the given position in this channel's file and write them to the + *

      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 - * count bytes starting at the given position, or if the - * target channel is non-blocking and it has fewer than count + * {@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. * *

      This method does not modify this channel's position. If the given @@ -624,14 +624,14 @@ public abstract class FileChannel * Transfers bytes into this channel's file from the given readable byte * channel. * - *

      An attempt is made to read up to count bytes from the + *

      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 position. 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 - * count bytes remaining, or if the source channel is non-blocking - * and has fewer than count 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. * *

      This method does not modify this channel's position. If the given @@ -704,7 +704,7 @@ public abstract class FileChannel * The file position at which the transfer is to begin; * must be non-negative * - * @return The number of bytes read, possibly zero, or -1 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 @@ public abstract class FileChannel * *

      The {@link MappedByteBuffer mapped byte buffer} * returned by this method will have a position of zero and a limit and - * capacity of size; 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 @@ public abstract class FileChannel * @return The mapped byte buffer * * @throws NonReadableChannelException - * If the mode 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 mode 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 @@ public abstract class FileChannel * will be thrown immediately; the thread's interrupt status will not be * changed. * - *

      The region specified by the position and size + *

      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 @@ public abstract class FileChannel * * @param size * The size of the locked region; must be non-negative, and the sum - * position + size must be non-negative + * {@code position} + {@code size} must be non-negative * * @param shared - * true 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); - * false 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 @@ public abstract class FileChannel * region * * @throws NonReadableChannelException - * If shared is true this channel was not + * If {@code shared} is {@code true} this channel was not * opened for reading * * @throws NonWritableChannelException - * If shared is false 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 @@ public abstract class FileChannel /** * Acquires an exclusive lock on this channel's file. * - *

      An invocation of this method of the form fc.lock() behaves + *

      An invocation of this method of the form {@code fc.lock()} behaves * in exactly the same way as the invocation * *

      @@ -1060,10 +1060,10 @@ public abstract class FileChannel
            * 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
      -     * null.  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.
            *
      -     * 

      The region specified by the position and size + *

      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 @@ public abstract class FileChannel * * @param size * The size of the locked region; must be non-negative, and the sum - * position + size must be non-negative + * {@code position} + {@code size} must be non-negative * * @param shared - * true to request a shared lock, - * false 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 null 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 @@ public abstract class FileChannel /** * Attempts to acquire an exclusive lock on this channel's file. * - *

      An invocation of this method of the form fc.tryLock() + *

      An invocation of this method of the form {@code fc.tryLock()} * behaves in exactly the same way as the invocation * *

            *     fc.{@link #tryLock(long,long,boolean) tryLock}(0L, Long.MAX_VALUE, false) 
      * * @return A lock object representing the newly-acquired lock, - * or null 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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java b/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java index 73e351126ca..3a5c6a1a4b7 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/FileLock.java @@ -136,11 +136,11 @@ public abstract class FileLock implements AutoCloseable { * * @param size * The size of the locked region; must be non-negative, and the sum - * position + size must be non-negative + * {@code position} + {@code size} must be non-negative * * @param shared - * true if this lock is shared, - * false 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 @@ public abstract class FileLock implements AutoCloseable { * * @param size * The size of the locked region; must be non-negative, and the sum - * position + size must be non-negative + * {@code position} + {@code size} must be non-negative * * @param shared - * true if this lock is shared, - * false 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 @@ public abstract class FileLock implements AutoCloseable { /** * Tells whether this lock is shared. * - * @return true if lock is shared, - * false 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 @@ public abstract class FileLock implements AutoCloseable { * @param size * The size of the lock range * - * @return true 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 @@ public abstract class FileLock implements AutoCloseable { *

      A lock object remains valid until it is released or the associated * file channel is closed, whichever comes first.

      * - * @return true if, and only if, this lock is valid + * @return {@code true} if, and only if, this lock is valid */ public abstract boolean isValid(); diff --git a/jdk/src/java.base/share/classes/java/nio/channels/GatheringByteChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/GatheringByteChannel.java index 9c50d9325e3..f2ae40e5170 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/GatheringByteChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/GatheringByteChannel.java @@ -66,11 +66,11 @@ public interface GatheringByteChannel * at the moment that this method is invoked. * *

      Suppose that a byte sequence of length n is written, where - * 0 <= n <= r. - * Up to the first srcs[offset].remaining() bytes of this sequence - * are written from buffer srcs[offset], up to the next - * srcs[offset+1].remaining() bytes are written from buffer - * srcs[offset+1], and so forth, until the entire byte sequence is + * {@code 0} {@code <=} n {@code <=} r. + * 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 @@ public interface GatheringByteChannel * @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 srcs.length + * larger than {@code srcs.length} * * @param length * The maximum number of buffers to be accessed; must be * non-negative and no larger than - * srcs.length - offset + * {@code srcs.length} - {@code offset} * * @return The number of bytes written, possibly zero * * @throws IndexOutOfBoundsException - * If the preconditions on the offset and length + * If the preconditions on the {@code offset} and {@code length} * parameters do not hold * * @throws NonWritableChannelException @@ -131,7 +131,7 @@ public interface GatheringByteChannel /** * Writes a sequence of bytes to this channel from the given buffers. * - *

      An invocation of this method of the form c.write(srcs) + *

      An invocation of this method of the form {@code c.write(srcs)} * behaves in exactly the same manner as the invocation * *

      diff --git a/jdk/src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java
      index 0e49aa680da..d13a37aeae4 100644
      --- a/jdk/src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java
      +++ b/jdk/src/java.base/share/classes/java/nio/channels/InterruptibleChannel.java
      @@ -54,7 +54,7 @@ import java.io.IOException;
        *
        * 

      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 instanceof operator. + * necessary, via the {@code instanceof} operator. * * * @author Mark Reinhold diff --git a/jdk/src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java index 4cd99c0936c..83fd12b44fb 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/ReadableByteChannel.java @@ -52,16 +52,16 @@ public interface ReadableByteChannel extends Channel { * *

      An attempt is made to read up to r bytes from the channel, * where r is the number of bytes remaining in the buffer, that is, - * dst.remaining(), at the moment this method is invoked. + * {@code dst.remaining()}, at the moment this method is invoked. * *

      Suppose that a byte sequence of length n is read, where - * 0 <= n <= r. + * {@code 0} {@code <=} n {@code <=} r. * This byte sequence will be transferred into the buffer so that the first * byte in the sequence is at index p and the last byte is at index - * p + n - 1, + * p {@code +} n {@code -} {@code 1}, * where p is the buffer's position at the moment this method is * invoked. Upon return the buffer's position will be equal to - * p + n; its limit will not have changed. + * p {@code +} n; its limit will not have changed. * *

      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 @@ public interface ReadableByteChannel extends Channel { * @param dst * The buffer into which bytes are to be transferred * - * @return The number of bytes read, possibly zero, or -1 if the + * @return The number of bytes read, possibly zero, or {@code -1} if the * channel has reached end-of-stream * * @throws NonReadableChannelException diff --git a/jdk/src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java index 7922909fe88..d4493979627 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/ScatteringByteChannel.java @@ -66,11 +66,11 @@ public interface ScatteringByteChannel * at the moment that this method is invoked. * *

      Suppose that a byte sequence of length n is read, where - * 0 <= n <= r. - * Up to the first dsts[offset].remaining() bytes of this sequence - * are transferred into buffer dsts[offset], up to the next - * dsts[offset+1].remaining() bytes are transferred into buffer - * dsts[offset+1], and so forth, until the entire byte sequence + * {@code 0} {@code <=} n {@code <=} r. + * 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 @@ public interface ScatteringByteChannel * @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 dsts.length + * larger than {@code dsts.length} * * @param length * The maximum number of buffers to be accessed; must be * non-negative and no larger than - * dsts.length - offset + * {@code dsts.length} - {@code offset} * * @return The number of bytes read, possibly zero, - * or -1 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 offset and length + * If the preconditions on the {@code offset} and {@code length} * parameters do not hold * * @throws NonReadableChannelException @@ -126,7 +126,7 @@ public interface ScatteringByteChannel /** * Reads a sequence of bytes from this channel into the given buffers. * - *

      An invocation of this method of the form c.read(dsts) + *

      An invocation of this method of the form {@code c.read(dsts)} * behaves in exactly the same manner as the invocation * *

      @@ -136,7 +136,7 @@ public interface ScatteringByteChannel
            *         The buffers into which bytes are to be transferred
            *
            * @return The number of bytes read, possibly zero,
      -     *         or -1 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
      diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java
      index 997d5c5ec57..8cf4dab27a4 100644
      --- a/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java
      +++ b/jdk/src/java.base/share/classes/java/nio/channels/SelectableChannel.java
      @@ -132,7 +132,7 @@ public abstract class SelectableChannel
            * of its keys have been cancelled.  A channel may also remain registered
            * for some time after it is closed.  

      * - * @return true 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 @@ public abstract class SelectableChannel * The selector * * @return The key returned when this channel was last registered with the - * given selector, or null 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 @@ public abstract class SelectableChannel * *

      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 ops, 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 att argument is not null 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. * *

      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 ops and its attachment - * will be att. + * The key's initial interest set will be {@code ops} and its attachment + * will be {@code att}. * *

      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 @@ public abstract class SelectableChannel * The interest set for the resulting key * * @param att - * The attachment for the resulting key; may be null + * The attachment for the resulting key; may be {@code null} * * @throws ClosedChannelException * If this channel is closed @@ -209,7 +209,7 @@ public abstract class SelectableChannel * but the corresponding key has already been cancelled * * @throws IllegalArgumentException - * If a bit in the ops 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 @@ public abstract class SelectableChannel * *

      An invocation of this convenience method of the form * - *

      sc.register(sel, ops)
      + *
      {@code sc.register(sel, ops)}
      * * behaves in exactly the same way as the invocation * - *
      sc.{@link + *
      {@code sc.}{@link * #register(java.nio.channels.Selector,int,java.lang.Object) - * register}(sel, ops, null)
      + * register(sel, ops, null)}
      * * @param sel * The selector with which this channel is to be registered @@ -267,7 +267,7 @@ public abstract class SelectableChannel * but the corresponding key has already been cancelled * * @throws IllegalArgumentException - * If a bit in ops 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 @@ public abstract class SelectableChannel * of the {@link #register(Selector, int) register} method is in progress * then it will first block until the other operation is complete.

      * - * @param block If true then this channel will be placed in - * blocking mode; if false 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 @@ public abstract class SelectableChannel * If this channel is closed * * @throws IllegalBlockingModeException - * If block is true 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 @@ public abstract class SelectableChannel *

      If this channel is closed then the value returned by this method is * not specified.

      * - * @return true 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(); diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java b/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java index 00ea670f9ba..86c133d192f 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/SelectionKey.java @@ -139,7 +139,7 @@ public abstract class SelectionKey { *

      A key is valid upon creation and remains so until it is cancelled, * its channel is closed, or its selector is closed.

      * - * @return true 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 @@ public abstract class SelectionKey { * Operation-set bit for read operations. * *

      Suppose that a selection key's interest set contains - * OP_READ at the start of a selection operation. 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 OP_READ 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 set.

      */ public static final int OP_READ = 1 << 0; @@ -231,11 +231,11 @@ public abstract class SelectionKey { * Operation-set bit for write operations. * *

      Suppose that a selection key's interest set contains - * OP_WRITE at the start of a selection operation. 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 OP_WRITE 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 set.

      */ public static final int OP_WRITE = 1 << 2; @@ -244,11 +244,11 @@ public abstract class SelectionKey { * Operation-set bit for socket-connect operations. * *

      Suppose that a selection key's interest set contains - * OP_CONNECT at the start of a selection operation. 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 - * OP_CONNECT 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 set.

      */ public static final int OP_CONNECT = 1 << 3; @@ -257,11 +257,11 @@ public abstract class SelectionKey { * Operation-set bit for socket-accept operations. * *

      Suppose that a selection key's interest set contains - * OP_ACCEPT at the start of a selection operation. 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 - * OP_ACCEPT 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 set.

      */ public static final int OP_ACCEPT = 1 << 4; @@ -269,7 +269,7 @@ public abstract class SelectionKey { /** * Tests whether this key's channel is ready for reading. * - *

      An invocation of this method of the form k.isReadable() + *

      An invocation of this method of the form {@code k.isReadable()} * behaves in exactly the same way as the expression * *

      {@code
      @@ -277,9 +277,9 @@ public abstract class SelectionKey {
            * }
      * *

      If this key's channel does not support read operations then this - * method always returns false.

      + * method always returns {@code false}.

      * - * @return true if, and only if, + * @return {@code true} if, and only if, {@code readyOps() & OP_READ} is nonzero * * @throws CancelledKeyException @@ -292,7 +292,7 @@ public abstract class SelectionKey { /** * Tests whether this key's channel is ready for writing. * - *

      An invocation of this method of the form k.isWritable() + *

      An invocation of this method of the form {@code k.isWritable()} * behaves in exactly the same way as the expression * *

      {@code
      @@ -300,9 +300,9 @@ public abstract class SelectionKey {
            * }
      * *

      If this key's channel does not support write operations then this - * method always returns false.

      + * method always returns {@code false}.

      * - * @return true if, and only if, + * @return {@code true} if, and only if, * {@code readyOps() & OP_WRITE} is nonzero * * @throws CancelledKeyException @@ -316,7 +316,7 @@ public abstract class SelectionKey { * Tests whether this key's channel has either finished, or failed to * finish, its socket-connection operation. * - *

      An invocation of this method of the form k.isConnectable() + *

      An invocation of this method of the form {@code k.isConnectable()} * behaves in exactly the same way as the expression * *

      {@code
      @@ -324,9 +324,9 @@ public abstract class SelectionKey {
            * }
      * *

      If this key's channel does not support socket-connect operations - * then this method always returns false.

      + * then this method always returns {@code false}.

      * - * @return true if, and only if, + * @return {@code true} if, and only if, * {@code readyOps() & OP_CONNECT} is nonzero * * @throws CancelledKeyException @@ -340,7 +340,7 @@ public abstract class SelectionKey { * Tests whether this key's channel is ready to accept a new socket * connection. * - *

      An invocation of this method of the form k.isAcceptable() + *

      An invocation of this method of the form {@code k.isAcceptable()} * behaves in exactly the same way as the expression * *

      {@code
      @@ -348,9 +348,9 @@ public abstract class SelectionKey {
            * }
      * *

      If this key's channel does not support socket-accept operations then - * this method always returns false.

      + * this method always returns {@code false}.

      * - * @return true if, and only if, + * @return {@code true} if, and only if, * {@code readyOps() & OP_ACCEPT} is nonzero * * @throws CancelledKeyException @@ -376,13 +376,13 @@ public abstract class SelectionKey { *

      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 null.

      + * attachment may be discarded by attaching {@code null}.

      * * @param ob - * The object to be attached; may be null + * The object to be attached; may be {@code null} * * @return The previously-attached object, if any, - * otherwise null + * otherwise {@code null} */ public final Object attach(Object ob) { return attachmentUpdater.getAndSet(this, ob); @@ -392,7 +392,7 @@ public abstract class SelectionKey { * Retrieves the current attachment. * * @return The object currently attached to this key, - * or null if there is no attachment + * or {@code null} if there is no attachment */ public final Object attachment() { return attachment; diff --git a/jdk/src/java.base/share/classes/java/nio/channels/Selector.java b/jdk/src/java.base/share/classes/java/nio/channels/Selector.java index ea72acb6400..cfed526b47d 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/Selector.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/Selector.java @@ -230,7 +230,7 @@ public abstract class Selector implements Closeable { /** * Tells whether or not this selector is open. * - * @return true 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 @@ public abstract class Selector implements Closeable { *

      This method does not offer real-time guarantees: It schedules the * timeout as if by invoking the {@link Object#wait(long)} method.

      * - * @param timeout If positive, block for up to timeout + * @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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java index 8d967b355c7..7c9666bbdd8 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java @@ -223,7 +223,7 @@ public abstract class ServerSocketChannel * Accepts a connection made to this channel's socket. * *

      If this channel is in non-blocking mode then this method will - * immediately return null 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 @@ public abstract class ServerSocketChannel * java.lang.SecurityManager#checkAccept checkAccept} method.

      * * @return The socket channel for the new connection, - * or null 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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java index eb13b156eee..c25cc68edf2 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/SocketChannel.java @@ -58,7 +58,7 @@ import java.nio.channels.spi.SelectorProvider; * 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 -1. 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 @@ public abstract class SocketChannel * *

      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 remote, and then + * the resulting socket channel, passing it {@code remote}, and then * returning that channel.

      * * @param remote @@ -204,9 +204,9 @@ public abstract class SocketChannel * operations. * *

      Socket channels support connecting, reading, and writing, so this - * method returns ({@link SelectionKey#OP_CONNECT} - * | {@link SelectionKey#OP_READ} | {@link - * SelectionKey#OP_WRITE}).

      + * method returns {@code (}{@link SelectionKey#OP_CONNECT} + * {@code |} {@link SelectionKey#OP_READ} {@code |} {@link + * SelectionKey#OP_WRITE}{@code )}. * * @return The valid-operation set */ @@ -304,7 +304,7 @@ public abstract class SocketChannel /** * Tells whether or not this channel's network socket is connected. * - * @return true 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 @@ public abstract class SocketChannel * Tells whether or not a connection operation is in progress on this * channel. * - * @return true 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 @@ public abstract class SocketChannel *

      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 true. Otherwise this method returns - * false 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. * *

      If this channel is in blocking mode then an invocation of this @@ -349,8 +349,8 @@ public abstract class SocketChannel * @param remote * The remote address to which this channel is to be connected * - * @return true if a connection was established, - * false 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 @@ public abstract class SocketChannel * {@link java.io.IOException} to be thrown. * *

      If this channel is already connected then this method will not block - * and will immediately return true. If this channel is in - * non-blocking mode then this method will return false 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 true or throw a checked + * or fails, and will always either return {@code true} or throw a checked * exception describing the failure. * *

      This method may be invoked at any time. If a read or write @@ -414,7 +414,7 @@ public abstract class SocketChannel * invocation of this method throws a checked exception, then the channel * will be closed.

      * - * @return true 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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/WritableByteChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/WritableByteChannel.java index b2ea06598cd..ef8efa5037c 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/WritableByteChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/WritableByteChannel.java @@ -54,16 +54,16 @@ public interface WritableByteChannel * *

      An attempt is made to write up to r bytes to the channel, * where r is the number of bytes remaining in the buffer, that is, - * src.remaining(), at the moment this method is invoked. + * {@code src.remaining()}, at the moment this method is invoked. * *

      Suppose that a byte sequence of length n is written, where - * 0 <= n <= r. + * {@code 0} {@code <=} n {@code <=} r. * This byte sequence will be transferred from the buffer starting at index * p, where p is the buffer's position at the moment this * method is invoked; the index of the last byte written will be - * p + n - 1. + * p {@code +} n {@code -} {@code 1}. * Upon return the buffer's position will be equal to - * p + n; its limit will not have changed. + * p {@code +} n; its limit will not have changed. * *

      Unless otherwise specified, a write operation will return only after * writing all of the r requested bytes. Some types of channels, diff --git a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java index 81183472108..b38bdea058a 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java @@ -32,29 +32,29 @@ * *

      * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
      ChannelsDescription
      {@link java.nio.channels.Channel}
      {@link java.nio.channels.Channel}A nexus for I/O operations
        {@link java.nio.channels.ReadableByteChannel}
        {@link java.nio.channels.ReadableByteChannel}Can read into a buffer
          {@link java.nio.channels.ScatteringByteChannel}  
          {@link java.nio.channels.ScatteringByteChannel}  Can read into a sequence of buffers
        {@link java.nio.channels.WritableByteChannel}
        {@link java.nio.channels.WritableByteChannel}Can write from a buffer
          {@link java.nio.channels.GatheringByteChannel}
          {@link java.nio.channels.GatheringByteChannel}Can write from a sequence of buffers
        {@link java.nio.channels.ByteChannel}
        {@link java.nio.channels.ByteChannel}Can read/write to/from a buffer
          {@link java.nio.channels.SeekableByteChannel}
          {@link java.nio.channels.SeekableByteChannel}A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes
        {@link java.nio.channels.AsynchronousChannel}
        {@link java.nio.channels.AsynchronousChannel}Supports asynchronous I/O operations.
          {@link java.nio.channels.AsynchronousByteChannel}
          {@link java.nio.channels.AsynchronousByteChannel}Can read and write bytes asynchronously
        {@link java.nio.channels.NetworkChannel}
        {@link java.nio.channels.NetworkChannel}A channel to a network socket
          {@link java.nio.channels.MulticastChannel}
          {@link java.nio.channels.MulticastChannel}Can join Internet Protocol (IP) multicast groups
      {@link java.nio.channels.Channels}
      {@link java.nio.channels.Channels}Utility methods for channel/stream interoperation
      * @@ -99,8 +99,8 @@ * Internet Protocol (IP) multicast groups. * *

      The {@link java.nio.channels.Channels} utility class defines static methods - * that support the interoperation of the stream classes of the {@link - * java.io} 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 @@ * *

      * - * + * * - * + * * - * + * * *
      File channelsDescription
      {@link java.nio.channels.FileChannel}
      {@link java.nio.channels.FileChannel}Reads, writes, maps, and manipulates files
      {@link java.nio.channels.FileLock}
      {@link java.nio.channels.FileLock}A lock on a (region of a) file
      {@link java.nio.MappedByteBuffer}  
      {@link java.nio.MappedByteBuffer}  A direct byte buffer mapped to a region of a file
      * @@ -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 {@link java.io} + * file channel connected to the same underlying file as the {@link java.io} * class. * * *
      * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
      Multiplexed, non-blocking I/O

      Description

      {@link java.nio.channels.SelectableChannel}
      {@link java.nio.channels.SelectableChannel}A channel that can be multiplexed
        {@link java.nio.channels.DatagramChannel}
        {@link java.nio.channels.DatagramChannel}A channel to a datagram-oriented socket
        {@link java.nio.channels.Pipe.SinkChannel}
        {@link java.nio.channels.Pipe.SinkChannel}The write end of a pipe
        {@link java.nio.channels.Pipe.SourceChannel}
        {@link java.nio.channels.Pipe.SourceChannel}The read end of a pipe
        {@link java.nio.channels.ServerSocketChannel}  
        {@link java.nio.channels.ServerSocketChannel}  A channel to a stream-oriented listening socket
        {@link java.nio.channels.SocketChannel}
        {@link java.nio.channels.SocketChannel}A channel for a stream-oriented connecting socket
      {@link java.nio.channels.Selector}
      {@link java.nio.channels.Selector}A multiplexor of selectable channels
      {@link java.nio.channels.SelectionKey}
      {@link java.nio.channels.SelectionKey}A token representing the registration
      of a channel * with a selector
      {@link java.nio.channels.Pipe}
      {@link java.nio.channels.Pipe}Two channels that form a unidirectional pipe
      * @@ -194,18 +194,18 @@ * *

      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 {@link java.net} 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 open 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. * *

      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 {@link - * java.nio.channels.spi} 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 {@link - * java.nio.channels.spi} 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 @@ * *

      * - * + * * - * + * * - * + * * - * + * * - * + * * *
      Asynchronous I/ODescription
      {@link java.nio.channels.AsynchronousFileChannel}
      {@link java.nio.channels.AsynchronousFileChannel}An asynchronous channel for reading, writing, and manipulating a file
      {@link java.nio.channels.AsynchronousSocketChannel}
      {@link java.nio.channels.AsynchronousSocketChannel}An asynchronous channel to a stream-oriented connecting socket
      {@link java.nio.channels.AsynchronousServerSocketChannel}  
      {@link java.nio.channels.AsynchronousServerSocketChannel}  An asynchronous channel to a stream-oriented listening socket
      {@link java.nio.channels.CompletionHandler}
      {@link java.nio.channels.CompletionHandler}A handler for consuming the result of an asynchronous operation
      {@link java.nio.channels.AsynchronousChannelGroup}
      {@link java.nio.channels.AsynchronousChannelGroup}A grouping of asynchronous channels for the purpose of resource sharing
      * @@ -272,13 +272,13 @@ *

      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 - * {@link java.nio.channels.spi} 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. * *


      - *

      Unless otherwise noted, passing a null argument to a constructor + *

      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. * diff --git a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java index fccc2904c7d..e45be24c166 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java @@ -46,7 +46,7 @@ import sun.nio.ch.Interruptible; * 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 - * try ... finally block: + * {@code try} ... {@code finally} block: * *

        * boolean completed = false;
      @@ -58,11 +58,11 @@ import sun.nio.ch.Interruptible;
        *     end(completed);
        * }
      * - *

      The completed argument to the {@link #end end} method tells + *

      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 - * true 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. * *

      A concrete channel class must also implement the {@link @@ -148,7 +148,7 @@ public abstract class AbstractInterruptibleChannel * Marks the beginning of an I/O operation that might block indefinitely. * *

      This method should be invoked in tandem with the {@link #end end} - * method, using a try ... finally block as + * method, using a {@code try} ... {@code finally} block as * shown above, in order to implement asynchronous * closing and interruption for this channel.

      */ @@ -177,12 +177,12 @@ public abstract class AbstractInterruptibleChannel * Marks the end of an I/O operation that might block indefinitely. * *

      This method should be invoked in tandem with the {@link #begin - * begin} method, using a try ... finally block + * begin} method, using a {@code try} ... {@code finally} block * as shown above, in order to implement asynchronous * closing and interruption for this channel.

      * * @param completed - * true 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 * diff --git a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java index 0de212d2df4..cb3ced9111d 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java @@ -305,8 +305,8 @@ public abstract class AbstractSelectableChannel * changing the blocking mode. This method is only invoked if the new mode * is different from the current mode.

      * - * @param block If true then this channel will be placed in - * blocking mode; if false 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 diff --git a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelector.java b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelector.java index 09e3b61491f..3c4eda99dc7 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelector.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AbstractSelector.java @@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * 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 - * try ... finally block: + * {@code try} ... {@code finally} block: * *
        * try {
      @@ -197,7 +197,7 @@ public abstract class AbstractSelector
            * Marks the beginning of an I/O operation that might block indefinitely.
            *
            * 

      This method should be invoked in tandem with the {@link #end end} - * method, using a try ... finally block as + * method, using a {@code try} ... {@code finally} block as * shown above, in order to implement interruption for * this selector. * @@ -223,7 +223,7 @@ public abstract class AbstractSelector * Marks the end of an I/O operation that might block indefinitely. * *

      This method should be invoked in tandem with the {@link #begin begin} - * method, using a try ... finally block as + * method, using a {@code try} ... {@code finally} block as * shown above, in order to implement interruption for * this selector.

      */ diff --git a/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java b/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java index d14c853522b..f720261d03b 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java @@ -64,7 +64,7 @@ public abstract class AsynchronousChannelProvider { * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("asynchronousChannelProvider") + * {@link RuntimePermission}{@code ("asynchronousChannelProvider")} */ protected AsynchronousChannelProvider() { this(checkPermission()); @@ -137,7 +137,7 @@ public abstract class AsynchronousChannelProvider { *
        * *
      1. If the system property - * java.nio.channels.spi.AsynchronousChannelProvider 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.

      2. @@ -145,8 +145,8 @@ public abstract class AsynchronousChannelProvider { *
      3. 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 - * java.nio.channels.spi.AsynchronousChannelProvider in the resource - * directory META-INF/services, 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.

      4. diff --git a/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java b/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java index ca704a8e5a5..cfe444a0041 100644 --- a/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java +++ b/jdk/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java @@ -46,7 +46,7 @@ import sun.security.action.GetPropertyAction; * #provider() provider} method. The first invocation of that method will locate * the default provider as specified below. * - *

        The system-wide default provider is used by the static open + *

        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 @@ import sun.security.action.GetPropertyAction; * 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 open + * by instantiating that provider and then directly invoking the {@code open} * methods defined in this class. * *

        All of the methods in this class are safe for use by multiple concurrent @@ -84,7 +84,7 @@ public abstract class SelectorProvider { * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("selectorProvider") + * {@link RuntimePermission}{@code ("selectorProvider")} */ protected SelectorProvider() { this(checkPermission()); @@ -142,7 +142,7 @@ public abstract class SelectorProvider { *

          * *
        1. If the system property - * java.nio.channels.spi.SelectorProvider 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.

        2. @@ -150,8 +150,8 @@ public abstract class SelectorProvider { *
        3. 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 - * java.nio.channels.spi.SelectorProvider in the resource - * directory META-INF/services, 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.

        4. @@ -305,14 +305,14 @@ public abstract class SelectorProvider { * returned. Subsequent invocations of this method return the same * channel.

          * - * @return The inherited channel, if any, otherwise null. + * @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}("inheritedChannel") + * {@link RuntimePermission}{@code ("inheritedChannel")} * * @since 1.5 */ diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template index faa51bb45d4..74b6f928439 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template @@ -55,12 +55,12 @@ import java.util.Arrays; * has not been used before;

          * *
        5. Invoke the {@link #$code$ $code$} method zero or more times, as - * long as additional input may be available, passing false for the - * endOfInput 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;

        6. * *
        7. Invoke the {@link #$code$ $code$} method one final time, passing - * true for the endOfInput argument; and then

        8. + * {@code true} for the {@code endOfInput} argument; and then

          * *
        9. Invoke the {@link #flush flush} method so that the $coder$ can * flush any internal state to the output buffer.

        10. @@ -175,7 +175,7 @@ public abstract class Charset$Coder$ { * $otype$s that will be produced for each input $itype$ * * @param replacement - * The initial replacement; must not be null, 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 @@ public abstract class Charset$Coder$ { * Returns this $coder$'s replacement value. * * @return This $coder$'s current replacement, - * which is never null and is never empty + * which is never {@code null} and is never empty */ public final $replType$ replacement() { #if[decoder] @@ -267,7 +267,7 @@ public abstract class Charset$Coder$ { * replacement is acceptable.

          * * @param newReplacement The new replacement; must not be - * null, 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 @@ public abstract class Charset$Coder$ { * * @param repl The byte array to be tested * - * @return true 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 @@ public abstract class Charset$Coder$ { /** * Returns this $coder$'s current action for malformed-input errors. * - * @return The current malformed-input action, which is never null + * @return The current malformed-input action, which is never {@code null} */ public CodingErrorAction malformedInputAction() { return malformedInputAction; @@ -370,7 +370,7 @@ public abstract class Charset$Coder$ { *

          This method invokes the {@link #implOnMalformedInput * implOnMalformedInput} method, passing the new action.

          * - * @param newAction The new action; must not be null + * @param newAction The new action; must not be {@code null} * * @return This $coder$ * @@ -400,7 +400,7 @@ public abstract class Charset$Coder$ { * Returns this $coder$'s current action for unmappable-character errors. * * @return The current unmappable-character action, which is never - * null + * {@code null} */ public CodingErrorAction unmappableCharacterAction() { return unmappableCharacterAction; @@ -412,7 +412,7 @@ public abstract class Charset$Coder$ { *

          This method invokes the {@link #implOnUnmappableCharacter * implOnUnmappableCharacter} method, passing the new action.

          * - * @param newAction The new action; must not be null + * @param newAction The new action; must not be {@code null} * * @return This $coder$ * @@ -521,16 +521,16 @@ public abstract class Charset$Coder$ { * 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. * - *

          The endOfInput parameter advises this method as to whether + *

          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 false 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 true. It is not erroneous, and in fact it is quite - * common, to pass false 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 true 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. * *

          This method works by invoking the {@link #$code$Loop $code$Loop} @@ -545,7 +545,7 @@ public abstract class Charset$Coder$ { * The output $otype$ buffer * * @param endOfInput - * true 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 @@ public abstract class Charset$Coder$ { * @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 false for - * the endOfInput parameter, nor of this method with a - * value of true for the endOfInput 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 @@ public abstract class Charset$Coder$ { * 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 true for the endOfInput + * with a value of {@code true} for the {@code endOfInput} * parameter */ public final CoderResult flush($Otype$Buffer out) { @@ -824,10 +824,10 @@ public abstract class Charset$Coder$ { * Tells whether or not this decoder implements an auto-detecting charset. * *

          The default implementation of this method always returns - * false; it should be overridden by auto-detecting decoders to - * return true.

          + * {@code false}; it should be overridden by auto-detecting decoders to + * return {@code true}.

          * - * @return true 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 @@ public abstract class Charset$Coder$ { * *

          If this decoder implements an auto-detecting charset then at a * single point during a decoding operation this method may start returning - * true 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. * - *

          That this method returns false does not imply that no bytes + *

          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. * *

          The default implementation of this method always throws an {@link * UnsupportedOperationException}; it should be overridden by - * auto-detecting decoders to return true once the input charset + * auto-detecting decoders to return {@code true} once the input charset * has been determined.

          * - * @return true 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 @@ public abstract class Charset$Coder$ { * auto-detecting decoders to return the appropriate value.

          * * @return The charset detected by this auto-detecting decoder, - * or null 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 @@ public abstract class Charset$Coder$ { /** * Tells whether or not this encoder can encode the given character. * - *

          This method returns false if the given character is a + *

          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 @@ public abstract class Charset$Coder$ { * @param c * The given character * - * @return true 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 @@ public abstract class Charset$Coder$ { * Tells whether or not this encoder can encode the given character * sequence. * - *

          If this method returns false for a particular character + *

          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 encoding * operation. @@ -968,7 +968,7 @@ public abstract class Charset$Coder$ { * @param cs * The given character sequence * - * @return true 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 * diff --git a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java index a242b9c7ac8..6766cb53c3d 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/Charset.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/Charset.java @@ -73,29 +73,29 @@ import sun.security.action.GetPropertyAction; * *

            * - *
          • The uppercase letters 'A' through 'Z' - * ('\u0041' through '\u005a'), + *
          • The uppercase letters {@code 'A'} through {@code 'Z'} + * ('\u0041' through '\u005a'), * - *
          • The lowercase letters 'a' through 'z' - * ('\u0061' through '\u007a'), + *
          • The lowercase letters {@code 'a'} through {@code 'z'} + * ('\u0061' through '\u007a'), * - *
          • The digits '0' through '9' - * ('\u0030' through '\u0039'), + *
          • The digits {@code '0'} through {@code '9'} + * ('\u0030' through '\u0039'), * - *
          • The dash character '-' - * ('\u002d'HYPHEN-MINUS), + *
          • The dash character {@code '-'} + * ('\u002d'HYPHEN-MINUS), * - *
          • The plus character '+' - * ('\u002b'PLUS SIGN), + *
          • The plus character {@code '+'} + * ('\u002b'PLUS SIGN), * - *
          • The period character '.' - * ('\u002e'FULL STOP), + *
          • The period character {@code '.'} + * ('\u002e'FULL STOP), * - *
          • The colon character ':' - * ('\u003a'COLON), and + *
          • The colon character {@code ':'} + * ('\u003a'COLON), and * - *
          • The underscore character '_' - * ('\u005f'LOW LINE). + *
          • The underscore character {@code '_'} + * ('\u005f'LOW LINE). * *
          * @@ -115,7 +115,7 @@ import sun.security.action.GetPropertyAction; *

          Some charsets have an historical name that is defined for * compatibility with previous versions of the Java platform. A charset's * historical name is either its canonical name or one of its aliases. The - * historical name is returned by the getEncoding() 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 @@ import sun.security.action.GetPropertyAction; * 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 "X-" or "x-". + * must begin with one of the strings {@code "X-"} or {@code "x-"}. * *

          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 @@ import sun.security.action.GetPropertyAction; * *

          * - * - * + * - * - * - * + * + * + * * - * + * * - * + * * - * + * * *
          CharsetDescription
          US-ASCIISeven-bit ASCII, a.k.a. ISO646-US, + *
          {@code US-ASCII}Seven-bit ASCII, a.k.a. {@code ISO646-US}, * a.k.a. the Basic Latin block of the Unicode character set
          ISO-8859-1  ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
          UTF-8
          ISO-8859-1  ISO Latin Alphabet No. 1, a.k.a. {@code ISO-LATIN-1}
          {@code UTF-8}Eight-bit UCS Transformation Format
          UTF-16BE
          {@code UTF-16BE}Sixteen-bit UCS Transformation Format, * big-endian byte order
          UTF-16LE
          {@code UTF-16LE}Sixteen-bit UCS Transformation Format, * little-endian byte order
          UTF-16
          {@code UTF-16}Sixteen-bit UCS Transformation Format, * byte order identified by an optional byte-order mark
          * - *

          The UTF-8 charset is specified by The {@code UTF-8} charset is specified by RFC 2279; the * transformation format upon which it is based is specified in * Amendment 2 of ISO 10646-1 and is also described in the Unicode * Standard. * - *

          The UTF-16 charsets are specified by The {@code UTF-16} charsets are specified by RFC 2781; the * transformation formats upon which they are based are specified in * Amendment 1 of ISO 10646-1 and are also described in the Unicode * Standard. * - *

          The UTF-16 charsets use sixteen-bit quantities and are + *

          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 byte-order mark represented by - * the Unicode character '\uFEFF'. Byte-order marks are handled + * the Unicode character '\uFEFF'. Byte-order marks are handled * as follows: * *

            * - *
          • When decoding, the UTF-16BE and UTF-16LE + *

          • When decoding, the {@code UTF-16BE} and {@code UTF-16LE} * charsets interpret the initial byte-order marks as a ZERO-WIDTH * NON-BREAKING SPACE; when encoding, they do not write * byte-order marks.

          • * - *
          • When decoding, the UTF-16 charset interprets the + *

          • 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 @@ import sun.security.action.GetPropertyAction; * 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 US-ASCII 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 - * EUC-JP is the name of the charset that encodes the + * {@code EUC-JP} is the name of the charset that encodes the * JIS X 0201, JIS X 0208, and JIS X 0212 * coded character sets for the Japanese language. * @@ -495,14 +495,14 @@ public abstract class Charset * The name of the requested charset; may be either * a canonical name or an alias * - * @return true 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 charsetName is null + * If the given {@code charsetName} is null */ public static boolean isSupported(String charsetName) { return (lookup(charsetName) != null); @@ -521,7 +521,7 @@ public abstract class Charset * If the given charset name is illegal * * @throws IllegalArgumentException - * If the given charsetName is null + * If the given {@code charsetName} is null * * @throws UnsupportedCharsetException * If no support for the named charset is available @@ -692,7 +692,7 @@ public abstract class Charset * href="http://www.iana.org/assignments/character-sets">IANA Charset * Registry. * - * @return true 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 @@ public abstract class Charset *

            Every charset contains itself. * *

            This method computes an approximation of the containment relation: - * If it returns true then the given charset is known to be - * contained by this charset; if it returns false, 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 true 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 @@ public abstract class Charset * 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 - * false.

            + * {@code false}.

            * - * @return true 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 @@ public abstract class Charset * Convenience method that decodes bytes in this charset into Unicode * characters. * - *

            An invocation of this method upon a charset cs returns the + *

            An invocation of this method upon a charset {@code cs} returns the * same result as the expression * *

            @@ -818,7 +818,7 @@ public abstract class Charset
                  * Convenience method that encodes Unicode characters into bytes in this
                  * charset.
                  *
            -     * 

            An invocation of this method upon a charset cs returns the + *

            An invocation of this method upon a charset {@code cs} returns the * same result as the expression * *

            @@ -853,7 +853,7 @@ public abstract class Charset
                 /**
                  * Convenience method that encodes a string into bytes in this charset.
                  *
            -     * 

            An invocation of this method upon a charset cs returns the + *

            An invocation of this method upon a charset {@code cs} returns the * same result as the expression * *

            @@ -898,7 +898,7 @@ public abstract class Charset
                  * 

            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.

            * - * @return true 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) { diff --git a/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java b/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java index 79d4843e2de..3d5e1c43a65 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/CoderResult.java @@ -46,24 +46,24 @@ import java.util.HashMap; * 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 true.

          • + * returns {@code true}.

            * *
          • Overflow 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 true.

          • + * isOverflow} method returns {@code true}.

            * *
          • A malformed-input error 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 - * true 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.

          • * *
          • An unmappable-character error 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 true 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 @@ import java.util.HashMap; * *

          * - *

          For convenience, the {@link #isError() isError} method returns true + *

          For convenience, the {@link #isError() isError} method returns {@code true} * for result objects that describe malformed-input and unmappable-character - * errors but false for those that describe underflow or overflow + * errors but {@code false} for those that describe underflow or overflow * conditions.

          * * @@ -114,7 +114,7 @@ public class CoderResult { /** * Tells whether or not this object describes an underflow condition. * - * @return true 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 @@ public class CoderResult { /** * Tells whether or not this object describes an overflow condition. * - * @return true 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 @@ public class CoderResult { /** * Tells whether or not this object describes an error condition. * - * @return true 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 @@ public class CoderResult { /** * Tells whether or not this object describes a malformed-input error. * - * @return true 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 @@ public class CoderResult { * Tells whether or not this object describes an unmappable-character * error. * - * @return true 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 @@ public class CoderResult { * * @throws UnsupportedOperationException * If this object does not describe an error condition, that is, - * if the {@link #isError() isError} does not return true + * if the {@link #isError() isError} does not return {@code true} */ public int length() { if (!isError()) diff --git a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java index e18f568004a..9d93a710a25 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java @@ -74,10 +74,10 @@ * *

          Support for new charsets can be made available via the * interface defined in the {@link - * java.nio.charset.spi.CharsetProvider} class in the {@link - * java.nio.charset.spi} package. + * java.nio.charset.spi.CharsetProvider} class in the {@link + * java.nio.charset.spi} package. * - *

          Unless otherwise noted, passing a null argument to a + *

          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. diff --git a/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java b/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java index f859245a9dc..63f01bf7cfa 100644 --- a/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java +++ b/jdk/src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java @@ -42,13 +42,13 @@ import java.util.Iterator; * loader}. * *

          A charset provider identifies itself with a provider-configuration file - * named java.nio.charset.spi.CharsetProvider in the resource - * directory META-INF/services. 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 ('\n'), a carriage return - * ('\r'), 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 '#' ('\u0023'); on + * ignored. The comment character is {@code '#'} ('\u0023'); on * each line all characters following the first comment character are ignored. * The file must be encoded in UTF-8. * @@ -83,7 +83,7 @@ public abstract class CharsetProvider { * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("charsetProvider") + * {@link RuntimePermission}{@code ("charsetProvider")} */ protected CharsetProvider() { this(checkPermission()); @@ -107,7 +107,7 @@ public abstract class CharsetProvider { * a canonical name or an alias * * @return A charset object for the named charset, - * or null if the named charset + * or {@code null} if the named charset * is not supported by this provider */ public abstract Charset charsetForName(String charsetName); diff --git a/jdk/src/java.base/share/classes/java/nio/exceptions b/jdk/src/java.base/share/classes/java/nio/exceptions index 062ccc4e438..d8cba29cc2d 100644 --- a/jdk/src/java.base/share/classes/java/nio/exceptions +++ b/jdk/src/java.base/share/classes/java/nio/exceptions @@ -56,5 +56,5 @@ SUPER=UnsupportedOperationException gen ReadOnlyBufferException " * Unchecked exception thrown when a content-mutation method such as - * put or compact is invoked upon a read-only buffer." \ + * put or compact is invoked upon a read-only buffer." \ -1210063976496234090L diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java index 03ace89e7ac..1c60862c857 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java +++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java @@ -202,7 +202,7 @@ public abstract class FileSystem * *

          In the case of the default provider, and a security manager is * installed, the security manager is invoked to check {@link - * RuntimePermission}("getFileStoreAttributes"). 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 top-most directory. If @@ -334,19 +334,19 @@ public abstract class FileSystem * character extension

    /home/*/* - * Matches /home/gus/data on UNIX platforms/home/*/* + * Matches /home/gus/data on UNIX platforms
    /home/** - * Matches /home/gus and - * /home/gus/data on UNIX platforms/home/** + * Matches /home/gus and + * /home/gus/data on UNIX platforms
    C:\\* - * Matches C:\foo and C:\bar on the Windows + * C:\\* + * Matches C:\foo and C:\bar on the Windows * platform (note that the backslash is escaped; as a string literal in the - * Java Language the pattern would be "C:\\\\*")
    @@ -390,7 +390,7 @@ public abstract class FileSystem * character is used to separate the subpatterns. Groups cannot be nested. *

    * - *
  • Leading period/dot characters in file name are + *

  • Leading period/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 diff --git a/jdk/src/java.base/share/classes/java/nio/file/Files.java b/jdk/src/java.base/share/classes/java/nio/file/Files.java index 6f968297631..3fb7fe28c94 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Files.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java @@ -1033,7 +1033,7 @@ public final class Files { * 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}("symbolic") + * 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 @@ public final class Files { * 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}("hard") + * 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 @@ public final class Files { * 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} - * ("getFileStoreAttributes") + * addition it checks + * {@link RuntimePermission}{@code ("getFileStoreAttributes")} */ public static FileStore getFileStore(Path path) throws IOException { return provider(path).getFileStore(path); @@ -1995,7 +1995,8 @@ public final class Files { * 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}("accessUserInformation") + * 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 @@ public final class Files { * 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}("accessUserInformation") + * 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 @@ public final class Files { * 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}("accessUserInformation") + * 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 @@ public final class Files { * 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}("accessUserInformation") + * installed, it denies + * {@link RuntimePermission}{@code ("accessUserInformation")} * or its {@link SecurityManager#checkWrite(String) checkWrite} * method denies write access to the file. * diff --git a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java index c3d617b2896..0502d7ba809 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java @@ -46,13 +46,13 @@ public class InvalidPathException * @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 -1 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 null + * if either the input or reason strings are {@code null} * * @throws IllegalArgumentException - * if the error index is less than -1 + * if the error index is less than {@code -1} */ public InvalidPathException(String input, String reason, int index) { super(reason); @@ -66,13 +66,13 @@ public class InvalidPathException /** * Constructs an instance from the given input string and reason. The - * resulting object will have an error index of -1. + * 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 null + * if either the input or reason strings are {@code null} */ public InvalidPathException(String input, String reason) { this(input, reason, -1); @@ -98,7 +98,7 @@ public class InvalidPathException /** * Returns an index into the input string of the position at which the - * error occurred, or -1 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 @@ public class InvalidPathException /** * Returns a string describing the error. The resulting string * consists of the reason string followed by a colon character - * (':'), a space, and the input string. If the error index is - * defined then the string " at index " 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. * diff --git a/jdk/src/java.base/share/classes/java/nio/file/Path.java b/jdk/src/java.base/share/classes/java/nio/file/Path.java index 8387a8e9597..ac497c3c0cf 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Path.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Path.java @@ -480,7 +480,8 @@ public interface Path *

    For any two {@link #normalize normalized} paths p and * q, where q does not have a root component, *

    - * p.relativize(p.resolve(q)).equals(q) + * p{@code .relativize(}p + * {@code .resolve(}q{@code )).equals(}q{@code )} *
    * *

    When symbolic links are supported, then whether the resulting path, @@ -525,9 +526,9 @@ public interface Path *

    The default provider provides a similar round-trip guarantee * to the {@link java.io.File} class. For a given {@code Path} p it * is guaranteed that - *

    - * {@link Paths#get(URI) Paths.get}(p.toUri()).equals(p - * .{@link #toAbsolutePath() toAbsolutePath}()) + *
    + * {@link Paths#get(URI) Paths.get}{@code (}p{@code .toUri()).equals(}p + * {@code .}{@link #toAbsolutePath() toAbsolutePath}{@code ())} *
    * 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 diff --git a/jdk/src/java.base/share/classes/java/nio/file/Paths.java b/jdk/src/java.base/share/classes/java/nio/file/Paths.java index bb49f99121e..3f57aaf7cb8 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/Paths.java +++ b/jdk/src/java.base/share/classes/java/nio/file/Paths.java @@ -103,9 +103,9 @@ public final class Paths { *

    The default provider provides a similar round-trip guarantee * to the {@link java.io.File} class. For a given {@code Path} p it * is guaranteed that - *

    - * Paths.get(p.{@link Path#toUri() toUri}()).equals( - * p.{@link Path#toAbsolutePath() toAbsolutePath}()) + *
    {@code + * Paths.get(}p{@code .}{@link Path#toUri() toUri}{@code ()).equals(} + * p{@code .}{@link Path#toAbsolutePath() toAbsolutePath}{@code ())} *
    * 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 diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java index 129d0ee2197..429bfde8a1b 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java @@ -165,7 +165,7 @@ public interface AclFileAttributeView * 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}("accessUserInformation") + * 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 @@ public interface AclFileAttributeView * 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}("accessUserInformation") + * installed, it denies {@link RuntimePermission}{@code ("accessUserInformation")} * or its {@link SecurityManager#checkWrite(String) checkWrite} * method denies write access to the file. */ diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java index f18caaf86a3..9acde225339 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/FileOwnerAttributeView.java @@ -69,7 +69,7 @@ public interface FileOwnerAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserInformation") or its + * RuntimePermission}{@code ("accessUserInformation")} or its * {@link SecurityManager#checkRead(String) checkRead} method * denies read access to the file. */ @@ -93,7 +93,7 @@ public interface FileOwnerAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserInformation") or its + * RuntimePermission}{@code ("accessUserInformation")} or its * {@link SecurityManager#checkWrite(String) checkWrite} method * denies write access to the file. */ diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java index 25466f2dbce..f8c36523d66 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java @@ -149,7 +149,8 @@ public interface PosixFileAttributeView * @throws IOException {@inheritDoc} * @throws SecurityException * In the case of the default provider, a security manager is - * installed, and it denies {@link RuntimePermission}("accessUserInformation") + * 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 @@ public interface PosixFileAttributeView * 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}("accessUserInformation") + * 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 @@ public interface PosixFileAttributeView * 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}("accessUserInformation") + * installed, it denies + * {@link RuntimePermission}{@code ("accessUserInformation")} * or its {@link SecurityManager#checkWrite(String) checkWrite} * method denies write access to the file. */ diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java index 56e7135ed43..ffd89b9e7b2 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserDefinedFileAttributeView.java @@ -89,7 +89,7 @@ public interface UserDefinedFileAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserDefinedAttributes") + * RuntimePermission}{@code ("accessUserDefinedAttributes")} * or its {@link SecurityManager#checkRead(String) checkRead} method * denies read access to the file. */ @@ -110,7 +110,7 @@ public interface UserDefinedFileAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserDefinedAttributes") + * RuntimePermission}{@code ("accessUserDefinedAttributes")} * or its {@link SecurityManager#checkRead(String) checkRead} method * denies read access to the file. */ @@ -156,7 +156,7 @@ public interface UserDefinedFileAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserDefinedAttributes") + * RuntimePermission}{@code ("accessUserDefinedAttributes")} * or its {@link SecurityManager#checkRead(String) checkRead} method * denies read access to the file. * @@ -206,7 +206,7 @@ public interface UserDefinedFileAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserDefinedAttributes") + * RuntimePermission}{@code ("accessUserDefinedAttributes")} * or its {@link SecurityManager#checkWrite(String) checkWrite} * method denies write access to the file. */ @@ -223,7 +223,7 @@ public interface UserDefinedFileAttributeView * @throws SecurityException * In the case of the default provider, a security manager is * installed, and it denies {@link - * RuntimePermission}("accessUserDefinedAttributes") + * RuntimePermission}{@code ("accessUserDefinedAttributes")} * or its {@link SecurityManager#checkWrite(String) checkWrite} * method denies write access to the file. */ diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java index c3f3befa96d..64e26604bd8 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalLookupService.java @@ -72,7 +72,8 @@ public abstract class UserPrincipalLookupService { * 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}("lookupUserInformation") + * installed, it checks + * {@link RuntimePermission}{@code ("lookupUserInformation")} */ public abstract UserPrincipal lookupPrincipalByName(String name) throws IOException; @@ -97,7 +98,8 @@ public abstract class UserPrincipalLookupService { * 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}("lookupUserInformation") + * installed, it checks + * {@link RuntimePermission}{@code ("lookupUserInformation")} */ public abstract GroupPrincipal lookupPrincipalByGroupName(String group) throws IOException; diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java index 5cf0ab0a5f3..563b339d3f2 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/UserPrincipalNotFoundException.java @@ -54,7 +54,7 @@ public class UserPrincipalNotFoundException /** * Returns the user principal name if this exception was created with the - * user principal name that was not found, otherwise null. + * user principal name that was not found, otherwise {@code null}. * * @return the user principal name or {@code null} */ diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java index be46551c60d..1dd20f627c7 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java @@ -28,23 +28,23 @@ * *
    * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
    Attribute viewsDescription
    {@link java.nio.file.attribute.AttributeView}
    {@link java.nio.file.attribute.AttributeView}Can read or update non-opaque values associated with objects in a file system
      {@link java.nio.file.attribute.FileAttributeView}
      {@link java.nio.file.attribute.FileAttributeView}Can read or update file attributes
        {@link java.nio.file.attribute.BasicFileAttributeView}  
        {@link java.nio.file.attribute.BasicFileAttributeView}  Can read or update a basic set of file attributes
          {@link java.nio.file.attribute.PosixFileAttributeView}  
          {@link java.nio.file.attribute.PosixFileAttributeView}  Can read or update POSIX defined file attributes
          {@link java.nio.file.attribute.DosFileAttributeView}  
          {@link java.nio.file.attribute.DosFileAttributeView}  Can read or update FAT file attributes
        {@link java.nio.file.attribute.FileOwnerAttributeView}  
        {@link java.nio.file.attribute.FileOwnerAttributeView}  Can read or update the owner of a file
         {@link java.nio.file.attribute.AclFileAttributeView}  
         {@link java.nio.file.attribute.AclFileAttributeView}  Can read or update Access Control Lists
        {@link java.nio.file.attribute.UserDefinedFileAttributeView}  
        {@link java.nio.file.attribute.UserDefinedFileAttributeView}  Can read or update user-defined file attributes
      {@link java.nio.file.attribute.FileStoreAttributeView}
      {@link java.nio.file.attribute.FileStoreAttributeView}Can read or update file system attributes
    * @@ -100,7 +100,7 @@ * * * - *

    Unless otherwise noted, passing a null argument to a constructor + *

    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. * diff --git a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java index dad51083401..b92cf525eef 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java +++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java @@ -102,7 +102,7 @@ public abstract class FileSystemProvider { * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("fileSystemProvider") + * {@link RuntimePermission}{@code ("fileSystemProvider")} */ protected FileSystemProvider() { this(checkPermission()); @@ -644,7 +644,7 @@ public abstract class FileSystemProvider { * 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}("symbolic") + * 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 @@ public abstract class FileSystemProvider { * 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}("hard") + * 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 @@ public abstract class FileSystemProvider { * 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} - * ("getFileStoreAttributes") + * addition it checks + * {@link RuntimePermission}{@code ("getFileStoreAttributes")} */ public abstract FileStore getFileStore(Path path) throws IOException; diff --git a/jdk/src/java.base/share/classes/java/nio/file/spi/FileTypeDetector.java b/jdk/src/java.base/share/classes/java/nio/file/spi/FileTypeDetector.java index ee118d63129..1e06a119331 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/spi/FileTypeDetector.java +++ b/jdk/src/java.base/share/classes/java/nio/file/spi/FileTypeDetector.java @@ -62,7 +62,7 @@ public abstract class FileTypeDetector { * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("fileTypeDetector") + * {@link RuntimePermission}{@code ("fileTypeDetector")} */ protected FileTypeDetector() { this(checkPermission()); diff --git a/jdk/src/java.base/share/classes/java/nio/file/spi/package-info.java b/jdk/src/java.base/share/classes/java/nio/file/spi/package-info.java index b86affe5ef4..d263ef72ecb 100644 --- a/jdk/src/java.base/share/classes/java/nio/file/spi/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/file/spi/package-info.java @@ -24,12 +24,12 @@ */ /** - * Service-provider classes for the {@link java.nio.file} package. + * Service-provider classes for the {@link java.nio.file} package. * *

    Only developers who are defining new file system providers or file type * detectors should need to make direct use of this package.

    * - *

    Unless otherwise noted, passing a null argument to a constructor + *

    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. * diff --git a/jdk/src/java.base/share/classes/java/nio/package-info.java b/jdk/src/java.base/share/classes/java/nio/package-info.java index 374e0bb59a9..b36faeac3c6 100644 --- a/jdk/src/java.base/share/classes/java/nio/package-info.java +++ b/jdk/src/java.base/share/classes/java/nio/package-info.java @@ -52,7 +52,7 @@ * * * - *

    The java.nio package defines the buffer classes, which + *

    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 @@ * *

    * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * - * + * * *
    BuffersDescription
    {@link java.nio.Buffer}
    {@link java.nio.Buffer}Position, limit, and capacity; *
    clear, flip, rewind, and mark/reset
      {@link java.nio.ByteBuffer}
      {@link java.nio.ByteBuffer}Get/put, compact, views; allocate, wrap
        {@link java.nio.MappedByteBuffer}  
        {@link java.nio.MappedByteBuffer}  A byte buffer mapped to a file
      {@link java.nio.CharBuffer}
      {@link java.nio.CharBuffer}Get/put, compact; allocate, wrap
      {@link java.nio.DoubleBuffer}
      {@link java.nio.DoubleBuffer}    ' '
      {@link java.nio.FloatBuffer}
      {@link java.nio.FloatBuffer}    ' '
      {@link java.nio.IntBuffer}
      {@link java.nio.IntBuffer}    ' '
      {@link java.nio.LongBuffer}
      {@link java.nio.LongBuffer}    ' '
      {@link java.nio.ShortBuffer}
      {@link java.nio.ShortBuffer}    ' '
    {@link java.nio.ByteOrder}
    {@link java.nio.ByteOrder}Typesafe enumeration for byte orders
    * @@ -129,7 +129,7 @@ * * * - *

    Unless otherwise noted, passing a null argument to a + *

    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. diff --git a/jdk/src/java.base/share/classes/sun/nio/ByteBuffered.java b/jdk/src/java.base/share/classes/sun/nio/ByteBuffered.java index a09621bbff4..6a016419ee4 100644 --- a/jdk/src/java.base/share/classes/sun/nio/ByteBuffered.java +++ b/jdk/src/java.base/share/classes/sun/nio/ByteBuffered.java @@ -29,11 +29,11 @@ import java.nio.ByteBuffer; import java.io.IOException; /** This is an interface to adapt existing APIs to use {@link java.nio.ByteBuffer - * ByteBuffers} as the underlying + * ByteBuffers} as the underlying * data format. Only the initial producer and final consumer have to be changed.

    * - * For example, the Zip/Jar code supports {@link java.io.InputStream InputStreams}. - * To make the Zip code use {@link java.nio.MappedByteBuffer MappedByteBuffers} as + * For example, the Zip/Jar code supports {@link java.io.InputStream InputStreams}. + * To make the Zip code use {@link java.nio.MappedByteBuffer MappedByteBuffers} as * the underlying data structure, it can create a class of InputStream that wraps the ByteBuffer, * and implements the ByteBuffered interface. A co-operating class several layers * away can ask the InputStream if it is an instance of ByteBuffered, then @@ -42,12 +42,12 @@ import java.io.IOException; public interface ByteBuffered { /** - * Returns the ByteBuffer behind this object, if this particular - * instance has one. An implementation of getByteBuffer() is allowed - * to return null for any reason. + * Returns the {@code ByteBuffer} behind this object, if this particular + * instance has one. An implementation of {@code getByteBuffer()} is allowed + * to return {@code null} for any reason. * - * @return The ByteBuffer, if this particular instance has one, - * or null otherwise. + * @return The {@code ByteBuffer}, if this particular instance has one, + * or {@code null} otherwise. * * @throws IOException * If the ByteBuffer is no longer valid. diff --git a/jdk/src/java.base/share/classes/sun/nio/ch/AllocatedNativeObject.java b/jdk/src/java.base/share/classes/sun/nio/ch/AllocatedNativeObject.java index 2406cb8f1e4..6709ce115cf 100644 --- a/jdk/src/java.base/share/classes/sun/nio/ch/AllocatedNativeObject.java +++ b/jdk/src/java.base/share/classes/sun/nio/ch/AllocatedNativeObject.java @@ -36,14 +36,14 @@ class AllocatedNativeObject // package-private { /** - * Allocates a memory area of at least size bytes outside of the + * Allocates a memory area of at least {@code size} bytes outside of the * Java heap and creates a native object for that area. * * @param size * Number of bytes to allocate * * @param pageAligned - * If true then the area will be aligned on a hardware + * If {@code true} then the area will be aligned on a hardware * page boundary * * @throws OutOfMemoryError diff --git a/jdk/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java b/jdk/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java index 445b75530cb..065b13036e5 100644 --- a/jdk/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java +++ b/jdk/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java @@ -538,11 +538,11 @@ public abstract class SctpChannel * {@link java.io.IOException} to be thrown. * *

    If this channel is already connected then this method will not block - * and will immediately return true. If this channel is in - * non-blocking mode then this method will return false 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 true or throw a checked + * or fails, and will always either return {@code true} or throw a checked * exception describing the failure. * *

    This method may be invoked at any time. If a {@link #send send} or {@link #receive receive} @@ -711,9 +711,9 @@ public abstract class SctpChannel * Returns an operation set identifying this channel's supported operations. * *

    SCTP channels support connecting, reading, and writing, so this - * method returns ({@link SelectionKey#OP_CONNECT} - * | {@link SelectionKey#OP_READ} | {@link - * SelectionKey#OP_WRITE}).

    + * method returns {@code (}{@link SelectionKey#OP_CONNECT} + * {@code |} {@link SelectionKey#OP_READ} {@code |} {@link + * SelectionKey#OP_WRITE}{@code )}. * * @return The valid-operation set */ From d37f9f40c9f569e2cbf251509a0f74132e3e48d8 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 13 Aug 2015 19:07:27 +0530 Subject: [PATCH 60/71] 8133347: Add makefiles support and basic session, persistence history navigation with jline Reviewed-by: erikj, jlahoda, jlaskey --- nashorn/make/BuildNashorn.gmk | 7 +- nashorn/make/build.xml | 24 ++- nashorn/make/project.properties | 13 +- .../jdk/nashorn/tools/jjs/Console.java | 103 ++++++++++++ .../classes/jdk/nashorn/tools/jjs/Main.java | 150 ++++++++++++++++++ .../classes/jdk/nashorn/tools/Shell.java | 4 +- 6 files changed, 287 insertions(+), 14 deletions(-) create mode 100644 nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java create mode 100644 nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java diff --git a/nashorn/make/BuildNashorn.gmk b/nashorn/make/BuildNashorn.gmk index 044ee4eddf5..45b8f27284d 100644 --- a/nashorn/make/BuildNashorn.gmk +++ b/nashorn/make/BuildNashorn.gmk @@ -53,7 +53,10 @@ $(eval $(call SetupJavaCompiler,GENERATE_NEWBYTECODE_DEBUG, \ SERVER_JVM := $(SJAVAC_SERVER_JAVA))) # Build nashorn into intermediate directory -$(eval $(call SetupJavaCompilation,BUILD_NASHORN, \ +# Name the compilation setup the same as the module, as is done in the global +# CompileJavaModules.gmk, to make dependency checking with other modules work +# seamlessly. +$(eval $(call SetupJavaCompilation,jdk.scripting.nashorn, \ SETUP := GENERATE_NEWBYTECODE_DEBUG, \ SRC := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes, \ EXCLUDE_FILES := META-INF/MANIFEST.MF, \ @@ -71,7 +74,7 @@ $(eval $(call SetupJavaCompilation,BUILD_NASGEN, \ ADD_JAVAC_FLAGS := -Xbootclasspath/p:"$(SUPPORT_OUTPUTDIR)/special_classes/jdk.scripting.nashorn/classes")) # Nasgen needs nashorn classes -$(BUILD_NASGEN): $(BUILD_NASHORN) +$(BUILD_NASGEN): $(jdk.scripting.nashorn) NASHORN_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules/jdk.scripting.nashorn NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run diff --git a/nashorn/make/build.xml b/nashorn/make/build.xml index b3190b092bf..f8f8e7fbb8c 100644 --- a/nashorn/make/build.xml +++ b/nashorn/make/build.xml @@ -147,16 +147,16 @@ - + - + - + - - + + ${line.separator} @@ -165,7 +165,14 @@ - + + + + @@ -230,13 +237,14 @@ - - + + diff --git a/nashorn/make/project.properties b/nashorn/make/project.properties index aab32c62a83..d3730d8cdd6 100644 --- a/nashorn/make/project.properties +++ b/nashorn/make/project.properties @@ -26,6 +26,9 @@ application.title=nashorn # location of JDK embedded ASM sources jdk.asm.src.dir=../jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm +# location of JDK embedded jline sources +jdk.jline.src.dir=../jdk/src/jdk.internal.le/share/classes + # source and target levels build.compiler=modern javac.source=1.8 @@ -112,7 +115,7 @@ javac.test.classpath=\ ${build.test.classes.dir}${path.separator}\ ${file.reference.testng.jar} -meta.inf.dir=${src.dir}/META-INF +meta.inf.dir=${nashorn.module.src.dir}/META-INF run.classpath=\ ${build.classes.dir} @@ -266,7 +269,13 @@ run.test.classpath=\ ${nashorn.internal.tests.jar}${path.separator}\ ${nashorn.api.tests.jar} -src.dir=src/jdk.scripting.nashorn/share/classes +nashorn.module.src.dir=src/jdk.scripting.nashorn/share/classes +nashorn.shell.module.src.dir=src/jdk.scripting.nashorn.shell/share/classes + +src.dir=${nashorn.module.src.dir}${path.separator}\ + ${nashorn.shell.module.src.dir}${path.separator}\ + ${jdk.jline.src.dir} + test.src.dir=test/src # -Xmx is used for all tests, -Xms only for octane benchmark diff --git a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java new file mode 100644 index 00000000000..932eb7ab055 --- /dev/null +++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Console.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.tools.jjs; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.prefs.BackingStoreException; +import java.util.prefs.Preferences; +import jdk.internal.jline.console.ConsoleReader; +import jdk.internal.jline.console.history.History.Entry; +import jdk.internal.jline.console.history.MemoryHistory; + +class Console implements AutoCloseable { + private final ConsoleReader in; + private final PersistentHistory history; + + Console(InputStream cmdin, PrintStream cmdout, Preferences prefs) throws IOException { + in = new ConsoleReader(cmdin, cmdout); + in.setExpandEvents(false); + in.setHandleUserInterrupt(true); + in.setHistory(history = new PersistentHistory(prefs)); + Runtime.getRuntime().addShutdownHook(new Thread(()->close())); + } + + String readLine(String prompt) throws IOException { + return in.readLine(prompt); + } + + + @Override + public void close() { + history.save(); + } + + public static class PersistentHistory extends MemoryHistory { + + private final Preferences prefs; + + protected PersistentHistory(Preferences prefs) { + this.prefs = prefs; + load(); + } + + private static final String HISTORY_LINE_PREFIX = "HISTORY_LINE_"; + + public final void load() { + try { + List keys = new ArrayList<>(Arrays.asList(prefs.keys())); + Collections.sort(keys); + for (String key : keys) { + if (!key.startsWith(HISTORY_LINE_PREFIX)) + continue; + CharSequence line = prefs.get(key, ""); + add(line); + } + } catch (BackingStoreException ex) { + throw new IllegalStateException(ex); + } + } + + public void save() { + Iterator entries = iterator(); + if (entries.hasNext()) { + int len = (int) Math.ceil(Math.log10(size()+1)); + String format = HISTORY_LINE_PREFIX + "%0" + len + "d"; + while (entries.hasNext()) { + Entry entry = entries.next(); + prefs.put(String.format(format, entry.index()), entry.value().toString()); + } + } + } + + } +} diff --git a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java new file mode 100644 index 00000000000..9bc4b56638e --- /dev/null +++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.tools.jjs; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.util.prefs.Preferences; +import jdk.nashorn.internal.objects.Global; +import jdk.nashorn.internal.runtime.Context; +import jdk.nashorn.internal.runtime.ErrorManager; +import jdk.nashorn.internal.runtime.JSType; +import jdk.nashorn.internal.runtime.ScriptEnvironment; +import jdk.nashorn.internal.runtime.ScriptRuntime; +import jdk.nashorn.tools.Shell; +import jdk.internal.jline.console.UserInterruptException; + +/** + * Interactive command line Shell for Nashorn. + */ +public final class Main extends Shell { + private Main() {} + + static final Preferences PREFS = Preferences.userRoot().node("tool/jjs"); + + /** + * Main entry point with the default input, output and error streams. + * + * @param args The command line arguments + */ + public static void main(final String[] args) { + try { + final int exitCode = main(System.in, System.out, System.err, args); + if (exitCode != SUCCESS) { + System.exit(exitCode); + } + } catch (final IOException e) { + System.err.println(e); //bootstrapping, Context.err may not exist + System.exit(IO_ERROR); + } + } + + /** + * Starting point for executing a {@code Shell}. Starts a shell with the + * given arguments and streams and lets it run until exit. + * + * @param in input stream for Shell + * @param out output stream for Shell + * @param err error stream for Shell + * @param args arguments to Shell + * + * @return exit code + * + * @throws IOException if there's a problem setting up the streams + */ + public static int main(final InputStream in, final OutputStream out, final OutputStream err, final String[] args) throws IOException { + return new Main().run(in, out, err, args); + } + + /** + * read-eval-print loop for Nashorn shell. + * + * @param context the nashorn context + * @param global global scope object to use + * @return return code + */ + protected int readEvalPrint(final Context context, final Global global) { + final ScriptEnvironment env = context.getEnv(); + final String prompt = bundle.getString("shell.prompt"); + final PrintWriter err = context.getErr(); + final Global oldGlobal = Context.getGlobal(); + final boolean globalChanged = (oldGlobal != global); + + try (final Console in = new Console(System.in, System.out, PREFS)) { + if (globalChanged) { + Context.setGlobal(global); + } + + global.addShellBuiltins(); + + while (true) { + String source = ""; + try { + source = in.readLine(prompt); + } catch (final IOException ioe) { + err.println(ioe.toString()); + if (env._dump_on_error) { + ioe.printStackTrace(err); + } + return IO_ERROR; + } catch (final UserInterruptException ex) { + break; + } + + if (source.isEmpty()) { + continue; + } + + try { + final Object res = context.eval(global, source, global, ""); + if (res != ScriptRuntime.UNDEFINED) { + err.println(JSType.toString(res)); + } + } catch (final Exception e) { + err.println(e); + if (env._dump_on_error) { + e.printStackTrace(err); + } + } + } + } catch (final Exception e) { + err.println(e); + if (env._dump_on_error) { + e.printStackTrace(err); + } + } finally { + if (globalChanged) { + Context.setGlobal(oldGlobal); + } + } + + return SUCCESS; + } +} diff --git a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java index 3d2a67172eb..ec0397a7b37 100644 --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java @@ -68,7 +68,7 @@ public class Shell { /** * Shell message bundle. */ - private static final ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_RESOURCE, Locale.getDefault()); + protected static final ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_RESOURCE, Locale.getDefault()); /** * Exit code for command line tool - successful @@ -403,7 +403,7 @@ public class Shell { * @param global global scope object to use * @return return code */ - private static int readEvalPrint(final Context context, final Global global) { + protected int readEvalPrint(final Context context, final Global global) { final String prompt = bundle.getString("shell.prompt"); final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); final PrintWriter err = context.getErr(); From d45350bdb17b664bb99072ec16b42d64c2ee3c30 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 13 Aug 2015 19:09:18 +0530 Subject: [PATCH 61/71] 8133347: Add makefiles support and basic session, persistence history navigation with jline Reviewed-by: erikj, jlahoda, jlaskey --- jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk | 2 +- jdk/src/java.base/share/conf/security/java.policy | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk index 1a9f71c05af..efc2230ddd0 100644 --- a/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk +++ b/jdk/make/launcher/Launcher-jdk.scripting.nashorn.gmk @@ -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) }')) diff --git a/jdk/src/java.base/share/conf/security/java.policy b/jdk/src/java.base/share/conf/security/java.policy index aef0017be48..968cc4ff52e 100644 --- a/jdk/src/java.base/share/conf/security/java.policy +++ b/jdk/src/java.base/share/conf/security/java.policy @@ -23,6 +23,14 @@ grant codeBase "jrt:/jdk.scripting.nashorn" { permission java.security.AllPermission; }; +grant codeBase "jrt:/jdk.scripting.nashorn.shell" { + permission java.security.AllPermission; +}; + +grant codeBase "jrt:/jdk.internal.le" { + permission java.security.AllPermission; +}; + grant codeBase "jrt:/jdk.crypto.ucrypto" { permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*"; permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch"; From c580b989e0fe086be80db2991af1c41310a02832 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 13 Aug 2015 19:09:59 +0530 Subject: [PATCH 62/71] 8133347: Add makefiles support and basic session, persistence history navigation with jline Reviewed-by: erikj, jlahoda, jlaskey --- make/CompileJavaModules.gmk | 1 + make/Images.gmk | 6 +++--- modules.xml | 19 +++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk index 8d97cd0aad2..a68908c9cb6 100644 --- a/make/CompileJavaModules.gmk +++ b/make/CompileJavaModules.gmk @@ -491,6 +491,7 @@ SHARE_SRC_DIRS += \ $(CORBA_TOPDIR)/src/$1/share/classes \ $(JAXP_TOPDIR)/src/$1/share/classes \ $(JAXWS_TOPDIR)/src/$1/share/classes \ + $(NASHORN_TOPDIR)/src/$1/share/classes \ # ALL_SRC_DIRS = \ diff --git a/make/Images.gmk b/make/Images.gmk index 0dfba0f509e..d3b60a22e6b 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -46,9 +46,9 @@ PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs # tools -TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev jdk.internal.le jdk.javadoc jdk.jcmd jdk.jconsole \ - jdk.hotspot.agent jdk.hprof.agent jdk.jartool jdk.jdeps jdk.jdi jdk.jdwp.agent \ - jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws +TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev jdk.internal.le jdk.scripting.nashorn.shell \ + jdk.javadoc jdk.jcmd jdk.jconsole jdk.hotspot.agent jdk.hprof.agent jdk.jartool \ + jdk.jdeps jdk.jdi jdk.jdwp.agent jdk.policytool jdk.rmic jdk.xml.bind jdk.xml.ws ifeq ($(OPENJDK_TARGET_OS), windows) PROVIDER_MODULES += jdk.crypto.mscapi diff --git a/modules.xml b/modules.xml index 5188fd4c42e..0445602d877 100644 --- a/modules.xml +++ b/modules.xml @@ -1799,6 +1799,25 @@ java.base java.logging java.scripting + + jdk.nashorn.internal.runtime + jdk.scripting.nashorn.shell + + + jdk.nashorn.internal.objects + jdk.scripting.nashorn.shell + + + jdk.nashorn.tools + jdk.scripting.nashorn.shell + + + + jdk.scripting.nashorn.shell + java.base + java.prefs + jdk.scripting.nashorn + jdk.internal.le jdk.sctp From 10207de32f3f5b4772ce801a0eeaa70d16f3e9a1 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Thu, 13 Aug 2015 09:36:14 -0700 Subject: [PATCH 63/71] 8065595: Wrong JNI_OnLoad called if just loaded lib does not have JNI_OnLoad function Add nio_util.c containing JNI_OnLoad bare bones implementation. Reviewed-by: rriggs --- jdk/make/lib/NioLibraries.gmk | 1 + jdk/make/mapfiles/libnio/mapfile-linux | 1 + jdk/make/mapfiles/libnio/mapfile-macosx | 3 +- jdk/make/mapfiles/libnio/mapfile-solaris | 1 + .../java.base/share/native/libnio/nio_util.c | 40 +++++++++++++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 jdk/src/java.base/share/native/libnio/nio_util.c diff --git a/jdk/make/lib/NioLibraries.gmk b/jdk/make/lib/NioLibraries.gmk index 81d6e0f7e67..d78f4a7db97 100644 --- a/jdk/make/lib/NioLibraries.gmk +++ b/jdk/make/lib/NioLibraries.gmk @@ -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 \ diff --git a/jdk/make/mapfiles/libnio/mapfile-linux b/jdk/make/mapfiles/libnio/mapfile-linux index e1928c477c9..c00f6dd5379 100644 --- a/jdk/make/mapfiles/libnio/mapfile-linux +++ b/jdk/make/mapfiles/libnio/mapfile-linux @@ -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; diff --git a/jdk/make/mapfiles/libnio/mapfile-macosx b/jdk/make/mapfiles/libnio/mapfile-macosx index d4b6dc5a219..7ce9c50fde5 100644 --- a/jdk/make/mapfiles/libnio/mapfile-macosx +++ b/jdk/make/mapfiles/libnio/mapfile-macosx @@ -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; diff --git a/jdk/make/mapfiles/libnio/mapfile-solaris b/jdk/make/mapfiles/libnio/mapfile-solaris index 92d62d20174..9c5da0e2f31 100644 --- a/jdk/make/mapfiles/libnio/mapfile-solaris +++ b/jdk/make/mapfiles/libnio/mapfile-solaris @@ -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; diff --git a/jdk/src/java.base/share/native/libnio/nio_util.c b/jdk/src/java.base/share/native/libnio/nio_util.c new file mode 100644 index 00000000000..f61c65268e8 --- /dev/null +++ b/jdk/src/java.base/share/native/libnio/nio_util.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include "jni.h" +#include "jvm.h" +#include "jni_util.h" + +JNIEXPORT jint JNICALL +JNI_OnLoad(JavaVM *vm, void *reserved) +{ + JNIEnv *env; + + if ((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_2) != JNI_OK) { + return JNI_EVERSION; /* JNI version not supported */ + } + + return JNI_VERSION_1_2; +} From c30f555733a452f0b205913862e4f5b53efd39a7 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:03 -0700 Subject: [PATCH 64/71] Added tag jdk9-b77 for changeset 05020a092c0f --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index e7cd2f8b813..4a5b7897a36 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -319,3 +319,4 @@ c706ef5ea5da00078dc5e4334660315f7d99c15b jdk9-b71 57f3134853ecdd4a3ee2d4d26f22ba981d653d79 jdk9-b74 8fd6eeb878606e39c908f12535f34ebbfd225a4a jdk9-b75 d82072b699b880a1f647a5e2d7c0f86cec958941 jdk9-b76 +7972dc8f2a47f0c4cd8f02fa5662af41f028aa14 jdk9-b77 From 68d4e9ccf4059d08ea489a2c32759062996870b6 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:04 -0700 Subject: [PATCH 65/71] Added tag jdk9-b77 for changeset 3cb9ab9c726d --- corba/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/corba/.hgtags b/corba/.hgtags index 5f4956021f3..3f3d3c4089b 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -319,3 +319,4 @@ f9f3706bd24c42c07cb260fe05730a749b8e52f4 jdk9-b72 622fe934e351e89107edf3c667d6b57f543f58f1 jdk9-b74 960b56805abd8460598897481820bd6a75f979e7 jdk9-b75 d8126bc88fa5cd1ae4e44d86a4b1280ca1c9e2aa jdk9-b76 +8bb2441c0fec8b28f7bf11a0ca3ec1642e7ef457 jdk9-b77 From 053ddb237aac816efa8865797ba82cd7e06d480f Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:05 -0700 Subject: [PATCH 66/71] Added tag jdk9-b77 for changeset f057c3f8e4d2 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index ec379ef03c1..9662d2a1477 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -479,3 +479,4 @@ e37d432868be0aa7cb5e0f3d7caff1e825d8ead3 jdk9-b73 fff6b54e9770ac4c12c2fb4cab5aa7672affa4bd jdk9-b74 2f354281e9915275693c4e519a959b8a6f22d3a3 jdk9-b75 0bc8d1656d6f2b1fdfe803c1305a108bb9939f35 jdk9-b76 +e66c3813789debfc06f206afde1bf7a84cb08451 jdk9-b77 From bd2258414ae3f7bdf38a485fd35073ff107dd1e1 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:06 -0700 Subject: [PATCH 67/71] Added tag jdk9-b77 for changeset 51926b23f437 --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 6165f2117df..e3b3c6177a6 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -319,3 +319,4 @@ be5efc34a43bdd982d1cbe11cb2f6d6a060dde60 jdk9-b73 eadcb2b55cd1daf77625813aad0f6f3967b1528a jdk9-b74 16b5e696f948cd8aa9b3afdb686ddffd48bd17a8 jdk9-b75 36801a89a04201b59874ec776ffe85d6253c9ab5 jdk9-b76 +be357705874c4ba1a69c38fb211e5e31e35bf9cb jdk9-b77 From 8a19dd511d9b8cf856d8826c09800d5a977d2425 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:07 -0700 Subject: [PATCH 68/71] Added tag jdk9-b77 for changeset c02e2d8c7f9f --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index a4e7142ec90..46783012104 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -319,3 +319,4 @@ f376824d4940f45719d91838f3f6249f873440db jdk9-b72 6dd82d2e4a104f4d204b2890f33ef11ec3e3f8d0 jdk9-b74 4dd09cb5f7c2a2a23a9958ea7a602dd74d5709b2 jdk9-b75 4526c0da8fb362eebd7e88f4d44e86858cf9b80b jdk9-b76 +7fd081100f48828431e7c1bff65c906ee759069b jdk9-b77 From 93691df899b98e79c16b290b87467151187404b1 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:07 -0700 Subject: [PATCH 69/71] Added tag jdk9-b77 for changeset 59d4b73cb39a --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 5db1d6583b2..4344d1a61ed 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -322,3 +322,4 @@ f5911c6155c29ac24b6f9068273207e5ebd3a3df jdk9-b69 6232472e51418757f7b2bf05332678ea78096e6b jdk9-b74 086bcd5e4a531a350c84668c8dc019461588ee3d jdk9-b75 55bb88306dc57d07f2c854803465f6d9a7eb4aba jdk9-b76 +bd6ece68cf8aca34c8d992569892060c82cfd3f1 jdk9-b77 From 5d7b720b028a13e3a264556deaa6864a1236a1ec Mon Sep 17 00:00:00 2001 From: David Katleman Date: Thu, 13 Aug 2015 12:20:11 -0700 Subject: [PATCH 70/71] Added tag jdk9-b77 for changeset 5bf57225d6fc --- nashorn/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/nashorn/.hgtags b/nashorn/.hgtags index bd520db026d..c929021d887 100644 --- a/nashorn/.hgtags +++ b/nashorn/.hgtags @@ -310,3 +310,4 @@ d017877b3b8cd39337f1bdc00d958f821433c4c3 jdk9-b72 2e8bb16872d7b15dc0a4f8e45c6ad65f762c1b04 jdk9-b74 f884dff432a7ac349153f3d1ea1eb222f3764c6c jdk9-b75 ab231613d7206431ba31917a02e7cedd70e88e70 jdk9-b76 +33cecbc59f2ad78ac0934cbc3e014d346077e848 jdk9-b77 From 7cc817742fa70dd037d7a4ac6ba673d52bfe4fa9 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 13 Aug 2015 21:46:05 -0700 Subject: [PATCH 71/71] 8133588: Place TimeoutLockLoops.java on the problem list Reviewed-by: dholmes --- jdk/test/ProblemList.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt index 10be3c68111..67724532e40 100644 --- a/jdk/test/ProblemList.txt +++ b/jdk/test/ProblemList.txt @@ -353,6 +353,10 @@ com/sun/jdi/GetLocalVariables4Test.sh windows-all # 8062512 java/util/spi/ResourceBundleControlProvider/UserDefaultControlTest.java generic-all +# 8029453 +java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java linux-all + + ############################################################################ # jdk_instrument