# HG changeset patch # User prr # Date 1403122455 25200 # Node ID e2bf17cee34bc128c006491903471c59e51e5805 # Parent aade36e70da0fd69be24951bdd7793c702370517# Parent f5f41ed620d57561c43b56bccf45177941d52127 Merge diff -r aade36e70da0 -r e2bf17cee34b .hgtags --- a/.hgtags Wed Jun 11 10:53:27 2014 +0400 +++ b/.hgtags Wed Jun 18 13:14:15 2014 -0700 @@ -259,3 +259,5 @@ 97932f6ad950ae5a73a9da5c96e6e58503ff646b jdk9-b14 74eb0778e4f2dbff6628e718378449fba27c4265 jdk9-b15 4a09f5d30be844ac6f714bdb0f63d8c3c08b9a98 jdk9-b16 +410bccbded9e9cce80f1e13ad221e37ae97a3986 jdk9-b17 +c5495e25c7258ab5f96a1ae14610887d76d2be63 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b .hgtags-top-repo --- a/.hgtags-top-repo Wed Jun 11 10:53:27 2014 +0400 +++ b/.hgtags-top-repo Wed Jun 18 13:14:15 2014 -0700 @@ -259,3 +259,5 @@ 4e3aa9723e9972623e3dafc321b368e7db7e9b3b jdk9-b14 b114474fb25af4e73cb7219f7c04bd8994da03a5 jdk9-b15 cf22a728521f91a4692b433d39d730a0a1b23155 jdk9-b16 +24152ee0ee1abef54a8bab04c099261dba7bcca5 jdk9-b17 +65abab59f783fcf02ff8e133431c252f9e5f07d5 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b corba/.hgtags --- a/corba/.hgtags Wed Jun 11 10:53:27 2014 +0400 +++ b/corba/.hgtags Wed Jun 18 13:14:15 2014 -0700 @@ -259,3 +259,5 @@ a2b82f863ba95a596da555a4c1b871c404863e7e jdk9-b14 e54022d0dd92106fff7f7fe670010cd7e6517ee3 jdk9-b15 422ef9d29d84f571453f015c4cb8713c3af70ee4 jdk9-b16 +4c75c2ca7cf3e0618315879acf17f42c8fcd0c09 jdk9-b17 +77565aaaa2bb814e94817e92d680168052a25395 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b hotspot/.hgtags --- a/hotspot/.hgtags Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/.hgtags Wed Jun 18 13:14:15 2014 -0700 @@ -419,3 +419,5 @@ bd333491bb6c012d7b606939406d0fa9a5ac7ffd jdk9-b14 170f6d733d7aec062f743a6b8c1cce940a7a984a jdk9-b15 b14e7c0b7d3ec04127f565cda1d84122e205680c jdk9-b16 +14b656df31c2cb09c505921061e79977823de71a jdk9-b17 +871fd128548480095e0dc3fc34c422666baeec75 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b hotspot/make/bsd/makefiles/universal.gmk --- a/hotspot/make/bsd/makefiles/universal.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/make/bsd/makefiles/universal.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -74,19 +74,21 @@ # Replace arch specific binaries with universal binaries +# Do not touch jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) +# That symbolic link belongs to the 'jdk' build. export_universal: $(RM) -r $(EXPORT_PATH)/jre/lib/{i386,amd64} $(RM) -r $(JDK_IMAGE_DIR)/jre/lib/{i386,amd64} - $(RM) $(JDK_IMAGE_DIR)/jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) ($(CD) $(EXPORT_PATH) && \ $(TAR) -cf - *) | \ ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xpf -) # Overlay universal binaries +# Do not touch jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) +# That symbolic link belongs to the 'jdk' build. copy_universal: $(RM) -r $(JDK_IMAGE_DIR)$(COPY_SUBDIR)/jre/lib/{i386,amd64} - $(RM) $(JDK_IMAGE_DIR)$(COPY_SUBDIR)/jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) ($(CD) $(EXPORT_PATH)$(COPY_SUBDIR) && \ $(TAR) -cf - *) | \ ($(CD) $(JDK_IMAGE_DIR)$(COPY_SUBDIR) && $(TAR) -xpf -) diff -r aade36e70da0 -r e2bf17cee34b hotspot/make/jprt.properties --- a/hotspot/make/jprt.properties Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/make/jprt.properties Wed Jun 18 13:14:15 2014 -0700 @@ -47,10 +47,10 @@ # sparc etc. # Define the Solaris platforms we want for the various releases -jprt.my.solaris.sparcv9.jdk9=solaris_sparcv9_5.10 +jprt.my.solaris.sparcv9.jdk9=solaris_sparcv9_5.11 jprt.my.solaris.sparcv9=${jprt.my.solaris.sparcv9.${jprt.tools.default.release}} -jprt.my.solaris.x64.jdk9=solaris_x64_5.10 +jprt.my.solaris.x64.jdk9=solaris_x64_5.11 jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}} jprt.my.linux.i586.jdk9=linux_i586_2.6 diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/classfile/classFileParser.cpp --- a/hotspot/src/share/vm/classfile/classFileParser.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -4359,9 +4359,15 @@ Method* m = k->lookup_method(vmSymbols::finalize_method_name(), vmSymbols::void_method_signature()); if (m != NULL && !m->is_empty_method()) { - f = true; + f = true; } - assert(f == k->has_finalizer(), "inconsistent has_finalizer"); + + // Spec doesn't prevent agent from redefinition of empty finalizer. + // Despite the fact that it's generally bad idea and redefined finalizer + // will not work as expected we shouldn't abort vm in this case + if (!k->has_redefined_this_or_super()) { + assert(f == k->has_finalizer(), "inconsistent has_finalizer"); + } #endif // Check if this klass supports the java.lang.Cloneable interface diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/classfile/javaClasses.hpp --- a/hotspot/src/share/vm/classfile/javaClasses.hpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/classfile/javaClasses.hpp Wed Jun 18 13:14:15 2014 -0700 @@ -1181,7 +1181,7 @@ static oop target( oop site) { return site->obj_field( _target_offset); } static void set_target( oop site, oop target) { site->obj_field_put( _target_offset, target); } - static volatile oop target_volatile(oop site) { return site->obj_field_volatile( _target_offset); } + static volatile oop target_volatile(oop site) { return oop((oopDesc *)(site->obj_field_volatile(_target_offset))); } static void set_target_volatile(oop site, oop target) { site->obj_field_put_volatile(_target_offset, target); } // Testers diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -311,8 +311,7 @@ _cmsGen->refs_discovery_is_mt(), // mt discovery (int) MAX2(ConcGCThreads, ParallelGCThreads), // mt discovery degree _cmsGen->refs_discovery_is_atomic(), // discovery is not atomic - &_is_alive_closure, // closure for liveness info - false); // next field updates do not need write barrier + &_is_alive_closure); // closure for liveness info // Initialize the _ref_processor field of CMSGen _cmsGen->set_ref_processor(_ref_processor); diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -2246,12 +2246,9 @@ // degree of mt discovery false, // Reference discovery is not atomic - &_is_alive_closure_cm, + &_is_alive_closure_cm); // is alive closure // (for efficiency/performance) - true); - // Setting next fields of discovered - // lists requires a barrier. // STW ref processor _ref_processor_stw = @@ -2266,12 +2263,9 @@ // degree of mt discovery true, // Reference discovery is atomic - &_is_alive_closure_stw, + &_is_alive_closure_stw); // is alive closure // (for efficiency/performance) - false); - // Setting next fields of discovered - // lists does not require a barrier. } size_t G1CollectedHeap::capacity() const { diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp --- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -1636,8 +1636,7 @@ refs_discovery_is_mt(), // mt discovery (int) ParallelGCThreads, // mt discovery degree refs_discovery_is_atomic(), // atomic_discovery - NULL, // is_alive_non_header - false); // write barrier for next field updates + NULL); // is_alive_non_header } } diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -854,8 +854,7 @@ true, // mt discovery (int) ParallelGCThreads, // mt discovery degree true, // atomic_discovery - &_is_alive_closure, // non-header is alive closure - false); // write barrier for next field updates + &_is_alive_closure); // non-header is alive closure _counters = new CollectorCounters("PSParallelCompact", 1); // Initialize static fields in ParCompactionManager. diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -864,8 +864,7 @@ true, // mt discovery (int) ParallelGCThreads, // mt discovery degree true, // atomic_discovery - NULL, // header provides liveness info - false); // next field updates do not need write barrier + NULL); // header provides liveness info // Cache the cardtable BarrierSet* bs = Universe::heap()->barrier_set(); diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/memory/allocation.cpp --- a/hotspot/src/share/vm/memory/allocation.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/memory/allocation.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -563,6 +563,7 @@ _chunk = new (alloc_failmode, len) Chunk(len); if (_chunk == NULL) { + _chunk = k; // restore the previous value of _chunk return NULL; } if (k) k->set_next(_chunk); // Append new chunk to end of linked list diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/memory/metaspace.cpp --- a/hotspot/src/share/vm/memory/metaspace.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/memory/metaspace.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -1423,6 +1423,17 @@ return (size_t)Atomic::add_ptr(-(intptr_t)v, &_capacity_until_GC); } +void MetaspaceGC::initialize() { + // Set the high-water mark to MaxMetapaceSize during VM initializaton since + // we can't do a GC during initialization. + _capacity_until_GC = MaxMetaspaceSize; +} + +void MetaspaceGC::post_initialize() { + // Reset the high-water mark once the VM initialization is done. + _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize); +} + bool MetaspaceGC::can_expand(size_t word_size, bool is_class) { // Check if the compressed class space is full. if (is_class && Metaspace::using_class_space()) { @@ -1443,21 +1454,13 @@ size_t MetaspaceGC::allowed_expansion() { size_t committed_bytes = MetaspaceAux::committed_bytes(); + size_t capacity_until_gc = capacity_until_GC(); + + assert(capacity_until_gc >= committed_bytes, + err_msg("capacity_until_gc: " SIZE_FORMAT " < committed_bytes: " SIZE_FORMAT, + capacity_until_gc, committed_bytes)); size_t left_until_max = MaxMetaspaceSize - committed_bytes; - - // Always grant expansion if we are initiating the JVM, - // or if the GC_locker is preventing GCs. - if (!is_init_completed() || GC_locker::is_active_and_needs_gc()) { - return left_until_max / BytesPerWord; - } - - size_t capacity_until_gc = capacity_until_GC(); - - if (capacity_until_gc <= committed_bytes) { - return 0; - } - size_t left_until_GC = capacity_until_gc - committed_bytes; size_t left_to_commit = MIN2(left_until_GC, left_until_max); @@ -1469,7 +1472,15 @@ uint current_shrink_factor = _shrink_factor; _shrink_factor = 0; - const size_t used_after_gc = MetaspaceAux::capacity_bytes(); + // Using committed_bytes() for used_after_gc is an overestimation, since the + // chunk free lists are included in committed_bytes() and the memory in an + // un-fragmented chunk free list is available for future allocations. + // However, if the chunk free lists becomes fragmented, then the memory may + // not be available for future allocations and the memory is therefore "in use". + // Including the chunk free lists in the definition of "in use" is therefore + // necessary. Not including the chunk free lists can cause capacity_until_GC to + // shrink below committed_bytes() and this has caused serious bugs in the past. + const size_t used_after_gc = MetaspaceAux::committed_bytes(); const size_t capacity_until_GC = MetaspaceGC::capacity_until_GC(); const double minimum_free_percentage = MinMetaspaceFreeRatio / 100.0; @@ -3094,6 +3105,8 @@ } void Metaspace::global_initialize() { + MetaspaceGC::initialize(); + // Initialize the alignment for shared spaces. int max_alignment = os::vm_allocation_granularity(); size_t cds_total = 0; @@ -3201,10 +3214,13 @@ } } - MetaspaceGC::initialize(); _tracer = new MetaspaceTracer(); } +void Metaspace::post_initialize() { + MetaspaceGC::post_initialize(); +} + Metachunk* Metaspace::get_initialization_chunk(MetadataType mdtype, size_t chunk_word_size, size_t chunk_bunch) { diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/memory/metaspace.hpp --- a/hotspot/src/share/vm/memory/metaspace.hpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/memory/metaspace.hpp Wed Jun 18 13:14:15 2014 -0700 @@ -208,6 +208,7 @@ static void ergo_initialize(); static void global_initialize(); + static void post_initialize(); static size_t first_chunk_word_size() { return _first_chunk_word_size; } static size_t first_class_chunk_word_size() { return _first_class_chunk_word_size; } @@ -398,7 +399,8 @@ public: - static void initialize() { _capacity_until_GC = MetaspaceSize; } + static void initialize(); + static void post_initialize(); static size_t capacity_until_GC(); static size_t inc_capacity_until_GC(size_t v); diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/memory/referenceProcessor.cpp --- a/hotspot/src/share/vm/memory/referenceProcessor.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/memory/referenceProcessor.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -96,12 +96,10 @@ bool mt_discovery, uint mt_discovery_degree, bool atomic_discovery, - BoolObjectClosure* is_alive_non_header, - bool discovered_list_needs_post_barrier) : + BoolObjectClosure* is_alive_non_header) : _discovering_refs(false), _enqueuing_is_done(false), _is_alive_non_header(is_alive_non_header), - _discovered_list_needs_post_barrier(discovered_list_needs_post_barrier), _processing_is_mt(mt_processing), _next_id(0) { @@ -340,10 +338,18 @@ // (java.lang.ref.Reference.discovered), self-loop their "next" field // thus distinguishing them from active References, then // prepend them to the pending list. + // + // The Java threads will see the Reference objects linked together through + // the discovered field. Instead of trying to do the write barrier updates + // in all places in the reference processor where we manipulate the discovered + // field we make sure to do the barrier here where we anyway iterate through + // all linked Reference objects. Note that it is important to not dirty any + // cards during reference processing since this will cause card table + // verification to fail for G1. + // // BKWRD COMPATIBILITY NOTE: For older JDKs (prior to the fix for 4956777), // the "next" field is used to chain the pending list, not the discovered // field. - if (TraceReferenceGC && PrintGCDetails) { gclog_or_tty->print_cr("ReferenceProcessor::enqueue_discovered_reflist list " INTPTR_FORMAT, (address)refs_list.head()); @@ -365,15 +371,15 @@ assert(java_lang_ref_Reference::next(obj) == NULL, "Reference not active; should not be discovered"); // Self-loop next, so as to make Ref not active. - // Post-barrier not needed when looping to self. java_lang_ref_Reference::set_next_raw(obj, obj); - if (next_d == obj) { // obj is last + if (next_d != obj) { + oopDesc::bs()->write_ref_field(java_lang_ref_Reference::discovered_addr(obj), next_d); + } else { + // This is the last object. // Swap refs_list into pending_list_addr and // set obj's discovered to what we read from pending_list_addr. oop old = oopDesc::atomic_exchange_oop(refs_list.head(), pending_list_addr); - // Need post-barrier on pending_list_addr above; - // see special post-barrier code at the end of - // enqueue_discovered_reflists() further below. + // Need post-barrier on pending_list_addr. See enqueue_discovered_ref_helper() above. java_lang_ref_Reference::set_discovered_raw(obj, old); // old may be NULL oopDesc::bs()->write_ref_field(java_lang_ref_Reference::discovered_addr(obj), old); } @@ -496,20 +502,15 @@ // pre-barrier here because we know the Reference has already been found/marked, // that's how it ended up in the discovered list in the first place. oop_store_raw(_prev_next, new_next); - if (_discovered_list_needs_post_barrier && _prev_next != _refs_list.adr_head()) { - // Needs post-barrier and this is not the list head (which is not on the heap) - oopDesc::bs()->write_ref_field(_prev_next, new_next); - } NOT_PRODUCT(_removed++); _refs_list.dec_length(1); } // Make the Reference object active again. void DiscoveredListIterator::make_active() { - // For G1 we don't want to use set_next - it - // will dirty the card for the next field of - // the reference object and will fail - // CT verification. + // The pre barrier for G1 is probably just needed for the old + // reference processing behavior. Should we guard this with + // ReferenceProcessor::pending_list_uses_discovered_field() ? if (UseG1GC) { HeapWord* next_addr = java_lang_ref_Reference::next_addr(_ref); if (UseCompressedOops) { @@ -517,10 +518,8 @@ } else { oopDesc::bs()->write_ref_field_pre((oop*)next_addr, NULL); } - java_lang_ref_Reference::set_next_raw(_ref, NULL); - } else { - java_lang_ref_Reference::set_next(_ref, NULL); } + java_lang_ref_Reference::set_next_raw(_ref, NULL); } void DiscoveredListIterator::clear_referent() { @@ -546,7 +545,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc) { assert(policy != NULL, "Must have a non-NULL policy"); - DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive); // Decide which softly reachable refs should be kept alive. while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(!discovery_is_atomic() /* allow_null_referent */)); @@ -586,7 +585,7 @@ BoolObjectClosure* is_alive, OopClosure* keep_alive) { assert(discovery_is_atomic(), "Error"); - DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */)); DEBUG_ONLY(oop next = java_lang_ref_Reference::next(iter.obj());) @@ -623,7 +622,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc) { assert(!discovery_is_atomic(), "Error"); - DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */)); HeapWord* next_addr = java_lang_ref_Reference::next_addr(iter.obj()); @@ -666,7 +665,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc) { ResourceMark rm; - DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive); while (iter.has_next()) { iter.update_discovered(); iter.load_ptrs(DEBUG_ONLY(false /* allow_null_referent */)); @@ -782,13 +781,6 @@ bool _clear_referent; }; -void ReferenceProcessor::set_discovered(oop ref, oop value) { - java_lang_ref_Reference::set_discovered_raw(ref, value); - if (_discovered_list_needs_post_barrier) { - oopDesc::bs()->write_ref_field(java_lang_ref_Reference::discovered_addr(ref), value); - } -} - // Balances reference queues. // Move entries from all queues[0, 1, ..., _max_num_q-1] to // queues[0, 1, ..., _num_q-1] because only the first _num_q @@ -846,9 +838,9 @@ // Add the chain to the to list. if (ref_lists[to_idx].head() == NULL) { // to list is empty. Make a loop at the end. - set_discovered(move_tail, move_tail); + java_lang_ref_Reference::set_discovered_raw(move_tail, move_tail); } else { - set_discovered(move_tail, ref_lists[to_idx].head()); + java_lang_ref_Reference::set_discovered_raw(move_tail, ref_lists[to_idx].head()); } ref_lists[to_idx].set_head(move_head); ref_lists[to_idx].inc_length(refs_to_move); @@ -982,7 +974,7 @@ void ReferenceProcessor::clean_up_discovered_reflist(DiscoveredList& refs_list) { assert(!discovery_is_atomic(), "Else why call this method?"); - DiscoveredListIterator iter(refs_list, NULL, NULL, _discovered_list_needs_post_barrier); + DiscoveredListIterator iter(refs_list, NULL, NULL); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */)); oop next = java_lang_ref_Reference::next(iter.obj()); @@ -1071,16 +1063,6 @@ // The last ref must have its discovered field pointing to itself. oop next_discovered = (current_head != NULL) ? current_head : obj; - // Note: In the case of G1, this specific pre-barrier is strictly - // not necessary because the only case we are interested in - // here is when *discovered_addr is NULL (see the CAS further below), - // so this will expand to nothing. As a result, we have manually - // elided this out for G1, but left in the test for some future - // collector that might have need for a pre-barrier here, e.g.:- - // oopDesc::bs()->write_ref_field_pre((oop* or narrowOop*)discovered_addr, next_discovered); - assert(!_discovered_list_needs_post_barrier || UseG1GC, - "Need to check non-G1 collector: " - "may need a pre-write-barrier for CAS from NULL below"); oop retest = oopDesc::atomic_compare_exchange_oop(next_discovered, discovered_addr, NULL); if (retest == NULL) { @@ -1089,9 +1071,6 @@ // is necessary. refs_list.set_head(obj); refs_list.inc_length(1); - if (_discovered_list_needs_post_barrier) { - oopDesc::bs()->write_ref_field((void*)discovered_addr, next_discovered); - } if (TraceReferenceGC) { gclog_or_tty->print_cr("Discovered reference (mt) (" INTPTR_FORMAT ": %s)", @@ -1242,24 +1221,14 @@ if (_discovery_is_mt) { add_to_discovered_list_mt(*list, obj, discovered_addr); } else { - // If "_discovered_list_needs_post_barrier", we do write barriers when - // updating the discovered reference list. Otherwise, we do a raw store - // here: the field will be visited later when processing the discovered - // references. + // We do a raw store here: the field will be visited later when processing + // the discovered references. oop current_head = list->head(); // The last ref must have its discovered field pointing to itself. oop next_discovered = (current_head != NULL) ? current_head : obj; - // As in the case further above, since we are over-writing a NULL - // pre-value, we can safely elide the pre-barrier here for the case of G1. - // e.g.:- oopDesc::bs()->write_ref_field_pre((oop* or narrowOop*)discovered_addr, next_discovered); assert(discovered == NULL, "control point invariant"); - assert(!_discovered_list_needs_post_barrier || UseG1GC, - "For non-G1 collector, may need a pre-write-barrier for CAS from NULL below"); oop_store_raw(discovered_addr, next_discovered); - if (_discovered_list_needs_post_barrier) { - oopDesc::bs()->write_ref_field((void*)discovered_addr, next_discovered); - } list->set_head(obj); list->inc_length(1); @@ -1353,7 +1322,7 @@ OopClosure* keep_alive, VoidClosure* complete_gc, YieldClosure* yield) { - DiscoveredListIterator iter(refs_list, keep_alive, is_alive, _discovered_list_needs_post_barrier); + DiscoveredListIterator iter(refs_list, keep_alive, is_alive); while (iter.has_next()) { iter.load_ptrs(DEBUG_ONLY(true /* allow_null_referent */)); oop obj = iter.obj(); diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/memory/referenceProcessor.hpp --- a/hotspot/src/share/vm/memory/referenceProcessor.hpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/memory/referenceProcessor.hpp Wed Jun 18 13:14:15 2014 -0700 @@ -99,7 +99,6 @@ oop _referent; OopClosure* _keep_alive; BoolObjectClosure* _is_alive; - bool _discovered_list_needs_post_barrier; DEBUG_ONLY( oop _first_seen; // cyclic linked list check @@ -113,8 +112,7 @@ public: inline DiscoveredListIterator(DiscoveredList& refs_list, OopClosure* keep_alive, - BoolObjectClosure* is_alive, - bool discovered_list_needs_post_barrier = false): + BoolObjectClosure* is_alive): _refs_list(refs_list), _prev_next(refs_list.adr_head()), _prev(NULL), @@ -128,8 +126,7 @@ #endif _next(NULL), _keep_alive(keep_alive), - _is_alive(is_alive), - _discovered_list_needs_post_barrier(discovered_list_needs_post_barrier) + _is_alive(is_alive) { } // End Of List. @@ -230,14 +227,6 @@ // other collectors in configuration bool _discovery_is_mt; // true if reference discovery is MT. - // If true, setting "next" field of a discovered refs list requires - // write post barrier. (Must be true if used in a collector in which - // elements of a discovered list may be moved during discovery: for - // example, a collector like Garbage-First that moves objects during a - // long-term concurrent marking phase that does weak reference - // discovery.) - bool _discovered_list_needs_post_barrier; - bool _enqueuing_is_done; // true if all weak references enqueued bool _processing_is_mt; // true during phases when // reference processing is MT. @@ -382,11 +371,6 @@ void enqueue_discovered_reflists(HeapWord* pending_list_addr, AbstractRefProcTaskExecutor* task_executor); protected: - // Set the 'discovered' field of the given reference to - // the given value - emitting post barriers depending upon - // the value of _discovered_list_needs_post_barrier. - void set_discovered(oop ref, oop value); - // "Preclean" the given discovered reference list // by removing references with strongly reachable referents. // Currently used in support of CMS only. @@ -427,8 +411,7 @@ bool mt_processing = false, uint mt_processing_degree = 1, bool mt_discovery = false, uint mt_discovery_degree = 1, bool atomic_discovery = true, - BoolObjectClosure* is_alive_non_header = NULL, - bool discovered_list_needs_post_barrier = false); + BoolObjectClosure* is_alive_non_header = NULL); // RefDiscoveryPolicy values enum DiscoveryPolicy { diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/oops/instanceKlass.cpp --- a/hotspot/src/share/vm/oops/instanceKlass.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -1501,6 +1501,21 @@ return NULL; } +#ifdef ASSERT +// search through class hierarchy and return true if this class or +// one of the superclasses was redefined +bool InstanceKlass::has_redefined_this_or_super() const { + const InstanceKlass* klass = this; + while (klass != NULL) { + if (klass->has_been_redefined()) { + return true; + } + klass = InstanceKlass::cast(klass->super()); + } + return false; +} +#endif + // lookup a method in the default methods list then in all transitive interfaces // Do NOT return private or static methods Method* InstanceKlass::lookup_method_in_ordered_interfaces(Symbol* name, diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/oops/instanceKlass.hpp --- a/hotspot/src/share/vm/oops/instanceKlass.hpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Wed Jun 18 13:14:15 2014 -0700 @@ -754,6 +754,11 @@ bool implements_interface(Klass* k) const; bool is_same_or_direct_interface(Klass* k) const; +#ifdef ASSERT + // check whether this class or one of its superclasses was redefined + bool has_redefined_this_or_super() const; +#endif + // Access to the implementor of an interface. Klass* implementor() const { @@ -811,8 +816,8 @@ // Casting from Klass* static InstanceKlass* cast(Klass* k) { - assert(k->is_klass(), "must be"); - assert(k->oop_is_instance(), "cast to InstanceKlass"); + assert(k == NULL || k->is_klass(), "must be"); + assert(k == NULL || k->oop_is_instance(), "cast to InstanceKlass"); return (InstanceKlass*) k; } diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/oops/oopsHierarchy.hpp --- a/hotspot/src/share/vm/oops/oopsHierarchy.hpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/oops/oopsHierarchy.hpp Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -112,9 +112,7 @@ // Assignment oop& operator=(const oop& o) { _o = o.obj(); return *this; } -#ifndef SOLARIS volatile oop& operator=(const oop& o) volatile { _o = o.obj(); return *this; } -#endif volatile oop& operator=(const volatile oop& o) volatile { _o = o.obj(); return *this; } // Explict user conversions @@ -123,11 +121,10 @@ operator void* () const volatile { return (void *)obj(); } #endif operator HeapWord* () const { return (HeapWord*)obj(); } - operator oopDesc* () const { return obj(); } + operator oopDesc* () const volatile { return obj(); } operator intptr_t* () const { return (intptr_t*)obj(); } operator PromotedObject* () const { return (PromotedObject*)obj(); } operator markOop () const { return markOop(obj()); } - operator address () const { return (address)obj(); } // from javaCalls.cpp @@ -161,11 +158,10 @@ oop::operator=(o); \ return *this; \ } \ - NOT_SOLARIS( \ volatile type##Oop& operator=(const type##Oop& o) volatile { \ (void)const_cast(oop::operator=(o)); \ return *this; \ - }) \ + } \ volatile type##Oop& operator=(const volatile type##Oop& o) volatile {\ (void)const_cast(oop::operator=(o)); \ return *this; \ diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/runtime/java.cpp diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/runtime/mutexLocker.cpp --- a/hotspot/src/share/vm/runtime/mutexLocker.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -280,10 +280,10 @@ #ifdef INCLUDE_TRACE def(JfrMsg_lock , Monitor, leaf, true); - def(JfrBuffer_lock , Mutex, nonleaf+1, true); - def(JfrThreadGroups_lock , Mutex, nonleaf+1, true); - def(JfrStream_lock , Mutex, nonleaf+2, true); - def(JfrStacktrace_lock , Mutex, special, true ); + def(JfrBuffer_lock , Mutex, leaf, true); + def(JfrThreadGroups_lock , Mutex, leaf, true); + def(JfrStream_lock , Mutex, nonleaf, true); + def(JfrStacktrace_lock , Mutex, special, true); #endif } diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/runtime/objectMonitor.cpp --- a/hotspot/src/share/vm/runtime/objectMonitor.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -385,6 +385,15 @@ jt->java_suspend_self(); } Self->set_current_pending_monitor(NULL); + + // We cleared the pending monitor info since we've just gotten past + // the enter-check-for-suspend dance and we now own the monitor free + // and clear, i.e., it is no longer pending. The ThreadBlockInVM + // destructor can go to a safepoint at the end of this block. If we + // do a thread dump during that safepoint, then this thread will show + // as having "-locked" the monitor, but the OS and java.lang.Thread + // states will still report that the thread is blocked trying to + // acquire it. } Atomic::dec_ptr(&_count); diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/runtime/thread.cpp --- a/hotspot/src/share/vm/runtime/thread.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/runtime/thread.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -1434,7 +1434,7 @@ _in_deopt_handler = 0; _doing_unsafe_access = false; _stack_guard_state = stack_guard_unused; - (void)const_cast(_exception_oop = NULL); + (void)const_cast(_exception_oop = oop(NULL)); _exception_pc = 0; _exception_handler_pc = 0; _is_method_handle_return = 0; @@ -3543,6 +3543,8 @@ // debug stuff, that does not work until all basic classes have been initialized. set_init_completed(); + Metaspace::post_initialize(); + HOTSPOT_VM_INIT_END(); // record VM initialization completion time diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/runtime/vframe.cpp --- a/hotspot/src/share/vm/runtime/vframe.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/runtime/vframe.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -199,6 +199,7 @@ continue; } if (monitor->owner() != NULL) { + // the monitor is associated with an object, i.e., it is locked // First, assume we have the monitor locked. If we haven't found an // owned monitor before and this is the first frame, then we need to @@ -209,7 +210,11 @@ if (!found_first_monitor && frame_count == 0) { markOop mark = monitor->owner()->mark(); if (mark->has_monitor() && - mark->monitor() == thread()->current_pending_monitor()) { + ( // we have marked ourself as pending on this monitor + mark->monitor() == thread()->current_pending_monitor() || + // we are not the owner of this monitor + !mark->monitor()->is_entered(thread()) + )) { lock_state = "waiting to lock"; } } diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/services/attachListener.cpp --- a/hotspot/src/share/vm/services/attachListener.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/services/attachListener.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -162,10 +162,7 @@ java_lang_Throwable::print(PENDING_EXCEPTION, out); out->cr(); CLEAR_PENDING_EXCEPTION; - // The exception has been printed on the output stream - // If the JVM returns JNI_ERR, the attachAPI throws a generic I/O - // exception and the content of the output stream is not processed. - // By returning JNI_OK, the exception will be displayed on the client side + return JNI_ERR; } return JNI_OK; } diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/services/memoryManager.cpp --- a/hotspot/src/share/vm/services/memoryManager.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/services/memoryManager.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ MemoryManager::MemoryManager() { _num_pools = 0; - (void)const_cast(_memory_mgr_obj = NULL); + (void)const_cast(_memory_mgr_obj = instanceOop(NULL)); } void MemoryManager::add_pool(MemoryPool* pool) { diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/services/memoryPool.cpp --- a/hotspot/src/share/vm/services/memoryPool.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/services/memoryPool.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -46,7 +46,7 @@ _name = name; _initial_size = init_size; _max_size = max_size; - (void)const_cast(_memory_pool_obj = NULL); + (void)const_cast(_memory_pool_obj = instanceOop(NULL)); _available_for_allocation = true; _num_managers = 0; _type = type; diff -r aade36e70da0 -r e2bf17cee34b hotspot/src/share/vm/utilities/debug.cpp --- a/hotspot/src/share/vm/utilities/debug.cpp Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/src/share/vm/utilities/debug.cpp Wed Jun 18 13:14:15 2014 -0700 @@ -263,13 +263,11 @@ void report_out_of_shared_space(SharedSpaceType shared_space) { static const char* name[] = { - "native memory for metadata", "shared read only space", "shared read write space", "shared miscellaneous data space" }; static const char* flag[] = { - "Metaspace", "SharedReadOnlySize", "SharedReadWriteSize", "SharedMiscDataSize" diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/TEST.groups --- a/hotspot/test/TEST.groups Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/TEST.groups Wed Jun 18 13:14:15 2014 -0700 @@ -81,6 +81,7 @@ runtime/NMT/ThreadedVirtualAllocTestType.java \ runtime/NMT/VirtualAllocTestType.java \ runtime/RedefineObject/TestRedefineObject.java \ + runtime/Thread/TestThreadDumpMonitorContention.java \ runtime/XCheckJniJsig/XCheckJSig.java \ serviceability/attach/AttachWithStalePidFile.java \ serviceability/jvmti/8036666/GetObjectLockCount.java \ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java --- a/hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,6 +22,7 @@ */ /* + * @ignore 8027915 * @test TestParallelHeapSizeFlags * @key gc * @bug 8006088 diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java --- a/hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,6 +22,7 @@ */ /* + * @ignore 8025645 * @test TestUseCompressedOopsErgo * @key gc * @bug 8010722 diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/g1/TestHumongousShrinkHeap.java --- a/hotspot/test/gc/g1/TestHumongousShrinkHeap.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/gc/g1/TestHumongousShrinkHeap.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,6 +22,7 @@ */ /** + * @ignore 8041506, 8041946, 8042051 * @test TestHumongousShrinkHeap * @bug 8036025 * @summary Verify that heap shrinks after GC in the presence of fragmentation due to humongous objects diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/g1/TestStringDeduplicationMemoryUsage.java --- a/hotspot/test/gc/g1/TestStringDeduplicationMemoryUsage.java Wed Jun 11 10:53:27 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +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. - */ - -/* - * @test TestStringDeduplicationMemoryUsage - * @summary Test string deduplication memory usage - * @bug 8029075 - * @key gc - * @library /testlibrary - */ - -public class TestStringDeduplicationMemoryUsage { - public static void main(String[] args) throws Exception { - TestStringDeduplicationTools.testMemoryUsage(); - } -} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/g1/TestStringDeduplicationTools.java --- a/hotspot/test/gc/g1/TestStringDeduplicationTools.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/gc/g1/TestStringDeduplicationTools.java Wed Jun 18 13:14:15 2014 -0700 @@ -294,55 +294,6 @@ } } - private static class MemoryUsageTest { - public static void main(String[] args) { - System.out.println("Begin: MemoryUsageTest"); - - final boolean useStringDeduplication = Boolean.parseBoolean(args[0]); - final int numberOfStrings = LargeNumberOfStrings; - final int numberOfUniqueStrings = 1; - - ArrayList list = createStrings(numberOfStrings, numberOfUniqueStrings); - forceDeduplication(DefaultAgeThreshold, FullGC); - - if (useStringDeduplication) { - verifyStrings(list, numberOfUniqueStrings); - } - - System.gc(); - - System.out.println("Heap Memory Usage: " + ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed()); - System.out.println("Array Header Size: " + unsafe.ARRAY_CHAR_BASE_OFFSET); - - System.out.println("End: MemoryUsageTest"); - } - - public static OutputAnalyzer run(boolean useStringDeduplication) throws Exception { - String[] extraArgs = new String[0]; - - if (useStringDeduplication) { - extraArgs = new String[] { - "-XX:+UseStringDeduplication", - "-XX:+PrintStringDeduplicationStatistics", - "-XX:StringDeduplicationAgeThreshold=" + DefaultAgeThreshold - }; - } - - String[] defaultArgs = new String[] { - "-XX:+PrintGC", - "-XX:+PrintGCDetails", - MemoryUsageTest.class.getName(), - "" + useStringDeduplication - }; - - ArrayList args = new ArrayList(); - args.addAll(Arrays.asList(extraArgs)); - args.addAll(Arrays.asList(defaultArgs)); - - return runTest(args.toArray(new String[args.size()])); - } - } - /* * Tests */ @@ -480,44 +431,4 @@ OutputAnalyzer output = InternedTest.run(); output.shouldHaveExitValue(0); } - - public static void testMemoryUsage() throws Exception { - // Test that memory usage is reduced after deduplication - OutputAnalyzer output; - final String heapMemoryUsagePattern = "Heap Memory Usage: (\\d+)"; - final String arrayHeaderSizePattern = "Array Header Size: (\\d+)"; - - // Run without deduplication - output = MemoryUsageTest.run(false); - output.shouldHaveExitValue(0); - final long heapMemoryUsageWithoutDedup = Long.parseLong(output.firstMatch(heapMemoryUsagePattern, 1)); - final long arrayHeaderSizeWithoutDedup = Long.parseLong(output.firstMatch(arrayHeaderSizePattern, 1)); - - // Run with deduplication - output = MemoryUsageTest.run(true); - output.shouldHaveExitValue(0); - final long heapMemoryUsageWithDedup = Long.parseLong(output.firstMatch(heapMemoryUsagePattern, 1)); - final long arrayHeaderSizeWithDedup = Long.parseLong(output.firstMatch(arrayHeaderSizePattern, 1)); - - // Sanity check to make sure one instance isn't using compressed class pointers and the other not - if (arrayHeaderSizeWithoutDedup != arrayHeaderSizeWithDedup) { - throw new Exception("Unexpected difference between array header sizes"); - } - - // Calculate expected memory usage with deduplication enabled. This calculation does - // not take alignment and padding into account, so it's a conservative estimate. - final long sizeOfChar = unsafe.ARRAY_CHAR_INDEX_SCALE; - final long sizeOfCharArray = StringLength * sizeOfChar + arrayHeaderSizeWithoutDedup; - final long bytesSaved = (LargeNumberOfStrings - 1) * sizeOfCharArray; - final long heapMemoryUsageWithDedupExpected = heapMemoryUsageWithoutDedup - bytesSaved; - - System.out.println("Memory usage summary:"); - System.out.println(" heapMemoryUsageWithoutDedup: " + heapMemoryUsageWithoutDedup); - System.out.println(" heapMemoryUsageWithDedup: " + heapMemoryUsageWithDedup); - System.out.println(" heapMemoryUsageWithDedupExpected: " + heapMemoryUsageWithDedupExpected); - - if (heapMemoryUsageWithDedup > heapMemoryUsageWithDedupExpected) { - throw new Exception("Unexpected memory usage, heapMemoryUsageWithDedup should be less or equal to heapMemoryUsageWithDedupExpected"); - } - } } diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/metaspace/TestMetaspaceInitialization.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/gc/metaspace/TestMetaspaceInitialization.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.ArrayList; + +/* @test TestMetaspaceInitialization + * @bug 8042933 + * @summary Tests to initialize metaspace with a very low MetaspaceSize + * @library /testlibrary + * @run main/othervm -XX:MetaspaceSize=2m TestMetaspaceInitialization + */ +public class TestMetaspaceInitialization { + private class Internal { + public int x; + public Internal(int x) { + this.x = x; + } + } + + private void test() { + ArrayList l = new ArrayList<>(); + l.add(new Internal(17)); + } + + public static void main(String[] args) { + new TestMetaspaceInitialization().test(); + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java --- a/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/gc/parallelScavenge/TestDynShrinkHeap.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,6 +22,7 @@ */ /** + * @ignore 8042051 * @test TestDynShrinkHeap * @bug 8016479 * @summary Verify that the heap shrinks after full GC according to the current values of the Min/MaxHeapFreeRatio flags diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/runtime/CommandLine/TestHexArguments.java --- a/hotspot/test/runtime/CommandLine/TestHexArguments.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/runtime/CommandLine/TestHexArguments.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,14 +35,14 @@ public class TestHexArguments { public static void main(String args[]) throws Exception { String[] javaArgs = {"-XX:SharedBaseAddress=0x1D000000", "-version"}; - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, javaArgs); + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(javaArgs); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldNotContain("Could not create the Java Virtual Machine"); output.shouldHaveExitValue(0); String[] javaArgs1 = {"-XX:SharedBaseAddress=1D000000", "-version"}; - pb = ProcessTools.createJavaProcessBuilder(true, javaArgs1); + pb = ProcessTools.createJavaProcessBuilder(javaArgs1); output = new OutputAnalyzer(pb.start()); output.shouldContain("Could not create the Java Virtual Machine"); } diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/runtime/RedefineFinalizer/RedefineFinalizer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/RedefineFinalizer/RedefineFinalizer.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 6904403 + * @summary Don't assert if we redefine finalize method + * @library /testlibrary + * @build RedefineClassHelper + * @run main RedefineClassHelper + * @run main/othervm -javaagent:redefineagent.jar RedefineFinalizer + */ + +/* + * Regression test for hitting: + * + * assert(f == k->has_finalizer()) failed: inconsistent has_finalizer + * + * when redefining finalizer method + */ +public class RedefineFinalizer { + + public static String newB = + "class RedefineFinalizer$B {" + + " protected void finalize() { " + + " System.out.println(\"Finalizer called\");" + + " }" + + "}"; + + public static void main(String[] args) throws Exception { + RedefineClassHelper.redefineClass(B.class, newB); + + A a = new A(); + } + + static class A extends B { + } + + static class B { + protected void finalize() { + // should be empty + } + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,93 @@ +/* + * 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. + */ + +/* @ignore JDK-8043896 + * @test LimitSharedSizes + * @summary Test handling of limits on shared space size + * @library /testlibrary + * @run main LimitSharedSizes + */ + +import com.oracle.java.testlibrary.*; + +public class LimitSharedSizes { + private static class SharedSizeTestData { + public String optionName; + public String optionValue; + public String expectedErrorMsg; + + public SharedSizeTestData(String name, String value, String msg) { + optionName = name; + optionValue = value; + expectedErrorMsg = msg; + } + } + + private static final SharedSizeTestData[] testTable = { + // values in this part of the test table should cause failure + // (shared space sizes are deliberately too small) + new SharedSizeTestData("-XX:SharedReadOnlySize", "4M", "read only"), + new SharedSizeTestData("-XX:SharedReadWriteSize","4M", "read write"), + + // Known issue, JDK-8038422 (assert() on Windows) + // new SharedSizeTestData("-XX:SharedMiscDataSize", "500k", "miscellaneous data"), + + // This will cause a VM crash; commenting out for now; see bug JDK-8038268 + // @ignore JDK-8038268 + // new SharedSizeTestData("-XX:SharedMiscCodeSize", "20k", "miscellaneous code"), + + // these values are larger than default ones, but should + // be acceptable and not cause failure + new SharedSizeTestData("-XX:SharedReadOnlySize", "20M", null), + new SharedSizeTestData("-XX:SharedReadWriteSize", "20M", null), + new SharedSizeTestData("-XX:SharedMiscDataSize", "20M", null), + new SharedSizeTestData("-XX:SharedMiscCodeSize", "20M", null) + }; + + public static void main(String[] args) throws Exception { + String fileName = "test.jsa"; + + for (SharedSizeTestData td : testTable) { + String option = td.optionName + "=" + td.optionValue; + System.out.println("testing option <" + option + ">"); + + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", + "-XX:SharedArchiveFile=./" + fileName, + option, + "-Xshare:dump"); + + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + + if (td.expectedErrorMsg != null) { + output.shouldContain("The shared " + td.expectedErrorMsg + + " space is not large enough"); + + output.shouldHaveExitValue(2); + } else { + output.shouldNotContain("space is not large enough"); + output.shouldHaveExitValue(0); + } + } + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test SharedBaseAddress + * @summary Test variety of values for SharedBaseAddress, making sure + * VM handles normal values as well as edge values w/o a crash. + * @library /testlibrary + * @run main SharedBaseAddress + */ + +import com.oracle.java.testlibrary.*; + +public class SharedBaseAddress { + + // shared base address test table + private static final String[] testTable = { + "1g", "8g", "64g","512g", "4t", + "32t", "128t", "0", + "1", "64k", "64M" + }; + + public static void main(String[] args) throws Exception { + // Known issue on Solaris-Sparc + // @ignore JDK-8044600 + if (Platform.isSolaris() && Platform.isSparc()) + return; + + for (String testEntry : testTable) { + System.out.println("sharedBaseAddress = " + testEntry); + + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", + "-XX:SharedArchiveFile=test.jsa", + "-XX:SharedBaseAddress=" + testEntry, + "-Xshare:dump"); + + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + + output.shouldContain("Loading classes to share"); + + try { + pb = ProcessTools.createJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", + "-XX:SharedArchiveFile=test.jsa", + "-Xshare:on", + "-version"); + output = new OutputAnalyzer(pb.start()); + output.shouldContain("sharing"); + output.shouldHaveExitValue(0); + } catch (RuntimeException e) { + output.shouldContain("Unable to use shared archive"); + output.shouldHaveExitValue(1); + } + } + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test SpaceUtilizationCheck + * @summary Check if the space utilization for shared spaces is adequate + * @library /testlibrary + * @run main SpaceUtilizationCheck + */ + +import com.oracle.java.testlibrary.*; + +import java.util.regex.Pattern; +import java.util.regex.Matcher; +import java.util.ArrayList; +import java.lang.Integer; + +public class SpaceUtilizationCheck { + // Minimum allowed utilization value (percent) + // The goal is to have this number to be 50% for RO and RW regions + // Once that feature is implemented, increase the MIN_UTILIZATION to 50 + private static final int MIN_UTILIZATION = 30; + + // Only RO and RW regions are considered for this check, since they + // currently account for the bulk of the shared space + private static final int NUMBER_OF_CHECKED_SHARED_REGIONS = 2; + + public static void main(String[] args) throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-XX:+UnlockDiagnosticVMOptions", + "-XX:SharedArchiveFile=./test.jsa", + "-Xshare:dump"); + + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + String stdout = output.getStdout(); + ArrayList utilization = findUtilization(stdout); + + if (utilization.size() != NUMBER_OF_CHECKED_SHARED_REGIONS ) + throw new RuntimeException("The output format of sharing summary has changed"); + + for(String str : utilization) { + int value = Integer.parseInt(str); + if (value < MIN_UTILIZATION) { + System.out.println(stdout); + throw new RuntimeException("Utilization for one of the regions" + + "is below a threshold of " + MIN_UTILIZATION + "%"); + } + } + } + + public static ArrayList findUtilization(String input) { + ArrayList regions = filterRegionsOfInterest(input.split("\n")); + return filterByPattern(filterByPattern(regions, "bytes \\[.*% used\\]"), "\\d+"); + } + + private static ArrayList filterByPattern(Iterable input, String pattern) { + ArrayList result = new ArrayList(); + for (String str : input) { + Matcher matcher = Pattern.compile(pattern).matcher(str); + if (matcher.find()) { + result.add(matcher.group()); + } + } + return result; + } + + private static ArrayList filterRegionsOfInterest(String[] inputLines) { + ArrayList result = new ArrayList(); + for (String str : inputLines) { + if (str.contains("ro space:") || str.contains("rw space:")) { + result.add(str); + } + } + return result; + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,405 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8036823 + * @summary Creates two threads contending for the same lock and checks + * whether jstack reports "locked" by more than one thread. + * + * @library /testlibrary + * @run main/othervm TestThreadDumpMonitorContention + */ + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.lang.management.ManagementFactory; +import java.lang.management.RuntimeMXBean; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.oracle.java.testlibrary.*; + +public class TestThreadDumpMonitorContention { + // jstack tends to be closely bound to the VM that we are running + // so use getTestJDKTool() instead of getCompileJDKTool() or even + // getJDKTool() which can fall back to "compile.jdk". + final static String JSTACK = JDKToolFinder.getTestJDKTool("jstack"); + final static String PID = getPid(); + + // looking for header lines with these patterns: + // "ContendingThread-1" #19 prio=5 os_prio=64 tid=0x000000000079c000 nid=0x23 runnable [0xffff80ffb8b87000] + // "ContendingThread-2" #21 prio=5 os_prio=64 tid=0x0000000000780000 nid=0x2f waiting for monitor entry [0xfffffd7fc1111000] + final static Pattern HEADER_PREFIX_PATTERN = Pattern.compile( + "^\"ContendingThread-.*"); + final static Pattern HEADER_WAITING_PATTERN = Pattern.compile( + "^\"ContendingThread-.* waiting for monitor entry .*"); + final static Pattern HEADER_RUNNABLE_PATTERN = Pattern.compile( + "^\"ContendingThread-.* runnable .*"); + + // looking for thread state lines with these patterns: + // java.lang.Thread.State: RUNNABLE + // java.lang.Thread.State: BLOCKED (on object monitor) + final static Pattern THREAD_STATE_PREFIX_PATTERN = Pattern.compile( + " *java\\.lang\\.Thread\\.State: .*"); + final static Pattern THREAD_STATE_BLOCKED_PATTERN = Pattern.compile( + " *java\\.lang\\.Thread\\.State: BLOCKED \\(on object monitor\\)"); + final static Pattern THREAD_STATE_RUNNABLE_PATTERN = Pattern.compile( + " *java\\.lang\\.Thread\\.State: RUNNABLE"); + + // looking for duplicates of this pattern: + // - locked <0x000000076ac59e20> (a TestThreadDumpMonitorContention$1) + final static Pattern LOCK_PATTERN = Pattern.compile( + ".* locked \\<.*\\(a TestThreadDumpMonitorContention.*"); + + // sanity checking header and thread state lines associated + // with this pattern: + // - waiting to lock <0x000000076ac59e20> (a TestThreadDumpMonitorContention$1) + final static Pattern WAITING_PATTERN = Pattern.compile( + ".* waiting to lock \\<.*\\(a TestThreadDumpMonitorContention.*"); + + volatile static boolean done = false; + + static int error_cnt = 0; + static String header_line = null; + static boolean have_header_line = false; + static boolean have_thread_state_line = false; + static int match_cnt = 0; + static String[] match_list = new String[2]; + static int n_samples = 15; + static String thread_state_line = null; + static boolean verbose = false; + + public static void main(String[] args) throws Exception { + if (args.length != 0) { + int arg_i = 0; + if (args[arg_i].equals("-v")) { + verbose = true; + arg_i++; + } + + try { + n_samples = Integer.parseInt(args[arg_i]); + } catch (NumberFormatException nfe) { + System.err.println(nfe); + usage(); + } + } + + Runnable runnable = new Runnable() { + public void run() { + while (!done) { + synchronized (this) { } + } + } + }; + Thread[] thread_list = new Thread[2]; + thread_list[0] = new Thread(runnable, "ContendingThread-1"); + thread_list[1] = new Thread(runnable, "ContendingThread-2"); + thread_list[0].start(); + thread_list[1].start(); + + doSamples(); + + done = true; + + thread_list[0].join(); + thread_list[1].join(); + + if (error_cnt == 0) { + System.out.println("Test PASSED."); + } else { + System.out.println("Test FAILED."); + throw new AssertionError("error_cnt=" + error_cnt); + } + } + + // Reached a blank line which is the end of the + // stack trace without matching either LOCK_PATTERN + // or WAITING_PATTERN. Rare, but it's not an error. + // + // Example: + // "ContendingThread-1" #21 prio=5 os_prio=64 tid=0x00000000007b9000 nid=0x2f runnable [0xfffffd7fc1111000] + // java.lang.Thread.State: RUNNABLE + // at TestThreadDumpMonitorContention$1.run(TestThreadDumpMonitorContention.java:67) + // at java.lang.Thread.run(Thread.java:745) + // + static boolean checkBlankLine(String line) { + if (line.length() == 0) { + have_header_line = false; + have_thread_state_line = false; + return true; + } + + return false; + } + + // Process the locked line here if we found one. + // + // Example 1: + // "ContendingThread-1" #21 prio=5 os_prio=64 tid=0x00000000007b9000 nid=0x2f runnable [0xfffffd7fc1111000] + // java.lang.Thread.State: RUNNABLE + // at TestThreadDumpMonitorContention$1.run(TestThreadDumpMonitorContention.java:67) + // - locked <0xfffffd7e6a2912f8> (a TestThreadDumpMonitorContention$1) + // at java.lang.Thread.run(Thread.java:745) + // + // Example 2: + // "ContendingThread-1" #21 prio=5 os_prio=64 tid=0x00000000007b9000 nid=0x2f waiting for monitor entry [0xfffffd7fc1111000] + // java.lang.Thread.State: BLOCKED (on object monitor) + // at TestThreadDumpMonitorContention$1.run(TestThreadDumpMonitorContention.java:67) + // - locked <0xfffffd7e6a2912f8> (a TestThreadDumpMonitorContention$1) + // at java.lang.Thread.run(Thread.java:745) + // + static boolean checkLockedLine(String line) { + Matcher matcher = LOCK_PATTERN.matcher(line); + if (matcher.matches()) { + if (verbose) { + System.out.println("locked_line='" + line + "'"); + } + match_list[match_cnt] = new String(line); + match_cnt++; + + matcher = HEADER_RUNNABLE_PATTERN.matcher(header_line); + if (!matcher.matches()) { + // It's strange, but a locked line can also + // match the HEADER_WAITING_PATTERN. + matcher = HEADER_WAITING_PATTERN.matcher(header_line); + if (!matcher.matches()) { + System.err.println(); + System.err.println("ERROR: header line does " + + "not match runnable or waiting patterns."); + System.err.println("ERROR: header_line='" + + header_line + "'"); + System.err.println("ERROR: locked_line='" + line + "'"); + error_cnt++; + } + } + + matcher = THREAD_STATE_RUNNABLE_PATTERN.matcher(thread_state_line); + if (!matcher.matches()) { + // It's strange, but a locked line can also + // match the THREAD_STATE_BLOCKED_PATTERN. + matcher = THREAD_STATE_BLOCKED_PATTERN.matcher( + thread_state_line); + if (!matcher.matches()) { + System.err.println(); + System.err.println("ERROR: thread state line does not " + + "match runnable or waiting patterns."); + System.err.println("ERROR: " + "thread_state_line='" + + thread_state_line + "'"); + System.err.println("ERROR: locked_line='" + line + "'"); + error_cnt++; + } + } + + // Have everything we need from this thread stack + // that matches the LOCK_PATTERN. + have_header_line = false; + have_thread_state_line = false; + return true; + } + + return false; + } + + // Process the waiting line here if we found one. + // + // Example: + // "ContendingThread-2" #22 prio=5 os_prio=64 tid=0x00000000007b9800 nid=0x30 waiting for monitor entry [0xfffffd7fc1010000] + // java.lang.Thread.State: BLOCKED (on object monitor) + // at TestThreadDumpMonitorContention$1.run(TestThreadDumpMonitorContention.java:67) + // - waiting to lock <0xfffffd7e6a2912f8> (a TestThreadDumpMonitorContention$1) + // at java.lang.Thread.run(Thread.java:745) + // + static boolean checkWaitingLine(String line) { + Matcher matcher = WAITING_PATTERN.matcher(line); + if (matcher.matches()) { + if (verbose) { + System.out.println("waiting_line='" + line + "'"); + } + + matcher = HEADER_WAITING_PATTERN.matcher(header_line); + if (!matcher.matches()) { + System.err.println(); + System.err.println("ERROR: header line does " + + "not match a waiting pattern."); + System.err.println("ERROR: header_line='" + header_line + "'"); + System.err.println("ERROR: waiting_line='" + line + "'"); + error_cnt++; + } + + matcher = THREAD_STATE_BLOCKED_PATTERN.matcher(thread_state_line); + if (!matcher.matches()) { + System.err.println(); + System.err.println("ERROR: thread state line " + + "does not match a waiting pattern."); + System.err.println("ERROR: thread_state_line='" + + thread_state_line + "'"); + System.err.println("ERROR: waiting_line='" + line + "'"); + error_cnt++; + } + + // Have everything we need from this thread stack + // that matches the WAITING_PATTERN. + have_header_line = false; + have_thread_state_line = false; + return true; + } + + return false; + } + + static void doSamples() throws Exception { + for (int count = 0; count < n_samples; count++) { + match_cnt = 0; + // verbose mode or an error has a lot of output so add more space + if (verbose || error_cnt > 0) System.out.println(); + System.out.println("Sample #" + count); + + // We don't use the ProcessTools, OutputBuffer or + // OutputAnalyzer classes from the testlibrary because + // we have a complicated multi-line parse to perform + // on a narrow subset of the JSTACK output. + // + // - we only care about stack traces that match + // HEADER_PREFIX_PATTERN; only two should match + // - we care about at most three lines from each stack trace + // - if both stack traces match LOCKED_PATTERN, then that's + // a failure and we report it + // - for a stack trace that matches LOCKED_PATTERN, we verify: + // - the header line matches HEADER_RUNNABLE_PATTERN + // or HEADER_WAITING_PATTERN + // - the thread state line matches THREAD_STATE_BLOCKED_PATTERN + // or THREAD_STATE_RUNNABLE_PATTERN + // - we report any mismatches as failures + // - for a stack trace that matches WAITING_PATTERN, we verify: + // - the header line matches HEADER_WAITING_PATTERN + // - the thread state line matches THREAD_STATE_BLOCKED_PATTERN + // - we report any mismatches as failures + // - the stack traces that match HEADER_PREFIX_PATTERN may + // not match either LOCKED_PATTERN or WAITING_PATTERN + // because we might observe the thread outside of + // monitor operations; this is not considered a failure + // + // When we do observe LOCKED_PATTERN or WAITING_PATTERN, + // then we are checking the header and thread state patterns + // that occurred earlier in the current stack trace that + // matched HEADER_PREFIX_PATTERN. We don't use data from + // stack traces that don't match HEADER_PREFIX_PATTERN and + // we don't mix data between the two stack traces that do + // match HEADER_PREFIX_PATTERN. + // + Process process = new ProcessBuilder(JSTACK, PID) + .redirectErrorStream(true).start(); + + BufferedReader reader = new BufferedReader(new InputStreamReader( + process.getInputStream())); + String line; + while ((line = reader.readLine()) != null) { + Matcher matcher = null; + + // process the header line here + if (!have_header_line) { + matcher = HEADER_PREFIX_PATTERN.matcher(line); + if (matcher.matches()) { + if (verbose) { + System.out.println(); + System.out.println("header='" + line + "'"); + } + header_line = new String(line); + have_header_line = true; + continue; + } + continue; // skip until have a header line + } + + // process the thread state line here + if (!have_thread_state_line) { + matcher = THREAD_STATE_PREFIX_PATTERN.matcher(line); + if (matcher.matches()) { + if (verbose) { + System.out.println("thread_state='" + line + "'"); + } + thread_state_line = new String(line); + have_thread_state_line = true; + continue; + } + continue; // skip until we have a thread state line + } + + // process the locked line here if we find one + if (checkLockedLine(line)) { + continue; + } + + // process the waiting line here if we find one + if (checkWaitingLine(line)) { + continue; + } + + // process the blank line here if we find one + if (checkBlankLine(line)) { + continue; + } + } + process.waitFor(); + + if (match_cnt == 2) { + if (match_list[0].equals(match_list[1])) { + System.err.println(); + System.err.println("ERROR: matching lock lines:"); + System.err.println("ERROR: line[0]'" + match_list[0] + "'"); + System.err.println("ERROR: line[1]'" + match_list[1] + "'"); + error_cnt++; + } + } + + // slight delay between jstack launches + Thread.sleep(500); + } + } + + // This helper relies on RuntimeMXBean.getName() returning a string + // that looks like this: 5436@mt-haku + // + // The testlibrary has tryFindJvmPid(), but that uses a separate + // process which is much more expensive for finding out your own PID. + // + static String getPid() { + RuntimeMXBean runtimebean = ManagementFactory.getRuntimeMXBean(); + String vmname = runtimebean.getName(); + int i = vmname.indexOf('@'); + if (i != -1) { + vmname = vmname.substring(0, i); + } + return vmname; + } + + static void usage() { + System.err.println("Usage: " + + "java TestThreadDumpMonitorContention [-v] [n_samples]"); + System.exit(1); + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/ParserTest.java --- a/hotspot/test/serviceability/ParserTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/ParserTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,10 +22,10 @@ */ /* - * @test ParserTest + * @test * @summary Test that the diagnostic command arguemnt parser works * @library /testlibrary /testlibrary/whitebox - * @build ParserTest + * @build ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.parser.* * @run main ClassFileInstaller sun.hotspot.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ParserTest */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/attach/AttachWithStalePidFile.java --- a/hotspot/test/serviceability/attach/AttachWithStalePidFile.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/attach/AttachWithStalePidFile.java Wed Jun 18 13:14:15 2014 -0700 @@ -27,7 +27,7 @@ * @key regression * @summary Regression test for attach issue where stale pid files in /tmp lead to connection issues * @library /testlibrary - * @compile AttachWithStalePidFileTarget.java + * @build com.oracle.java.testlibrary.* AttachWithStalePidFileTarget * @run main AttachWithStalePidFile */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/dcmd/DynLibDcmdTest.java --- a/hotspot/test/serviceability/dcmd/DynLibDcmdTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/dcmd/DynLibDcmdTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * @test * @summary Test of VM.dynlib diagnostic command via MBean * @library /testlibrary - * @compile DcmdUtil.java + * @build com.oracle.java.testlibrary.* DcmdUtil * @run main DynLibDcmdTest */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java --- a/hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * @test * @bug 8027230 * @library /testlibrary - * @build GetObjectSizeOverflowAgent + * @build ClassFileInstaller com.oracle.java.testlibrary.* GetObjectSizeOverflowAgent * @run main ClassFileInstaller GetObjectSizeOverflowAgent * @run main GetObjectSizeOverflow */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java --- a/hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java Wed Jun 18 13:14:15 2014 -0700 @@ -26,7 +26,7 @@ * @summary Redefine a class with an UnresolvedClass reference in the constant pool. * @bug 8035150 * @library /testlibrary - * @build UnresolvedClassAgent com.oracle.java.testlibrary.ProcessTools com.oracle.java.testlibrary.OutputAnalyzer + * @build com.oracle.java.testlibrary.* UnresolvedClassAgent * @run main TestRedefineWithUnresolvedClass */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java --- a/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java Wed Jun 18 13:14:15 2014 -0700 @@ -26,6 +26,7 @@ * @bug 8028623 * @summary Test hashing of extended characters in Serviceability Agent. * @library /testlibrary + * @build com.oracle.java.testlibrary.* * @compile -encoding utf8 Test8028623.java * @run main Test8028623 */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java --- a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @key regression * @summary Regression test for hprof export issue due to large heaps (>2G) * @library /testlibrary - * @compile JMapHProfLargeHeapProc.java + * @build com.oracle.java.testlibrary.* JMapHProfLargeHeapProc * @run main JMapHProfLargeHeapTest */ diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/testlibrary/RedefineClassHelper.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/testlibrary/RedefineClassHelper.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,79 @@ +/* + * 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. + */ + +import java.io.PrintWriter; +import java.lang.instrument.*; +import com.oracle.java.testlibrary.*; + +/* + * Helper class to write tests that redefine classes. + * When main method is run, it will create a redefineagent.jar that can be used + * with the -javaagent option to support redefining classes in jtreg tests. + * + * See sample test in test/testlibrary_tests/RedefineClassTest.java + */ +public class RedefineClassHelper { + + public static Instrumentation instrumentation; + public static void premain(String agentArgs, Instrumentation inst) { + instrumentation = inst; + } + + /** + * Redefine a class + * + * @param clazz Class to redefine + * @param javacode String with the new java code for the class to be redefined + */ + public static void redefineClass(Class clazz, String javacode) throws Exception { + byte[] bytecode = InMemoryJavaCompiler.compile(clazz.getName(), javacode); + redefineClass(clazz, bytecode); + } + + /** + * Redefine a class + * + * @param clazz Class to redefine + * @param bytecode byte[] with the new class + */ + public static void redefineClass(Class clazz, byte[] bytecode) throws Exception { + instrumentation.redefineClasses(new ClassDefinition(clazz, bytecode)); + } + + /** + * Main method to be invoked before test to create the redefineagent.jar + */ + public static void main(String[] args) throws Exception { + ClassFileInstaller.main("RedefineClassHelper"); + + PrintWriter pw = new PrintWriter("MANIFEST.MF"); + pw.println("Premain-Class: RedefineClassHelper"); + pw.println("Can-Redefine-Classes: true"); + pw.close(); + + sun.tools.jar.Main jarTool = new sun.tools.jar.Main(System.out, System.err, "jar"); + if (!jarTool.run(new String[] { "-cmf", "MANIFEST.MF", "redefineagent.jar", "RedefineClassHelper.class" })) { + throw new Exception("jar operation failed"); + } + } +} diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/testlibrary/ctw/test/ClassesDirTest.java --- a/hotspot/test/testlibrary/ctw/test/ClassesDirTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/testlibrary/ctw/test/ClassesDirTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,10 +22,10 @@ */ /* - * @test ClassesDirTest + * @test * @bug 8012447 * @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src - * @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox ClassesDirTest Foo Bar + * @build ClassFileInstaller sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar * @run main ClassesDirTest prepare * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld classes diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/testlibrary/ctw/test/ClassesListTest.java --- a/hotspot/test/testlibrary/ctw/test/ClassesListTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/testlibrary/ctw/test/ClassesListTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,10 +22,10 @@ */ /* - * @test ClassesListTest + * @test * @bug 8012447 * @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src - * @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox ClassesListTest Foo Bar + * @build ClassFileInstaller sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar * @run main ClassesListTest prepare * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld classes.lst diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/testlibrary/ctw/test/JarDirTest.java --- a/hotspot/test/testlibrary/ctw/test/JarDirTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/testlibrary/ctw/test/JarDirTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,10 +22,10 @@ */ /* - * @test JarDirTest + * @test * @bug 8012447 * @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src - * @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox JarDirTest Foo Bar + * @build ClassFileInstaller com.oracle.java.testlibrary.* sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar * @run main JarDirTest prepare * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld jars/* diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/testlibrary/ctw/test/JarsTest.java --- a/hotspot/test/testlibrary/ctw/test/JarsTest.java Wed Jun 11 10:53:27 2014 +0400 +++ b/hotspot/test/testlibrary/ctw/test/JarsTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,10 +22,10 @@ */ /* - * @test JarsTest + * @test * @bug 8012447 * @library /testlibrary /testlibrary/whitebox /testlibrary/ctw/src - * @build sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox JarsTest Foo Bar + * @build ClassFileInstaller com.oracle.java.testlibrary.* sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar * @run main JarsTest prepare * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Dsun.hotspot.tools.ctw.logfile=ctw.log sun.hotspot.tools.ctw.CompileTheWorld foo.jar bar.jar diff -r aade36e70da0 -r e2bf17cee34b hotspot/test/testlibrary_tests/RedefineClassTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hotspot/test/testlibrary_tests/RedefineClassTest.java Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * 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 + * @library /testlibrary + * @summary Proof of concept test for RedefineClassHelper + * @build RedefineClassHelper + * @run main RedefineClassHelper + * @run main/othervm -javaagent:redefineagent.jar RedefineClassTest + */ + +import static com.oracle.java.testlibrary.Asserts.*; +import com.oracle.java.testlibrary.*; + +/* + * Proof of concept test for the test utility class RedefineClassHelper + */ +public class RedefineClassTest { + + public static String newClass = "class RedefineClassTest$A { public int Method() { return 2; } }"; + public static void main(String[] args) throws Exception { + A a = new A(); + assertTrue(a.Method() == 1); + RedefineClassHelper.redefineClass(A.class, newClass); + assertTrue(a.Method() == 2); + } + + static class A { + public int Method() { + return 1; + } + } +} diff -r aade36e70da0 -r e2bf17cee34b jaxp/.hgtags --- a/jaxp/.hgtags Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/.hgtags Wed Jun 18 13:14:15 2014 -0700 @@ -259,3 +259,5 @@ 32b3fc4bc7374a34d52b7f4e2391b4b4b0c084e8 jdk9-b14 6bad71866c7598587860e0981b0b0e51ec8c0476 jdk9-b15 a1461221b05d4620e4d7d1907e2a0282aaedf31c jdk9-b16 +6f923fcbe5129eceb9617a9a18dbdd743980e785 jdk9-b17 +5afa90c28742d175431be75f9098745510bd2b30 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java --- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -32,7 +34,6 @@ import java.text.DecimalFormatSymbols; import java.util.ArrayList; import java.util.Enumeration; -import java.util.Vector; import javax.xml.transform.Templates; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; @@ -51,6 +52,7 @@ import com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory; import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator; import com.sun.org.apache.xml.internal.serializer.SerializationHandler; +import com.sun.org.apache.xml.internal.serializer.ToStream; /** * @author Jacek Ambroziak @@ -74,7 +76,7 @@ public String _doctypeSystem = null; public boolean _indent = false; public String _mediaType = null; - public Vector _cdata = null; + public ArrayList _cdata = null; public int _indentamount = -1; public static final int FIRST_TRANSLET_VERSION = 100; @@ -642,7 +644,7 @@ */ public void addCdataElement(String name) { if (_cdata == null) { - _cdata = new Vector(); + _cdata = new ArrayList<>(); } int lastColon = name.lastIndexOf(':'); @@ -650,11 +652,11 @@ if (lastColon > 0) { String uri = name.substring(0, lastColon); String localName = name.substring(lastColon+1); - _cdata.addElement(uri); - _cdata.addElement(localName); + _cdata.add(uri); + _cdata.add(localName); } else { - _cdata.addElement(null); - _cdata.addElement(name); + _cdata.add(null); + _cdata.add(name); } } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java --- a/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -40,7 +42,7 @@ import java.util.Enumeration; import java.util.Properties; import java.util.StringTokenizer; -import java.util.Vector; +import java.util.ArrayList; import java.lang.reflect.Constructor; import javax.xml.parsers.DocumentBuilder; @@ -1084,7 +1086,7 @@ else if (name.equals(OutputKeys.CDATA_SECTION_ELEMENTS)) { if (value != null) { StringTokenizer e = new StringTokenizer(value); - Vector uriAndLocalNames = null; + ArrayList uriAndLocalNames = null; while (e.hasMoreTokens()) { final String token = e.nextToken(); @@ -1104,11 +1106,11 @@ } if (uriAndLocalNames == null) { - uriAndLocalNames = new Vector(); + uriAndLocalNames = new ArrayList<>(); } // add the uri/localName as a pair, in that order - uriAndLocalNames.addElement(uri); - uriAndLocalNames.addElement(localName); + uriAndLocalNames.add(uri); + uriAndLocalNames.add(localName); } handler.setCdataSectionElements(uriAndLocalNames); } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/dom/EntityReferenceImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -347,7 +347,7 @@ * @see DocumentTypeImpl * @see EntityImpl */ - // The Xerces parser invokes callbacks for startEnityReference + // The Xerces parser invokes callbacks for startEntityReference // the parsed value of the entity EACH TIME, so it is actually // easier to create the nodes through the callbacks rather than // clone the Entity. diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -585,7 +585,7 @@ boolean reportEntity = fReportEntity; if (name.startsWith("%")) { reportEntity = peekReportEntity(); - // check well-formedness of the enity + // check well-formedness of the entity int startMarkUpDepth = popPEStack(); // throw fatalError if this entity was incomplete and // was a freestanding decl diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -2728,7 +2728,7 @@ //if the last section was character data if(fLastSectionWasCharacterData){ - //if we dont encounter any CDATA or ENITY REFERENCE and current state is also not SCANNER_STATE_CHARACTER_DATA + //if we dont encounter any CDATA or ENTITY REFERENCE and current state is also not SCANNER_STATE_CHARACTER_DATA //return the last scanned charactrer data. if((fScannerState != SCANNER_STATE_CDATA) && (fScannerState != SCANNER_STATE_REFERENCE) && (fScannerState != SCANNER_STATE_CHARACTER_DATA)){ diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java Wed Jun 18 13:14:15 2014 -0700 @@ -1218,7 +1218,7 @@ // references appear in the document. // REVISIT: this can be combined to a single check in // startEntity if we add one more argument in - // startEnity, inAttrValue + // startEntity, inAttrValue String nonNormalizedValue = attributes.getNonNormalizedValue(i); if (nonNormalizedValue != null) { String entityName = getExternalEntityRefInAttrValue(nonNormalizedValue); diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java Wed Jun 18 13:14:15 2014 -0700 @@ -559,11 +559,13 @@ * @param token The token string */ private void addToken(String tokenStr) { - if (!fTokenNames.containsValue(tokenStr)) { - Integer tokenInt = new Integer(fTokenNames.size()); + String str = fTokenNames.get(tokenStr); + Integer tokenInt = str == null ? null : Integer.parseInt(str); + if (tokenInt == null) { + tokenInt = new Integer(fTokenNames.size()); fTokenNames.put(tokenInt, tokenStr); - addToken(tokenInt.intValue()); } + addToken(tokenInt.intValue()); } /** diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java --- a/jaxp/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -524,11 +524,13 @@ * @param token The token string */ private void addToken(String tokenStr) { - if (!fTokenNames.containsValue(tokenStr)) { - Integer tokenInt = new Integer(fTokenNames.size()); + String str = fTokenNames.get(tokenStr); + Integer tokenInt = str == null ? null : Integer.parseInt(str); + if (tokenInt == null) { + tokenInt = new Integer(fTokenNames.size()); fTokenNames.put(tokenInt, tokenStr); - addToken(tokenInt.intValue()); } + addToken(tokenInt.intValue()); } /** @@ -1251,4 +1253,4 @@ super.setProperty(propertyId, value); } -} +} \ No newline at end of file diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java --- a/jaxp/src/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/dtm/DTMConfigurationException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ /** * Create a new DTMConfigurationException with no - * detail mesage. + * detail message. */ public DTMConfigurationException() { super("Configuration Error"); diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -27,7 +29,7 @@ import java.io.Writer; import java.util.Hashtable; import java.util.Properties; -import java.util.Vector; +import java.util.ArrayList; import javax.xml.transform.SourceLocator; import javax.xml.transform.Transformer; @@ -150,9 +152,9 @@ couldThrowIOException(); } /** - * @see SerializationHandler#setCdataSectionElements(java.util.Vector) + * @see SerializationHandler#setCdataSectionElements(java.util.ArrayList) */ - public void setCdataSectionElements(Vector URI_and_localNames) + public void setCdataSectionElements(ArrayList URI_and_localNames) { aMethodIsCalled(); } @@ -763,4 +765,25 @@ aMethodIsCalled(); } + + + public String getOutputProperty(String name) { + aMethodIsCalled(); + return null; + } + + public String getOutputPropertyDefault(String name) { + aMethodIsCalled(); + return null; + } + + public void setOutputProperty(String name, String val) { + aMethodIsCalled(); + + } + + public void setOutputPropertyDefault(String name, String val) { + aMethodIsCalled(); + + } } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -23,8 +25,11 @@ package com.sun.org.apache.xml.internal.serializer; import java.io.IOException; -import java.util.Vector; +import java.util.HashMap; +import java.util.Set; +import java.util.ArrayList; +import javax.xml.transform.OutputKeys; import javax.xml.transform.SourceLocator; import javax.xml.transform.Transformer; @@ -108,12 +113,12 @@ /** * The System ID for the doc type. */ - private String m_doctypeSystem; + protected String m_doctypeSystem; /** * The public ID for the doc type. */ - private String m_doctypePublic; + protected String m_doctypePublic; /** * Flag to tell that we need to add the doctype decl, which we can't do @@ -122,15 +127,9 @@ boolean m_needToOutputDocTypeDecl = true; /** - * The character encoding. Must match the encoding used for the - * printWriter. - */ - private String m_encoding = null; - - /** * Tells if we should write the XML declaration. */ - private boolean m_shouldNotWriteXMLHeader = false; + protected boolean m_shouldNotWriteXMLHeader = false; /** * The standalone value for the doctype. @@ -159,12 +158,12 @@ /** * Tells the XML version, for writing out to the XML decl. */ - private String m_version = null; + protected String m_version = null; /** * The mediatype. Not used right now. */ - private String m_mediatype; + protected String m_mediatype; /** * The transformer that was around when this output handler was created (if @@ -173,13 +172,6 @@ private Transformer m_transformer; /** - * Pairs of local names and corresponding URIs of CDATA sections. This list - * comes from the cdata-section-elements attribute. Every second one is a - * local name, and every other second one is the URI for the local name. - */ - protected Vector m_cdataSectionElements = null; - - /** * Namespace support, that keeps track of currently defined * prefix/uri mappings. As processed elements come and go, so do * the associated mappings for that element. @@ -538,16 +530,16 @@ */ public String getEncoding() { - return m_encoding; + return getOutputProperty(OutputKeys.ENCODING); } /** * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. * @param m_encoding the character encoding */ - public void setEncoding(String m_encoding) + public void setEncoding(String encoding) { - this.m_encoding = m_encoding; + setOutputProperty(OutputKeys.ENCODING,encoding); } /** @@ -557,7 +549,8 @@ */ public void setOmitXMLDeclaration(boolean b) { - this.m_shouldNotWriteXMLHeader = b; + String val = b ? "yes":"no"; + setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,val); } @@ -588,7 +581,7 @@ */ public void setDoctypePublic(String doctypePublic) { - this.m_doctypePublic = doctypePublic; + setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic); } @@ -610,7 +603,7 @@ */ public void setDoctypeSystem(String doctypeSystem) { - this.m_doctypeSystem = doctypeSystem; + setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem); } /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties @@ -621,8 +614,8 @@ */ public void setDoctype(String doctypeSystem, String doctypePublic) { - this.m_doctypeSystem = doctypeSystem; - this.m_doctypePublic = doctypePublic; + setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem); + setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic); } /** @@ -634,12 +627,9 @@ */ public void setStandalone(String standalone) { - if (standalone != null) - { - m_standaloneWasSpecified = true; - setStandaloneInternal(standalone); - } + setOutputProperty(OutputKeys.STANDALONE, standalone); } + /** * Sets the XSL standalone attribute, but does not remember if this is a * default or explicite setting. @@ -700,7 +690,7 @@ */ public void setVersion(String version) { - m_version = version; + setOutputProperty(OutputKeys.VERSION, version); } /** @@ -712,7 +702,7 @@ */ public void setMediaType(String mediaType) { - m_mediatype = mediaType; + setOutputProperty(OutputKeys.MEDIA_TYPE,mediaType); } /** @@ -741,7 +731,8 @@ */ public void setIndent(boolean doIndent) { - m_doIndent = doIndent; + String val = doIndent ? "yes":"no"; + setOutputProperty(OutputKeys.INDENT,val); } /** @@ -787,59 +778,6 @@ } /** - * Push a boolean state based on if the name of the current element - * is found in the list of qnames. A state is only pushed if - * there were some cdata-section-names were specified. - *

- * Hidden parameters are the vector of qualified elements specified in - * cdata-section-names attribute, and the m_cdataSectionStates stack - * onto which whether the current element is in the list is pushed (true or - * false). Other hidden parameters are the current elements namespaceURI, - * localName and qName - */ - protected boolean isCdataSection() - { - - boolean b = false; - - if (null != m_cdataSectionElements) - { - if (m_elemContext.m_elementLocalName == null) - m_elemContext.m_elementLocalName = - getLocalName(m_elemContext.m_elementName); - if (m_elemContext.m_elementURI == null) - { - String prefix = getPrefixPart(m_elemContext.m_elementName); - if (prefix != null) - m_elemContext.m_elementURI = - m_prefixMap.lookupNamespace(prefix); - - } - - if ((null != m_elemContext.m_elementURI) - && m_elemContext.m_elementURI.length() == 0) - m_elemContext.m_elementURI = null; - - int nElems = m_cdataSectionElements.size(); - - // loop through 2 at a time, as these are pairs of URI and localName - for (int i = 0; i < nElems; i += 2) - { - String uri = (String) m_cdataSectionElements.elementAt(i); - String loc = (String) m_cdataSectionElements.elementAt(i + 1); - if (loc.equals(m_elemContext.m_elementLocalName) - && subPartMatch(m_elemContext.m_elementURI, uri)) - { - b = true; - - break; - } - } - } - return b; - } - - /** * Tell if two strings are equal, without worry if the first string is null. * * @param p String reference, which may be null. @@ -1312,12 +1250,11 @@ private void resetSerializerBase() { this.m_attributes.clear(); - this.m_cdataSectionElements = null; + this.m_StringOfCDATASections = null; this.m_elemContext = new ElemContext(); this.m_doctypePublic = null; this.m_doctypeSystem = null; this.m_doIndent = false; - this.m_encoding = null; this.m_indentAmount = 0; this.m_inEntityRef = false; this.m_inExternalDTD = false; @@ -1399,4 +1336,333 @@ // A particular sub-class of SerializerBase provides the implementation (if desired) } + + /** + * The CDATA section names stored in a whitespace separateed list with + * each element being a word of the form "{uri}localName" This list + * comes from the cdata-section-elements attribute. + * + * This field replaces m_cdataSectionElements Vector. + */ + protected String m_StringOfCDATASections = null; + + boolean m_docIsEmpty = true; + void initCdataElems(String s) + { + if (s != null) + { + int max = s.length(); + + // true if we are in the middle of a pair of curly braces that delimit a URI + boolean inCurly = false; + + // true if we found a URI but haven't yet processed the local name + boolean foundURI = false; + + StringBuilder buf = new StringBuilder(); + String uri = null; + String localName = null; + + // parse through string, breaking on whitespaces. I do this instead + // of a tokenizer so I can track whitespace inside of curly brackets, + // which theoretically shouldn't happen if they contain legal URLs. + for (int i = 0; i < max; i++) + { + char c = s.charAt(i); + + if (Character.isWhitespace(c)) + { + if (!inCurly) + { + if (buf.length() > 0) + { + localName = buf.toString(); + if (!foundURI) + uri = ""; + addCDATAElement(uri,localName); + buf.setLength(0); + foundURI = false; + } + continue; + } + else + buf.append(c); // add whitespace to the URI + } + else if ('{' == c) // starting a URI + inCurly = true; + else if ('}' == c) + { + // we just ended a URI + foundURI = true; + uri = buf.toString(); + buf.setLength(0); + inCurly = false; + } + else + { + // append non-whitespace, non-curly to current URI or localName being gathered. + buf.append(c); + } + + } + + if (buf.length() > 0) + { + // We have one last localName to process. + localName = buf.toString(); + if (!foundURI) + uri = ""; + addCDATAElement(uri,localName); + } + } + } + + protected java.util.HashMap> m_CdataElems = null; + private void addCDATAElement(String uri, String localName) + { + if (m_CdataElems == null) { + m_CdataElems = new java.util.HashMap<>(); + } + + HashMap h = m_CdataElems.get(localName); + if (h == null) { + h = new HashMap<>(); + m_CdataElems.put(localName,h); + } + h.put(uri,uri); + + } + + + /** + * Return true if nothing has been sent to this result tree yet. + *

+ * This is not a public API. + * + * @xsl.usage internal + */ + public boolean documentIsEmpty() { + // If we haven't called startDocument() yet, then this document is empty + return m_docIsEmpty && (m_elemContext.m_currentElemDepth == 0); + } + + /** + * Return true if the current element in m_elemContext + * is a CDATA section. + * CDATA sections are specified in the attribute + * cdata-section-names or in the JAXP equivalent property. + * In any case the format of the value of such a property is: + *

+     * "{uri1}localName1 {uri2}localName2 . . . "
+     * 
+ * + *

+ * This method is not a public API, but is only used internally by the serializer. + */ + protected boolean isCdataSection() { + boolean b = false; + + if (null != m_StringOfCDATASections) { + if (m_elemContext.m_elementLocalName == null) { + String localName = getLocalName(m_elemContext.m_elementName); + m_elemContext.m_elementLocalName = localName; + } + + if ( m_elemContext.m_elementURI == null) { + + m_elemContext.m_elementURI = getElementURI(); + } + else if ( m_elemContext.m_elementURI.length() == 0) { + if ( m_elemContext.m_elementName == null) { + m_elemContext.m_elementName = m_elemContext.m_elementLocalName; + // leave URI as "", meaning in no namespace + } + else if (m_elemContext.m_elementLocalName.length() < m_elemContext.m_elementName.length()){ + // We were told the URI was "", yet the name has a prefix since the name is longer than the localname. + // So we will fix that incorrect information here. + m_elemContext.m_elementURI = getElementURI(); + } + } + + HashMap h = null; + if (m_CdataElems != null) { + h = m_CdataElems.get(m_elemContext.m_elementLocalName); + } + if (h != null) { + Object obj = h.get(m_elemContext.m_elementURI); + if (obj != null) + b = true; + } + + } + return b; + } + + /** + * Before this call m_elementContext.m_elementURI is null, + * which means it is not yet known. After this call it + * is non-null, but possibly "" meaning that it is in the + * default namespace. + * + * @return The URI of the element, never null, but possibly "". + */ + private String getElementURI() { + String uri = null; + // At this point in processing we have received all the + // namespace mappings + // As we still don't know the elements namespace, + // we now figure it out. + + String prefix = getPrefixPart(m_elemContext.m_elementName); + + if (prefix == null) { + // no prefix so lookup the URI of the default namespace + uri = m_prefixMap.lookupNamespace(""); + } else { + uri = m_prefixMap.lookupNamespace(prefix); + } + if (uri == null) { + // We didn't find the namespace for the + // prefix ... ouch, that shouldn't happen. + // This is a hack, we really don't know + // the namespace + uri = EMPTYSTRING; + } + + return uri; + } + + + /** + * Get the value of an output property, + * the explicit value, if any, otherwise the + * default value, if any, otherwise null. + */ + public String getOutputProperty(String name) { + String val = getOutputPropertyNonDefault(name); + // If no explicit value, try to get the default value + if (val == null) + val = getOutputPropertyDefault(name); + return val; + + } + /** + * Get the value of an output property, + * not the default value. If there is a default + * value, but no non-default value this method + * will return null. + *

+ * + */ + public String getOutputPropertyNonDefault(String name) { + return getProp(name,false); + } + + /** + * Get the default value of an xsl:output property, + * which would be null only if no default value exists + * for the property. + */ + public String getOutputPropertyDefault(String name) { + return getProp(name, true); + } + + /** + * Set the value for the output property, typically from + * an xsl:output element, but this does not change what + * the default value is. + */ + public void setOutputProperty(String name, String val) { + setProp(name,val,false); + } + + /** + * Set the default value for an output property, but this does + * not impact any explicitly set value. + */ + public void setOutputPropertyDefault(String name, String val) { + setProp(name,val,true); + + } + + /** + * A mapping of keys to explicitly set values, for example if + * and has an "encoding" attribute, this + * map will have what that attribute maps to. + */ + private HashMap m_OutputProps; + /** + * A mapping of keys to default values, for example if + * the default value of the encoding is "UTF-8" then this + * map will have that "encoding" maps to "UTF-8". + */ + private HashMap m_OutputPropsDefault; + + Set getOutputPropDefaultKeys() { + return m_OutputPropsDefault.keySet(); + } + Set getOutputPropKeys() { + return m_OutputProps.keySet(); + } + + private String getProp(String name, boolean defaultVal) { + if (m_OutputProps == null) { + m_OutputProps = new HashMap<>(); + m_OutputPropsDefault = new HashMap<>(); + } + + String val; + if (defaultVal) + val = m_OutputPropsDefault.get(name); + else + val = m_OutputProps.get(name); + + return val; + } + /** + * + * @param name The name of the property, e.g. "{http://myprop}indent-tabs" or "indent". + * @param val The value of the property, e.g. "4" + * @param defaultVal true if this is a default value being set for the property as + * opposed to a user define on, set say explicitly in the stylesheet or via JAXP + */ + void setProp(String name, String val, boolean defaultVal) { + if (m_OutputProps == null) { + m_OutputProps = new HashMap<>(); + m_OutputPropsDefault = new HashMap<>(); + } + + if (defaultVal) + m_OutputPropsDefault.put(name,val); + else { + if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name) && val != null) { + initCdataElems(val); + String oldVal = m_OutputProps.get(name); + String newVal; + if (oldVal == null) + newVal = oldVal + ' ' + val; + else + newVal = val; + m_OutputProps.put(name,newVal); + } + else { + m_OutputProps.put(name,val); + } + } + } + + /** + * Get the first char of the local name + * @param name Either a local name, or a local name + * preceeded by a uri enclosed in curly braces. + */ + static char getFirstCharLocName(String name) { + final char first; + int i = name.indexOf('}'); + if (i < 0) + first = name.charAt(0); + else + first = name.charAt(i+1); + return first; + } } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -349,84 +351,84 @@ // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("A"); + elemDesc = (ElemDesc) m_elementFlags.get("a"); elemDesc.setAttr("HREF", ElemDesc.ATTRURL); elemDesc.setAttr("NAME", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("AREA"); + elemDesc = (ElemDesc) m_elementFlags.get("area"); elemDesc.setAttr("HREF", ElemDesc.ATTRURL); elemDesc.setAttr("NOHREF", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("BASE"); + elemDesc = (ElemDesc) m_elementFlags.get("base"); elemDesc.setAttr("HREF", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("BUTTON"); + elemDesc = (ElemDesc) m_elementFlags.get("button"); elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("BLOCKQUOTE"); + elemDesc = (ElemDesc) m_elementFlags.get("blockquote"); elemDesc.setAttr("CITE", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("DEL"); + elemDesc = (ElemDesc) m_elementFlags.get("del"); elemDesc.setAttr("CITE", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("DIR"); + elemDesc = (ElemDesc) m_elementFlags.get("dir"); elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("DIV"); + elemDesc = (ElemDesc) m_elementFlags.get("div"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); // Netscape 4 extension elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("DL"); + elemDesc = (ElemDesc) m_elementFlags.get("dl"); elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("FORM"); + elemDesc = (ElemDesc) m_elementFlags.get("form"); elemDesc.setAttr("ACTION", ElemDesc.ATTRURL); // ---------------------------------------------- // Attribution to: "Voytenko, Dimitry" - elemDesc = (ElemDesc) m_elementFlags.get("FRAME"); + elemDesc = (ElemDesc) m_elementFlags.get("frame"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL); elemDesc.setAttr("NORESIZE",ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("HEAD"); + elemDesc = (ElemDesc) m_elementFlags.get("head"); elemDesc.setAttr("PROFILE", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("HR"); + elemDesc = (ElemDesc) m_elementFlags.get("hr"); elemDesc.setAttr("NOSHADE", ElemDesc.ATTREMPTY); // ---------------------------------------------- // HTML 4.0, section 16.5 - elemDesc = (ElemDesc) m_elementFlags.get("IFRAME"); + elemDesc = (ElemDesc) m_elementFlags.get("iframe"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL); // ---------------------------------------------- // Netscape 4 extension - elemDesc = (ElemDesc) m_elementFlags.get("ILAYER"); + elemDesc = (ElemDesc) m_elementFlags.get("ilayer"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("IMG"); + elemDesc = (ElemDesc) m_elementFlags.get("img"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL); elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL); elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("INPUT"); + elemDesc = (ElemDesc) m_elementFlags.get("input"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL); elemDesc.setAttr("CHECKED", ElemDesc.ATTREMPTY); @@ -435,24 +437,24 @@ elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("INS"); + elemDesc = (ElemDesc) m_elementFlags.get("ins"); elemDesc.setAttr("CITE", ElemDesc.ATTRURL); // ---------------------------------------------- // Netscape 4 extension - elemDesc = (ElemDesc) m_elementFlags.get("LAYER"); + elemDesc = (ElemDesc) m_elementFlags.get("layer"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("LINK"); + elemDesc = (ElemDesc) m_elementFlags.get("link"); elemDesc.setAttr("HREF", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("MENU"); + elemDesc = (ElemDesc) m_elementFlags.get("menu"); elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("OBJECT"); + elemDesc = (ElemDesc) m_elementFlags.get("object"); elemDesc.setAttr("CLASSID", ElemDesc.ATTRURL); elemDesc.setAttr("CODEBASE", ElemDesc.ATTRURL); elemDesc.setAttr("DATA", ElemDesc.ATTRURL); @@ -461,58 +463,58 @@ elemDesc.setAttr("DECLARE", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("OL"); + elemDesc = (ElemDesc) m_elementFlags.get("ol"); elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("OPTGROUP"); + elemDesc = (ElemDesc) m_elementFlags.get("optgroup"); elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("OPTION"); + elemDesc = (ElemDesc) m_elementFlags.get("option"); elemDesc.setAttr("SELECTED", ElemDesc.ATTREMPTY); elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("Q"); + elemDesc = (ElemDesc) m_elementFlags.get("q"); elemDesc.setAttr("CITE", ElemDesc.ATTRURL); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("SCRIPT"); + elemDesc = (ElemDesc) m_elementFlags.get("script"); elemDesc.setAttr("SRC", ElemDesc.ATTRURL); elemDesc.setAttr("FOR", ElemDesc.ATTRURL); elemDesc.setAttr("DEFER", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("SELECT"); + elemDesc = (ElemDesc) m_elementFlags.get("select"); elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); elemDesc.setAttr("MULTIPLE", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("TABLE"); + elemDesc = (ElemDesc) m_elementFlags.get("table"); elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("TD"); + elemDesc = (ElemDesc) m_elementFlags.get("td"); elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("TEXTAREA"); + elemDesc = (ElemDesc) m_elementFlags.get("textarea"); elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("TH"); + elemDesc = (ElemDesc) m_elementFlags.get("th"); elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // ---------------------------------------------- // The nowrap attribute of a tr element is both // a Netscape and Internet-Explorer extension - elemDesc = (ElemDesc) m_elementFlags.get("TR"); + elemDesc = (ElemDesc) m_elementFlags.get("tr"); elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("UL"); + elemDesc = (ElemDesc) m_elementFlags.get("ul"); elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); } @@ -1762,7 +1764,7 @@ * lets determine if the current element is specified in the cdata- * section-elements list. */ - if (m_cdataSectionElements != null) + if (m_StringOfCDATASections != null) m_elemContext.m_isCdataSection = isCdataSection(); if (m_doIndent) { @@ -1776,55 +1778,8 @@ throw new SAXException(e); } } - /** - * Initialize the serializer with the specified output stream and output - * format. Must be called before calling any of the serialize methods. - * - * @param output The output stream to use - * @param format The output format - * @throws UnsupportedEncodingException The encoding specified in the - * output format is not supported - */ - protected synchronized void init(OutputStream output, Properties format) - throws UnsupportedEncodingException - { - if (null == format) - { - format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML); - } - super.init(output,format, false); - } /** - * Specifies an output stream to which the document should be - * serialized. This method should not be called while the - * serializer is in the process of serializing a document. - *

- * The encoding specified in the output properties is used, or - * if no encoding was specified, the default for the selected - * output method. - * - * @param output The output stream - */ - public void setOutputStream(OutputStream output) - { - - try - { - Properties format; - if (null == m_format) - format = OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML); - else - format = m_format; - init(output, format, true); - } - catch (UnsupportedEncodingException uee) - { - - // Should have been warned in init, I guess... - } - } - /** * This method is used when a prefix/uri namespace mapping * is indicated after the element was started with a * startElement() and before and endElement(). diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -22,7 +22,7 @@ */ package com.sun.org.apache.xml.internal.serializer; -import java.util.Vector; +import java.util.ArrayList; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; @@ -234,9 +234,9 @@ /** * Does nothing. The setting of CDATA section elements has an impact on * stream serializers. - * @see SerializationHandler#setCdataSectionElements(java.util.Vector) + * @see SerializationHandler#setCdataSectionElements(java.util.ArrayList) */ - public void setCdataSectionElements(Vector URI_and_localNames) + public void setCdataSectionElements(ArrayList URI_and_localNames) { // do nothing } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -25,11 +27,15 @@ import com.sun.org.apache.xalan.internal.utils.SecuritySupport; import java.io.IOException; import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; +import java.util.Enumeration; +import java.util.Iterator; import java.util.Properties; +import java.util.Set; import java.util.StringTokenizer; -import java.util.Vector; +import java.util.ArrayList; import javax.xml.transform.ErrorListener; import javax.xml.transform.OutputKeys; @@ -186,9 +192,6 @@ */ boolean m_isUTF8 = false; - /** The xsl:output properties. */ - protected Properties m_format; - /** * remembers if we are in between the startCDATA() and endCDATA() callbacks */ @@ -306,6 +309,7 @@ } } + OutputStream m_outputStream; /** * Get the output stream where the events will be serialized to. * @@ -314,13 +318,7 @@ */ public OutputStream getOutputStream() { - - if (m_writer instanceof WriterToUTF8Buffered) - return ((WriterToUTF8Buffered) m_writer).getOutputStream(); - if (m_writer instanceof WriterToASCI) - return ((WriterToASCI) m_writer).getOutputStream(); - else - return null; + return m_outputStream; } // Implement DeclHandler @@ -419,10 +417,174 @@ */ protected final void outputLineSep() throws IOException { - m_writer.write(m_lineSep, 0, m_lineSepLen); } + void setProp(String name, String val, boolean defaultVal) { + if (val != null) { + + char first = getFirstCharLocName(name); + switch (first) { + case 'c': + if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name)) { + addCdataSectionElements(val); // val is cdataSectionNames + } + break; + case 'd': + if (OutputKeys.DOCTYPE_SYSTEM.equals(name)) { + this.m_doctypeSystem = val; + } else if (OutputKeys.DOCTYPE_PUBLIC.equals(name)) { + this.m_doctypePublic = val; + if (val.startsWith("-//W3C//DTD XHTML")) + m_spaceBeforeClose = true; + } + break; + case 'e': + String newEncoding = val; + if (OutputKeys.ENCODING.equals(name)) { + String possible_encoding = Encodings.getMimeEncoding(val); + if (possible_encoding != null) { + // if the encoding is being set, try to get the + // preferred + // mime-name and set it too. + super.setProp("mime-name", possible_encoding, + defaultVal); + } + final String oldExplicitEncoding = getOutputPropertyNonDefault(OutputKeys.ENCODING); + final String oldDefaultEncoding = getOutputPropertyDefault(OutputKeys.ENCODING); + if ( (defaultVal && ( oldDefaultEncoding == null || !oldDefaultEncoding.equalsIgnoreCase(newEncoding))) + || ( !defaultVal && (oldExplicitEncoding == null || !oldExplicitEncoding.equalsIgnoreCase(newEncoding) ))) { + // We are trying to change the default or the non-default setting of the encoding to a different value + // from what it was + + EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding); + if (newEncoding != null && encodingInfo.name == null) { + // We tried to get an EncodingInfo for Object for the given + // encoding, but it came back with an internall null name + // so the encoding is not supported by the JDK, issue a message. + final String msg = Utils.messages.createMessage( + MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ newEncoding }); + + final String msg2 = + "Warning: encoding \"" + newEncoding + "\" not supported, using " + + Encodings.DEFAULT_MIME_ENCODING; + try { + // Prepare to issue the warning message + final Transformer tran = super.getTransformer(); + if (tran != null) { + final ErrorListener errHandler = tran + .getErrorListener(); + // Issue the warning message + if (null != errHandler + && m_sourceLocator != null) { + errHandler + .warning(new TransformerException( + msg, m_sourceLocator)); + errHandler + .warning(new TransformerException( + msg2, m_sourceLocator)); + } else { + System.out.println(msg); + System.out.println(msg2); + } + } else { + System.out.println(msg); + System.out.println(msg2); + } + } catch (Exception e) { + } + + // We said we are using UTF-8, so use it + newEncoding = Encodings.DEFAULT_MIME_ENCODING; + val = Encodings.DEFAULT_MIME_ENCODING; // to store the modified value into the properties a little later + encodingInfo = Encodings.getEncodingInfo(newEncoding); + } + // The encoding was good, or was forced to UTF-8 above + + + // If there is already a non-default set encoding and we + // are trying to set the default encoding, skip the this block + // as the non-default value is already the one to use. + if (defaultVal == false || oldExplicitEncoding == null) { + m_encodingInfo = encodingInfo; + if (newEncoding != null) + m_isUTF8 = newEncoding.equals(Encodings.DEFAULT_MIME_ENCODING); + + // if there was a previously set OutputStream + OutputStream os = getOutputStream(); + if (os != null) { + Writer w = getWriter(); + + // If the writer was previously set, but + // set by the user, or if the new encoding is the same + // as the old encoding, skip this block + String oldEncoding = getOutputProperty(OutputKeys.ENCODING); + if ((w == null || !m_writer_set_by_user) + && !newEncoding.equalsIgnoreCase(oldEncoding)) { + // Make the change of encoding in our internal + // table, then call setOutputStreamInternal + // which will stomp on the old Writer (if any) + // with a new Writer with the new encoding. + super.setProp(name, val, defaultVal); + setOutputStreamInternal(os,false); + } + } + } + } + } + break; + case 'i': + if (OutputPropertiesFactory.S_KEY_INDENT_AMOUNT.equals(name)) { + setIndentAmount(Integer.parseInt(val)); + } else if (OutputKeys.INDENT.equals(name)) { + boolean b = "yes".equals(val) ? true : false; + m_doIndent = b; + } + + break; + case 'l': + if (OutputPropertiesFactory.S_KEY_LINE_SEPARATOR.equals(name)) { + m_lineSep = val.toCharArray(); + m_lineSepLen = m_lineSep.length; + } + + break; + case 'm': + if (OutputKeys.MEDIA_TYPE.equals(name)) { + m_mediatype = val; + } + break; + case 'o': + if (OutputKeys.OMIT_XML_DECLARATION.equals(name)) { + boolean b = "yes".equals(val) ? true : false; + this.m_shouldNotWriteXMLHeader = b; + } + break; + case 's': + // if standalone was explicitly specified + if (OutputKeys.STANDALONE.equals(name)) { + if (defaultVal) { + setStandaloneInternal(val); + } else { + m_standaloneWasSpecified = true; + setStandaloneInternal(val); + } + } + + break; + case 'v': + if (OutputKeys.VERSION.equals(name)) { + m_version = val; + } + break; + default: + break; + + } + super.setProp(name, val, defaultVal); + } + } + /** * Specifies an output format for this serializer. It the * serializer has already been associated with an output format, @@ -434,115 +596,34 @@ */ public void setOutputFormat(Properties format) { - boolean shouldFlush = m_shouldFlush; - init(m_writer, format, false, false); - - m_shouldFlush = shouldFlush; - } - - /** - * Initialize the serializer with the specified writer and output format. - * Must be called before calling any of the serialize methods. - * This method can be called multiple times and the xsl:output properties - * passed in the 'format' parameter are accumulated across calls. - * - * @param writer The writer to use - * @param format The output format - * @param shouldFlush True if the writer should be flushed at EndDocument. - */ - private synchronized void init( - Writer writer, - Properties format, - boolean defaultProperties, - boolean shouldFlush) - { - - m_shouldFlush = shouldFlush; - - - // if we are tracing events we need to trace what - // characters are written to the output writer. - if (m_tracer != null - && !(writer instanceof SerializerTraceWriter) ) - m_writer = new SerializerTraceWriter(writer, m_tracer); - else - m_writer = writer; - - - m_format = format; - // m_cdataSectionNames = - // OutputProperties.getQNameProperties( - // OutputKeys.CDATA_SECTION_ELEMENTS, - // format); - setCdataSectionElements(OutputKeys.CDATA_SECTION_ELEMENTS, format); - - setIndentAmount( - OutputPropertyUtils.getIntProperty( - OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, - format)); - setIndent( - OutputPropertyUtils.getBooleanProperty(OutputKeys.INDENT, format)); - + if (format != null) { - String sep = - format.getProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR); - if (sep != null) { - m_lineSep = sep.toCharArray(); - m_lineSepLen = sep.length(); + // Set the default values first, + // and the non-default values after that, + // just in case there is some unexpected + // residual values left over from over-ridden default values + Enumeration propNames; + propNames = format.propertyNames(); + while (propNames.hasMoreElements()) + { + String key = (String) propNames.nextElement(); + // Get the value, possibly a default value + String value = format.getProperty(key); + // Get the non-default value (if any). + String explicitValue = (String) format.get(key); + if (explicitValue == null && value != null) { + // This is a default value + this.setOutputPropertyDefault(key,value); + } + if (explicitValue != null) { + // This is an explicit non-default value + this.setOutputProperty(key,explicitValue); + } } } - boolean shouldNotWriteXMLHeader = - OutputPropertyUtils.getBooleanProperty( - OutputKeys.OMIT_XML_DECLARATION, - format); - setOmitXMLDeclaration(shouldNotWriteXMLHeader); - setDoctypeSystem(format.getProperty(OutputKeys.DOCTYPE_SYSTEM)); - String doctypePublic = format.getProperty(OutputKeys.DOCTYPE_PUBLIC); - setDoctypePublic(doctypePublic); - - // if standalone was explicitly specified - if (format.get(OutputKeys.STANDALONE) != null) - { - String val = format.getProperty(OutputKeys.STANDALONE); - if (defaultProperties) - setStandaloneInternal(val); - else - setStandalone(val); - } - - setMediaType(format.getProperty(OutputKeys.MEDIA_TYPE)); - - if (null != doctypePublic) - { - if (doctypePublic.startsWith("-//W3C//DTD XHTML")) - m_spaceBeforeClose = true; - } - - /* - * This code is added for XML 1.1 Version output. - */ - String version = getVersion(); - if (null == version) - { - version = format.getProperty(OutputKeys.VERSION); - setVersion(version); - } - - // initCharsMap(); - String encoding = getEncoding(); - if (null == encoding) - { - encoding = - Encodings.getMimeEncoding( - format.getProperty(OutputKeys.ENCODING)); - setEncoding(encoding); - } - - m_isUTF8 = encoding.equals(Encodings.DEFAULT_MIME_ENCODING); - // Access this only from the Hashtable level... we don't want to // get default properties. String entitiesFileName = @@ -557,107 +638,10 @@ m_charInfo = CharInfo.getCharInfo(entitiesFileName, method); } - } - - /** - * Initialize the serializer with the specified writer and output format. - * Must be called before calling any of the serialize methods. - * - * @param writer The writer to use - * @param format The output format - */ - private synchronized void init(Writer writer, Properties format) - { - init(writer, format, false, false); - } - /** - * Initialize the serializer with the specified output stream and output - * format. Must be called before calling any of the serialize methods. - * - * @param output The output stream to use - * @param format The output format - * @param defaultProperties true if the properties are the default - * properties - * - * @throws UnsupportedEncodingException The encoding specified in the - * output format is not supported - */ - protected synchronized void init( - OutputStream output, - Properties format, - boolean defaultProperties) - throws UnsupportedEncodingException - { - - String encoding = getEncoding(); - if (encoding == null) - { - // if not already set then get it from the properties - encoding = - Encodings.getMimeEncoding( - format.getProperty(OutputKeys.ENCODING)); - setEncoding(encoding); - } - - if (encoding.equalsIgnoreCase("UTF-8")) - { - m_isUTF8 = true; - // if (output instanceof java.io.BufferedOutputStream) - // { - // init(new WriterToUTF8(output), format, defaultProperties, true); - // } - // else if (output instanceof java.io.FileOutputStream) - // { - // init(new WriterToUTF8Buffered(output), format, defaultProperties, true); - // } - // else - // { - // // Not sure what to do in this case. I'm going to be conservative - // // and not buffer. - // init(new WriterToUTF8(output), format, defaultProperties, true); - // } - - - init( - new WriterToUTF8Buffered(output), - format, - defaultProperties, - true); - - - } - else if ( - encoding.equals("WINDOWS-1250") - || encoding.equals("US-ASCII") - || encoding.equals("ASCII")) - { - init(new WriterToASCI(output), format, defaultProperties, true); - } - else - { - Writer osw; - - try - { - osw = Encodings.getWriter(output, encoding); - } - catch (UnsupportedEncodingException uee) - { - System.out.println( - "Warning: encoding \"" - + encoding - + "\" not supported" - + ", using " - + Encodings.DEFAULT_MIME_ENCODING); - - encoding = Encodings.DEFAULT_MIME_ENCODING; - setEncoding(encoding); - osw = Encodings.getWriter(output, encoding); - } - - init(osw, format, defaultProperties, true); - } - + + + + m_shouldFlush = shouldFlush; } /** @@ -665,9 +649,26 @@ * * @return The output format in use */ - public Properties getOutputFormat() - { - return m_format; + public Properties getOutputFormat() { + Properties def = new Properties(); + { + Set s = getOutputPropDefaultKeys(); + for (String key : s) { + String val = getOutputPropertyDefault(key); + def.put(key, val); + } + } + + Properties props = new Properties(def); + { + Set s = getOutputPropKeys(); + for (String key : s) { + String val = getOutputPropertyNonDefault(key); + if (val != null) + props.put(key, val); + } + } + return props; } /** @@ -679,13 +680,28 @@ */ public void setWriter(Writer writer) { + setWriterInternal(writer, true); + } + + private boolean m_writer_set_by_user; + private void setWriterInternal(Writer writer, boolean setByUser) { + m_writer_set_by_user = setByUser; + m_writer = writer; // if we are tracing events we need to trace what // characters are written to the output writer. - if (m_tracer != null - && !(writer instanceof SerializerTraceWriter) ) - m_writer = new SerializerTraceWriter(writer, m_tracer); - else - m_writer = writer; + if (m_tracer != null) { + boolean noTracerYet = true; + Writer w2 = m_writer; + while (w2 instanceof WriterChain) { + if (w2 instanceof SerializerTraceWriter) { + noTracerYet = false; + break; + } + w2 = ((WriterChain)w2).getWriter(); + } + if (noTracerYet) + m_writer = new SerializerTraceWriter(m_writer, m_tracer); + } } /** @@ -720,25 +736,68 @@ */ public void setOutputStream(OutputStream output) { - - try + setOutputStreamInternal(output, true); + } + + private void setOutputStreamInternal(OutputStream output, boolean setByUser) + { + m_outputStream = output; + String encoding = getOutputProperty(OutputKeys.ENCODING); + if (Encodings.DEFAULT_MIME_ENCODING.equalsIgnoreCase(encoding)) + { + // We wrap the OutputStream with a writer, but + // not one set by the user + try { + setWriterInternal(new WriterToUTF8Buffered(output), false); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } else if ( + "WINDOWS-1250".equals(encoding) + || "US-ASCII".equals(encoding) + || "ASCII".equals(encoding)) { - Properties format; - if (null == m_format) - format = - OutputPropertiesFactory.getDefaultMethodProperties( - Method.XML); - else - format = m_format; - init(output, format, true); + setWriterInternal(new WriterToASCI(output), false); + } else if (encoding != null) { + Writer osw = null; + try + { + osw = Encodings.getWriter(output, encoding); + } + catch (UnsupportedEncodingException uee) + { + osw = null; + } + + + if (osw == null) { + System.out.println( + "Warning: encoding \"" + + encoding + + "\" not supported" + + ", using " + + Encodings.DEFAULT_MIME_ENCODING); + + encoding = Encodings.DEFAULT_MIME_ENCODING; + setEncoding(encoding); + try { + osw = Encodings.getWriter(output, encoding); + } catch (UnsupportedEncodingException e) { + // We can't really get here, UTF-8 is always supported + // This try-catch exists to make the compiler happy + e.printStackTrace(); + } + } + setWriterInternal(osw,false); } - catch (UnsupportedEncodingException uee) - { - - // Should have been warned in init, I guess... + else { + // don't have any encoding, but we have an OutputStream + Writer osw = new OutputStreamWriter(output); + setWriterInternal(osw,false); } } + /** * @see SerializationHandler#setEscaping(boolean) */ @@ -2455,7 +2514,7 @@ * lets determine if the current element is specified in the cdata- * section-elements list. */ - if (m_cdataSectionElements != null) + if (m_StringOfCDATASections != null) m_elemContext.m_isCdataSection = isCdataSection(); if (m_doIndent) @@ -2532,12 +2591,12 @@ * @param key the property key. * @param props the list of properties to search in. * - * Sets the vector of local-name/URI pairs of the cdata section elements + * Sets the ArrayList of local-name/URI pairs of the cdata section elements * specified in the cdata-section-elements property. * * This method is essentially a copy of getQNameProperties() from * OutputProperties. Eventually this method should go away and a call - * to setCdataSectionElements(Vector v) should be made directly. + * to setCdataSectionElements(ArrayList v) should be made directly. */ private void setCdataSectionElements(String key, Properties props) { @@ -2546,11 +2605,11 @@ if (null != s) { - // Vector of URI/LocalName pairs - Vector v = new Vector(); + // ArrayList of URI/LocalName pairs + ArrayList v = new ArrayList<>(); int l = s.length(); boolean inCurly = false; - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); // parse through string, breaking on whitespaces. I do this instead // of a tokenizer so I can track whitespace inside of curly brackets, @@ -2597,7 +2656,7 @@ * * @return a QName object */ - private void addCdataSectionElement(String URI_and_localName, Vector v) + private void addCdataSectionElement(String URI_and_localName, ArrayList v) { StringTokenizer tokenizer = @@ -2608,14 +2667,14 @@ if (null == s2) { // add null URI and the local name - v.addElement(null); - v.addElement(s1); + v.add(null); + v.add(s1); } else { // add URI, then local name - v.addElement(s1); - v.addElement(s2); + v.add(s1); + v.add(s2); } } @@ -2624,11 +2683,38 @@ * The "official way to set URI and localName pairs. * This method should be used by both Xalan and XSLTC. * - * @param URI_and_localNames a vector of pairs of Strings (URI/local) + * @param URI_and_localNames an ArrayList of pairs of Strings (URI/local) */ - public void setCdataSectionElements(Vector URI_and_localNames) + public void setCdataSectionElements(ArrayList URI_and_localNames) { - m_cdataSectionElements = URI_and_localNames; + // convert to the new way. + if (URI_and_localNames != null) + { + final int len = URI_and_localNames.size() - 1; + if (len > 0) + { + final StringBuilder sb = new StringBuilder(); + for (int i = 0; i < len; i += 2) + { + // whitspace separated "{uri1}local1 {uri2}local2 ..." + if (i != 0) + sb.append(' '); + final String uri = (String) URI_and_localNames.get(i); + final String localName = + (String) URI_and_localNames.get(i + 1); + if (uri != null) + { + // If there is no URI don't put this in, just the localName then. + sb.append('{'); + sb.append(uri); + sb.append('}'); + } + sb.append(localName); + } + m_StringOfCDATASections = sb.toString(); + } + } + initCdataElems(m_StringOfCDATASections); } /** @@ -3084,37 +3170,7 @@ */ public void setEncoding(String encoding) { - String old = getEncoding(); - super.setEncoding(encoding); - if (old == null || !old.equals(encoding)) { - // If we have changed the setting of the - m_encodingInfo = Encodings.getEncodingInfo(encoding); - - if (encoding != null && m_encodingInfo.name == null) { - // We tried to get an EncodingInfo for Object for the given - // encoding, but it came back with an internall null name - // so the encoding is not supported by the JDK, issue a message. - String msg = Utils.messages.createMessage( - MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ encoding }); - try - { - // Prepare to issue the warning message - Transformer tran = super.getTransformer(); - if (tran != null) { - ErrorListener errHandler = tran.getErrorListener(); - // Issue the warning message - if (null != errHandler && m_sourceLocator != null) - errHandler.warning(new TransformerException(msg, m_sourceLocator)); - else - System.out.println(msg); - } - else - System.out.println(msg); - } - catch (Exception e){} - } - } - return; + setOutputProperty(OutputKeys.ENCODING,encoding); } /** @@ -3386,4 +3442,24 @@ public void setDTDEntityExpansion(boolean expand) { m_expandDTDEntities = expand; } + + /** + * Remembers the cdata sections specified in the cdata-section-elements by appending the given + * cdata section elements to the list. This method can be called multiple times, but once an + * element is put in the list of cdata section elements it can not be removed. + * This method should be used by both Xalan and XSLTC. + * + * @param URI_and_localNames a whitespace separated list of element names, each element + * is a URI in curly braces (optional) and a local name. An example of such a parameter is: + * "{http://company.com}price {myURI2}book chapter" + */ + public void addCdataSectionElements(String URI_and_localNames) + { + if (URI_and_localNames != null) + initCdataElems(URI_and_localNames); + if (m_StringOfCDATASections == null) + m_StringOfCDATASections = URI_and_localNames; + else + m_StringOfCDATASections += (" " + URI_and_localNames); + } } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -26,7 +26,7 @@ import java.io.OutputStream; import java.io.Writer; import java.util.Properties; -import java.util.Vector; +import java.util.ArrayList; import javax.xml.transform.SourceLocator; import javax.xml.transform.Transformer; @@ -100,12 +100,12 @@ * A collection of namespace URI's (only for first element). * _namespacePrefix has the matching prefix for these URI's */ - private Vector m_namespaceURI = null; + private ArrayList m_namespaceURI = null; /** * A collection of namespace Prefix (only for first element) * _namespaceURI has the matching URIs for these prefix' */ - private Vector m_namespacePrefix = null; + private ArrayList m_namespacePrefix = null; /** * true if startDocument() was called before the underlying handler @@ -421,11 +421,11 @@ { if (m_namespacePrefix == null) { - m_namespacePrefix = new Vector(); - m_namespaceURI = new Vector(); + m_namespacePrefix = new ArrayList<>(); + m_namespaceURI = new ArrayList<>(); } - m_namespacePrefix.addElement(prefix); - m_namespaceURI.addElement(uri); + m_namespacePrefix.add(prefix); + m_namespaceURI.add(uri); if (m_firstElementURI == null) { @@ -1092,8 +1092,8 @@ for (int i = 0; i < n; i++) { final String prefix = - (String) m_namespacePrefix.elementAt(i); - final String uri = (String) m_namespaceURI.elementAt(i); + (String) m_namespacePrefix.get(i); + final String uri = (String) m_namespaceURI.get(i); m_handler.startPrefixMapping(prefix, uri, false); } m_namespacePrefix = null; @@ -1165,8 +1165,8 @@ final int max = m_namespacePrefix.size(); for (int i = 0; i < max; i++) { - final String prefix = (String) m_namespacePrefix.elementAt(i); - final String uri = (String) m_namespaceURI.elementAt(i); + final String prefix = m_namespacePrefix.get(i); + final String uri = m_namespaceURI.get(i); if (m_firstElementPrefix != null && m_firstElementPrefix.equals(prefix) @@ -1194,7 +1194,7 @@ * specified in the cdata-section-elements attribute. * @see SerializationHandler#setCdataSectionElements(java.util.Vector) */ - public void setCdataSectionElements(Vector URI_and_localNames) + public void setCdataSectionElements(ArrayList URI_and_localNames) { m_handler.setCdataSectionElements(URI_and_localNames); } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/WriterToUTF8Buffered.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/WriterToUTF8Buffered.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/WriterToUTF8Buffered.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 1999-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java --- a/jaxp/src/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java Wed Jun 18 13:14:15 2014 -0700 @@ -3,9 +3,11 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * @@ -22,7 +24,7 @@ */ package com.sun.org.apache.xml.internal.serializer; -import java.util.Vector; +import java.util.ArrayList; /** * This interface has methods associated with the XSLT xsl:output attribues @@ -105,11 +107,6 @@ */ public String getVersion(); - - - - - /** * Sets the value coming from the xsl:output cdata-section-elements * stylesheet property. @@ -124,7 +121,7 @@ * relevant in specifying which elements have their text to be output as * CDATA sections. */ - public void setCdataSectionElements(Vector URI_and_localNames); + public void setCdataSectionElements(ArrayList URI_and_localNames); /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties * @param system the system identifier to be used in the DOCTYPE declaration @@ -181,4 +178,58 @@ */ public void setVersion(String version); + /** + * Get the value for a property that affects seraialization, + * if a property was set return that value, otherwise return + * the default value, otherwise return null. + * @param name The name of the property, which is just the local name + * if it is in no namespace, but is the URI in curly braces followed by + * the local name if it is in a namespace, for example: + *

    + *
  • "encoding" + *
  • "method" + *
  • "{http://xml.apache.org/xalan}indent-amount" + *
  • "{http://xml.apache.org/xalan}line-separator" + *
+ * @return The value of the parameter + */ + public String getOutputProperty(String name); + /** + * Get the default value for a property that affects seraialization, + * or null if there is none. It is possible that a non-default value + * was set for the property, however the value returned by this method + * is unaffected by any non-default settings. + * @param name The name of the property. + * @return The default value of the parameter, or null if there is no default value. + */ + public String getOutputPropertyDefault(String name); + /** + * Set the non-default value for a property that affects seraialization. + * @param name The name of the property, which is just the local name + * if it is in no namespace, but is the URI in curly braces followed by + * the local name if it is in a namespace, for example: + *
    + *
  • "encoding" + *
  • "method" + *
  • "{http://xml.apache.org/xalan}indent-amount" + *
  • "{http://xml.apache.org/xalan}line-separator" + *
+ * @val The non-default value of the parameter + */ + public void setOutputProperty(String name, String val); + + /** + * Set the default value for a property that affects seraialization. + * @param name The name of the property, which is just the local name + * if it is in no namespace, but is the URI in curly braces followed by + * the local name if it is in a namespace, for example: + *
    + *
  • "encoding" + *
  • "method" + *
  • "{http://xml.apache.org/xalan}indent-amount" + *
  • "{http://xml.apache.org/xalan}line-separator" + *
+ * @val The default value of the parameter + */ + public void setOutputPropertyDefault(String name, String val); } diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/xml/internal/stream/Entity.java --- a/jaxp/src/com/sun/xml/internal/stream/Entity.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/xml/internal/stream/Entity.java Wed Jun 18 13:14:15 2014 -0700 @@ -352,7 +352,7 @@ } /**each 'external' parsed entity may have xml/text declaration containing version information - * @return String version of the enity, for an internal entity version would be null + * @return String version of the entity, for an internal entity version would be null */ public String getEntityVersion(){ return version ; diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/com/sun/xml/internal/stream/StaxXMLInputSource.java --- a/jaxp/src/com/sun/xml/internal/stream/StaxXMLInputSource.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/com/sun/xml/internal/stream/StaxXMLInputSource.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * @author Neeraj * * This class wraps XMLInputSource and is also capable of telling wether application - * returned XMLStreamReader or not when XMLResolver.resolveEnity + * returned XMLStreamReader or not when XMLResolver.resolveEntity * was called. */ public class StaxXMLInputSource { diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/datatype/DatatypeConfigurationException.java --- a/jaxp/src/javax/xml/datatype/DatatypeConfigurationException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/datatype/DatatypeConfigurationException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ /** *

Create a new DatatypeConfigurationException with - * no specified detail mesage and cause.

+ * no specified detail message and cause.

*/ public DatatypeConfigurationException() { diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/datatype/DatatypeFactory.java --- a/jaxp/src/javax/xml/datatype/DatatypeFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/datatype/DatatypeFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -119,7 +119,7 @@ Pattern.compile("[^YM]*[DT].*"); /** - *

Protected constructor to prevent instaniation outside of package.

+ *

Protected constructor to prevent instantiation outside of package.

* *

Use {@link #newInstance()} to create a DatatypeFactory.

*/ diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/namespace/QName.java --- a/jaxp/src/javax/xml/namespace/QName.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/namespace/QName.java Wed Jun 18 13:14:15 2014 -0700 @@ -83,7 +83,7 @@ * *

To workaround this issue, serialVersionUID is set with either * a default value or a compatibility value. To use the - * compatiblity value, set the system property:

+ * compatibility value, set the system property:

* * com.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 * diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java --- a/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -423,7 +423,7 @@ *
    *
  • * true: the implementation will limit XML processing to conform to implementation limits. - * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. + * Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. * If XML processing is limited for security reasons, it will be reported via a call to the registered * {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}. * See {@link DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}. @@ -517,7 +517,7 @@ * modified DOM trees. * *

    - * Initialy, null is set as the {@link Schema}. + * Initially, null is set as the {@link Schema}. * *

    * This processing will take effect even if @@ -531,7 +531,7 @@ * exception when the {@link #newDocumentBuilder()} is invoked.

    * * - *

    Note for implmentors

    + *

    Note for implementors

    * *

    * A parser must be able to work with any {@link Schema} diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/parsers/FactoryConfigurationError.java --- a/jaxp/src/javax/xml/parsers/FactoryConfigurationError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/parsers/FactoryConfigurationError.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ /** * Create a new FactoryConfigurationError with no - * detail mesage. + * detail message. */ public FactoryConfigurationError() { diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/parsers/ParserConfigurationException.java --- a/jaxp/src/javax/xml/parsers/ParserConfigurationException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/parsers/ParserConfigurationException.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ /** * Create a new ParserConfigurationException with no - * detail mesage. + * detail message. */ public ParserConfigurationException() { diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/parsers/SAXParser.java --- a/jaxp/src/javax/xml/parsers/SAXParser.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/parsers/SAXParser.java Wed Jun 18 13:14:15 2014 -0700 @@ -69,7 +69,7 @@ * given {@link org.xml.sax.HandlerBase} or the * {@link org.xml.sax.helpers.DefaultHandler} are called.

    * - * Implementors of this class which wrap an underlaying implementation + * Implementors of this class which wrap an underlying implementation * can consider using the {@link org.xml.sax.helpers.ParserAdapter} * class to initially adapt their SAX1 implementation to work under * this revised class. @@ -79,7 +79,7 @@ public abstract class SAXParser { /** - *

    Protected constructor to prevent instaniation. + *

    Protected constructor to prevent instantiation. * Use {@link javax.xml.parsers.SAXParserFactory#newSAXParser()}.

    */ protected SAXParser () { @@ -393,10 +393,10 @@ } /** - * Returns the SAX parser that is encapsultated by the + * Returns the SAX parser that is encapsulated by the * implementation of this class. * - * @return The SAX parser that is encapsultated by the + * @return The SAX parser that is encapsulated by the * implementation of this class. * * @throws SAXException If any SAX errors occur during processing. diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/parsers/SAXParserFactory.java --- a/jaxp/src/javax/xml/parsers/SAXParserFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/parsers/SAXParserFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -359,7 +359,7 @@ * is responsible to make sure that the application will receive * those modified event stream.

    * - *

    Initialy, null is set as the {@link Schema}.

    + *

    Initially, null is set as the {@link Schema}.

    * *

    This processing will take effect even if * the {@link #isValidating()} method returns false. diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/transform/ErrorListener.java --- a/jaxp/src/javax/xml/transform/ErrorListener.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/transform/ErrorListener.java Wed Jun 18 13:14:15 2014 -0700 @@ -28,7 +28,7 @@ /** *

    To provide customized error handling, implement this interface and * use the setErrorListener method to register an instance of the - * implmentation with the {@link javax.xml.transform.Transformer}. The + * implementation with the {@link javax.xml.transform.Transformer}. The * Transformer then reports all errors and warnings through this * interface.

    * diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/transform/TransformerConfigurationException.java --- a/jaxp/src/javax/xml/transform/TransformerConfigurationException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/transform/TransformerConfigurationException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ /** * Create a new TransformerConfigurationException with no - * detail mesage. + * detail message. */ public TransformerConfigurationException() { super("Configuration Error"); diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/transform/TransformerFactoryConfigurationError.java --- a/jaxp/src/javax/xml/transform/TransformerFactoryConfigurationError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/transform/TransformerFactoryConfigurationError.java Wed Jun 18 13:14:15 2014 -0700 @@ -42,7 +42,7 @@ /** * Create a new TransformerFactoryConfigurationError with no - * detail mesage. + * detail message. */ public TransformerFactoryConfigurationError() { diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/validation/SchemaFactory.java --- a/jaxp/src/javax/xml/validation/SchemaFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/validation/SchemaFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -358,7 +358,7 @@ *
      *
    • * true: the implementation will limit XML processing to conform to implementation limits. - * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. + * Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. * If XML processing is limited for security reasons, it will be reported via a call to the registered * {@link ErrorHandler#fatalError(SAXParseException exception)}. * See {@link #setErrorHandler(ErrorHandler errorHandler)}. diff -r aade36e70da0 -r e2bf17cee34b jaxp/src/javax/xml/validation/ValidatorHandler.java --- a/jaxp/src/javax/xml/validation/ValidatorHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxp/src/javax/xml/validation/ValidatorHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -379,7 +379,7 @@ *
        *
      • * true: the implementation will limit XML processing to conform to implementation limits. - * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. + * Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources. * If XML processing is limited for security reasons, it will be reported via a call to the registered * {@link ErrorHandler#fatalError(SAXParseException exception)}. * See {@link #setErrorHandler(ErrorHandler errorHandler)}. diff -r aade36e70da0 -r e2bf17cee34b jaxws/.hgtags --- a/jaxws/.hgtags Wed Jun 11 10:53:27 2014 +0400 +++ b/jaxws/.hgtags Wed Jun 18 13:14:15 2014 -0700 @@ -262,3 +262,5 @@ 02e58850b7062825308413d420f2b02c1f25a724 jdk9-b14 e9780330017a6b464a385356d77e5136f9de8d09 jdk9-b15 1e1a3b2215b7551d88e89d1ca8c1e1ebe3d3c0ab jdk9-b16 +6b159e727dac283f424b7d19f5be3ddd9f85acf5 jdk9-b17 +275f2385aed80c84297840638d58656366350c58 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b jdk/.hgtags --- a/jdk/.hgtags Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/.hgtags Wed Jun 18 13:14:15 2014 -0700 @@ -259,3 +259,5 @@ 5c7a17a81afd0906b53ee31d95a3211c96ff6b25 jdk9-b14 4537360f09fe23ab339ee588747b657feb12d0c8 jdk9-b15 ab7d2c565b0de5bee1361d282d4029371327fc9e jdk9-b16 +fd8e675f141b9bdb2f46d1ae8251f4ee3a895d64 jdk9-b17 +6ad17b31f0d30593392b1e8695b9709dbbd7fb70 jdk9-b18 diff -r aade36e70da0 -r e2bf17cee34b jdk/THIRD_PARTY_README --- a/jdk/THIRD_PARTY_README Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/THIRD_PARTY_README Wed Jun 18 13:14:15 2014 -0700 @@ -1471,7 +1471,7 @@ version 2.0. The NSS libraries are supplied in executable form, built from unmodified -NSS source code labeled with the "NSS_3.13.1_RTM" release tag. +NSS source code labeled with the "NSS_3_16_RTM" HG tag. The NSS source code is available in the OpenJDK source code repository at: jdk/test/sun/security/pkcs11/nss/src diff -r aade36e70da0 -r e2bf17cee34b jdk/make/CompileDemos.gmk --- a/jdk/make/CompileDemos.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/CompileDemos.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -1,6 +1,5 @@ - # -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -320,7 +319,6 @@ endif $(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \ - -I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \ $(BUILD_LIBHPROF_AIX_EXTRA_CFLAGS), C, \ -ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread, $(BUILD_LIBHPROF_AIX_EXTRA_SRC))) diff -r aade36e70da0 -r e2bf17cee34b jdk/make/CreateJars.gmk --- a/jdk/make/CreateJars.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/CreateJars.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -676,15 +676,6 @@ ########################################################################################## -# -# This is an empty jar (only contains manifest) and fits poorly into framework... -# create simple rule instead -# -$(IMAGES_OUTPUTDIR)/lib/management-agent.jar: $(JDK_TOPDIR)/src/share/classes/sun/management/manifest - $(JAR) cfm $@ $< - -########################################################################################## - # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that # all jars can be found in one place when creating images in Images.gmk. It needs to be # done here so that clean targets can be simple and accurate. diff -r aade36e70da0 -r e2bf17cee34b jdk/make/lib/Awt2dLibraries.gmk --- a/jdk/make/lib/Awt2dLibraries.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/lib/Awt2dLibraries.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -319,7 +319,6 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) LIBAWT_FILES += awt_LoadLibrary.c - LIBAWT_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks endif ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc) @@ -484,7 +483,6 @@ LDFLAGS_SUFFIX_macosx := -lmlib_image -ljvm $(LIBM) \ -framework Cocoa \ -framework OpenGL \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \ -framework JavaRuntimeSupport \ -framework ApplicationServices \ @@ -1146,12 +1144,6 @@ -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \ $(foreach dir, $(LIBAWT_HEADLESS_DIRS), -I$(dir)) - ifeq ($(OPENJDK_TARGET_OS), macosx) - LIBAWT_HEADLESS_CFLAGS += \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks - endif - LIBAWT_HEADLESS_FILES := \ awt_Font.c \ HeadlessToolkit.c \ @@ -1252,8 +1244,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) LIBSPLASHSCREEN_CFLAGS := -I$(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen \ - $(LIBSPLASHSCREEN_CFLAGS) \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks + $(LIBSPLASHSCREEN_CFLAGS) LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp @@ -1283,7 +1274,6 @@ -framework ApplicationServices \ -framework Foundation \ -framework Cocoa \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation else ifeq ($(OPENJDK_TARGET_OS), windows) LIBSPLASHSCREEN_LDFLAGS_SUFFIX += kernel32.lib user32.lib gdi32.lib delayimp.lib -DELAYLOAD:user32.dll @@ -1468,9 +1458,7 @@ -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils \ -I$(JDK_TOPDIR)/src/share/native/sun/java2d/loops \ -I$(JDK_TOPDIR)/src/share/native/sun/java2d/pipe \ - -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ + -I$(JDK_TOPDIR)/src/share/native/sun/awt/debug, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \ @@ -1481,7 +1469,6 @@ -framework Cocoa \ -framework Security \ -framework ExceptionHandling \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \ -framework JavaRuntimeSupport \ -framework OpenGL \ @@ -1514,8 +1501,7 @@ CFLAGS := $(CFLAGS_JDKLIB) \ -I$(JDK_TOPDIR)/src/macosx/native/com/apple/laf \ -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \ - -I$(JDK_TOPDIR)/src/macosx/native/sun/awt \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \ + -I$(JDK_TOPDIR)/src/macosx/native/sun/awt, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN) \ -Xlinker -rpath -Xlinker @loader_path, \ @@ -1523,7 +1509,6 @@ -framework Cocoa \ -framework Carbon \ -framework ApplicationServices \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \ -framework JavaRuntimeSupport \ -ljava -ljvm, \ diff -r aade36e70da0 -r e2bf17cee34b jdk/make/lib/CoreLibraries.gmk --- a/jdk/make/lib/CoreLibraries.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/lib/CoreLibraries.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -306,7 +306,7 @@ LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \ LDFLAGS_SUFFIX_aix := -ljvm -ljava, \ LDFLAGS_SUFFIX_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \ - LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation, \ + LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation -framework Foundation, \ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=prefs.dll" \ @@ -526,30 +526,3 @@ BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a endif - -########################################################################################## - -$(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \ - LIBRARY := npt, \ - OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ - SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \ - LANG := C, \ - OPTIMIZATION := LOW, \ - CFLAGS := $(CFLAGS_JDKLIB) \ - -I$(JDK_TOPDIR)/src/share/npt \ - -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \ - MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnpt/mapfile-vers, \ - LDFLAGS := $(LDFLAGS_JDKLIB) \ - $(call SET_SHARED_LIBRARY_ORIGIN), \ - LDFLAGS_macosx := -liconv, \ - LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \ - LDFLAGS_SUFFIX_solaris := -lc, \ - VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ - RC_FLAGS := $(RC_FLAGS) \ - -D "JDK_FNAME=npt.dll" \ - -D "JDK_INTERNAL_NAME=npt" \ - -D "JDK_FTYPE=0x2L", \ - OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnpt, \ - DEBUG_SYMBOLS := true)) - -BUILD_LIBRARIES += $(BUILD_LIBNPT) diff -r aade36e70da0 -r e2bf17cee34b jdk/make/lib/PlatformLibraries.gmk --- a/jdk/make/lib/PlatformLibraries.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/lib/PlatformLibraries.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -32,14 +32,11 @@ LANG := C, \ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) \ - -I$(JDK_TOPDIR)/src/macosx/native/apple/applescript \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ + -I$(JDK_TOPDIR)/src/macosx/native/apple/applescript, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX := -framework Cocoa \ -framework Carbon \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \ $(LDFLAGS_JDKLIB_SUFFIX), \ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \ @@ -63,9 +60,7 @@ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) \ -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \ - -I$(JDK_OUTPUTDIR)/gensrc_headers_icons \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ + -I$(JDK_OUTPUTDIR)/gensrc_headers_icons, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX_macosx := \ @@ -76,7 +71,6 @@ -framework Cocoa \ -framework Security \ -framework ExceptionHandling \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \ -framework JavaRuntimeSupport \ -framework OpenGL \ @@ -107,16 +101,13 @@ OPTIMIZATION := LOW, \ CFLAGS := $(CFLAGS_JDKLIB) \ $(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \ - -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ - -F/System/Library/Frameworks/ApplicationServices.framework/Frameworks, \ + -I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX_macosx := \ -losxapp \ -framework Cocoa \ -framework ApplicationServices \ - -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ -framework JavaNativeFoundation \ -framework JavaRuntimeSupport \ -framework Security \ diff -r aade36e70da0 -r e2bf17cee34b jdk/make/lib/SecurityLibraries.gmk --- a/jdk/make/lib/SecurityLibraries.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/lib/SecurityLibraries.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -130,7 +130,7 @@ BUILD_LIBKRB5_NAME := osxkrb5 BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5 \ $(JDK_TOPDIR)/src/macosx/native/sun/security/krb5 - BUILD_LIBKRB5_LIBS := -F/System/Library/Frameworks/JavaVM.framework/Frameworks \ + BUILD_LIBKRB5_LIBS := \ -framework JavaNativeFoundation \ -framework Cocoa \ -framework SystemConfiguration \ @@ -147,7 +147,6 @@ CFLAGS := $(CFLAGS_JDKLIB) \ -I$(JDK_TOPDIR)/src/share/native/sun/security/krb5, \ CFLAGS_windows := -I$(JDK_TOPDIR)/src/windows/native/sun/security/krb5, \ - CFLAGS_macosx := -F/System/Library/Frameworks/JavaVM.framework/Frameworks, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \ diff -r aade36e70da0 -r e2bf17cee34b jdk/make/lib/ServiceabilityLibraries.gmk --- a/jdk/make/lib/ServiceabilityLibraries.gmk Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/lib/ServiceabilityLibraries.gmk Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -147,8 +147,6 @@ CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \ -I$(JDK_TOPDIR)/src/share/transport/export \ -I$(JDK_TOPDIR)/src/share/back/export \ - -I$(JDK_TOPDIR)/src/share/npt \ - -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \ -I$(JDK_TOPDIR)/src/share/back \ -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \ -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \ @@ -158,6 +156,7 @@ LDFLAGS_SUFFIX_linux := $(LIBDL), \ LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \ LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \ + LDFLAGS_SUFFIX_macosx := -liconv, \ VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \ RC_FLAGS := $(RC_FLAGS) \ -D "JDK_FNAME=jdwp.dll" \ @@ -340,8 +339,6 @@ BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \ - -I$(JDK_TOPDIR)/src/share/npt \ - -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \ -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo ifeq ($(OPENJDK_TARGET_OS), aix) diff -r aade36e70da0 -r e2bf17cee34b jdk/make/mapfiles/libnpt/mapfile-vers --- a/jdk/make/mapfiles/libnpt/mapfile-vers Wed Jun 11 10:53:27 2014 +0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# -# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. Oracle designates this -# particular file as subject to the "Classpath" exception as provided -# by Oracle in the LICENSE file that accompanied this code. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - nptInitialize; - nptTerminate; - local: - *; -}; diff -r aade36e70da0 -r e2bf17cee34b jdk/make/profile-includes.txt --- a/jdk/make/profile-includes.txt Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/profile-includes.txt Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -127,12 +127,9 @@ $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt.diz \ $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) \ $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \ - $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \ - $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \ $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)prefs$(SHARED_LIBRARY_SUFFIX) \ $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \ jvm.hprof.txt \ - management-agent.jar \ management/jmxremote.access \ management/jmxremote.password.template \ management/management.properties \ @@ -140,8 +137,7 @@ PROFILE_3_JRE_OTHER_FILES := -PROFILE_3_JRE_JAR_FILES := \ - management-agent.jar +PROFILE_3_JRE_JAR_FILES := FULL_JRE_BIN_FILES := \ diff -r aade36e70da0 -r e2bf17cee34b jdk/make/src/classes/build/tools/buildmetaindex/BuildMetaIndex.java --- a/jdk/make/src/classes/build/tools/buildmetaindex/BuildMetaIndex.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/make/src/classes/build/tools/buildmetaindex/BuildMetaIndex.java Wed Jun 18 13:14:15 2014 -0700 @@ -53,7 +53,6 @@ com/sun/net/ javax/ com/sun/security/ -# management-agent.jar ! rt.jar org/w3c/ com/sun/image/ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java --- a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Wed Jun 18 13:14:15 2014 -0700 @@ -523,7 +523,7 @@ * that is used for menu shortcuts on this toolkit. * @see java.awt.MenuBar * @see java.awt.MenuShortcut - * @since JDK1.1 + * @since 1.1 */ @Override public int getMenuShortcutKeyMask() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/debugInit.c --- a/jdk/src/share/back/debugInit.c Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/back/debugInit.c Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -202,8 +202,6 @@ jint jvmtiCompileTimeMajorVersion; jint jvmtiCompileTimeMinorVersion; jint jvmtiCompileTimeMicroVersion; - char *boot_path = NULL; - char npt_lib[MAXPATHLEN]; /* See if it's already loaded */ if ( gdata!=NULL && gdata->isLoaded==JNI_TRUE ) { @@ -268,24 +266,6 @@ forceExit(1); /* Kill entire process, no core dump wanted */ } - JVMTI_FUNC_PTR(gdata->jvmti, GetSystemProperty) - (gdata->jvmti, (const char *)"sun.boot.library.path", - &boot_path); - - dbgsysBuildLibName(npt_lib, sizeof(npt_lib), boot_path, NPT_LIBNAME); - /* Npt and Utf function init */ - NPT_INITIALIZE(npt_lib, &(gdata->npt), NPT_VERSION, NULL); - jvmtiDeallocate(boot_path); - if (gdata->npt == NULL) { - ERROR_MESSAGE(("JDWP: unable to initialize NPT library")); - return JNI_ERR; - } - gdata->npt->utf = (gdata->npt->utfInitialize)(NULL); - if (gdata->npt->utf == NULL) { - ERROR_MESSAGE(("JDWP: UTF function initialization failed")); - return JNI_ERR; - } - /* Parse input options */ if (!parseOptions(options)) { /* No message necessary, should have been printed out already */ @@ -1307,22 +1287,26 @@ if ( error != JVMTI_ERROR_NONE ) { exit_code = 1; if ( docoredump ) { + LOG_MISC(("Dumping core as requested by command line")); finish_logging(exit_code); abort(); } } + if ( msg==NULL ) { msg = ""; } LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg)); - gdata->vmDead = JNI_TRUE; + if (gdata != NULL) { + gdata->vmDead = JNI_TRUE; - /* Let's try and cleanup the JVMTI, if we even have one */ - if ( gdata->jvmti != NULL ) { - /* Dispose of jvmti (gdata->jvmti becomes NULL) */ - disposeEnvironment(gdata->jvmti); + /* Let's try and cleanup the JVMTI, if we even have one */ + if ( gdata->jvmti != NULL ) { + /* Dispose of jvmti (gdata->jvmti becomes NULL) */ + disposeEnvironment(gdata->jvmti); + } } /* Finish up logging. We reach here if JDWP is doing the exiting. */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/error_messages.c --- a/jdk/src/share/back/error_messages.c Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/back/error_messages.c Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,7 @@ #include #include "util.h" +#include "utf_util.h" #include "proc_md.h" /* Maximim length of a message */ @@ -70,13 +71,8 @@ len = (int)strlen((char*)utf8buf); /* Convert to platform encoding (ignore errors, dangerous area) */ - if (gdata->npt != NULL) { - (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf, - utf8buf, len, pbuf, MAX_MESSAGE_LEN); - } else { - /* May be called before NPT is initialized so don't fault */ - strncpy(pbuf, (char*)utf8buf, len); - } + (void)utf8ToPlatform(utf8buf, len, pbuf, MAX_MESSAGE_LEN); + (void)fprintf(fp, "%s%s%s", prefix, pbuf, suffix); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/inStream.c --- a/jdk/src/share/back/inStream.c Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/back/inStream.c Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -24,6 +24,7 @@ */ #include "util.h" +#include "utf_util.h" #include "stream.h" #include "inStream.h" #include "transport.h" @@ -379,15 +380,12 @@ string[length] = '\0'; /* This is Standard UTF-8, convert to Modified UTF-8 if necessary */ - new_length = (gdata->npt->utf8sToUtf8mLength) - (gdata->npt->utf, (jbyte*)string, length); + new_length = utf8sToUtf8mLength((jbyte*)string, length); if ( new_length != length ) { char *new_string; new_string = jvmtiAllocate(new_length+1); - (gdata->npt->utf8sToUtf8m) - (gdata->npt->utf, (jbyte*)string, length, - (jbyte*)new_string, new_length); + utf8sToUtf8m((jbyte*)string, length, (jbyte*)new_string, new_length); jvmtiDeallocate(string); return new_string; } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/outStream.c --- a/jdk/src/share/back/outStream.c Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/back/outStream.c Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -24,6 +24,7 @@ */ #include "util.h" +#include "utf_util.h" #include "stream.h" #include "outStream.h" #include "inStream.h" @@ -307,8 +308,7 @@ } else { jint new_length; - new_length = (gdata->npt->utf8mToUtf8sLength) - (gdata->npt->utf, (jbyte*)string, length); + new_length = utf8mToUtf8sLength((jbyte*)string, length); if ( new_length == length ) { (void)outStream_writeInt(stream, length); error = writeBytes(stream, (jbyte *)string, length); @@ -316,9 +316,7 @@ char *new_string; new_string = jvmtiAllocate(new_length+1); - (gdata->npt->utf8mToUtf8s) - (gdata->npt->utf, (jbyte*)string, length, - (jbyte*)new_string, new_length); + utf8mToUtf8s((jbyte*)string, length, (jbyte*)new_string, new_length); (void)outStream_writeInt(stream, new_length); error = writeBytes(stream, (jbyte *)new_string, new_length); jvmtiDeallocate(new_string); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/transport.c --- a/jdk/src/share/back/transport.c Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/back/transport.c Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -24,6 +24,7 @@ */ #include "util.h" +#include "utf_util.h" #include "transport.h" #include "debugLoop.h" #include "sys.h" @@ -65,8 +66,7 @@ len = (int)strlen(msg); maxlen = len+len/2+2; /* Should allow for plenty of room */ utf8msg = (jbyte*)jvmtiAllocate(maxlen+1); - (void)(gdata->npt->utf8FromPlatform)(gdata->npt->utf, - msg, len, utf8msg, maxlen); + (void)utf8FromPlatform(msg, len, utf8msg, maxlen); utf8msg[maxlen] = 0; } if (rv == JDWPTRANSPORT_ERROR_NONE) { @@ -110,8 +110,7 @@ int len; len = (int)strlen(libdir); - (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf, - (jbyte*)libdir, len, buf, (int)sizeof(buf)); + (void)utf8ToPlatform((jbyte*)libdir, len, buf, (int)sizeof(buf)); plibdir = buf; } @@ -392,8 +391,7 @@ /* Convert commandLine from UTF-8 to platform encoding */ len = (int)strlen(commandLine); buf = jvmtiAllocate(len*3+3); - (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf, - (jbyte*)commandLine, len, buf, len*3+3); + (void)utf8ToPlatform((jbyte*)commandLine, len, buf, len*3+3); /* Exec commandLine */ rc = dbgsysExec(buf); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/utf_util.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/back/utf_util.c Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,540 @@ +/* + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include +#include + +#include "jni.h" + +#include "utf_util.h" + + +/* Error and assert macros */ +#define UTF_ERROR(m) utfError(__FILE__, __LINE__, m) +#define UTF_ASSERT(x) ( (x)==0 ? UTF_ERROR("ASSERT ERROR " #x) : (void)0 ) + +// Platform independed part + +static void utfError(char *file, int line, char *message) { + (void)fprintf(stderr, "UTF ERROR [\"%s\":%d]: %s\n", file, line, message); + abort(); +} + +/* Determine length of this Standard UTF-8 in Modified UTF-8. + * Validation is done of the basic UTF encoding rules, returns + * length (no change) when errors are detected in the UTF encoding. + * + * Note: Accepts Modified UTF-8 also, no verification on the + * correctness of Standard UTF-8 is done. e,g, 0xC080 input is ok. + */ +int JNICALL utf8sToUtf8mLength(jbyte *string, int length) { + int newLength; + int i; + + newLength = 0; + for ( i = 0 ; i < length ; i++ ) { + unsigned byte; + + byte = (unsigned char)string[i]; + if ( (byte & 0x80) == 0 ) { /* 1byte encoding */ + newLength++; + if ( byte == 0 ) { + newLength++; /* We gain one byte in length on NULL bytes */ + } + } else if ( (byte & 0xE0) == 0xC0 ) { /* 2byte encoding */ + /* Check encoding of following bytes */ + if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) { + break; /* Error condition */ + } + i++; /* Skip next byte */ + newLength += 2; + } else if ( (byte & 0xF0) == 0xE0 ) { /* 3byte encoding */ + /* Check encoding of following bytes */ + if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80 + || (string[i+2] & 0xC0) != 0x80 ) { + break; /* Error condition */ + } + i += 2; /* Skip next two bytes */ + newLength += 3; + } else if ( (byte & 0xF8) == 0xF0 ) { /* 4byte encoding */ + /* Check encoding of following bytes */ + if ( (i+3) >= length || (string[i+1] & 0xC0) != 0x80 + || (string[i+2] & 0xC0) != 0x80 + || (string[i+3] & 0xC0) != 0x80 ) { + break; /* Error condition */ + } + i += 3; /* Skip next 3 bytes */ + newLength += 6; /* 4byte encoding turns into 2 3byte ones */ + } else { + break; /* Error condition */ + } + } + if ( i != length ) { + /* Error in finding new length, return old length so no conversion */ + /* FIXUP: ERROR_MESSAGE? */ + return length; + } + return newLength; +} + +/* Convert Standard UTF-8 to Modified UTF-8. + * Assumes the UTF-8 encoding was validated by utf8mLength() above. + * + * Note: Accepts Modified UTF-8 also, no verification on the + * correctness of Standard UTF-8 is done. e,g, 0xC080 input is ok. + */ +void JNICALL utf8sToUtf8m(jbyte *string, int length, jbyte *newString, int newLength) { + int i; + int j; + + j = 0; + for ( i = 0 ; i < length ; i++ ) { + unsigned byte1; + + byte1 = (unsigned char)string[i]; + + /* NULL bytes and bytes starting with 11110xxx are special */ + if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */ + if ( byte1 == 0 ) { + /* Bits out: 11000000 10000000 */ + newString[j++] = (jbyte)0xC0; + newString[j++] = (jbyte)0x80; + } else { + /* Single byte */ + newString[j++] = byte1; + } + } else if ( (byte1 & 0xE0) == 0xC0 ) { /* 2byte encoding */ + newString[j++] = byte1; + newString[j++] = string[++i]; + } else if ( (byte1 & 0xF0) == 0xE0 ) { /* 3byte encoding */ + newString[j++] = byte1; + newString[j++] = string[++i]; + newString[j++] = string[++i]; + } else if ( (byte1 & 0xF8) == 0xF0 ) { /* 4byte encoding */ + /* Beginning of 4byte encoding, turn into 2 3byte encodings */ + unsigned byte2, byte3, byte4, u21; + + /* Bits in: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ + byte2 = (unsigned char)string[++i]; + byte3 = (unsigned char)string[++i]; + byte4 = (unsigned char)string[++i]; + /* Reconstruct full 21bit value */ + u21 = (byte1 & 0x07) << 18; + u21 += (byte2 & 0x3F) << 12; + u21 += (byte3 & 0x3F) << 6; + u21 += (byte4 & 0x3F); + /* Bits out: 11101101 1010xxxx 10xxxxxx */ + newString[j++] = (jbyte)0xED; + newString[j++] = (jbyte)(0xA0 + (((u21 >> 16) - 1) & 0x0F)); + newString[j++] = (jbyte)(0x80 + ((u21 >> 10) & 0x3F)); + /* Bits out: 11101101 1011xxxx 10xxxxxx */ + newString[j++] = (jbyte)0xED; + newString[j++] = (jbyte)(0xB0 + ((u21 >> 6) & 0x0F)); + newString[j++] = byte4; + } + } + UTF_ASSERT(i==length); + UTF_ASSERT(j==newLength); + newString[j] = (jbyte)0; +} + +/* Given a Modified UTF-8 string, calculate the Standard UTF-8 length. + * Basic validation of the UTF encoding rules is done, and length is + * returned (no change) when errors are detected. + * + * Note: No validation is made that this is indeed Modified UTF-8 coming in. + * + */ +int JNICALL utf8mToUtf8sLength(jbyte *string, int length) { + int newLength; + int i; + + newLength = 0; + for ( i = 0 ; i < length ; i++ ) { + unsigned byte1, byte2, byte3, byte4, byte5, byte6; + + byte1 = (unsigned char)string[i]; + if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */ + newLength++; + } else if ( (byte1 & 0xE0) == 0xC0 ) { /* 2byte encoding */ + /* Check encoding of following bytes */ + if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) { + break; /* Error condition */ + } + byte2 = (unsigned char)string[++i]; + if ( byte1 != 0xC0 || byte2 != 0x80 ) { + newLength += 2; /* Normal 2byte encoding, not 0xC080 */ + } else { + newLength++; /* We will turn 0xC080 into 0 */ + } + } else if ( (byte1 & 0xF0) == 0xE0 ) { /* 3byte encoding */ + /* Check encoding of following bytes */ + if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80 + || (string[i+2] & 0xC0) != 0x80 ) { + break; /* Error condition */ + } + byte2 = (unsigned char)string[++i]; + byte3 = (unsigned char)string[++i]; + newLength += 3; + /* Possible process a second 3byte encoding */ + if ( (i+3) < length && byte1 == 0xED && (byte2 & 0xF0) == 0xA0 ) { + /* See if this is a pair of 3byte encodings */ + byte4 = (unsigned char)string[i+1]; + byte5 = (unsigned char)string[i+2]; + byte6 = (unsigned char)string[i+3]; + if ( byte4 == 0xED && (byte5 & 0xF0) == 0xB0 ) { + /* Check encoding of 3rd byte */ + if ( (byte6 & 0xC0) != 0x80 ) { + break; /* Error condition */ + } + newLength++; /* New string will have 4byte encoding */ + i += 3; /* Skip next 3 bytes */ + } + } + } else { + break; /* Error condition */ + } + } + if ( i != length ) { + /* Error in UTF encoding */ + /* FIXUP: ERROR_MESSAGE()? */ + return length; + } + return newLength; +} + +/* Convert a Modified UTF-8 string into a Standard UTF-8 string + * It is assumed that this string has been validated in terms of the + * basic UTF encoding rules by utf8Length() above. + * + * Note: No validation is made that this is indeed Modified UTF-8 coming in. + * + */ +void JNICALL utf8mToUtf8s(jbyte *string, int length, jbyte *newString, int newLength) { + int i; + int j; + + j = 0; + for ( i = 0 ; i < length ; i++ ) { + unsigned byte1, byte2, byte3, byte4, byte5, byte6; + + byte1 = (unsigned char)string[i]; + if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */ + /* Single byte */ + newString[j++] = byte1; + } else if ( (byte1 & 0xE0) == 0xC0 ) { /* 2byte encoding */ + byte2 = (unsigned char)string[++i]; + if ( byte1 != 0xC0 || byte2 != 0x80 ) { + newString[j++] = byte1; + newString[j++] = byte2; + } else { + newString[j++] = 0; + } + } else if ( (byte1 & 0xF0) == 0xE0 ) { /* 3byte encoding */ + byte2 = (unsigned char)string[++i]; + byte3 = (unsigned char)string[++i]; + if ( i+3 < length && byte1 == 0xED && (byte2 & 0xF0) == 0xA0 ) { + /* See if this is a pair of 3byte encodings */ + byte4 = (unsigned char)string[i+1]; + byte5 = (unsigned char)string[i+2]; + byte6 = (unsigned char)string[i+3]; + if ( byte4 == 0xED && (byte5 & 0xF0) == 0xB0 ) { + unsigned u21; + + /* Bits in: 11101101 1010xxxx 10xxxxxx */ + /* Bits in: 11101101 1011xxxx 10xxxxxx */ + i += 3; + + /* Reconstruct 21 bit code */ + u21 = ((byte2 & 0x0F) + 1) << 16; + u21 += (byte3 & 0x3F) << 10; + u21 += (byte5 & 0x0F) << 6; + u21 += (byte6 & 0x3F); + + /* Bits out: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ + + /* Convert to 4byte encoding */ + newString[j++] = 0xF0 + ((u21 >> 18) & 0x07); + newString[j++] = 0x80 + ((u21 >> 12) & 0x3F); + newString[j++] = 0x80 + ((u21 >> 6) & 0x3F); + newString[j++] = 0x80 + (u21 & 0x3F); + continue; + } + } + /* Normal 3byte encoding */ + newString[j++] = byte1; + newString[j++] = byte2; + newString[j++] = byte3; + } + } + UTF_ASSERT(i==length); + UTF_ASSERT(j==newLength); + newString[j] = 0; +} + +#ifdef _WIN32 +// Microsoft Windows specific part + +#include + +static UINT getCodepage() { + LANGID langID; + LCID localeID; + TCHAR strCodePage[7]; // ANSI code page id + + static UINT intCodePage = -1; + + if (intCodePage == -1) { + // Firts call, get codepage from the os + langID = LANGIDFROMLCID(GetUserDefaultLCID()); + localeID = MAKELCID(langID, SORT_DEFAULT); + if (GetLocaleInfo(localeID, LOCALE_IDEFAULTANSICODEPAGE, + strCodePage, sizeof(strCodePage)/sizeof(TCHAR)) > 0 ) { + intCodePage = atoi(strCodePage); + } + else { + intCodePage = GetACP(); + } + } + + return intCodePage; +} + +/* + * Get wide string (assumes len>0) + */ +static WCHAR* getWideString(UINT codePage, char* str, int len, int *pwlen) { + int wlen; + WCHAR* wstr; + + /* Convert the string to WIDE string */ + wlen = MultiByteToWideChar(codePage, 0, str, len, NULL, 0); + *pwlen = wlen; + if (wlen <= 0) { + UTF_ERROR(("Can't get WIDE string length")); + return NULL; + } + wstr = (WCHAR*)malloc(wlen * sizeof(WCHAR)); + if (wstr == NULL) { + UTF_ERROR(("Can't malloc() any space")); + return NULL; + } + if (MultiByteToWideChar(codePage, 0, str, len, wstr, wlen) == 0) { + UTF_ERROR(("Can't get WIDE string")); + return NULL; + } + return wstr; +} + +/* + * Convert UTF-8 to a platform string + */ +int JNICALL utf8ToPlatform(jbyte *utf8, int len, char* output, int outputMaxLen) { + int wlen; + int plen; + WCHAR* wstr; + UINT codepage; + + UTF_ASSERT(utf8); + UTF_ASSERT(output); + UTF_ASSERT(outputMaxLen > len); + + /* Zero length is ok, but we don't need to do much */ + if ( len == 0 ) { + output[0] = 0; + return 0; + } + + /* Get WIDE string version (assumes len>0) */ + wstr = getWideString(CP_UTF8, (char*)utf8, len, &wlen); + if ( wstr == NULL ) { + // Can't allocate WIDE string + goto just_copy_bytes; + } + + /* Convert WIDE string to MultiByte string */ + codepage = getCodepage(); + plen = WideCharToMultiByte(codepage, 0, wstr, wlen, + output, outputMaxLen, NULL, NULL); + free(wstr); + if (plen <= 0) { + // Can't convert WIDE string to multi-byte + goto just_copy_bytes; + } + output[plen] = '\0'; + return plen; + +just_copy_bytes: + (void)memcpy(output, utf8, len); + output[len] = 0; + return len; +} + +/* + * Convert Platform Encoding to UTF-8. + */ +int JNICALL utf8FromPlatform(char *str, int len, jbyte *output, int outputMaxLen) { + int wlen; + int plen; + WCHAR* wstr; + UINT codepage; + + UTF_ASSERT(str); + UTF_ASSERT(output); + UTF_ASSERT(outputMaxLen > len); + + /* Zero length is ok, but we don't need to do much */ + if ( len == 0 ) { + output[0] = 0; + return 0; + } + + /* Get WIDE string version (assumes len>0) */ + codepage = getCodepage(); + wstr = getWideString(codepage, str, len, &wlen); + if ( wstr == NULL ) { + goto just_copy_bytes; + } + + /* Convert WIDE string to UTF-8 string */ + plen = WideCharToMultiByte(CP_UTF8, 0, wstr, wlen, + (char*)output, outputMaxLen, NULL, NULL); + free(wstr); + if (plen <= 0) { + UTF_ERROR(("Can't convert WIDE string to multi-byte")); + goto just_copy_bytes; + } + output[plen] = '\0'; + return plen; + +just_copy_bytes: + (void)memcpy(output, str, len); + output[len] = 0; + return len; +} + + +#else +// *NIX specific part + +#include +#include +#include +#include + +typedef enum {TO_UTF8, FROM_UTF8} conv_direction; + +/* + * Do iconv() conversion. + * Returns length or -1 if output overflows. + */ +static int iconvConvert(conv_direction drn, char *bytes, size_t len, char *output, size_t outputMaxLen) { + + static char *codeset = 0; + iconv_t func; + size_t bytes_converted; + size_t inLeft, outLeft; + char *inbuf, *outbuf; + + UTF_ASSERT(bytes); + UTF_ASSERT(output); + UTF_ASSERT(outputMaxLen > len); + + /* Zero length is ok, but we don't need to do much */ + if ( len == 0 ) { + output[0] = 0; + return 0; + } + + if (codeset == NULL && codeset != (char *) -1) { + // locale is not initialized, do it now + if (setlocale(LC_ALL, "") != NULL) { + // nl_langinfo returns ANSI_X3.4-1968 by default + codeset = (char*)nl_langinfo(CODESET); + } + + if (codeset == NULL) { + // Not able to intialize process locale from platform one. + codeset = (char *) -1; + } + } + + if (codeset == (char *) -1) { + // There was an error during initialization, so just bail out + goto just_copy_bytes; + } + + func = (drn == TO_UTF8) ? iconv_open(codeset, "UTF-8") : iconv_open("UTF-8", codeset); + if (func == (iconv_t) -1) { + // Requested charset combination is not supported, conversion couldn't be done. + // make sure we will not try it again + codeset = (char *) -1; + goto just_copy_bytes; + } + + // perform conversion + inbuf = bytes; + outbuf = output; + inLeft = len; + outLeft = outputMaxLen; + + bytes_converted = iconv(func, (void*)&inbuf, &inLeft, &outbuf, &outLeft); + if (bytes_converted == (size_t) -1 || bytes_converted == 0 || inLeft != 0) { + // Input string is invalid, not able to convert entire string + // or some other iconv error happens. + iconv_close(func); + goto just_copy_bytes; + } + + iconv_close(func); + // Overwrite bytes_converted with value of actually stored bytes + bytes_converted = outputMaxLen-outLeft; + output[bytes_converted] = 0; + return bytes_converted; + + +just_copy_bytes: + (void)memcpy(output, bytes, len); + output[len] = 0; + return len; + } + +/* + * Convert UTF-8 to Platform Encoding. + * Returns length or -1 if output overflows. + */ +int JNICALL utf8ToPlatform(jbyte *utf8, int len, char *output, int outputMaxLen) { + return iconvConvert(FROM_UTF8, (char*)utf8, len, output, outputMaxLen); +} + +/* + * Convert Platform Encoding to UTF-8. + * Returns length or -1 if output overflows. + */ +int JNICALL utf8FromPlatform(char *str, int len, jbyte *output, int outputMaxLen) { + return iconvConvert(TO_UTF8, str, len, (char*) output, outputMaxLen); +} + +#endif diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/utf_util.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/back/utf_util.h Wed Jun 18 13:14:15 2014 -0700 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#ifndef _utf_util_h_ +#define _utf_util_h_ + +#include "jni.h" + + +int JNICALL utf8sToUtf8mLength(jbyte *string, int length); +void JNICALL utf8sToUtf8m(jbyte *string, int length, jbyte *newString, int newLength); +int JNICALL utf8mToUtf8sLength(jbyte *string, int length); +void JNICALL utf8mToUtf8s(jbyte *string, int length, jbyte *newString, int newLength); + +int JNICALL utf8ToPlatform(jbyte *utf8, int len, char* output, int outputMaxLen); +int JNICALL utf8FromPlatform(char *str, int len, jbyte *output, int outputMaxLen); + +#endif diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/back/util.h --- a/jdk/src/share/back/util.h Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/back/util.h Wed Jun 18 13:14:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -53,9 +53,6 @@ #include "error_messages.h" #include "debugInit.h" -/* Get access to Native Platform Toolkit functions */ -#include "npt.h" - /* Definition of a CommonRef tracked by the backend for the frontend */ typedef struct RefNode { jlong seqNum; /* ID of reference, also key for hash table */ @@ -123,9 +120,6 @@ unsigned log_flags; - /* The Native Platform Toolkit access */ - NptEnv *npt; - /* Common References static data */ jrawMonitorID refLock; jlong nextSeqNum; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java --- a/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -509,7 +509,7 @@ byte[] signature = new byte[6]; stream.readFully(signature); - StringBuffer version = new StringBuffer(3); + StringBuilder version = new StringBuilder(3); version.append((char)signature[3]); version.append((char)signature[4]); version.append((char)signature[5]); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java --- a/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java Wed Jun 18 13:14:15 2014 -0700 @@ -900,7 +900,7 @@ if (times == 1) { return s; } - StringBuffer sb = new StringBuffer((s.length() + 1)*times - 1); + StringBuilder sb = new StringBuilder((s.length() + 1)*times - 1); sb.append(s); for (int i = 1; i < times; i++) { sb.append(" "); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java Wed Jun 18 13:14:15 2014 -0700 @@ -169,23 +169,23 @@ result.add(typedInName); } - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); len = result.size(); // construct the resulting string for (int i=0; i 0) { - buf.append(" "); + sb.append(" "); } if (len > 1) { - buf.append("\""); + sb.append("\""); } - buf.append(result.get(i)); + sb.append(result.get(i)); if (len > 1) { - buf.append("\""); + sb.append("\""); } } - return buf.toString(); + return sb.toString(); } public void setFileName(String fileName) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java Wed Jun 18 13:14:15 2014 -0700 @@ -533,13 +533,13 @@ // Pending: verify character encoding spec for gconf Reader reader = new InputStreamReader(url.openStream(), "ISO-8859-1"); char[] buf = new char[1024]; - StringBuffer strBuf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int n; while ((n = reader.read(buf)) >= 0) { - strBuf.append(buf, 0, n); + sb.append(buf, 0, n); } reader.close(); - String str = strBuf.toString(); + String str = sb.toString(); if (str != null) { String strLowerCase = str.toLowerCase(); int i = strLowerCase.indexOf(" 0) { - buf.append(" "); + sb.append(" "); } if (files.length > 1) { - buf.append("\""); + sb.append("\""); } - buf.append(fileNameString(files[i])); + sb.append(fileNameString(files[i])); if (files.length > 1) { - buf.append("\""); + sb.append("\""); } } - return buf.toString(); + return sb.toString(); } public MotifFileChooserUI(JFileChooser filechooser) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java --- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java Wed Jun 18 13:14:15 2014 -0700 @@ -690,7 +690,7 @@ } private String fileNameString(File[] files) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (int i = 0; files != null && i < files.length; i++) { if (i > 0) { buf.append(" "); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java --- a/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java Wed Jun 18 13:14:15 2014 -0700 @@ -628,7 +628,7 @@ } if (metaCoding.length > 0 && (verbose > 2 || verbose > 1 && metaCoding.length > 1)) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < metaCoding.length; i++) { if (i == 1) sb.append(" /"); sb.append(" ").append(metaCoding[i] & 0xFF); @@ -756,7 +756,7 @@ " size="+outputSize()+ irr+" coding="+bandCoding); if (metaCoding != noMetaCoding) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < metaCoding.length; i++) { if (i == 1) sb.append(" /"); sb.append(" ").append(metaCoding[i] & 0xFF); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java --- a/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java Wed Jun 18 13:14:15 2014 -0700 @@ -839,7 +839,7 @@ return parts; } - /** @since JDK 7, JSR 292 */ + /** @since 1.7, JSR 292 */ public static class MethodHandleEntry extends Entry { final int refKind; @@ -889,7 +889,7 @@ } } - /** @since JDK 7, JSR 292 */ + /** @since 1.7, JSR 292 */ public static class MethodTypeEntry extends Entry { final SignatureEntry typeRef; @@ -924,7 +924,7 @@ } } - /** @since JDK 7, JSR 292 */ + /** @since 1.7, JSR 292 */ public static class InvokeDynamicEntry extends Entry { final BootstrapMethodEntry bssRef; @@ -977,7 +977,7 @@ } } - /** @since JDK 7, JSR 292 */ + /** @since 1.7, JSR 292 */ public static class BootstrapMethodEntry extends Entry { final MethodHandleEntry bsmRef; @@ -1026,7 +1026,7 @@ } static String stringValueOf(MethodHandleEntry bsmRef, Entry[] argRefs) { - StringBuffer sb = new StringBuffer(bsmRef.stringValue()); + StringBuilder sb = new StringBuilder(bsmRef.stringValue()); // Arguments are formatted as "" instead of "[foo,bar,baz]". // This ensures there will be no confusion if "[,]" appear inside of names. char nextSep = '<'; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/java/util/jar/pack/package.html --- a/jdk/src/share/classes/com/sun/java/util/jar/pack/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -97,7 +97,7 @@
    • -@since JDK1.5.0
    • +@since 1.5
      diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java --- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java Wed Jun 18 13:14:15 2014 -0700 @@ -562,7 +562,7 @@ } if (readMethod != null) { ReflectUtil.checkPackageAccess(readMethod.getDeclaringClass()); - return MethodUtil.invoke(readMethod, complex, new Class[0]); + return MethodUtil.invoke(readMethod, complex, new Class[0]); } throw new AttributeNotFoundException( diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java --- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java Wed Jun 18 13:14:15 2014 -0700 @@ -757,7 +757,7 @@ } } - private static void ensureClassAccess(Class clazz) + private static void ensureClassAccess(Class clazz) throws IllegalAccessException { int mod = clazz.getModifiers(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java --- a/jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java Wed Jun 18 13:14:15 2014 -0700 @@ -58,7 +58,7 @@ private final AccessControlContext acc; - public ClientNotifForwarder(Map env) { + public ClientNotifForwarder(Map env) { this(null, env); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java --- a/jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/remote/security/MBeanServerFileAccessController.java Wed Jun 18 13:14:15 2014 -0700 @@ -310,10 +310,10 @@ } }); if (s == null) return; /* security has not been enabled */ - final Set principals = s.getPrincipals(); + final Set principals = s.getPrincipals(); String newPropertyValue = null; - for (Iterator i = principals.iterator(); i.hasNext(); ) { - final Principal p = (Principal) i.next(); + for (Iterator i = principals.iterator(); i.hasNext(); ) { + final Principal p = i.next(); Access access = accessMap.get(p.getName()); if (access != null) { boolean ok; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -63,12 +63,12 @@ if (SNMP_LOGGER.isLoggable(Level.FINEST)) { SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), "extractSubNet", "BINARY ARRAY :"); - StringBuffer buff = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for(int i =0; i < addrLength; i++) { - buff.append((b[i] &0xFF) +":"); + sb.append((b[i] & 0xFF) + ":"); } SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(), - "extractSubNet", buff.toString()); + "extractSubNet", sb.toString()); } // 8 is a byte size. Common to any InetAddress (V4 or V6). diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java Wed Jun 18 13:14:15 2014 -0700 @@ -170,7 +170,7 @@ * string literal. */ protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); + StringBuilder retval = new StringBuilder(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java Wed Jun 18 13:14:15 2014 -0700 @@ -186,8 +186,8 @@ public static String getDefaultAclFileName() { final String fileSeparator = System.getProperty("file.separator"); - final StringBuffer defaultAclName = - new StringBuffer(System.getProperty("java.home")). + final StringBuilder defaultAclName = + new StringBuilder(System.getProperty("java.home")). append(fileSeparator).append("lib").append(fileSeparator). append("snmp.acl"); return defaultAclName.toString(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java Wed Jun 18 13:14:15 2014 -0700 @@ -65,7 +65,7 @@ * equivalents in the given string */ protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); + StringBuilder retval = new StringBuilder(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/SnmpMessage.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/SnmpMessage.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/SnmpMessage.java Wed Jun 18 13:14:15 2014 -0700 @@ -347,7 +347,7 @@ * @return The string containing the dump. */ public String printMessage() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (community == null) { sb.append("Community: null") ; } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java Wed Jun 18 13:14:15 2014 -0700 @@ -181,22 +181,22 @@ * @return The string containing the dump. */ public static String dumpHexBuffer(byte [] b, int offset, int len) { - StringBuffer buf = new StringBuffer(len << 1) ; + StringBuilder sb = new StringBuilder(len << 1) ; int k = 1 ; int flen = offset + len ; for (int i = offset; i < flen ; i++) { int j = b[i] & 0xFF ; - buf.append(Character.forDigit((j >>> 4) , 16)) ; - buf.append(Character.forDigit((j & 0x0F), 16)) ; + sb.append(Character.forDigit((j >>> 4), 16)) ; + sb.append(Character.forDigit((j & 0x0F), 16)) ; k++ ; if (k%16 == 0) { - buf.append('\n') ; + sb.append('\n') ; k = 1 ; } else - buf.append(' ') ; + sb.append(' ') ; } - return buf.toString() ; + return sb.toString() ; } /** @@ -205,7 +205,7 @@ * @return The string containing the dump. */ public String printMessage() { - StringBuffer sb = new StringBuffer() ; + StringBuilder sb = new StringBuilder() ; sb.append("Version: ") ; sb.append(version) ; sb.append("\n") ; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java Wed Jun 18 13:14:15 2014 -0700 @@ -73,7 +73,7 @@ * @return The String representation of the value. */ public String toString() { - StringBuffer result = new StringBuffer() ; + StringBuilder result = new StringBuilder() ; for (int i = 0 ; i < value.length ; i++) { byte b = value[i] ; int n = (b >= 0) ? b : b + 256 ; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java Wed Jun 18 13:14:15 2014 -0700 @@ -478,7 +478,7 @@ * @return The string containing the dump. */ public String printMessage() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("msgId : " + msgId + "\n"); sb.append("msgMaxSize : " + msgMaxSize + "\n"); sb.append("msgFlags : " + msgFlags + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java --- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpRequestTree.java Wed Jun 18 13:14:15 2014 -0700 @@ -535,7 +535,7 @@ // Save old vectors SnmpOid[] olde = entryoids; - Vector[] oldl = entrylists; + Vector[] oldl = entrylists; boolean[] oldn = isentrynew; SnmpVarBind[] oldr = rowstatus; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java --- a/jdk/src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java Wed Jun 18 13:14:15 2014 -0700 @@ -96,7 +96,7 @@ * Used by CNCtx.getNameInNamespace(), CNCompoundName.toString(). */ static String cosNameToInsString(NameComponent[] cname) { - StringBuffer str = new StringBuffer(); + StringBuilder str = new StringBuilder(); for ( int i = 0; i < cname.length; i++) { if ( i > 0) { str.append(compSeparator); @@ -254,7 +254,7 @@ } private static String stringifyComponent(NameComponent comp) { - StringBuffer one = new StringBuffer(escape(comp.id)); + StringBuilder one = new StringBuilder(escape(comp.id)); if (comp.kind != null && !comp.kind.equals("")) { one.append(kindSeparator + escape(comp.kind)); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java --- a/jdk/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -198,14 +198,14 @@ } } - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < servers.length; i++) { if (i > 0) { - buf.append(' '); + sb.append(' '); } - buf.append("dns://").append(servers[i]).append(path); + sb.append("dns://").append(servers[i]).append(path); } - return buf.toString(); + return sb.toString(); } /* diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/dns/DnsName.java --- a/jdk/src/share/classes/com/sun/jndi/dns/DnsName.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/dns/DnsName.java Wed Jun 18 13:14:15 2014 -0700 @@ -415,7 +415,7 @@ */ private void parse(String name) throws InvalidNameException { - StringBuffer label = new StringBuffer(); // label being parsed + StringBuilder label = new StringBuilder(); // label being parsed for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); @@ -564,15 +564,15 @@ * into account. See compareLabels(). */ private static String keyForLabel(String label) { - StringBuffer buf = new StringBuffer(label.length()); + StringBuilder sb = new StringBuilder(label.length()); for (int i = 0; i < label.length(); i++) { char c = label.charAt(i); if (c >= 'A' && c <= 'Z') { c += 'a' - 'A'; // to lower case } - buf.append(c); + sb.append(c); } - return buf.toString(); + return sb.toString(); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/dns/ResourceRecord.java --- a/jdk/src/share/classes/com/sun/jndi/dns/ResourceRecord.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/dns/ResourceRecord.java Wed Jun 18 13:14:15 2014 -0700 @@ -596,21 +596,21 @@ // If bestBase != -1, compress zeros in [bestBase, bestBase+bestLen) boolean compress = (bestBase != -1); - StringBuffer buf = new StringBuffer(40); + StringBuilder sb = new StringBuilder(40); if (bestBase == 0) { - buf.append(':'); + sb.append(':'); } for (int i = 0; i < 8; i++) { if (!compress || (i < bestBase) || (i >= bestBase + bestLen)) { - buf.append(Integer.toHexString(addr6[i])); + sb.append(Integer.toHexString(addr6[i])); if (i < 7) { - buf.append(':'); + sb.append(':'); } } else if (compress && (i == bestBase)) { // first compressed zero - buf.append(':'); + sb.append(':'); } } - return buf.toString(); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java --- a/jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java Wed Jun 18 13:14:15 2014 -0700 @@ -210,7 +210,7 @@ if (ctls == null) { return ""; } - StringBuffer str = new StringBuffer(); + StringBuilder str = new StringBuilder(); for (int i = 0; i < ctls.length; i++) { str.append(ctls[i].getID()); str.append(' '); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/ldap/DigestClientId.java --- a/jdk/src/share/classes/com/sun/jndi/ldap/DigestClientId.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/ldap/DigestClientId.java Wed Jun 18 13:14:15 2014 -0700 @@ -103,14 +103,14 @@ public String toString() { if (propvals != null) { - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < propvals.length; i++) { - buf.append(':'); + sb.append(':'); if (propvals[i] != null) { - buf.append(propvals[i]); + sb.append(propvals[i]); } } - return super.toString() + buf.toString(); + return super.toString() + sb.toString(); } else { return super.toString(); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java --- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java Wed Jun 18 13:14:15 2014 -0700 @@ -767,7 +767,7 @@ final private String classDef2ObjectDesc(Attributes attrs) throws NamingException { - StringBuffer objectDesc = new StringBuffer("( "); + StringBuilder objectDesc = new StringBuilder("( "); Attribute attr = null; int count = 0; @@ -879,7 +879,7 @@ final private String attrDef2AttrDesc(Attributes attrs) throws NamingException { - StringBuffer attrDesc = new StringBuffer("( "); // opening parens + StringBuilder attrDesc = new StringBuilder("( "); // opening parens Attribute attr = null; int count = 0; @@ -1012,7 +1012,7 @@ final private String syntaxDef2SyntaxDesc(Attributes attrs) throws NamingException { - StringBuffer syntaxDesc = new StringBuffer("( "); // opening parens + StringBuilder syntaxDesc = new StringBuilder("( "); // opening parens Attribute attr = null; int count = 0; @@ -1068,7 +1068,7 @@ final private String matchRuleDef2MatchRuleDesc(Attributes attrs) throws NamingException { - StringBuffer matchRuleDesc = new StringBuffer("( "); // opening parens + StringBuilder matchRuleDesc = new StringBuilder("( "); // opening parens Attribute attr = null; int count = 0; @@ -1196,7 +1196,7 @@ // write QDList - StringBuffer qdList = new StringBuffer(attr.getID()); + StringBuilder qdList = new StringBuilder(attr.getID()); qdList.append(WHSP); qdList.append(OID_LIST_BEGIN); @@ -1233,7 +1233,7 @@ // write OID List - StringBuffer oidList = new StringBuffer(oidsAttr.getID()); + StringBuilder oidList = new StringBuilder(oidsAttr.getID()); oidList.append(WHSP); oidList.append(OID_LIST_BEGIN); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java --- a/jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java Wed Jun 18 13:14:15 2014 -0700 @@ -68,7 +68,7 @@ if (dn == null) { return null; } - StringBuffer domain = new StringBuffer(); + StringBuilder domain = new StringBuilder(); LdapName ldapName = new LdapName(dn); // process RDNs left-to-right diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java --- a/jdk/src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -88,7 +88,7 @@ } } if (selected == -1) { - StringBuffer allChoices = new StringBuffer(); + StringBuilder allChoices = new StringBuilder(); for (int j = 0; j < choices.length; j++) { allChoices.append(choices[j] + ","); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java --- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java Wed Jun 18 13:14:15 2014 -0700 @@ -520,30 +520,30 @@ str = (String)obj; } int len = str.length(); - StringBuffer buf = new StringBuffer(len); + StringBuilder sb = new StringBuilder(len); char ch; for (int i = 0; i < len; i++) { switch (ch=str.charAt(i)) { case '*': - buf.append("\\2a"); + sb.append("\\2a"); break; case '(': - buf.append("\\28"); + sb.append("\\28"); break; case ')': - buf.append("\\29"); + sb.append("\\29"); break; case '\\': - buf.append("\\5c"); + sb.append("\\5c"); break; case 0: - buf.append("\\00"); + sb.append("\\00"); break; default: - buf.append(ch); + sb.append(ch); } } - return buf.toString(); + return sb.toString(); } @@ -585,7 +585,7 @@ int param; int where = 0, start = 0; - StringBuffer answer = new StringBuffer(expr.length()); + StringBuilder answer = new StringBuilder(expr.length()); while ((where = findUnescaped('{', expr, start)) >= 0) { int pstart = where + 1; // skip '{' diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/management/DiagnosticCommandMBean.java --- a/jdk/src/share/classes/com/sun/management/DiagnosticCommandMBean.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/management/DiagnosticCommandMBean.java Wed Jun 18 13:14:15 2014 -0700 @@ -212,7 +212,7 @@ * {@linkplain javax.management.Notification#getUserData() userData} that * is the new {@code MBeanInfo}. * - * @since 8 + * @since 1.8 */ public interface DiagnosticCommandMBean extends DynamicMBean { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/media/sound/SoftPerformer.java --- a/jdk/src/share/classes/com/sun/media/sound/SoftPerformer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/media/sound/SoftPerformer.java Wed Jun 18 13:14:15 2014 -0700 @@ -326,7 +326,7 @@ private static KeySortComparator keySortComparator = new KeySortComparator(); private String extractKeys(ModelConnectionBlock conn) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (conn.getSources() != null) { sb.append("["); ModelSource[] srcs = conn.getSources(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java --- a/jdk/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -162,7 +162,7 @@ 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); private String decodeChannelMask(long channelmask) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); long m = 1; for (int i = 0; i < allchannelnames.length; i++) { if ((channelmask & m) != 0L) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java --- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java Wed Jun 18 13:14:15 2014 -0700 @@ -257,7 +257,7 @@ public static final byte[] decode(Element element) throws Base64DecodingException { Node sibling = element.getFirstChild(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); while (sibling != null) { if (sibling.getNodeType() == Node.TEXT_NODE) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java --- a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -7697,7 +7697,7 @@ * @param columnIndex the first column is 1, the second is 2, ... * @return a SQLXML object that maps an SQL XML value * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7723,7 +7723,7 @@ * @return the column value if the value is a SQL NULL the * value returned is null * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public RowId getRowId(int columnIndex) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7738,7 +7738,7 @@ * @return the column value if the value is a SQL NULL the * value returned is null * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public RowId getRowId(String columnName) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7754,7 +7754,7 @@ * @param columnIndex the first column is 1, the second 2, ... * @param x the column value * @throws SQLException if a database access occurs - * @since 6.0 + * @since 1.6 */ public void updateRowId(int columnIndex, RowId x) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7770,7 +7770,7 @@ * @param columnName the name of the column * @param x the column value * @throws SQLException if a database access occurs - * @since 6.0 + * @since 1.6 */ public void updateRowId(String columnName, RowId x) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7780,7 +7780,7 @@ * Retrieves the holdability of this ResultSet object * @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT * @throws SQLException if a database error occurs - * @since 6.0 + * @since 1.6 */ public int getHoldability() throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7791,7 +7791,7 @@ * method close has been called on it, or if it is automatically closed. * @return true if this ResultSet object is closed; false if it is still open * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public boolean isClosed() throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7803,7 +7803,7 @@ * @param columnIndex the first column is 1, the second 2, ... * @param nString the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNString(int columnIndex, String nString) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7815,7 +7815,7 @@ * @param columnName name of the Column * @param nString the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNString(String columnName, String nString) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7828,7 +7828,7 @@ * @param columnIndex the first column is 1, the second 2, ... * @param nClob the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7840,7 +7840,7 @@ * @param columnName name of the column * @param nClob the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNClob(String columnName, NClob nClob) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7855,7 +7855,7 @@ * @return a NClob object representing the SQL * NCLOB value in the specified column * @exception SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public NClob getNClob(int i) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); @@ -7871,7 +7871,7 @@ * @return a NClob object representing the SQL NCLOB * value in the specified column * @exception SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public NClob getNClob(String colName) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("cachedrowsetimpl.opnotysupp").toString()); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java --- a/jdk/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -4505,7 +4505,7 @@ * @param columnIndex the first column is 1, the second is 2, ... * @return a SQLXML object that maps an SQL XML value * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public SQLXML getSQLXML(int columnIndex) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4531,7 +4531,7 @@ * @return the column value if the value is a SQL NULL the * value returned is null * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public RowId getRowId(int columnIndex) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4546,7 +4546,7 @@ * @return the column value if the value is a SQL NULL the * value returned is null * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public RowId getRowId(String columnName) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4562,7 +4562,7 @@ * @param columnIndex the first column is 1, the second 2, ... * @param x the column value * @throws SQLException if a database access occurs - * @since 6.0 + * @since 1.6 */ public void updateRowId(int columnIndex, RowId x) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4578,7 +4578,7 @@ * @param columnName the name of the column * @param x the column value * @throws SQLException if a database access occurs - * @since 6.0 + * @since 1.6 */ public void updateRowId(String columnName, RowId x) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4588,7 +4588,7 @@ * Retrieves the holdability of this ResultSet object * @return either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT * @throws SQLException if a database error occurs - * @since 6.0 + * @since 1.6 */ public int getHoldability() throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4599,7 +4599,7 @@ * method close has been called on it, or if it is automatically closed. * @return true if this ResultSet object is closed; false if it is still open * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public boolean isClosed() throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4611,7 +4611,7 @@ * @param columnIndex the first column is 1, the second 2, ... * @param nString the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNString(int columnIndex, String nString) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4623,7 +4623,7 @@ * @param columnName name of the Column * @param nString the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNString(String columnName, String nString) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4636,7 +4636,7 @@ * @param columnIndex the first column is 1, the second 2, ... * @param nClob the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNClob(int columnIndex, NClob nClob) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4648,7 +4648,7 @@ * @param columnName name of the column * @param nClob the value for the column to be updated * @throws SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public void updateNClob(String columnName, NClob nClob) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4663,7 +4663,7 @@ * @return a NClob object representing the SQL * NCLOB value in the specified column * @exception SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public NClob getNClob(int i) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); @@ -4679,7 +4679,7 @@ * @return a NClob object representing the SQL NCLOB * value in the specified column * @exception SQLException if a database access error occurs - * @since 6.0 + * @since 1.6 */ public NClob getNClob(String colName) throws SQLException { throw new SQLFeatureNotSupportedException(resBundle.handleGetObject("jdbcrowsetimpl.featnotsupp").toString()); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/security/sasl/CramMD5Base.java --- a/jdk/src/share/classes/com/sun/security/sasl/CramMD5Base.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/security/sasl/CramMD5Base.java Wed Jun 18 13:14:15 2014 -0700 @@ -195,7 +195,7 @@ digest = md5.digest(); // Get character representation of digest - StringBuffer digestString = new StringBuffer(); + StringBuilder digestString = new StringBuilder(); for (i = 0; i < digest.length; i++) { if ((digest[i] & 0x000000ff) < 0x10) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/security/sasl/CramMD5Server.java --- a/jdk/src/share/classes/com/sun/security/sasl/CramMD5Server.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/security/sasl/CramMD5Server.java Wed Jun 18 13:14:15 2014 -0700 @@ -117,15 +117,15 @@ long rand = random.nextLong(); long timestamp = System.currentTimeMillis(); - StringBuffer buf = new StringBuffer(); - buf.append('<'); - buf.append(rand); - buf.append('.'); - buf.append(timestamp); - buf.append('@'); - buf.append(fqdn); - buf.append('>'); - String challengeStr = buf.toString(); + StringBuilder sb = new StringBuilder(); + sb.append('<'); + sb.append(rand); + sb.append('.'); + sb.append(timestamp); + sb.append('@'); + sb.append(fqdn); + sb.append('>'); + String challengeStr = sb.toString(); logger.log(Level.FINE, "CRAMSRV01:Generated challenge: {0}", challengeStr); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java --- a/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java Wed Jun 18 13:14:15 2014 -0700 @@ -387,7 +387,7 @@ protected byte[] binaryToHex(byte[] digest) throws UnsupportedEncodingException { - StringBuffer digestString = new StringBuffer(); + StringBuilder digestString = new StringBuilder(); for (int i = 0; i < digest.length; i ++) { if ((digest[i] & 0x000000ff) < 0x10) { @@ -598,7 +598,7 @@ protected static String nonceCountToHex(int count) { String str = Integer.toHexString(count); - StringBuffer pad = new StringBuffer(); + StringBuilder pad = new StringBuilder(); if (str.length() < 8) { for (int i = 0; i < 8-str.length(); i ++) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java --- a/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java Wed Jun 18 13:14:15 2014 -0700 @@ -203,19 +203,19 @@ String supportedCiphers = null; if ((allQop&PRIVACY_PROTECTION) != 0) { myCiphers = getPlatformCiphers(); - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); // myCipher[i] is a byte that indicates whether CIPHER_TOKENS[i] // is supported for (int i = 0; i < CIPHER_TOKENS.length; i++) { if (myCiphers[i] != 0) { - if (buf.length() > 0) { - buf.append(','); + if (sb.length() > 0) { + sb.append(','); } - buf.append(CIPHER_TOKENS[i]); + sb.append(CIPHER_TOKENS[i]); } } - supportedCiphers = buf.toString(); + supportedCiphers = sb.toString(); } try { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java --- a/jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -80,13 +80,13 @@ "SASLIMPL02:Preferred qop mask: {0}", new Byte(allQop)); if (qop.length > 0) { - StringBuffer qopbuf = new StringBuffer(); + StringBuilder str = new StringBuilder(); for (int i = 0; i < qop.length; i++) { - qopbuf.append(Byte.toString(qop[i])); - qopbuf.append(' '); + str.append(Byte.toString(qop[i])); + str.append(' '); } logger.logp(Level.FINE, myClassName, "constructor", - "SASLIMPL03:Preferred qops : {0}", qopbuf.toString()); + "SASLIMPL03:Preferred qops : {0}", str.toString()); } } @@ -95,13 +95,13 @@ logger.logp(Level.FINE, myClassName, "constructor", "SASLIMPL04:Preferred strength property: {0}", prop); if (logger.isLoggable(Level.FINE) && strength.length > 0) { - StringBuffer strbuf = new StringBuffer(); + StringBuilder str = new StringBuilder(); for (int i = 0; i < strength.length; i++) { - strbuf.append(Byte.toString(strength[i])); - strbuf.append(' '); + str.append(Byte.toString(strength[i])); + str.append(' '); } logger.logp(Level.FINE, myClassName, "constructor", - "SASLIMPL05:Cipher strengths: {0}", strbuf.toString()); + "SASLIMPL05:Cipher strengths: {0}", str.toString()); } // Max receive buffer size diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java --- a/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java Wed Jun 18 13:14:15 2014 -0700 @@ -76,16 +76,10 @@ * // attach to target VM * VirtualMachine vm = VirtualMachine.attach("2177"); * - * // get system properties in target VM - * Properties props = vm.getSystemProperties(); - * - * // construct path to management agent - * String home = props.getProperty("java.home"); - * String agent = home + File.separator + "lib" + File.separator - * + "management-agent.jar"; - * - * // load agent into target VM - * vm.loadAgent(agent, "com.sun.management.jmxremote.port=5000"); + * // start management agent + * Properties props = new Properties(); + * props.put("com.sun.management.jmxremote.port", "5000"); + * vm.startManagementAgent(props); * * // detach * vm.detach(); @@ -93,9 +87,9 @@ * * *

      In this example we attach to a Java virtual machine that is identified by - * the process identifier 2177. The system properties from the target - * VM are then used to construct the path to a management agent which is then - * loaded into the target VM. Once loaded the client detaches from the target VM.

      + * the process identifier 2177. Then the JMX management agent is + * started in the target process using the supplied arguments. Finally, the + * client detaches from the target VM.

      * *

      A VirtualMachine is safe for use by multiple concurrent threads.

      * @@ -611,6 +605,68 @@ public abstract Properties getAgentProperties() throws IOException; /** + * Starts the JMX management agent in the target virtual machine. + * + *

      The configuration properties are the same as those specified on + * the command line when starting the JMX management agent. In the same + * way as on the command line, you need to specify at least the + * {@code com.sun.management.jmxremote.port} property. + * + *

      See the online documentation for + * Monitoring and Management Using JMX Technology for further details. + * + * @param agentProperties + * A Properties object containing the configuration properties + * for the agent. + * + * @throws AttachOperationFailedException + * If the target virtual machine is unable to complete the + * attach operation. A more specific error message will be + * given by {@link AttachOperationFailedException#getMessage()}. + * + * @throws IOException + * If an I/O error occurs, a communication error for example, + * that cannot be identified as an error to indicate that the + * operation failed in the target VM. + * + * @throws IllegalArgumentException + * If keys or values in agentProperties are invalid. + * + * @throws NullPointerException + * If agentProperties is null. + * + * @since 1.9 + */ + public abstract void startManagementAgent(Properties agentProperties) throws IOException; + + /** + * Starts the local JMX management agent in the target virtual machine. + * + *

      See the online documentation for + * Monitoring and Management Using JMX Technology for further details. + * + * @return The String representation of the local connector's service address. + * The value can be parsed by the + * {@link javax.management.remote.JMXServiceURL#JMXServiceURL(String)} + * constructor. + * + * @throws AttachOperationFailedException + * If the target virtual machine is unable to complete the + * attach operation. A more specific error message will be + * given by {@link AttachOperationFailedException#getMessage()}. + * + * @throws IOException + * If an I/O error occurs, a communication error for example, + * that cannot be identified as an error to indicate that the + * operation failed in the target VM. + * + * @since 1.9 + */ + public abstract String startLocalManagementAgent() throws IOException; + + /** * Returns a hash-code value for this VirtualMachine. The hash * code is based upon the VirtualMachine's components, and satifies * the general contract of the {@link java.lang.Object#hashCode() diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java Wed Jun 18 13:14:15 2014 -0700 @@ -102,8 +102,8 @@ @Override public String toString() { - StringBuffer buffer = new StringBuffer("exception catch "); - buffer.append(refSpec.toString()); - return buffer.toString(); + StringBuilder sb = new StringBuilder("exception catch "); + sb.append(refSpec.toString()); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java Wed Jun 18 13:14:15 2014 -0700 @@ -118,13 +118,13 @@ @Override public String toString() { - StringBuffer buffer = new StringBuffer("breakpoint "); - buffer.append(refSpec.toString()); - buffer.append(':'); - buffer.append(lineNumber); - buffer.append(" ("); - buffer.append(getStatusString()); - buffer.append(')'); - return buffer.toString(); + StringBuilder sb = new StringBuilder("breakpoint "); + sb.append(refSpec.toString()); + sb.append(':'); + sb.append(lineNumber); + sb.append(" ("); + sb.append(getStatusString()); + sb.append(')'); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java Wed Jun 18 13:14:15 2014 -0700 @@ -126,26 +126,26 @@ @Override public String toString() { - StringBuffer buffer = new StringBuffer("breakpoint "); - buffer.append(refSpec.toString()); - buffer.append('.'); - buffer.append(methodId); + StringBuilder sb = new StringBuilder("breakpoint "); + sb.append(refSpec.toString()); + sb.append('.'); + sb.append(methodId); if (methodArgs != null) { boolean first = true; - buffer.append('('); + sb.append('('); for (String name : methodArgs) { if (!first) { - buffer.append(','); + sb.append(','); } - buffer.append(name); + sb.append(name); first = false; } - buffer.append(")"); + sb.append(")"); } - buffer.append(" ("); - buffer.append(getStatusString()); - buffer.append(')'); - return buffer.toString(); + sb.append(" ("); + sb.append(getStatusString()); + sb.append(')'); + return sb.toString(); } private boolean isValidMethodName(String s) { @@ -225,8 +225,8 @@ * stripping whitespace after the name ends. */ int i = 0; - StringBuffer typePart = new StringBuffer(); - StringBuffer arrayPart = new StringBuffer(); + StringBuilder typePart = new StringBuilder(); + StringBuilder arrayPart = new StringBuilder(); name = name.trim(); int nameLength = name.length(); /* diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java Wed Jun 18 13:14:15 2014 -0700 @@ -185,7 +185,7 @@ } final public String Name() throws ParseException { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); jj_consume_token(IDENTIFIER); sb.append(token); label_2: diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java Wed Jun 18 13:14:15 2014 -0700 @@ -114,7 +114,7 @@ int[][] expectedTokenSequences, String[] tokenImage) { String eol = System.getProperty("line.separator", "\n"); - StringBuffer expected = new StringBuffer(); + StringBuilder expected = new StringBuilder(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) { @@ -164,7 +164,7 @@ * string literal. */ static String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); + StringBuilder retval = new StringBuilder(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java Wed Jun 18 13:14:15 2014 -0700 @@ -73,7 +73,7 @@ * equivalents in the given string */ protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); + StringBuilder retval = new StringBuilder(); char ch; for (int i = 0; i < str.length(); i++) { switch (str.charAt(i)) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java Wed Jun 18 13:14:15 2014 -0700 @@ -267,7 +267,7 @@ buf[j] = ' '; } buf[79] = '\0'; - StringBuffer sbOut = new StringBuffer(); + StringBuilder sbOut = new StringBuilder(); sbOut.append(buf); // Right-justify the thread number at start of output string @@ -381,16 +381,16 @@ } } else { clname = t.nextToken(); - StringBuffer sbuf = new StringBuffer(); + StringBuilder str = new StringBuilder(); // Allow VM arguments to be specified here? while (t.hasMoreTokens()) { String tok = t.nextToken(); - sbuf.append(tok); + str.append(tok); if (t.hasMoreTokens()) { - sbuf.append(' '); + str.append(' '); } } - String args = sbuf.toString(); + String args = str.toString(); try { String vmArgs = context.getVmArguments(); runtime.run(suspended, vmArgs, clname, args); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java Wed Jun 18 13:14:15 2014 -0700 @@ -333,7 +333,7 @@ private String processClasspathDefaults(String javaArgs) { if (javaArgs.indexOf("-classpath ") == -1) { - StringBuffer munged = new StringBuffer(javaArgs); + StringBuilder munged = new StringBuilder(javaArgs); SearchPath classpath = classManager.getClassPath(); if (classpath.isEmpty()) { String envcp = System.getProperty("env.class.path"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java Wed Jun 18 13:14:15 2014 -0700 @@ -236,7 +236,7 @@ private String expandTabs(String s) { int col = 0; int len = s.length(); - StringBuffer sb = new StringBuffer(132); + StringBuilder sb = new StringBuilder(132); for (int i = 0; i < len; i++) { char c = s.charAt(i); sb.append(c); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java Wed Jun 18 13:14:15 2014 -0700 @@ -154,27 +154,27 @@ @Override public String toString() { - StringBuffer buffer = new StringBuffer(refSpec.toString()); + StringBuilder sb = new StringBuilder(refSpec.toString()); if (isMethodBreakpoint()) { - buffer.append('.'); - buffer.append(methodId); + sb.append('.'); + sb.append(methodId); if (methodArgs != null) { boolean first = true; - buffer.append('('); + sb.append('('); for (String arg : methodArgs) { if (!first) { - buffer.append(','); + sb.append(','); } - buffer.append(arg); + sb.append(arg); first = false; } - buffer.append(")"); + sb.append(")"); } } else { - buffer.append(':'); - buffer.append(lineNumber); + sb.append(':'); + sb.append(lineNumber); } - return MessageOutput.format("breakpoint", buffer.toString()); + return MessageOutput.format("breakpoint", sb.toString()); } private Location location(ReferenceType refType) throws @@ -275,8 +275,8 @@ * stripping whitespace after the name ends */ int i = 0; - StringBuffer typePart = new StringBuffer(); - StringBuffer arrayPart = new StringBuffer(); + StringBuilder typePart = new StringBuilder(); + StringBuilder arrayPart = new StringBuilder(); name = name.trim(); int nameLength = name.length(); /* diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java Wed Jun 18 13:14:15 2014 -0700 @@ -164,30 +164,30 @@ } String typedName(Method method) { - StringBuffer buf = new StringBuffer(); - buf.append(method.name()); - buf.append("("); + StringBuilder sb = new StringBuilder(); + sb.append(method.name()); + sb.append("("); List args = method.argumentTypeNames(); int lastParam = args.size() - 1; // output param types except for the last for (int ii = 0; ii < lastParam; ii++) { - buf.append(args.get(ii)); - buf.append(", "); + sb.append(args.get(ii)); + sb.append(", "); } if (lastParam >= 0) { // output the last param String lastStr = args.get(lastParam); if (method.isVarArgs()) { // lastParam is an array. Replace the [] with ... - buf.append(lastStr.substring(0, lastStr.length() - 2)); - buf.append("..."); + sb.append(lastStr.substring(0, lastStr.length() - 2)); + sb.append("..."); } else { - buf.append(lastStr); + sb.append(lastStr); } } - buf.append(")"); - return buf.toString(); + sb.append(")"); + return sb.toString(); } void commandConnectors(VirtualMachineManager vmm) { @@ -226,7 +226,7 @@ } void commandClasses() { - StringBuffer classList = new StringBuffer(); + StringBuilder classList = new StringBuilder(); for (ReferenceType refType : Env.vm().allClasses()) { classList.append(refType.name()); classList.append("\n"); @@ -309,7 +309,7 @@ String idClass = t.nextToken(); ReferenceType cls = Env.getReferenceTypeFromToken(idClass); if (cls != null) { - StringBuffer methodsList = new StringBuffer(); + StringBuilder methodsList = new StringBuilder(); for (Method method : cls.allMethods()) { methodsList.append(method.declaringType().name()); methodsList.append(" "); @@ -333,7 +333,7 @@ if (cls != null) { List fields = cls.allFields(); List visible = cls.visibleFields(); - StringBuffer fieldsList = new StringBuffer(); + StringBuilder fieldsList = new StringBuilder(); for (Field field : fields) { String s; if (!visible.contains(field)) { @@ -391,11 +391,11 @@ * very long thread names, at the possible cost of lines * being wrapped by the display device. */ - StringBuffer idBuffer = new StringBuffer(Env.description(thr)); + StringBuilder idBuffer = new StringBuilder(Env.description(thr)); for (int i = idBuffer.length(); i < maxIdLength; i++) { idBuffer.append(" "); } - StringBuffer nameBuffer = new StringBuffer(thr.name()); + StringBuilder nameBuffer = new StringBuilder(thr.name()); for (int i = nameBuffer.length(); i < maxNameLength; i++) { nameBuffer.append(" "); } @@ -1606,16 +1606,16 @@ private void dump(ObjectReference obj, ReferenceType refType, ReferenceType refTypeBase) { for (Field field : refType.fields()) { - StringBuffer o = new StringBuffer(); - o.append(" "); + StringBuilder sb = new StringBuilder(); + sb.append(" "); if (!refType.equals(refTypeBase)) { - o.append(refType.name()); - o.append("."); + sb.append(refType.name()); + sb.append("."); } - o.append(field.name()); - o.append(MessageOutput.format("colon space")); - o.append(obj.getValue(field)); - MessageOutput.printDirectln(o.toString()); // Special case: use printDirectln() + sb.append(field.name()); + sb.append(MessageOutput.format("colon space")); + sb.append(obj.getValue(field)); + MessageOutput.printDirectln(sb.toString()); // Special case: use printDirectln() } if (refType instanceof ClassType) { ClassType sup = ((ClassType)refType).superclass(); @@ -1954,7 +1954,7 @@ } } - StringBuffer line = new StringBuffer(80); + StringBuilder line = new StringBuilder(80); line.append("0000: "); for (int i = 0; i < bytecodes.length; i++) { if ((i > 0) && (i % 16 == 0)) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/tty/Env.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/Env.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/Env.java Wed Jun 18 13:14:15 2014 -0700 @@ -114,12 +114,12 @@ } static String excludesString() { - StringBuffer buffer = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (String pattern : excludes()) { - buffer.append(pattern); - buffer.append(","); + sb.append(pattern); + sb.append(","); } - return buffer.toString(); + return sb.toString(); } static void addExcludes(StepRequest request) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java --- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/TTY.java Wed Jun 18 13:14:15 2014 -0700 @@ -827,17 +827,17 @@ private static String addArgument(String string, String argument) { if (hasWhitespace(argument) || argument.indexOf(',') != -1) { // Quotes were stripped out for this argument, add 'em back. - StringBuffer buffer = new StringBuffer(string); - buffer.append('"'); + StringBuilder sb = new StringBuilder(string); + sb.append('"'); for (int i = 0; i < argument.length(); i++) { char c = argument.charAt(i); if (c == '"') { - buffer.append('\\'); + sb.append('\\'); } - buffer.append(c); + sb.append(c); } - buffer.append("\" "); - return buffer.toString(); + sb.append("\" "); + return sb.toString(); } else { return string + argument + ' '; } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/example/trace/Trace.java --- a/jdk/src/share/classes/com/sun/tools/example/trace/Trace.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/example/trace/Trace.java Wed Jun 18 13:14:15 2014 -0700 @@ -121,7 +121,7 @@ usage(); System.exit(1); } - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(args[inx]); for (++inx; inx < args.length; ++inx) { sb.append(' '); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/hat/internal/util/Misc.java --- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/Misc.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/Misc.java Wed Jun 18 13:14:15 2014 -0700 @@ -83,30 +83,30 @@ public static String encodeHtml(String str) { final int len = str.length(); - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < len; i++) { char ch = str.charAt(i); if (ch == '<') { - buf.append("<"); + sb.append("<"); } else if (ch == '>') { - buf.append(">"); + sb.append(">"); } else if (ch == '"') { - buf.append("""); + sb.append("""); } else if (ch == '\'') { - buf.append("'"); + sb.append("'"); } else if (ch == '&') { - buf.append("&"); + sb.append("&"); } else if (ch < ' ') { - buf.append("&#" + Integer.toString(ch) + ";"); + sb.append("&#" + Integer.toString(ch) + ";"); } else { int c = (ch & 0xFFFF); if (c > 127) { - buf.append("&#" + Integer.toString(c) + ";"); + sb.append("&#" + Integer.toString(c) + ";"); } else { - buf.append(ch); + sb.append(ch); } } } - return buf.toString(); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/FieldImpl.java --- a/jdk/src/share/classes/com/sun/tools/jdi/FieldImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/FieldImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -95,12 +95,12 @@ } public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); - buf.append(declaringType().name()); - buf.append('.'); - buf.append(name()); + sb.append(declaringType().name()); + sb.append('.'); + sb.append(name()); - return buf.toString(); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/JNITypeParser.java --- a/jdk/src/share/classes/com/sun/tools/jdi/JNITypeParser.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/JNITypeParser.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,11 +44,11 @@ } static String typeNameToSignature(String signature) { - StringBuffer buffer = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int firstIndex = signature.indexOf('['); int index = firstIndex; while (index != -1) { - buffer.append('['); + sb.append('['); index = signature.indexOf('[', index + 1); } @@ -57,28 +57,28 @@ } if (signature.equals("boolean")) { - buffer.append('Z'); + sb.append('Z'); } else if (signature.equals("byte")) { - buffer.append('B'); + sb.append('B'); } else if (signature.equals("char")) { - buffer.append('C'); + sb.append('C'); } else if (signature.equals("short")) { - buffer.append('S'); + sb.append('S'); } else if (signature.equals("int")) { - buffer.append('I'); + sb.append('I'); } else if (signature.equals("long")) { - buffer.append('J'); + sb.append('J'); } else if (signature.equals("float")) { - buffer.append('F'); + sb.append('F'); } else if (signature.equals("double")) { - buffer.append('D'); + sb.append('D'); } else { - buffer.append('L'); - buffer.append(signature.replace('.', '/')); - buffer.append(';'); + sb.append('L'); + sb.append(signature.replace('.', '/')); + sb.append(';'); } - return buffer.toString(); + return sb.toString(); } String typeName() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/MethodImpl.java --- a/jdk/src/share/classes/com/sun/tools/jdi/MethodImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/MethodImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -387,7 +387,7 @@ } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(declaringType().name()); sb.append("."); sb.append(name()); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java --- a/jdk/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -751,7 +751,7 @@ String baseSourceDir() { if (baseSourceDir == null) { String typeName = name(); - StringBuffer sb = new StringBuffer(typeName.length() + 10); + StringBuilder sb = new StringBuilder(typeName.length() + 10); int index = 0; int nextIndex; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/SDE.java --- a/jdk/src/share/classes/com/sun/tools/jdi/SDE.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/SDE.java Wed Jun 18 13:14:15 2014 -0700 @@ -56,16 +56,16 @@ if (sourcePath == null) { sourcePath = refType.baseSourceDir() + sourceName; } else { - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < sourcePath.length(); ++i) { char ch = sourcePath.charAt(i); if (ch == '/') { - buf.append(File.separatorChar); + sb.append(File.separatorChar); } else { - buf.append(ch); + sb.append(ch); } } - sourcePath = buf.toString(); + sourcePath = sb.toString(); } isConverted = true; } @@ -327,7 +327,7 @@ } String readLine() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); char ch; ignoreWhite(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/TargetVM.java --- a/jdk/src/share/classes/com/sun/tools/jdi/TargetVM.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/TargetVM.java Wed Jun 18 13:14:15 2014 -0700 @@ -78,7 +78,7 @@ ", errorCode=" + packet.errorCode + ", flags=" + packet.flags); } - StringBuffer line = new StringBuffer(80); + StringBuilder line = new StringBuilder(80); line.append("0000: "); for (int i = 0; i < packet.data.length; i++) { if ((i > 0) && (i % 16 == 0)) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java --- a/jdk/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -742,7 +742,7 @@ } void printReceiveTrace(int depth, String string) { - StringBuffer sb = new StringBuffer("Receiving:"); + StringBuilder sb = new StringBuilder("Receiving:"); for (int i = depth; i > 0; --i) { sb.append(" "); } @@ -872,7 +872,7 @@ ReferenceTypeImpl referenceType(long id, int tag, String signature) { if ((vm.traceFlags & VirtualMachine.TRACE_REFTYPES) != 0) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("Looking up "); if (tag == JDWP.TypeTag.CLASS) { sb.append("Class"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/applet/Applet.java --- a/jdk/src/share/classes/java/applet/Applet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/applet/Applet.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ * * @author Arthur van Hoff * @author Chris Warth - * @since JDK1.0 + * @since 1.0 */ public class Applet extends Panel { @@ -375,7 +375,7 @@ * * @return the locale of the applet; if no locale has * been set, the default locale is returned. - * @since JDK1.1 + * @since 1.1 */ public Locale getLocale() { Locale locale = super.getLocale(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/applet/AppletContext.java --- a/jdk/src/share/classes/java/applet/AppletContext.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/applet/AppletContext.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,7 +43,7 @@ * information about its environment. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public interface AppletContext { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/applet/AppletStub.java --- a/jdk/src/share/classes/java/applet/AppletStub.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/applet/AppletStub.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * * @author Arthur van Hoff * @see java.applet.Applet#setStub(java.applet.AppletStub) - * @since JDK1.0 + * @since 1.0 */ public interface AppletStub { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/applet/AudioClip.java --- a/jdk/src/share/classes/java/applet/AudioClip.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/applet/AudioClip.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * together to produce a composite. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public interface AudioClip { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/applet/package.html --- a/jdk/src/share/classes/java/applet/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/applet/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -55,6 +55,6 @@

    --> -@since JDK1.0 +@since 1.0 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/AWTError.java --- a/jdk/src/share/classes/java/awt/AWTError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/AWTError.java Wed Jun 18 13:14:15 2014 -0700 @@ -41,7 +41,7 @@ * Constructs an instance of AWTError with the specified * detail message. * @param msg the detail message. - * @since JDK1.0 + * @since 1.0 */ public AWTError(String msg) { super(msg); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/AWTException.java --- a/jdk/src/share/classes/java/awt/AWTException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/AWTException.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,7 +43,7 @@ * instance of String that describes this particular * exception. * @param msg the detail message - * @since JDK1.0 + * @since 1.0 */ public AWTException(String msg) { super(msg); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/BorderLayout.java --- a/jdk/src/share/classes/java/awt/BorderLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/BorderLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -119,7 +119,7 @@ * @author Arthur van Hoff * @see java.awt.Container#add(String, Component) * @see java.awt.ComponentOrientation - * @since JDK1.0 + * @since 1.0 */ public class BorderLayout implements LayoutManager2, java.io.Serializable { @@ -367,7 +367,7 @@ /** * Returns the horizontal gap between components. - * @since JDK1.1 + * @since 1.1 */ public int getHgap() { return hgap; @@ -376,7 +376,7 @@ /** * Sets the horizontal gap between components. * @param hgap the horizontal gap between components - * @since JDK1.1 + * @since 1.1 */ public void setHgap(int hgap) { this.hgap = hgap; @@ -384,7 +384,7 @@ /** * Returns the vertical gap between components. - * @since JDK1.1 + * @since 1.1 */ public int getVgap() { return vgap; @@ -393,7 +393,7 @@ /** * Sets the vertical gap between components. * @param vgap the vertical gap between components - * @since JDK1.1 + * @since 1.1 */ public void setVgap(int vgap) { this.vgap = vgap; @@ -415,7 +415,7 @@ * @see java.awt.Container#add(java.awt.Component, java.lang.Object) * @exception IllegalArgumentException if the constraint object is not * a string, or if it not one of the five specified constants. - * @since JDK1.1 + * @since 1.1 */ public void addLayoutComponent(Component comp, Object constraints) { synchronized (comp.getTreeLock()) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Button.java --- a/jdk/src/share/classes/java/awt/Button.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Button.java Wed Jun 18 13:14:15 2014 -0700 @@ -82,7 +82,7 @@ * @see java.awt.event.ActionListener * @see java.awt.Component#processMouseEvent * @see java.awt.Component#addMouseListener - * @since JDK1.0 + * @since 1.0 */ public class Button extends Component implements Accessible { @@ -228,7 +228,7 @@ * If the string is null then the action command * is set to match the label of the button. * @see java.awt.event.ActionEvent - * @since JDK1.1 + * @since 1.1 */ public void setActionCommand(String command) { actionCommand = command; @@ -255,7 +255,7 @@ * @see #removeActionListener * @see #getActionListeners * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addActionListener(ActionListener l) { if (l == null) { @@ -277,7 +277,7 @@ * @see #addActionListener * @see #getActionListeners * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeActionListener(ActionListener l) { if (l == null) { @@ -370,7 +370,7 @@ * @param e the event * @see java.awt.event.ActionEvent * @see java.awt.Button#processActionEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ActionEvent) { @@ -401,7 +401,7 @@ * @see java.awt.event.ActionListener * @see java.awt.Button#addActionListener * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processActionEvent(ActionEvent e) { ActionListener listener = actionListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Canvas.java --- a/jdk/src/share/classes/java/awt/Canvas.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Canvas.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * in order to perform custom graphics on the canvas. * * @author Sami Shaio - * @since JDK1.0 + * @since 1.0 */ public class Canvas extends Component implements Accessible { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/CardLayout.java --- a/jdk/src/share/classes/java/awt/CardLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/CardLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -53,7 +53,7 @@ * * @author Arthur van Hoff * @see java.awt.Container - * @since JDK1.0 + * @since 1.0 */ public class CardLayout implements LayoutManager2, @@ -148,7 +148,7 @@ * @return the horizontal gap between components. * @see java.awt.CardLayout#setHgap(int) * @see java.awt.CardLayout#getVgap() - * @since JDK1.1 + * @since 1.1 */ public int getHgap() { return hgap; @@ -159,7 +159,7 @@ * @param hgap the horizontal gap between components. * @see java.awt.CardLayout#getHgap() * @see java.awt.CardLayout#setVgap(int) - * @since JDK1.1 + * @since 1.1 */ public void setHgap(int hgap) { this.hgap = hgap; @@ -180,7 +180,7 @@ * @param vgap the vertical gap between components. * @see java.awt.CardLayout#getVgap() * @see java.awt.CardLayout#setHgap(int) - * @since JDK1.1 + * @since 1.1 */ public void setVgap(int vgap) { this.vgap = vgap; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Checkbox.java --- a/jdk/src/share/classes/java/awt/Checkbox.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Checkbox.java Wed Jun 18 13:14:15 2014 -0700 @@ -71,7 +71,7 @@ * @author Sami Shaio * @see java.awt.GridLayout * @see java.awt.CheckboxGroup - * @since JDK1.0 + * @since 1.0 */ public class Checkbox extends Component implements ItemSelectable, Accessible { @@ -190,7 +190,7 @@ * GraphicsEnvironment.isHeadless * returns true * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public Checkbox(String label, boolean state, CheckboxGroup group) throws HeadlessException { @@ -216,7 +216,7 @@ * GraphicsEnvironment.isHeadless * returns true * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public Checkbox(String label, CheckboxGroup group, boolean state) throws HeadlessException { @@ -424,7 +424,7 @@ * @see #setState * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addItemListener(ItemListener l) { if (l == null) { @@ -446,7 +446,7 @@ * @see #getItemListeners * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeItemListener(ItemListener l) { if (l == null) { @@ -540,7 +540,7 @@ * @param e the event * @see java.awt.event.ItemEvent * @see #processItemEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ItemEvent) { @@ -572,7 +572,7 @@ * @see java.awt.event.ItemListener * @see #addItemListener * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processItemEvent(ItemEvent e) { ItemListener listener = itemListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/CheckboxGroup.java --- a/jdk/src/share/classes/java/awt/CheckboxGroup.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/CheckboxGroup.java Wed Jun 18 13:14:15 2014 -0700 @@ -52,7 +52,7 @@ * * @author Sami Shaio * @see java.awt.Checkbox - * @since JDK1.0 + * @since 1.0 */ public class CheckboxGroup implements java.io.Serializable { /** @@ -84,7 +84,7 @@ * "on" state, or null. * @see java.awt.Checkbox * @see java.awt.CheckboxGroup#setSelectedCheckbox - * @since JDK1.1 + * @since 1.1 */ public Checkbox getSelectedCheckbox() { return getCurrent(); @@ -113,7 +113,7 @@ * current selection. * @see java.awt.Checkbox * @see java.awt.CheckboxGroup#getSelectedCheckbox - * @since JDK1.1 + * @since 1.1 */ public void setSelectedCheckbox(Checkbox box) { setCurrent(box); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/CheckboxMenuItem.java --- a/jdk/src/share/classes/java/awt/CheckboxMenuItem.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/CheckboxMenuItem.java Wed Jun 18 13:14:15 2014 -0700 @@ -59,7 +59,7 @@ * @author Sami Shaio * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.0 + * @since 1.0 */ public class CheckboxMenuItem extends MenuItem implements ItemSelectable, Accessible { @@ -102,7 +102,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public CheckboxMenuItem() throws HeadlessException { this("", false); @@ -132,7 +132,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public CheckboxMenuItem(String label, boolean state) throws HeadlessException { @@ -231,7 +231,7 @@ * @see #setState * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addItemListener(ItemListener l) { if (l == null) { @@ -253,7 +253,7 @@ * @see #getItemListeners * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeItemListener(ItemListener l) { if (l == null) { @@ -350,7 +350,7 @@ * @param e the event * @see java.awt.event.ItemEvent * @see #processItemEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ItemEvent) { @@ -381,7 +381,7 @@ * @see java.awt.event.ItemListener * @see #addItemListener * @see java.awt.MenuItem#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processItemEvent(ItemEvent e) { ItemListener listener = itemListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Choice.java --- a/jdk/src/share/classes/java/awt/Choice.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Choice.java Wed Jun 18 13:14:15 2014 -0700 @@ -68,7 +68,7 @@ * * @author Sami Shaio * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class Choice extends Component implements ItemSelectable, Accessible { /** @@ -158,7 +158,7 @@ * Returns the number of items in this Choice menu. * @return the number of items in this Choice menu * @see #getItem - * @since JDK1.1 + * @since 1.1 */ public int getItemCount() { return countItems(); @@ -196,7 +196,7 @@ * @param item the item to be added * @exception NullPointerException if the item's value is * null - * @since JDK1.1 + * @since 1.1 */ public void add(String item) { addItem(item); @@ -291,7 +291,7 @@ * @param item the item to remove from this Choice menu * @exception IllegalArgumentException if the item doesn't * exist in the choice menu - * @since JDK1.1 + * @since 1.1 */ public void remove(String item) { synchronized (this) { @@ -319,7 +319,7 @@ * @param position the position of the item * @throws IndexOutOfBoundsException if the specified * position is out of bounds - * @since JDK1.1 + * @since 1.1 */ public void remove(int position) { synchronized (this) { @@ -357,7 +357,7 @@ /** * Removes all items from the choice menu. * @see #remove - * @since JDK1.1 + * @since 1.1 */ public void removeAll() { synchronized (this) { @@ -475,7 +475,7 @@ * @see #select * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addItemListener(ItemListener l) { if (l == null) { @@ -497,7 +497,7 @@ * @see #getItemListeners * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeItemListener(ItemListener l) { if (l == null) { @@ -591,7 +591,7 @@ * @param e the event * @see java.awt.event.ItemEvent * @see #processItemEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ItemEvent) { @@ -623,7 +623,7 @@ * @see java.awt.event.ItemListener * @see #addItemListener(ItemListener) * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processItemEvent(ItemEvent e) { ItemListener listener = itemListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Color.java --- a/jdk/src/share/classes/java/awt/Color.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Color.java Wed Jun 18 13:14:15 2014 -0700 @@ -597,7 +597,7 @@ * @see #getRed * @see #getGreen * @see #getBlue - * @since JDK1.0 + * @since 1.0 */ public int getRGB() { return value; @@ -621,7 +621,7 @@ * a brighter version of this Color * with the same {@code alpha} value. * @see java.awt.Color#darker - * @since JDK1.0 + * @since 1.0 */ public Color brighter() { int r = getRed(); @@ -664,7 +664,7 @@ * a darker version of this Color * with the same {@code alpha} value. * @see java.awt.Color#brighter - * @since JDK1.0 + * @since 1.0 */ public Color darker() { return new Color(Math.max((int)(getRed() *FACTOR), 0), @@ -676,7 +676,7 @@ /** * Computes the hash code for this Color. * @return a hash code value for this object. - * @since JDK1.0 + * @since 1.0 */ public int hashCode() { return value; @@ -693,7 +693,7 @@ * Color * @return true if the objects are the same; * false otherwise. - * @since JDK1.0 + * @since 1.0 */ public boolean equals(Object obj) { return obj instanceof Color && ((Color)obj).getRGB() == this.getRGB(); @@ -723,7 +723,7 @@ * @exception NumberFormatException if the specified string cannot * be interpreted as a decimal, * octal, or hexadecimal integer. - * @since JDK1.1 + * @since 1.1 */ public static Color decode(String nm) throws NumberFormatException { Integer intval = Integer.decode(nm); @@ -747,7 +747,7 @@ * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.Integer#getInteger(java.lang.String) * @see java.awt.Color#Color(int) - * @since JDK1.0 + * @since 1.0 */ public static Color getColor(String nm) { return getColor(nm, null); @@ -771,7 +771,7 @@ * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.Integer#getInteger(java.lang.String) * @see java.awt.Color#Color(int) - * @since JDK1.0 + * @since 1.0 */ public static Color getColor(String nm, Color v) { Integer intval = Integer.getInteger(nm); @@ -801,7 +801,7 @@ * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.Integer#getInteger(java.lang.String) * @see java.awt.Color#Color(int) - * @since JDK1.0 + * @since 1.0 */ public static Color getColor(String nm, int v) { Integer intval = Integer.getInteger(nm); @@ -834,7 +834,7 @@ * @see java.awt.Color#getRGB() * @see java.awt.Color#Color(int) * @see java.awt.image.ColorModel#getRGBdefault() - * @since JDK1.0 + * @since 1.0 */ public static int HSBtoRGB(float hue, float saturation, float brightness) { int r = 0, g = 0, b = 0; @@ -902,7 +902,7 @@ * @see java.awt.Color#getRGB() * @see java.awt.Color#Color(int) * @see java.awt.image.ColorModel#getRGBdefault() - * @since JDK1.0 + * @since 1.0 */ public static float[] RGBtoHSB(int r, int g, int b, float[] hsbvals) { float hue, saturation, brightness; @@ -957,7 +957,7 @@ * @param b the brightness of the color * @return a Color object with the specified hue, * saturation, and brightness. - * @since JDK1.0 + * @since 1.0 */ public static Color getHSBColor(float h, float s, float b) { return new Color(HSBtoRGB(h, s, b)); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Component.java --- a/jdk/src/share/classes/java/awt/Component.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Component.java Wed Jun 18 13:14:15 2014 -0700 @@ -1018,7 +1018,7 @@ * Gets the name of the component. * @return this component's name * @see #setName - * @since JDK1.1 + * @since 1.1 */ public String getName() { if (name == null && !nameExplicitlySet) { @@ -1035,7 +1035,7 @@ * @param name the string that is to be this * component's name * @see #getName - * @since JDK1.1 + * @since 1.1 */ public void setName(String name) { String oldName; @@ -1050,7 +1050,7 @@ /** * Gets the parent of this component. * @return the parent container of this component - * @since JDK1.0 + * @since 1.0 */ public Container getParent() { return getParent_NoClientCode(); @@ -1221,7 +1221,7 @@ * toolkit is used by that component. Therefore if the component * is moved from one frame to another, the toolkit it uses may change. * @return the toolkit of this component - * @since JDK1.0 + * @since 1.0 */ public Toolkit getToolkit() { return getToolkitImpl(); @@ -1250,7 +1250,7 @@ * otherwise * @see #validate * @see #invalidate - * @since JDK1.0 + * @since 1.0 */ public boolean isValid() { return (peer != null) && valid; @@ -1292,7 +1292,7 @@ * @return true if the component is visible, * false otherwise * @see #setVisible - * @since JDK1.0 + * @since 1.0 */ @Transient public boolean isVisible() { @@ -1419,7 +1419,7 @@ * @return true if the component is showing, * false otherwise * @see #setVisible - * @since JDK1.0 + * @since 1.0 */ public boolean isShowing() { if (visible && (peer != null)) { @@ -1437,7 +1437,7 @@ * @return true if the component is enabled, * false otherwise * @see #setEnabled - * @since JDK1.0 + * @since 1.0 */ public boolean isEnabled() { return isEnabledImpl(); @@ -1466,7 +1466,7 @@ * enabled; otherwise this component is disabled * @see #isEnabled * @see #isLightweight - * @since JDK1.1 + * @since 1.1 */ public void setEnabled(boolean b) { enable(b); @@ -1611,7 +1611,7 @@ * otherwise, hides this component * @see #isVisible * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setVisible(boolean b) { show(b); @@ -1739,7 +1739,7 @@ * not have a foreground color, the foreground color of its parent * is returned * @see #setForeground - * @since JDK1.0 + * @since 1.0 * @beaninfo * bound: true */ @@ -1760,7 +1760,7 @@ * then this component will inherit * the foreground color of its parent * @see #getForeground - * @since JDK1.0 + * @since 1.0 */ public void setForeground(Color c) { Color oldColor = foreground; @@ -1796,7 +1796,7 @@ * not have a background color, * the background color of its parent is returned * @see #setBackground - * @since JDK1.0 + * @since 1.0 */ @Transient public Color getBackground() { @@ -1819,7 +1819,7 @@ * if this parameter is null, then this * component will inherit the background color of its parent * @see #getBackground - * @since JDK1.0 + * @since 1.0 * @beaninfo * bound: true */ @@ -1856,7 +1856,7 @@ * @return this component's font; if a font has not been set * for this component, the font of its parent is returned * @see #setFont - * @since JDK1.0 + * @since 1.0 */ @Transient public Font getFont() { @@ -1887,7 +1887,7 @@ * component will inherit the font of its parent * @see #getFont * @see #invalidate - * @since JDK1.0 + * @since 1.0 * @beaninfo * bound: true */ @@ -1940,7 +1940,7 @@ * does not have its own locale and has not yet been added to * a containment hierarchy such that the locale can be determined * from the containing parent - * @since JDK1.1 + * @since 1.1 */ public Locale getLocale() { Locale locale = this.locale; @@ -1965,7 +1965,7 @@ * @param l the locale to become this component's locale * @see #getLocale * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setLocale(Locale l) { Locale oldValue = locale; @@ -1986,7 +1986,7 @@ * @see java.awt.image.ColorModel * @see java.awt.peer.ComponentPeer#getColorModel() * @see Toolkit#getColorModel() - * @since JDK1.0 + * @since 1.0 */ public ColorModel getColorModel() { ComponentPeer peer = this.peer; @@ -2016,7 +2016,7 @@ * the coordinate space of the component's parent * @see #setLocation * @see #getLocationOnScreen - * @since JDK1.1 + * @since 1.1 */ public Point getLocation() { return location(); @@ -2095,7 +2095,7 @@ * @see #getLocation * @see #setBounds * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setLocation(int x, int y) { move(x, y); @@ -2127,7 +2127,7 @@ * @see #getLocation * @see #setBounds * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setLocation(Point p) { setLocation(p.x, p.y); @@ -2143,7 +2143,7 @@ * @return a Dimension object that indicates the * size of this component * @see #setSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getSize() { return size(); @@ -2170,7 +2170,7 @@ * @see #getSize * @see #setBounds * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setSize(int width, int height) { resize(width, height); @@ -2201,7 +2201,7 @@ * @see #setSize * @see #setBounds * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setSize(Dimension d) { resize(d); @@ -2258,7 +2258,7 @@ * @see #setSize(int, int) * @see #setSize(Dimension) * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setBounds(int x, int y, int width, int height) { reshape(x, y, width, height); @@ -2402,7 +2402,7 @@ * @see #setSize(int, int) * @see #setSize(Dimension) * @see #invalidate - * @since JDK1.1 + * @since 1.1 */ public void setBounds(Rectangle r) { setBounds(r.x, r.y, r.width, r.height); @@ -2883,7 +2883,7 @@ * @see #doLayout() * @see LayoutManager * @see Container#validate - * @since JDK1.0 + * @since 1.0 */ public void validate() { synchronized (getTreeLock()) { @@ -2926,7 +2926,7 @@ * @see #doLayout * @see LayoutManager * @see java.awt.Container#isValidateRoot - * @since JDK1.0 + * @since 1.0 */ public void invalidate() { synchronized (getTreeLock()) { @@ -3021,7 +3021,7 @@ * @return a graphics context for this component, or null * if it has none * @see #paint - * @since JDK1.0 + * @since 1.0 */ public Graphics getGraphics() { if (peer instanceof LightweightPeer) { @@ -3085,7 +3085,7 @@ * @see #getPeer * @see java.awt.peer.ComponentPeer#getFontMetrics(Font) * @see Toolkit#getFontMetrics(Font) - * @since JDK1.0 + * @since 1.0 */ public FontMetrics getFontMetrics(Font font) { // This is an unsupported hack, but left in for a customer. @@ -3125,7 +3125,7 @@ * @see #contains * @see Toolkit#createCustomCursor * @see Cursor - * @since JDK1.1 + * @since 1.1 */ public void setCursor(Cursor cursor) { this.cursor = cursor; @@ -3158,7 +3158,7 @@ * If no cursor is set in the entire hierarchy, * Cursor.DEFAULT_CURSOR is returned. * @see #setCursor - * @since JDK1.1 + * @since 1.1 */ public Cursor getCursor() { return getCursor_NoClientCode(); @@ -3212,7 +3212,7 @@ * * @param g the graphics context to use for painting * @see #update - * @since JDK1.0 + * @since 1.0 */ public void paint(Graphics g) { } @@ -3248,7 +3248,7 @@ * @param g the specified context to use for updating * @see #paint * @see #repaint() - * @since JDK1.0 + * @since 1.0 */ public void update(Graphics g) { paint(g); @@ -3264,7 +3264,7 @@ * * @param g the graphics context to use for painting * @see #paint - * @since JDK1.0 + * @since 1.0 */ public void paintAll(Graphics g) { if (isShowing()) { @@ -3308,7 +3308,7 @@ * * @see #update(Graphics) - * @since JDK1.0 + * @since 1.0 */ public void repaint() { repaint(0, 0, 0, width, height); @@ -3327,7 +3327,7 @@ * @param tm maximum time in milliseconds before update * @see #paint * @see #update(Graphics) - * @since JDK1.0 + * @since 1.0 */ public void repaint(long tm) { repaint(tm, 0, 0, width, height); @@ -3351,7 +3351,7 @@ * @param width the width * @param height the height * @see #update(Graphics) - * @since JDK1.0 + * @since 1.0 */ public void repaint(int x, int y, int width, int height) { repaint(0, x, y, width, height); @@ -3377,7 +3377,7 @@ * @param width the width * @param height the height * @see #update(Graphics) - * @since JDK1.0 + * @since 1.0 */ public void repaint(long tm, int x, int y, int width, int height) { if (this.peer instanceof LightweightPeer) { @@ -3430,7 +3430,7 @@ * graphics context is the bounding rectangle of this component. * @param g the graphics context to use for printing * @see #paint(Graphics) - * @since JDK1.0 + * @since 1.0 */ public void print(Graphics g) { paint(g); @@ -3445,7 +3445,7 @@ * graphics context is the bounding rectangle of this component. * @param g the graphics context to use for printing * @see #print(Graphics) - * @since JDK1.0 + * @since 1.0 */ public void printAll(Graphics g) { if (isShowing()) { @@ -3525,7 +3525,7 @@ * @see Graphics#drawImage(Image, int, int, int, int, Color, java.awt.image.ImageObserver) * @see Graphics#drawImage(Image, int, int, int, int, java.awt.image.ImageObserver) * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) - * @since JDK1.0 + * @since 1.0 */ public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) { @@ -3550,7 +3550,7 @@ * Creates an image from the specified image producer. * @param producer the image producer * @return the image produced - * @since JDK1.0 + * @since 1.0 */ public Image createImage(ImageProducer producer) { ComponentPeer peer = this.peer; @@ -3572,7 +3572,7 @@ * true. * @see #isDisplayable * @see GraphicsEnvironment#isHeadless - * @since JDK1.0 + * @since 1.0 */ public Image createImage(int width, int height) { ComponentPeer peer = this.peer; @@ -3643,7 +3643,7 @@ * to be notified as the image is being prepared * @return true if the image has already been fully * prepared; false otherwise - * @since JDK1.0 + * @since 1.0 */ public boolean prepareImage(Image image, ImageObserver observer) { return prepareImage(image, -1, -1, observer); @@ -3665,7 +3665,7 @@ * @return true if the image has already been fully * prepared; false otherwise * @see java.awt.image.ImageObserver - * @since JDK1.0 + * @since 1.0 */ public boolean prepareImage(Image image, int width, int height, ImageObserver observer) { @@ -3701,7 +3701,7 @@ * @see #prepareImage(Image, int, int, java.awt.image.ImageObserver) * @see Toolkit#checkImage(Image, int, int, java.awt.image.ImageObserver) * @see java.awt.image.ImageObserver - * @since JDK1.0 + * @since 1.0 */ public int checkImage(Image image, ImageObserver observer) { return checkImage(image, -1, -1, observer); @@ -3737,7 +3737,7 @@ * @see #prepareImage(Image, int, int, java.awt.image.ImageObserver) * @see Toolkit#checkImage(Image, int, int, java.awt.image.ImageObserver) * @see java.awt.image.ImageObserver - * @since JDK1.0 + * @since 1.0 */ public int checkImage(Image image, int width, int height, ImageObserver observer) { @@ -4622,7 +4622,7 @@ * @param x the x coordinate of the point * @param y the y coordinate of the point * @see #getComponentAt(int, int) - * @since JDK1.1 + * @since 1.1 */ public boolean contains(int x, int y) { return inside(x, y); @@ -4644,7 +4644,7 @@ * @param p the point * @throws NullPointerException if {@code p} is {@code null} * @see #getComponentAt(Point) - * @since JDK1.1 + * @since 1.1 */ public boolean contains(Point p) { return contains(p.x, p.y); @@ -4669,7 +4669,7 @@ * null if the location * is outside this component * @see #contains(int, int) - * @since JDK1.0 + * @since 1.0 */ public Component getComponentAt(int x, int y) { return locate(x, y); @@ -4689,7 +4689,7 @@ * specified point. * @param p the point * @see java.awt.Component#contains - * @since JDK1.1 + * @since 1.1 */ public Component getComponentAt(Point p) { return getComponentAt(p.x, p.y); @@ -5224,7 +5224,7 @@ * @see java.awt.event.ComponentListener * @see #removeComponentListener * @see #getComponentListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void addComponentListener(ComponentListener l) { if (l == null) { @@ -5248,7 +5248,7 @@ * @see java.awt.event.ComponentListener * @see #addComponentListener * @see #getComponentListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeComponentListener(ComponentListener l) { if (l == null) { @@ -5286,7 +5286,7 @@ * @see java.awt.event.FocusListener * @see #removeFocusListener * @see #getFocusListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void addFocusListener(FocusListener l) { if (l == null) { @@ -5317,7 +5317,7 @@ * @see java.awt.event.FocusListener * @see #addFocusListener * @see #getFocusListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeFocusListener(FocusListener l) { if (l == null) { @@ -5618,7 +5618,7 @@ * @see java.awt.event.KeyListener * @see #removeKeyListener * @see #getKeyListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void addKeyListener(KeyListener l) { if (l == null) { @@ -5649,7 +5649,7 @@ * @see java.awt.event.KeyListener * @see #addKeyListener * @see #getKeyListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeKeyListener(KeyListener l) { if (l == null) { @@ -5687,7 +5687,7 @@ * @see java.awt.event.MouseListener * @see #removeMouseListener * @see #getMouseListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void addMouseListener(MouseListener l) { if (l == null) { @@ -5718,7 +5718,7 @@ * @see java.awt.event.MouseListener * @see #addMouseListener * @see #getMouseListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeMouseListener(MouseListener l) { if (l == null) { @@ -5756,7 +5756,7 @@ * @see java.awt.event.MouseMotionListener * @see #removeMouseMotionListener * @see #getMouseMotionListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void addMouseMotionListener(MouseMotionListener l) { if (l == null) { @@ -5787,7 +5787,7 @@ * @see java.awt.event.MouseMotionListener * @see #addMouseMotionListener * @see #getMouseMotionListeners - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeMouseMotionListener(MouseMotionListener l) { if (l == null) { @@ -6072,7 +6072,7 @@ * @see #processEvent * @see #disableEvents * @see AWTEvent - * @since JDK1.1 + * @since 1.1 */ protected final void enableEvents(long eventsToEnable) { long notifyAncestors = 0; @@ -6108,7 +6108,7 @@ * from being delivered to this component. * @param eventsToDisable the event mask defining the event types * @see #enableEvents - * @since JDK1.1 + * @since 1.1 */ protected final void disableEvents(long eventsToDisable) { long notifyAncestors = 0; @@ -6285,7 +6285,7 @@ * @see #processInputMethodEvent * @see #processHierarchyEvent * @see #processMouseWheelEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof FocusEvent) { @@ -6351,7 +6351,7 @@ * @see java.awt.event.ComponentListener * @see #addComponentListener * @see #enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processComponentEvent(ComponentEvent e) { ComponentListener listener = componentListener; @@ -6414,7 +6414,7 @@ * @see #addFocusListener * @see #enableEvents * @see #dispatchEvent - * @since JDK1.1 + * @since 1.1 */ protected void processFocusEvent(FocusEvent e) { FocusListener listener = focusListener; @@ -6480,7 +6480,7 @@ * @see #addKeyListener * @see #enableEvents * @see #isShowing - * @since JDK1.1 + * @since 1.1 */ protected void processKeyEvent(KeyEvent e) { KeyListener listener = keyListener; @@ -6522,7 +6522,7 @@ * @see java.awt.event.MouseListener * @see #addMouseListener * @see #enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processMouseEvent(MouseEvent e) { MouseListener listener = mouseListener; @@ -6570,7 +6570,7 @@ * @see java.awt.event.MouseMotionListener * @see #addMouseMotionListener * @see #enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processMouseMotionEvent(MouseEvent e) { MouseMotionListener listener = mouseMotionListener; @@ -6882,7 +6882,7 @@ * @see #isDisplayable * @see #removeNotify * @see #invalidate - * @since JDK1.0 + * @since 1.0 */ public void addNotify() { synchronized (getTreeLock()) { @@ -6985,7 +6985,7 @@ * * @see #isDisplayable * @see #addNotify - * @since JDK1.0 + * @since 1.0 */ public void removeNotify() { KeyboardFocusManager.clearMostRecentFocusOwner(this); @@ -7094,7 +7094,7 @@ * @return true if this Component is * focusable; false otherwise * @see #setFocusable - * @since JDK1.1 + * @since 1.1 * @deprecated As of 1.4, replaced by isFocusable(). */ @Deprecated @@ -7433,7 +7433,7 @@ * @see #isFocusable * @see #isDisplayable * @see KeyboardFocusManager#clearGlobalFocusOwner - * @since JDK1.0 + * @since 1.0 */ public void requestFocus() { requestFocusHelper(false, true); @@ -7862,7 +7862,7 @@ * Transfers the focus to the next component, as though this Component were * the focus owner. * @see #requestFocus() - * @since JDK1.1 + * @since 1.1 */ public void transferFocus() { nextFocus(); @@ -8070,7 +8070,7 @@ * @param popup the popup menu to be added to the component. * @see #remove(MenuComponent) * @exception NullPointerException if {@code popup} is {@code null} - * @since JDK1.1 + * @since 1.1 */ public void add(PopupMenu popup) { synchronized (getTreeLock()) { @@ -8095,7 +8095,7 @@ * Removes the specified popup menu from the component. * @param popup the popup menu to be removed * @see #add(PopupMenu) - * @since JDK1.1 + * @since 1.1 */ @SuppressWarnings("unchecked") public void remove(MenuComponent popup) { @@ -8126,7 +8126,7 @@ * null. * * @return a string representation of this component's state - * @since JDK1.0 + * @since 1.0 */ protected String paramString() { final String thisName = Objects.toString(getName(), ""); @@ -8140,7 +8140,7 @@ /** * Returns a string representation of this component and its values. * @return a string representation of this component - * @since JDK1.0 + * @since 1.0 */ public String toString() { return getClass().getName() + '[' + paramString() + ']'; @@ -8150,7 +8150,7 @@ * Prints a listing of this component to the standard system output * stream System.out. * @see java.lang.System#out - * @since JDK1.0 + * @since 1.0 */ public void list() { list(System.out, 0); @@ -8161,7 +8161,7 @@ * stream. * @param out a print stream * @throws NullPointerException if {@code out} is {@code null} - * @since JDK1.0 + * @since 1.0 */ public void list(PrintStream out) { list(out, 0); @@ -8174,7 +8174,7 @@ * @param indent number of spaces to indent * @see java.io.PrintStream#println(java.lang.Object) * @throws NullPointerException if {@code out} is {@code null} - * @since JDK1.0 + * @since 1.0 */ public void list(PrintStream out, int indent) { for (int i = 0 ; i < indent ; i++) { @@ -8187,7 +8187,7 @@ * Prints a listing to the specified print writer. * @param out the print writer to print to * @throws NullPointerException if {@code out} is {@code null} - * @since JDK1.1 + * @since 1.1 */ public void list(PrintWriter out) { list(out, 0); @@ -8200,7 +8200,7 @@ * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null} * @see java.io.PrintStream#println(java.lang.Object) - * @since JDK1.1 + * @since 1.1 */ public void list(PrintWriter out, int indent) { for (int i = 0 ; i < indent ; i++) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Container.java --- a/jdk/src/share/classes/java/awt/Container.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Container.java Wed Jun 18 13:14:15 2014 -0700 @@ -85,7 +85,7 @@ * @see #add(java.awt.Component, int) * @see #getComponent(int) * @see LayoutManager - * @since JDK1.0 + * @since 1.0 */ public class Container extends Component { @@ -302,7 +302,7 @@ * * @return the number of components in this panel. * @see #getComponent - * @since JDK1.1 + * @since 1.1 * @see Component#getTreeLock() */ public int getComponentCount() { @@ -384,7 +384,7 @@ * @return the insets of this container. * @see Insets * @see LayoutManager - * @since JDK1.1 + * @since 1.1 */ public Insets getInsets() { return insets(); @@ -975,7 +975,7 @@ * @see #validate * @see javax.swing.JComponent#revalidate() * @see LayoutManager - * @since JDK1.1 + * @since 1.1 */ public void add(Component comp, Object constraints) { addImpl(comp, constraints, -1); @@ -1078,7 +1078,7 @@ * @see #invalidate * @see LayoutManager * @see LayoutManager2 - * @since JDK1.1 + * @since 1.1 */ protected void addImpl(Component comp, Object constraints, int index) { synchronized (getTreeLock()) { @@ -1202,7 +1202,7 @@ * @see #invalidate * @see #validate * @see #getComponentCount - * @since JDK1.1 + * @since 1.1 */ public void remove(int index) { synchronized (getTreeLock()) { @@ -1501,7 +1501,7 @@ * @see LayoutManager#layoutContainer * @see #setLayout * @see #validate - * @since JDK1.1 + * @since 1.1 */ public void doLayout() { layout(); @@ -1749,7 +1749,7 @@ * @param f The font to become this container's font. * @see Component#getFont * @see #invalidate - * @since JDK1.0 + * @since 1.0 */ public void setFont(Font f) { boolean shouldinvalidate = false; @@ -1834,7 +1834,7 @@ * @see #getLayout * @see LayoutManager#minimumLayoutSize(Container) * @see Component#getMinimumSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize() { return minimumSize(); @@ -2539,7 +2539,7 @@ * point is within the bounds of the container the container itself * is returned; otherwise the top-most child is returned. * @see Component#contains - * @since JDK1.1 + * @since 1.1 */ public Component getComponentAt(int x, int y) { return locate(x, y); @@ -2585,7 +2585,7 @@ * or null if the component does * not contain the point. * @see Component#contains - * @since JDK1.1 + * @since 1.1 */ public Component getComponentAt(Point p) { return getComponentAt(p.x, p.y); @@ -2837,7 +2837,7 @@ * @param c the component * @return true if it is an ancestor; * false otherwise. - * @since JDK1.1 + * @since 1.1 */ public boolean isAncestorOf(Component c) { Container p; @@ -3012,7 +3012,7 @@ * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null} * @see Component#list(java.io.PrintStream, int) - * @since JDK1.0 + * @since 1.0 */ public void list(PrintStream out, int indent) { super.list(out, indent); @@ -3039,7 +3039,7 @@ * @param indent the number of spaces to indent * @throws NullPointerException if {@code out} is {@code null} * @see Component#list(java.io.PrintWriter, int) - * @since JDK1.1 + * @since 1.1 */ public void list(PrintWriter out, int indent) { super.list(out, indent); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Dialog.java --- a/jdk/src/share/classes/java/awt/Dialog.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Dialog.java Wed Jun 18 13:14:15 2014 -0700 @@ -92,7 +92,7 @@ * * @author Sami Shaio * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class Dialog extends Window { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Event.java --- a/jdk/src/share/classes/java/awt/Event.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Event.java Wed Jun 18 13:14:15 2014 -0700 @@ -57,7 +57,7 @@ * PGDN, F1, F2, etc). * * @author Sami Shaio - * @since JDK1.0 + * @since 1.0 */ public class Event implements java.io.Serializable { private transient long data; @@ -871,7 +871,7 @@ * @return a string that represents the event and the values * of its member fields. * @see java.awt.Event#paramString - * @since JDK1.1 + * @since 1.1 */ public String toString() { return getClass().getName() + "[" + paramString() + "]"; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/FileDialog.java --- a/jdk/src/share/classes/java/awt/FileDialog.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/FileDialog.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * * @author Sami Shaio * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class FileDialog extends Dialog { @@ -176,7 +176,7 @@ * FileDialog(parent, "", LOAD). * * @param parent the owner of the dialog - * @since JDK1.1 + * @since 1.1 */ public FileDialog(Frame parent) { this(parent, "", LOAD); @@ -353,7 +353,7 @@ * @see java.awt.FileDialog#getMode * @exception IllegalArgumentException if an illegal file * dialog mode is supplied - * @since JDK1.1 + * @since 1.1 */ public void setMode(int mode) { switch (mode) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/FlowLayout.java --- a/jdk/src/share/classes/java/awt/FlowLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/FlowLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -79,7 +79,7 @@ * * @author Arthur van Hoff * @author Sami Shaio - * @since JDK1.0 + * @since 1.0 * @see ComponentOrientation */ public class FlowLayout implements LayoutManager, java.io.Serializable { @@ -246,7 +246,7 @@ * or FlowLayout.TRAILING. * @return the alignment value for this layout * @see java.awt.FlowLayout#setAlignment - * @since JDK1.1 + * @since 1.1 */ public int getAlignment() { return newAlign; @@ -264,7 +264,7 @@ *
* @param align one of the alignment values shown above * @see #getAlignment() - * @since JDK1.1 + * @since 1.1 */ public void setAlignment(int align) { this.newAlign = align; @@ -295,7 +295,7 @@ * and between the components and the borders * of the Container * @see java.awt.FlowLayout#setHgap - * @since JDK1.1 + * @since 1.1 */ public int getHgap() { return hgap; @@ -310,7 +310,7 @@ * and between the components and the borders * of the Container * @see java.awt.FlowLayout#getHgap - * @since JDK1.1 + * @since 1.1 */ public void setHgap(int hgap) { this.hgap = hgap; @@ -325,7 +325,7 @@ * and between the components and the borders * of the Container * @see java.awt.FlowLayout#setVgap - * @since JDK1.1 + * @since 1.1 */ public int getVgap() { return vgap; @@ -339,7 +339,7 @@ * and between the components and the borders * of the Container * @see java.awt.FlowLayout#getVgap - * @since JDK1.1 + * @since 1.1 */ public void setVgap(int vgap) { this.vgap = vgap; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Font.java --- a/jdk/src/share/classes/java/awt/Font.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Font.java Wed Jun 18 13:14:15 2014 -0700 @@ -364,7 +364,7 @@ /** * The logical name of this Font, as passed to the * constructor. - * @since JDK1.0 + * @since 1.0 * * @serial * @see #getName @@ -374,7 +374,7 @@ /** * The style of this Font, as passed to the constructor. * This style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC. - * @since JDK1.0 + * @since 1.0 * * @serial * @see #getStyle() @@ -383,7 +383,7 @@ /** * The point size of this Font, rounded to integer. - * @since JDK1.0 + * @since 1.0 * * @serial * @see #getSize() @@ -436,7 +436,7 @@ /** * Gets the peer of this Font. * @return the peer of the Font. - * @since JDK1.1 + * @since 1.1 * @deprecated Font rendering is now platform independent. */ @Deprecated @@ -562,7 +562,7 @@ * @param size the point size of the {@code Font} * @see GraphicsEnvironment#getAllFonts * @see GraphicsEnvironment#getAvailableFontFamilyNames - * @since JDK1.0 + * @since 1.0 */ public Font(String name, int style, int size) { this.name = (name != null) ? name : "Default"; @@ -1180,7 +1180,7 @@ * * @see #getName * @see #getFontName - * @since JDK1.1 + * @since 1.1 */ public String getFamily() { return getFamily_NoClientCode(); @@ -1240,7 +1240,7 @@ * this Font. * @see #getFamily * @see #getFontName - * @since JDK1.0 + * @since 1.0 */ public String getName() { return name; @@ -1286,7 +1286,7 @@ * @see #isPlain * @see #isBold * @see #isItalic - * @since JDK1.0 + * @since 1.0 */ public int getStyle() { return style; @@ -1312,7 +1312,7 @@ * @see #getSize2D * @see GraphicsConfiguration#getDefaultTransform * @see GraphicsConfiguration#getNormalizingTransform - * @since JDK1.0 + * @since 1.0 */ public int getSize() { return size; @@ -1337,7 +1337,7 @@ * PLAIN style; * false otherwise. * @see java.awt.Font#getStyle - * @since JDK1.0 + * @since 1.0 */ public boolean isPlain() { return style == 0; @@ -1350,7 +1350,7 @@ * style is BOLD; * false otherwise. * @see java.awt.Font#getStyle - * @since JDK1.0 + * @since 1.0 */ public boolean isBold() { return (style & BOLD) != 0; @@ -1363,7 +1363,7 @@ * style is ITALIC; * false otherwise. * @see java.awt.Font#getStyle - * @since JDK1.0 + * @since 1.0 */ public boolean isItalic() { return (style & ITALIC) != 0; @@ -1484,7 +1484,7 @@ * describes, or a new default Font if * str is null. * @see #getFamily - * @since JDK1.1 + * @since 1.1 */ public static Font decode(String str) { String fontName = str; @@ -1595,7 +1595,7 @@ /** * Returns a hashcode for this Font. * @return a hashcode value for this Font. - * @since JDK1.0 + * @since 1.0 */ public int hashCode() { if (hash == 0) { @@ -1622,7 +1622,7 @@ * or if the argument is a Font object * describing the same font as this object; * false otherwise. - * @since JDK1.0 + * @since 1.0 */ public boolean equals(Object obj) { if (obj == this) { @@ -1667,7 +1667,7 @@ * representation. * @return a String representation of this * Font object. - * @since JDK1.0 + * @since 1.0 */ // NOTE: This method may be called by privileged threads. // DO NOT INVOKE CLIENT CODE ON THIS THREAD! diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/FontMetrics.java --- a/jdk/src/share/classes/java/awt/FontMetrics.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/FontMetrics.java Wed Jun 18 13:14:15 2014 -0700 @@ -94,7 +94,7 @@ * * @author Jim Graham * @see java.awt.Font - * @since JDK1.0 + * @since 1.0 */ public abstract class FontMetrics implements java.io.Serializable { @@ -625,7 +625,6 @@ * object's values as a String. * @return a String representation of this * FontMetrics object. - * @since JDK1.0. */ public String toString() { return getClass().getName() + diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Frame.java --- a/jdk/src/share/classes/java/awt/Frame.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Frame.java Wed Jun 18 13:14:15 2014 -0700 @@ -130,7 +130,7 @@ * @author Sami Shaio * @see WindowEvent * @see Window#addWindowListener - * @since JDK1.0 + * @since 1.0 */ public class Frame extends Window implements MenuContainer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Graphics.java --- a/jdk/src/share/classes/java/awt/Graphics.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Graphics.java Wed Jun 18 13:14:15 2014 -0700 @@ -99,7 +99,7 @@ * @see java.awt.Graphics#setPaintMode() * @see java.awt.Graphics#setXORMode(java.awt.Color) * @see java.awt.Graphics#setFont(java.awt.Font) - * @since JDK1.0 + * @since 1.0 */ public abstract class Graphics { @@ -283,7 +283,7 @@ * @see java.awt.Graphics#clipRect * @see java.awt.Graphics#setClip(int, int, int, int) * @see java.awt.Graphics#setClip(Shape) - * @since JDK1.1 + * @since 1.1 */ public abstract Rectangle getClipBounds(); @@ -321,7 +321,7 @@ * @see java.awt.Graphics#clipRect * @see java.awt.Graphics#setClip(Shape) * @see java.awt.Graphics#getClip - * @since JDK1.1 + * @since 1.1 */ public abstract void setClip(int x, int y, int width, int height); @@ -339,7 +339,7 @@ * @see java.awt.Graphics#clipRect * @see java.awt.Graphics#setClip(int, int, int, int) * @see java.awt.Graphics#setClip(Shape) - * @since JDK1.1 + * @since 1.1 */ public abstract Shape getClip(); @@ -357,7 +357,7 @@ * @see java.awt.Graphics#getClip() * @see java.awt.Graphics#clipRect * @see java.awt.Graphics#setClip(int, int, int, int) - * @since JDK1.1 + * @since 1.1 */ public abstract void setClip(Shape clip); @@ -694,7 +694,7 @@ * @param yPoints an array of y points * @param nPoints the total number of points * @see java.awt.Graphics#drawPolygon(int[], int[], int) - * @since JDK1.1 + * @since 1.1 */ public abstract void drawPolyline(int xPoints[], int yPoints[], int nPoints); @@ -1058,7 +1058,7 @@ * @see java.awt.Image * @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) - * @since JDK1.1 + * @since 1.1 */ public abstract boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, @@ -1119,7 +1119,7 @@ * @see java.awt.Image * @see java.awt.image.ImageObserver * @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) - * @since JDK1.1 + * @since 1.1 */ public abstract boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Graphics2D.java --- a/jdk/src/share/classes/java/awt/Graphics2D.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Graphics2D.java Wed Jun 18 13:14:15 2014 -0700 @@ -662,7 +662,7 @@ * null * @see java.awt.Graphics#drawBytes * @see java.awt.Graphics#drawChars - * @since JDK1.0 + * @since 1.0 */ public abstract void drawString(String str, int x, int y); @@ -968,7 +968,7 @@ * context are relative to this new origin. * @param x the specified x coordinate * @param y the specified y coordinate - * @since JDK1.0 + * @since 1.0 */ public abstract void translate(int x, int y); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/GridBagConstraints.java --- a/jdk/src/share/classes/java/awt/GridBagConstraints.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/GridBagConstraints.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * @author Doug Stein * @author Bill Spitzak (orignial NeWS & OLIT implementation) * @see java.awt.GridBagLayout - * @since JDK1.0 + * @since 1.0 */ public class GridBagConstraints implements Cloneable, java.io.Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/GridBagLayout.java --- a/jdk/src/share/classes/java/awt/GridBagLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/GridBagLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -359,7 +359,7 @@ * @see java.awt.GridBagConstraints * @see java.awt.GridBagLayoutInfo * @see java.awt.ComponentOrientation - * @since JDK1.0 + * @since 1.0 */ public class GridBagLayout implements LayoutManager2, java.io.Serializable { @@ -562,7 +562,7 @@ * @return the graphics origin of the cell in the top-left * corner of the layout grid * @see java.awt.ComponentOrientation - * @since JDK1.1 + * @since 1.1 */ public Point getLayoutOrigin () { Point origin = new Point(0,0); @@ -580,7 +580,7 @@ * @return an array of two arrays, containing the widths * of the layout columns and * the heights of the layout rows - * @since JDK1.1 + * @since 1.1 */ public int [][] getLayoutDimensions () { if (layoutInfo == null) @@ -606,7 +606,7 @@ * @return an array of two arrays, representing the * horizontal weights of the layout columns * and the vertical weights of the layout rows - * @since JDK1.1 + * @since 1.1 */ public double [][] getLayoutWeights () { if (layoutInfo == null) @@ -647,7 +647,7 @@ * in the layout grid contains the point * (xy). * @see java.awt.ComponentOrientation - * @since JDK1.1 + * @since 1.1 */ public Point location(int x, int y) { Point loc = new Point(0,0); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/GridBagLayoutInfo.java --- a/jdk/src/share/classes/java/awt/GridBagLayoutInfo.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/GridBagLayoutInfo.java Wed Jun 18 13:14:15 2014 -0700 @@ -62,7 +62,7 @@ * grid cells with it's own parameters. * @param width the columns * @param height the rows - * @since 6.0 + * @since 1.6 */ GridBagLayoutInfo(int width, int height) { this.width = width; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/GridLayout.java --- a/jdk/src/share/classes/java/awt/GridLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/GridLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -88,7 +88,7 @@ * number of rows is set to zero. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class GridLayout implements LayoutManager, java.io.Serializable { /* @@ -144,7 +144,7 @@ /** * Creates a grid layout with a default of one column per component, * in a single row. - * @since JDK1.1 + * @since 1.1 */ public GridLayout() { this(1, 0, 0, 0); @@ -203,7 +203,7 @@ /** * Gets the number of rows in this layout. * @return the number of rows in this layout - * @since JDK1.1 + * @since 1.1 */ public int getRows() { return rows; @@ -214,7 +214,7 @@ * @param rows the number of rows in this layout * @exception IllegalArgumentException if the value of both * rows and cols is set to zero - * @since JDK1.1 + * @since 1.1 */ public void setRows(int rows) { if ((rows == 0) && (this.cols == 0)) { @@ -226,7 +226,7 @@ /** * Gets the number of columns in this layout. * @return the number of columns in this layout - * @since JDK1.1 + * @since 1.1 */ public int getColumns() { return cols; @@ -242,7 +242,7 @@ * @param cols the number of columns in this layout * @exception IllegalArgumentException if the value of both * rows and cols is set to zero - * @since JDK1.1 + * @since 1.1 */ public void setColumns(int cols) { if ((cols == 0) && (this.rows == 0)) { @@ -254,7 +254,7 @@ /** * Gets the horizontal gap between components. * @return the horizontal gap between components - * @since JDK1.1 + * @since 1.1 */ public int getHgap() { return hgap; @@ -263,7 +263,7 @@ /** * Sets the horizontal gap between components to the specified value. * @param hgap the horizontal gap between components - * @since JDK1.1 + * @since 1.1 */ public void setHgap(int hgap) { this.hgap = hgap; @@ -272,7 +272,7 @@ /** * Gets the vertical gap between components. * @return the vertical gap between components - * @since JDK1.1 + * @since 1.1 */ public int getVgap() { return vgap; @@ -281,7 +281,7 @@ /** * Sets the vertical gap between components to the specified value. * @param vgap the vertical gap between components - * @since JDK1.1 + * @since 1.1 */ public void setVgap(int vgap) { this.vgap = vgap; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Image.java --- a/jdk/src/share/classes/java/awt/Image.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Image.java Wed Jun 18 13:14:15 2014 -0700 @@ -41,7 +41,7 @@ * * @author Sami Shaio * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public abstract class Image { @@ -164,7 +164,7 @@ * @see java.awt.Image#SCALE_SMOOTH * @see java.awt.Image#SCALE_REPLICATE * @see java.awt.Image#SCALE_AREA_AVERAGING - * @since JDK1.1 + * @since 1.1 */ public Image getScaledInstance(int width, int height, int hints) { ImageFilter filter; @@ -180,21 +180,21 @@ /** * Use the default image-scaling algorithm. - * @since JDK1.1 + * @since 1.1 */ public static final int SCALE_DEFAULT = 1; /** * Choose an image-scaling algorithm that gives higher priority * to scaling speed than smoothness of the scaled image. - * @since JDK1.1 + * @since 1.1 */ public static final int SCALE_FAST = 2; /** * Choose an image-scaling algorithm that gives higher priority * to image smoothness than scaling speed. - * @since JDK1.1 + * @since 1.1 */ public static final int SCALE_SMOOTH = 4; @@ -205,7 +205,7 @@ * that performs the same algorithm yet integrates more efficiently * into the imaging infrastructure supplied by the toolkit. * @see java.awt.image.ReplicateScaleFilter - * @since JDK1.1 + * @since 1.1 */ public static final int SCALE_REPLICATE = 8; @@ -215,7 +215,7 @@ * performs the same algorithm yet integrates more efficiently * into the image infrastructure supplied by the toolkit. * @see java.awt.image.AreaAveragingScaleFilter - * @since JDK1.1 + * @since 1.1 */ public static final int SCALE_AREA_AVERAGING = 16; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Insets.java --- a/jdk/src/share/classes/java/awt/Insets.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Insets.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * @author Sami Shaio * @see java.awt.LayoutManager * @see java.awt.Container - * @since JDK1.0 + * @since 1.0 */ public class Insets implements Cloneable, java.io.Serializable { @@ -130,7 +130,7 @@ * bottom, and right are all equal. * @return true if the two insets are equal; * otherwise false. - * @since JDK1.1 + * @since 1.1 */ public boolean equals(Object obj) { if (obj instanceof Insets) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Label.java --- a/jdk/src/share/classes/java/awt/Label.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Label.java Wed Jun 18 13:14:15 2014 -0700 @@ -49,7 +49,7 @@ * style="float:center; margin: 7px 10px;"> * * @author Sami Shaio - * @since JDK1.0 + * @since 1.0 */ public class Label extends Component implements Accessible { @@ -73,7 +73,6 @@ /** * Indicates that the label should be right justified. - * @since JDK1.0t. */ public static final int RIGHT = 2; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/List.java --- a/jdk/src/share/classes/java/awt/List.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/List.java Wed Jun 18 13:14:15 2014 -0700 @@ -104,7 +104,7 @@ * @see java.awt.event.ItemListener * @see java.awt.event.ActionEvent * @see java.awt.event.ActionListener - * @since JDK1.0 + * @since 1.0 */ public class List extends Component implements ItemSelectable, Accessible { /** @@ -199,7 +199,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public List(int rows) throws HeadlessException { this(rows, false); @@ -275,7 +275,7 @@ * Gets the number of items in the list. * @return the number of items in the list * @see #getItem - * @since JDK1.1 + * @since 1.1 */ public int getItemCount() { return countItems(); @@ -315,7 +315,7 @@ * @see #select * @see #deselect * @see #isIndexSelected - * @since JDK1.1 + * @since 1.1 */ public synchronized String[] getItems() { String itemCopies[] = new String[items.size()]; @@ -326,7 +326,7 @@ /** * Adds the specified item to the end of scrolling list. * @param item the item to be added - * @since JDK1.1 + * @since 1.1 */ public void add(String item) { addItem(item); @@ -351,7 +351,7 @@ * if this parameter is null then the item is * treated as an empty string, "" * @param index the position at which to add the item - * @since JDK1.1 + * @since 1.1 */ public void add(String item, int index) { addItem(item, index); @@ -399,7 +399,7 @@ * Removes all items from this list. * @see #remove * @see #delItems - * @since JDK1.1 + * @since 1.1 */ public void removeAll() { clear(); @@ -426,7 +426,7 @@ * @param item the item to remove from the list * @exception IllegalArgumentException * if the item doesn't exist in the list - * @since JDK1.1 + * @since 1.1 */ public synchronized void remove(String item) { int index = items.indexOf(item); @@ -445,7 +445,7 @@ * only selected item in the list, the list is set to have no selection. * @param position the index of the item to delete * @see #add(String, int) - * @since JDK1.1 + * @since 1.1 * @exception ArrayIndexOutOfBoundsException * if the position is less than 0 or * greater than getItemCount()-1 @@ -639,7 +639,7 @@ * selected; false otherwise * @see #select * @see #deselect - * @since JDK1.1 + * @since 1.1 */ public boolean isIndexSelected(int index) { return isSelected(index); @@ -675,7 +675,7 @@ * @return true if this list allows multiple * selections; otherwise, false * @see #setMultipleMode - * @since JDK1.1 + * @since 1.1 */ public boolean isMultipleMode() { return allowsMultipleSelections(); @@ -702,7 +702,7 @@ * are allowed; otherwise, only one item from * the list can be selected at once * @see #isMultipleMode - * @since JDK1.1 + * @since 1.1 */ public void setMultipleMode(boolean b) { setMultipleSelections(b); @@ -753,7 +753,7 @@ * @return the preferred dimensions for displaying this scrolling list * given that the specified number of rows must be visible * @see java.awt.Component#getPreferredSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getPreferredSize(int rows) { return preferredSize(rows); @@ -777,7 +777,7 @@ * Gets the preferred size of this scrolling list. * @return the preferred dimensions for displaying this scrolling list * @see java.awt.Component#getPreferredSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getPreferredSize() { return preferredSize(); @@ -803,7 +803,7 @@ * @return the minimum dimensions for displaying this scrolling list * given that the specified number of rows must be visible * @see java.awt.Component#getMinimumSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize(int rows) { return minimumSize(rows); @@ -828,7 +828,7 @@ * @return the minimum dimensions needed * to display this scrolling list * @see java.awt.Component#getMinimumSize() - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize() { return minimumSize(); @@ -861,7 +861,7 @@ * @see #deselect * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addItemListener(ItemListener l) { if (l == null) { @@ -884,7 +884,7 @@ * @see #getItemListeners * @see java.awt.event.ItemEvent * @see java.awt.event.ItemListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeItemListener(ItemListener l) { if (l == null) { @@ -927,7 +927,7 @@ * @see #getActionListeners * @see java.awt.event.ActionEvent * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addActionListener(ActionListener l) { if (l == null) { @@ -951,7 +951,7 @@ * @see #getActionListeners * @see java.awt.event.ActionEvent * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeActionListener(ActionListener l) { if (l == null) { @@ -1061,7 +1061,7 @@ * @see java.awt.event.ItemEvent * @see #processActionEvent * @see #processItemEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ItemEvent) { @@ -1096,7 +1096,7 @@ * @see java.awt.event.ItemListener * @see #addItemListener * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processItemEvent(ItemEvent e) { ItemListener listener = itemListener; @@ -1127,7 +1127,7 @@ * @see java.awt.event.ActionListener * @see #addActionListener * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processActionEvent(ActionEvent e) { ActionListener listener = actionListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/MediaTracker.java --- a/jdk/src/share/classes/java/awt/MediaTracker.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/MediaTracker.java Wed Jun 18 13:14:15 2014 -0700 @@ -164,7 +164,7 @@ * }
* * @author Jim Graham - * @since JDK1.0 + * @since 1.0 */ public class MediaTracker implements java.io.Serializable { @@ -726,7 +726,7 @@ * @param image the image to be removed * @see java.awt.MediaTracker#removeImage(java.awt.Image, int) * @see java.awt.MediaTracker#removeImage(java.awt.Image, int, int, int) - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeImage(Image image) { removeImageImpl(image); @@ -765,7 +765,7 @@ * @param id the tracking ID from which to remove the image * @see java.awt.MediaTracker#removeImage(java.awt.Image) * @see java.awt.MediaTracker#removeImage(java.awt.Image, int, int, int) - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeImage(Image image, int id) { removeImageImpl(image, id); @@ -805,7 +805,7 @@ * @param height the height to remove (-1 for unscaled) * @see java.awt.MediaTracker#removeImage(java.awt.Image) * @see java.awt.MediaTracker#removeImage(java.awt.Image, int) - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeImage(Image image, int id, int width, int height) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Menu.java --- a/jdk/src/share/classes/java/awt/Menu.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Menu.java Wed Jun 18 13:14:15 2014 -0700 @@ -53,7 +53,7 @@ * @author Sami Shaio * @see java.awt.MenuItem * @see java.awt.CheckboxMenuItem - * @since JDK1.0 + * @since 1.0 */ public class Menu extends MenuItem implements MenuContainer, Accessible { @@ -118,7 +118,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public Menu() throws HeadlessException { this("", false); @@ -151,7 +151,6 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.0. */ public Menu(String label, boolean tearOff) throws HeadlessException { super(label); @@ -215,7 +214,7 @@ /** * Get the number of items in this menu. * @return the number of items in this menu. - * @since JDK1.1 + * @since 1.1 */ public int getItemCount() { return countItems(); @@ -303,7 +302,7 @@ * @see java.awt.Menu#add(java.awt.MenuItem) * @exception IllegalArgumentException if the value of * index is less than zero - * @since JDK1.1 + * @since 1.1 */ public void insert(MenuItem menuitem, int index) { @@ -347,7 +346,7 @@ * @see java.awt.Menu#add(java.awt.MenuItem) * @exception IllegalArgumentException if the value of * index is less than zero - * @since JDK1.1 + * @since 1.1 */ public void insert(String label, int index) { @@ -369,7 +368,7 @@ * @exception IllegalArgumentException if the value of * index is less than 0. * @see java.awt.Menu#addSeparator - * @since JDK1.1 + * @since 1.1 */ public void insertSeparator(int index) { @@ -436,7 +435,7 @@ /** * Removes all items from this menu. - * @since JDK1.0. + * @since 1.1 */ public void removeAll() { synchronized (getTreeLock()) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/MenuBar.java --- a/jdk/src/share/classes/java/awt/MenuBar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/MenuBar.java Wed Jun 18 13:14:15 2014 -0700 @@ -65,7 +65,7 @@ * @see java.awt.Menu * @see java.awt.MenuItem * @see java.awt.MenuShortcut - * @since JDK1.0 + * @since 1.0 */ public class MenuBar extends MenuComponent implements MenuContainer, Accessible { @@ -272,7 +272,7 @@ /** * Gets the number of menus on the menu bar. * @return the number of menus on the menu bar. - * @since JDK1.1 + * @since 1.1 */ public int getMenuCount() { return countMenus(); @@ -318,7 +318,7 @@ * @return an enumeration of menu shortcuts that this * menu bar is managing. * @see java.awt.MenuShortcut - * @since JDK1.1 + * @since 1.1 */ public synchronized Enumeration shortcuts() { Vector shortcuts = new Vector<>(); @@ -341,7 +341,7 @@ * @param s the specified menu shortcut. * @see java.awt.MenuItem * @see java.awt.MenuShortcut - * @since JDK1.1 + * @since 1.1 */ public MenuItem getShortcutMenuItem(MenuShortcut s) { int nmenus = getMenuCount(); @@ -387,7 +387,7 @@ /** * Deletes the specified menu shortcut. * @param s the menu shortcut to delete. - * @since JDK1.1 + * @since 1.1 */ public void deleteShortcut(MenuShortcut s) { int nmenus = getMenuCount(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/MenuComponent.java --- a/jdk/src/share/classes/java/awt/MenuComponent.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/MenuComponent.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ * through the method processEvent. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public abstract class MenuComponent implements java.io.Serializable { @@ -175,7 +175,7 @@ * Gets the name of the menu component. * @return the name of the menu component * @see java.awt.MenuComponent#setName(java.lang.String) - * @since JDK1.1 + * @since 1.1 */ public String getName() { if (name == null && !nameExplicitlySet) { @@ -191,7 +191,7 @@ * Sets the name of the component to the specified string. * @param name the name of the menu component * @see java.awt.MenuComponent#getName - * @since JDK1.1 + * @since 1.1 */ public void setName(String name) { synchronized(this) { @@ -373,7 +373,7 @@ * exception. * * @param e the event - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/MenuItem.java --- a/jdk/src/share/classes/java/awt/MenuItem.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/MenuItem.java Wed Jun 18 13:14:15 2014 -0700 @@ -176,7 +176,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public MenuItem() throws HeadlessException { this("", null); @@ -192,7 +192,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.0 + * @since 1.0 */ public MenuItem(String label) throws HeadlessException { this(label, null); @@ -209,7 +209,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ public MenuItem(String label, MenuShortcut s) throws HeadlessException { this.label = label; @@ -242,7 +242,7 @@ * @return the label of this menu item, or null if this menu item has no label. * @see java.awt.MenuItem#setLabel - * @since JDK1.0 + * @since 1.0 */ public String getLabel() { return label; @@ -252,7 +252,7 @@ * Sets the label for this menu item to the specified label. * @param label the new label, or null for no label. * @see java.awt.MenuItem#getLabel - * @since JDK1.0 + * @since 1.0 */ public synchronized void setLabel(String label) { this.label = label; @@ -265,7 +265,7 @@ /** * Checks whether this menu item is enabled. * @see java.awt.MenuItem#setEnabled - * @since JDK1.0 + * @since 1.0 */ public boolean isEnabled() { return enabled; @@ -276,7 +276,7 @@ * @param b if true, enables this menu item; * if false, disables it. * @see java.awt.MenuItem#isEnabled - * @since JDK1.1 + * @since 1.1 */ public synchronized void setEnabled(boolean b) { enable(b); @@ -327,7 +327,7 @@ * @return the menu shortcut associated with this menu item, * or null if none has been specified. * @see java.awt.MenuItem#setShortcut - * @since JDK1.1 + * @since 1.1 */ public MenuShortcut getShortcut() { return shortcut; @@ -340,7 +340,7 @@ * @param s the menu shortcut to associate * with this menu item. * @see java.awt.MenuItem#getShortcut - * @since JDK1.1 + * @since 1.1 */ public void setShortcut(MenuShortcut s) { shortcut = s; @@ -353,7 +353,7 @@ /** * Delete any MenuShortcut object associated * with this menu item. - * @since JDK1.1 + * @since 1.1 */ public void deleteShortcut() { shortcut = null; @@ -455,7 +455,7 @@ * @see java.awt.MenuItem#processEvent * @see java.awt.MenuItem#disableEvents * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected final void enableEvents(long eventsToEnable) { eventMask |= eventsToEnable; @@ -470,7 +470,7 @@ * @see java.awt.MenuItem#processEvent * @see java.awt.MenuItem#enableEvents * @see java.awt.Component#disableEvents - * @since JDK1.1 + * @since 1.1 */ protected final void disableEvents(long eventsToDisable) { eventMask &= ~eventsToDisable; @@ -485,7 +485,7 @@ * @param command the action command to be set * for this menu item. * @see java.awt.MenuItem#getActionCommand - * @since JDK1.1 + * @since 1.1 */ public void setActionCommand(String command) { actionCommand = command; @@ -495,7 +495,7 @@ * Gets the command name of the action event that is fired * by this menu item. * @see java.awt.MenuItem#setActionCommand - * @since JDK1.1 + * @since 1.1 */ public String getActionCommand() { return getActionCommandImpl(); @@ -518,7 +518,7 @@ * @see #getActionListeners * @see java.awt.event.ActionEvent * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addActionListener(ActionListener l) { if (l == null) { @@ -540,7 +540,7 @@ * @see #getActionListeners * @see java.awt.event.ActionEvent * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeActionListener(ActionListener l) { if (l == null) { @@ -621,7 +621,7 @@ * * @param e the event * @see java.awt.MenuItem#processActionEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ActionEvent) { @@ -661,7 +661,7 @@ * @see java.awt.event.ActionEvent * @see java.awt.event.ActionListener * @see java.awt.MenuItem#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processActionEvent(ActionEvent e) { ActionListener listener = actionListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/MenuShortcut.java --- a/jdk/src/share/classes/java/awt/MenuShortcut.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/MenuShortcut.java Wed Jun 18 13:14:15 2014 -0700 @@ -54,7 +54,7 @@ * via {@link Toolkit#getMenuShortcutKeyMask}. * * @author Thomas Ball - * @since JDK1.1 + * @since 1.1 */ public class MenuShortcut implements java.io.Serializable { @@ -71,7 +71,7 @@ * @see #getKey() * @see #usesShiftModifier() * @see java.awt.event.KeyEvent - * @since JDK1.1 + * @since 1.1 */ int key; @@ -82,7 +82,7 @@ * * @serial * @see #usesShiftModifier() - * @since JDK1.1 + * @since 1.1 */ boolean usesShift; @@ -120,7 +120,7 @@ * Returns the raw keycode of this MenuShortcut. * @return the raw keycode of this MenuShortcut. * @see java.awt.event.KeyEvent - * @since JDK1.1 + * @since 1.1 */ public int getKey() { return key; @@ -130,7 +130,7 @@ * Returns whether this MenuShortcut must be invoked using the SHIFT key. * @return true if this MenuShortcut must be invoked using the * SHIFT key, false otherwise. - * @since JDK1.1 + * @since 1.1 */ public boolean usesShiftModifier() { return usesShift; @@ -143,7 +143,7 @@ * @param s the MenuShortcut to compare with this. * @return true if this MenuShortcut is the same as another, * false otherwise. - * @since JDK1.1 + * @since 1.1 */ public boolean equals(MenuShortcut s) { return (s != null && (s.getKey() == key) && @@ -178,7 +178,7 @@ /** * Returns an internationalized description of the MenuShortcut. * @return a string representation of this MenuShortcut. - * @since JDK1.1 + * @since 1.1 */ public String toString() { int modifiers = 0; @@ -196,7 +196,7 @@ * Returns the parameter string representing the state of this * MenuShortcut. This string is useful for debugging. * @return the parameter string of this MenuShortcut. - * @since JDK1.1 + * @since 1.1 */ protected String paramString() { String str = "key=" + key; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Panel.java --- a/jdk/src/share/classes/java/awt/Panel.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Panel.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * * @author Sami Shaio * @see java.awt.FlowLayout - * @since JDK1.0 + * @since 1.0 */ public class Panel extends Container implements Accessible { private static final String base = "panel"; @@ -59,7 +59,7 @@ /** * Creates a new panel with the specified layout manager. * @param layout the layout manager for this panel. - * @since JDK1.1 + * @since 1.1 */ public Panel(LayoutManager layout) { setLayout(layout); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java --- a/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java Wed Jun 18 13:14:15 2014 -0700 @@ -393,7 +393,7 @@ * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentListener * @see java.awt.event.AdjustmentEvent - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l){ if (l == null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Scrollbar.java --- a/jdk/src/share/classes/java/awt/Scrollbar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Scrollbar.java Wed Jun 18 13:14:15 2014 -0700 @@ -161,7 +161,7 @@ * @author Sami Shaio * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener - * @since JDK1.0 + * @since 1.0 */ public class Scrollbar extends Component implements Adjustable, Accessible { @@ -460,7 +460,7 @@ * @exception IllegalArgumentException if the value supplied * for orientation is not a * legal value - * @since JDK1.1 + * @since 1.1 */ public void setOrientation(int orientation) { synchronized (getTreeLock()) { @@ -566,7 +566,7 @@ * @param newMinimum the new minimum value for this scroll bar * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#setMaximum - * @since JDK1.1 + * @since 1.1 */ public void setMinimum(int newMinimum) { // No checks are necessary in this method since minimum is @@ -611,7 +611,7 @@ * for this scroll bar * @see java.awt.Scrollbar#setValues * @see java.awt.Scrollbar#setMinimum - * @since JDK1.1 + * @since 1.1 */ public void setMaximum(int newMaximum) { // minimum is checked first in setValues, so we need to @@ -649,7 +649,7 @@ * * @return the visible amount of this scroll bar * @see java.awt.Scrollbar#setVisibleAmount - * @since JDK1.1 + * @since 1.1 */ public int getVisibleAmount() { return getVisible(); @@ -697,7 +697,7 @@ * @param newAmount the new visible amount * @see java.awt.Scrollbar#getVisibleAmount * @see java.awt.Scrollbar#setValues - * @since JDK1.1 + * @since 1.1 */ public void setVisibleAmount(int newAmount) { // Use setValues so that a consistent policy relating @@ -722,7 +722,7 @@ * @param v the amount by which to increment or decrement * the scroll bar's value * @see java.awt.Scrollbar#getUnitIncrement - * @since JDK1.1 + * @since 1.1 */ public void setUnitIncrement(int v) { setLineIncrement(v); @@ -761,7 +761,7 @@ * * @return the unit increment of this scroll bar * @see java.awt.Scrollbar#setUnitIncrement - * @since JDK1.1 + * @since 1.1 */ public int getUnitIncrement() { return getLineIncrement(); @@ -790,7 +790,7 @@ * @param v the amount by which to increment or decrement * the scroll bar's value * @see java.awt.Scrollbar#getBlockIncrement - * @since JDK1.1 + * @since 1.1 */ public void setBlockIncrement(int v) { setPageIncrement(v); @@ -826,7 +826,7 @@ * * @return the block increment of this scroll bar * @see java.awt.Scrollbar#setBlockIncrement - * @since JDK1.1 + * @since 1.1 */ public int getBlockIncrement() { return getPageIncrement(); @@ -972,7 +972,7 @@ * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addAdjustmentListener(AdjustmentListener l) { if (l == null) { @@ -995,7 +995,7 @@ * @see #getAdjustmentListeners * @see java.awt.event.AdjustmentEvent * @see java.awt.event.AdjustmentListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeAdjustmentListener(AdjustmentListener l) { if (l == null) { @@ -1086,7 +1086,7 @@ * @param e the event * @see java.awt.event.AdjustmentEvent * @see java.awt.Scrollbar#processAdjustmentEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof AdjustmentEvent) { @@ -1118,7 +1118,7 @@ * @see java.awt.event.AdjustmentListener * @see java.awt.Scrollbar#addAdjustmentListener * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processAdjustmentEvent(AdjustmentEvent e) { AdjustmentListener listener = adjustmentListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/TextArea.java --- a/jdk/src/share/classes/java/awt/TextArea.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/TextArea.java Wed Jun 18 13:14:15 2014 -0700 @@ -51,7 +51,7 @@ *
* * @author Sami Shaio - * @since JDK1.0 + * @since 1.0 */ public class TextArea extends TextComponent { @@ -84,25 +84,25 @@ /** * Create and display both vertical and horizontal scrollbars. - * @since JDK1.1 + * @since 1.1 */ public static final int SCROLLBARS_BOTH = 0; /** * Create and display vertical scrollbar only. - * @since JDK1.1 + * @since 1.1 */ public static final int SCROLLBARS_VERTICAL_ONLY = 1; /** * Create and display horizontal scrollbar only. - * @since JDK1.1 + * @since 1.1 */ public static final int SCROLLBARS_HORIZONTAL_ONLY = 2; /** * Do not create or display any scrollbars for the text area. - * @since JDK1.1 + * @since 1.1 */ public static final int SCROLLBARS_NONE = 3; @@ -248,7 +248,7 @@ * columns is set to 0 * @param scrollbars a constant that determines what * scrollbars are created to view the text area - * @since JDK1.1 + * @since 1.1 * @exception HeadlessException if * GraphicsEnvironment.isHeadless returns true * @see java.awt.GraphicsEnvironment#isHeadless() @@ -307,7 +307,7 @@ * @see java.awt.TextComponent#setText * @see java.awt.TextArea#replaceRange * @see java.awt.TextArea#append - * @since JDK1.1 + * @since 1.1 */ public void insert(String str, int pos) { insertText(str, pos); @@ -335,7 +335,7 @@ * * @param str the non-null text to append * @see java.awt.TextArea#insert - * @since JDK1.1 + * @since 1.1 */ public void append(String str) { appendText(str); @@ -371,7 +371,7 @@ * @param start the start position * @param end the end position * @see java.awt.TextArea#insert - * @since JDK1.1 + * @since 1.1 */ public void replaceRange(String str, int start, int end) { replaceText(str, start, end); @@ -396,7 +396,7 @@ * @return the number of rows in the text area * @see #setRows(int) * @see #getColumns() - * @since JDK1 + * @since 1.0 */ public int getRows() { return rows; @@ -410,7 +410,7 @@ * @exception IllegalArgumentException if the value * supplied for rows * is less than 0 - * @since JDK1.1 + * @since 1.1 */ public void setRows(int rows) { int oldVal = this.rows; @@ -441,7 +441,7 @@ * @exception IllegalArgumentException if the value * supplied for columns * is less than 0 - * @since JDK1.1 + * @since 1.1 */ public void setColumns(int columns) { int oldVal = this.columns; @@ -469,7 +469,7 @@ * @see java.awt.TextArea#SCROLLBARS_HORIZONTAL_ONLY * @see java.awt.TextArea#SCROLLBARS_NONE * @see java.awt.TextArea#TextArea(java.lang.String, int, int, int) - * @since JDK1.1 + * @since 1.1 */ public int getScrollbarVisibility() { return scrollbarVisibility; @@ -485,7 +485,7 @@ * the text area with the specified * number of rows and columns * @see java.awt.Component#getPreferredSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getPreferredSize(int rows, int columns) { return preferredSize(rows, columns); @@ -509,7 +509,7 @@ * Determines the preferred size of this text area. * @return the preferred dimensions needed for this text area * @see java.awt.Component#getPreferredSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getPreferredSize() { return preferredSize(); @@ -537,7 +537,7 @@ * the text area with the specified * number of rows and columns * @see java.awt.Component#getMinimumSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize(int rows, int columns) { return minimumSize(rows, columns); @@ -561,7 +561,7 @@ * Determines the minimum size of this text area. * @return the preferred dimensions needed for this text area * @see java.awt.Component#getPreferredSize - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize() { return minimumSize(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/TextComponent.java --- a/jdk/src/share/classes/java/awt/TextComponent.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/TextComponent.java Wed Jun 18 13:14:15 2014 -0700 @@ -55,7 +55,7 @@ * * @author Sami Shaio * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class TextComponent extends Component implements Accessible { @@ -268,7 +268,7 @@ * @return true if this text component is * editable; false otherwise. * @see java.awt.TextComponent#setEditable - * @since JDK1.0 + * @since 1.0 */ public boolean isEditable() { return editable; @@ -288,7 +288,7 @@ * @param b a flag indicating whether this text component * is user editable. * @see java.awt.TextComponent#isEditable - * @since JDK1.0 + * @since 1.0 */ public synchronized void setEditable(boolean b) { if (editable == b) { @@ -313,7 +313,7 @@ * If this text component does not have a background color, * the background color of its parent is returned. * @see #setBackground(Color) - * @since JDK1.0 + * @since 1.0 */ public Color getBackground() { if (!editable && !backgroundSetByClientCode) { @@ -330,7 +330,7 @@ * If this parameter is null then this text component * will inherit the background color of its parent. * @see #getBackground() - * @since JDK1.0 + * @since 1.0 */ public void setBackground(Color c) { backgroundSetByClientCode = true; @@ -365,7 +365,7 @@ * selected text * @see java.awt.TextComponent#getSelectionStart * @see java.awt.TextComponent#setSelectionEnd - * @since JDK1.1 + * @since 1.1 */ public synchronized void setSelectionStart(int selectionStart) { /* Route through select method to enforce consistent policy @@ -401,7 +401,7 @@ * selected text * @see java.awt.TextComponent#getSelectionEnd * @see java.awt.TextComponent#setSelectionStart - * @since JDK1.1 + * @since 1.1 */ public synchronized void setSelectionEnd(int selectionEnd) { /* Route through select method to enforce consistent policy @@ -494,7 +494,7 @@ * @param position the position of the text insertion caret * @exception IllegalArgumentException if position * is less than zero - * @since JDK1.1 + * @since 1.1 */ public synchronized void setCaretPosition(int position) { if (position < 0) { @@ -523,7 +523,7 @@ * * @return the position of the text insertion caret * @see #setCaretPosition(int) - * @since JDK1.1 + * @since 1.1 */ public synchronized int getCaretPosition() { TextComponentPeer peer = (TextComponentPeer)this.peer; @@ -574,7 +574,7 @@ * @see #addTextListener * @see #getTextListeners * @see java.awt.event.TextListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeTextListener(TextListener l) { if (l == null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/TextField.java --- a/jdk/src/share/classes/java/awt/TextField.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/TextField.java Wed Jun 18 13:14:15 2014 -0700 @@ -92,7 +92,7 @@ * @see java.awt.TextField#processEvent * @see java.awt.TextField#processActionEvent * @see java.awt.TextField#addActionListener - * @since JDK1.0 + * @since 1.0 */ public class TextField extends TextComponent { @@ -265,7 +265,7 @@ * @param c the echo character for this text field. * @see java.awt.TextField#echoCharIsSet * @see java.awt.TextField#getEchoChar - * @since JDK1.1 + * @since 1.1 */ public void setEchoChar(char c) { setEchoCharacter(c); @@ -321,7 +321,7 @@ * approximate average character width that is platform-dependent. * @return the number of columns. * @see java.awt.TextField#setColumns - * @since JDK1.1 + * @since 1.1 */ public int getColumns() { return columns; @@ -335,7 +335,7 @@ * @exception IllegalArgumentException if the value * supplied for columns * is less than 0. - * @since JDK1.1 + * @since 1.1 */ public void setColumns(int columns) { int oldVal; @@ -361,7 +361,7 @@ * in this text field. * @return the preferred dimensions for * displaying this text field. - * @since JDK1.1 + * @since 1.1 */ public Dimension getPreferredSize(int columns) { return preferredSize(columns); @@ -385,7 +385,7 @@ * Gets the preferred size of this text field. * @return the preferred dimensions for * displaying this text field. - * @since JDK1.1 + * @since 1.1 */ public Dimension getPreferredSize() { return preferredSize(); @@ -409,7 +409,7 @@ * the specified number of columns. * @param columns the number of columns in * this text field. - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize(int columns) { return minimumSize(columns); @@ -433,7 +433,7 @@ * Gets the minimum dimensions for this text field. * @return the minimum dimensions for * displaying this text field. - * @since JDK1.1 + * @since 1.1 */ public Dimension getMinimumSize() { return minimumSize(); @@ -463,7 +463,7 @@ * @see #removeActionListener * @see #getActionListeners * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void addActionListener(ActionListener l) { if (l == null) { @@ -484,7 +484,7 @@ * @see #addActionListener * @see #getActionListeners * @see java.awt.event.ActionListener - * @since JDK1.1 + * @since 1.1 */ public synchronized void removeActionListener(ActionListener l) { if (l == null) { @@ -578,7 +578,7 @@ * @param e the event * @see java.awt.event.ActionEvent * @see java.awt.TextField#processActionEvent - * @since JDK1.1 + * @since 1.1 */ protected void processEvent(AWTEvent e) { if (e instanceof ActionEvent) { @@ -609,7 +609,7 @@ * @see java.awt.event.ActionListener * @see java.awt.TextField#addActionListener * @see java.awt.Component#enableEvents - * @since JDK1.1 + * @since 1.1 */ protected void processActionEvent(ActionEvent e) { ActionListener listener = actionListener; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Toolkit.java --- a/jdk/src/share/classes/java/awt/Toolkit.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Toolkit.java Wed Jun 18 13:14:15 2014 -0700 @@ -108,7 +108,7 @@ * @author Sami Shaio * @author Arthur van Hoff * @author Fred Ecks - * @since JDK1.0 + * @since 1.0 */ public abstract class Toolkit { @@ -222,7 +222,7 @@ * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.ScrollPane * @see java.awt.peer.ScrollPanePeer - * @since JDK1.1 + * @since 1.1 */ protected abstract ScrollPanePeer createScrollPane(ScrollPane target) throws HeadlessException; @@ -355,7 +355,7 @@ * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.PopupMenu * @see java.awt.peer.PopupMenuPeer - * @since JDK1.1 + * @since 1.1 */ protected abstract PopupMenuPeer createPopupMenu(PopupMenu target) throws HeadlessException; @@ -457,7 +457,7 @@ * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true * @see java.awt.GraphicsEnvironment#isHeadless - * @since JDK1.1 + * @since 1.1 */ protected void loadSystemColors(int[] systemColors) throws HeadlessException { @@ -1105,7 +1105,7 @@ * @param imagedata an array of bytes, representing * image data in a supported image format. * @return an image. - * @since JDK1.1 + * @since 1.1 */ public Image createImage(byte[] imagedata) { return createImage(imagedata, 0, imagedata.length); @@ -1122,7 +1122,7 @@ * of the data in the array. * @param imagelength the length of the data in the array. * @return an image. - * @since JDK1.1 + * @since 1.1 */ public abstract Image createImage(byte[] imagedata, int imageoffset, @@ -1159,7 +1159,7 @@ * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.PrintJob * @see java.lang.RuntimePermission - * @since JDK1.1 + * @since 1.1 */ public abstract PrintJob getPrintJob(Frame frame, String jobtitle, Properties props); @@ -1230,7 +1230,7 @@ /** * Emits an audio beep depending on native system settings and hardware * capabilities. - * @since JDK1.1 + * @since 1.1 */ public abstract void beep(); @@ -1273,7 +1273,7 @@ * @see java.awt.datatransfer.DataFlavor#plainTextFlavor * @see java.io.Reader * @see java.awt.AWTPermission - * @since JDK1.1 + * @since 1.1 */ public abstract Clipboard getSystemClipboard() throws HeadlessException; @@ -1353,7 +1353,7 @@ * @see java.awt.GraphicsEnvironment#isHeadless * @see java.awt.MenuBar * @see java.awt.MenuShortcut - * @since JDK1.1 + * @since 1.1 */ public int getMenuShortcutKeyMask() throws HeadlessException { GraphicsEnvironment.checkHeadless(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/Window.java --- a/jdk/src/share/classes/java/awt/Window.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/Window.java Wed Jun 18 13:14:15 2014 -0700 @@ -143,7 +143,7 @@ * @see WindowEvent * @see #addWindowListener * @see java.awt.BorderLayout - * @since JDK1.0 + * @since 1.0 */ public class Window extends Container implements Accessible { @@ -753,7 +753,7 @@ * not be called directly by programs. * @see Component#isDisplayable * @see Container#removeNotify - * @since JDK1.0 + * @since 1.0 */ public void addNotify() { synchronized (getTreeLock()) { @@ -1405,7 +1405,7 @@ * is returned. * @return the locale that is set for this window. * @see java.util.Locale - * @since JDK1.1 + * @since 1.1 */ public Locale getLocale() { if (this.locale == null) { @@ -1441,7 +1441,7 @@ * Cursor.DEFAULT_CURSOR. * @see Component#getCursor * @see Cursor - * @since JDK1.1 + * @since 1.1 */ public void setCursor(Cursor cursor) { if (cursor == null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/datatransfer/package.html --- a/jdk/src/share/classes/java/awt/datatransfer/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/datatransfer/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -59,6 +59,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/event/InputEvent.java --- a/jdk/src/share/classes/java/awt/event/InputEvent.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/event/InputEvent.java Wed Jun 18 13:14:15 2014 -0700 @@ -162,7 +162,7 @@ * @see getButtonDownMasks * There are twenty buttons fit into 4byte space. * one more bit is reserved for FIRST_HIGH_BIT. - * @since 7.0 + * @since 1.7 */ private static final int [] BUTTON_DOWN_MASK = new int [] { BUTTON1_DOWN_MASK, BUTTON2_DOWN_MASK, @@ -187,7 +187,7 @@ /** * A method to access an array of extended modifiers for additional buttons. - * @since 7.0 + * @since 1.7 */ private static int [] getButtonDownMasks(){ return Arrays.copyOf(BUTTON_DOWN_MASK, BUTTON_DOWN_MASK.length); @@ -237,7 +237,7 @@ * @return a mask for an existing mouse button. * @throws IllegalArgumentException if {@code button} is less than zero or greater than the number * of button masks reserved for buttons - * @since 7.0 + * @since 1.7 * @see java.awt.MouseInfo#getNumberOfButtons() * @see Toolkit#areExtraMouseButtonsEnabled() * @see MouseEvent#getModifiers() diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/event/WindowEvent.java --- a/jdk/src/share/classes/java/awt/event/WindowEvent.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/event/WindowEvent.java Wed Jun 18 13:14:15 2014 -0700 @@ -54,7 +54,7 @@ * @see WindowListener * @see Tutorial: Writing a Window Listener * - * @since JDK1.1 + * @since 1.1 */ public class WindowEvent extends ComponentEvent { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/event/package.html --- a/jdk/src/share/classes/java/awt/event/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/event/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -53,6 +53,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/im/spi/package.html --- a/jdk/src/share/classes/java/awt/im/spi/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/im/spi/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -121,6 +121,6 @@ Method Engine SPI Tutorial -@since JDK1.3 +@since 1.3 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/image/package.html --- a/jdk/src/share/classes/java/awt/image/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/image/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -53,6 +53,6 @@ --> -@since JDK1.0 +@since 1.0 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/awt/package.html --- a/jdk/src/share/classes/java/awt/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/awt/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -78,6 +78,6 @@ --> -@since JDK1.0 +@since 1.0 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/beans/Introspector.java --- a/jdk/src/share/classes/java/beans/Introspector.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/beans/Introspector.java Wed Jun 18 13:14:15 2014 -0700 @@ -1291,7 +1291,7 @@ * Creates a key for a method in a method cache. */ private static String makeQualifiedMethodName(String name, String[] params) { - StringBuffer sb = new StringBuffer(name); + StringBuilder sb = new StringBuilder(name); sb.append('='); for (int i = 0; i < params.length; i++) { sb.append(':'); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/beans/Statement.java --- a/jdk/src/share/classes/java/beans/Statement.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/beans/Statement.java Wed Jun 18 13:14:15 2014 -0700 @@ -340,7 +340,7 @@ if (arguments == null) { arguments = emptyArray; } - StringBuffer result = new StringBuffer(instanceName(target) + "." + methodName + "("); + StringBuilder result = new StringBuilder(instanceName(target) + "." + methodName + "("); int n = arguments.length; for(int i = 0; i < n; i++) { result.append(instanceName(arguments[i])); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/BufferedInputStream.java --- a/jdk/src/share/classes/java/io/BufferedInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/BufferedInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ * the contained input stream. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class BufferedInputStream extends FilterInputStream { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/BufferedOutputStream.java --- a/jdk/src/share/classes/java/io/BufferedOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/BufferedOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * system for each byte written. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class BufferedOutputStream extends FilterOutputStream { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/BufferedReader.java --- a/jdk/src/share/classes/java/io/BufferedReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/BufferedReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -64,7 +64,7 @@ * @see java.nio.file.Files#newBufferedReader * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class BufferedReader extends Reader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/BufferedWriter.java --- a/jdk/src/share/classes/java/io/BufferedWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/BufferedWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -60,7 +60,7 @@ * @see java.nio.file.Files#newBufferedWriter * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class BufferedWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ByteArrayInputStream.java --- a/jdk/src/share/classes/java/io/ByteArrayInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ByteArrayInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -38,7 +38,7 @@ * * @author Arthur van Hoff * @see java.io.StringBufferInputStream - * @since JDK1.0 + * @since 1.0 */ public class ByteArrayInputStream extends InputStream { @@ -73,7 +73,7 @@ * If no mark has been set, then the value of mark is the offset * passed to the constructor (or 0 if the offset was not supplied). * - * @since JDK1.1 + * @since 1.1 */ protected int mark = 0; @@ -237,7 +237,7 @@ * markSupported method of ByteArrayInputStream * always returns true. * - * @since JDK1.1 + * @since 1.1 */ public boolean markSupported() { return true; @@ -256,7 +256,7 @@ *

Note: The readAheadLimit for this class * has no meaning. * - * @since JDK1.1 + * @since 1.1 */ public void mark(int readAheadLimit) { mark = pos; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ByteArrayOutputStream.java --- a/jdk/src/share/classes/java/io/ByteArrayOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ByteArrayOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * generating an IOException. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class ByteArrayOutputStream extends OutputStream { @@ -202,7 +202,7 @@ * required. * * @return String decoded from the buffer's contents. - * @since JDK1.1 + * @since 1.1 */ public synchronized String toString() { return new String(buf, 0, count); @@ -224,7 +224,7 @@ * @return String decoded from the buffer's contents. * @exception UnsupportedEncodingException * If the named charset is not supported - * @since JDK1.1 + * @since 1.1 */ public synchronized String toString(String charsetName) throws UnsupportedEncodingException diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/CharArrayReader.java --- a/jdk/src/share/classes/java/io/CharArrayReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/CharArrayReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * character-input stream. * * @author Herb Jellinek - * @since JDK1.1 + * @since 1.1 */ public class CharArrayReader extends Reader { /** The character buffer. */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/CharArrayWriter.java --- a/jdk/src/share/classes/java/io/CharArrayWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/CharArrayWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * without generating an IOException. * * @author Herb Jellinek - * @since JDK1.1 + * @since 1.1 */ public class CharArrayWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/CharConversionException.java --- a/jdk/src/share/classes/java/io/CharConversionException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/CharConversionException.java Wed Jun 18 13:14:15 2014 -0700 @@ -28,7 +28,7 @@ * Base class for character conversion exceptions. * * @author Asmus Freytag - * @since JDK1.1 + * @since 1.1 */ public class CharConversionException extends java.io.IOException diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/DataInput.java --- a/jdk/src/share/classes/java/io/DataInput.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/DataInput.java Wed Jun 18 13:14:15 2014 -0700 @@ -143,7 +143,7 @@ * @author Frank Yellin * @see java.io.DataInputStream * @see java.io.DataOutput - * @since JDK1.0 + * @since 1.0 */ public interface DataInput { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/DataInputStream.java --- a/jdk/src/share/classes/java/io/DataInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/DataInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * * @author Arthur van Hoff * @see java.io.DataOutputStream - * @since JDK1.0 + * @since 1.0 */ public class DataInputStream extends FilterInputStream implements DataInput { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/DataOutput.java --- a/jdk/src/share/classes/java/io/DataOutput.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/DataOutput.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @author Frank Yellin * @see java.io.DataInput * @see java.io.DataOutputStream - * @since JDK1.0 + * @since 1.0 */ public interface DataOutput { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/DataOutputStream.java --- a/jdk/src/share/classes/java/io/DataOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/DataOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * * @author unascribed * @see java.io.DataInputStream - * @since JDK1.0 + * @since 1.0 */ public class DataOutputStream extends FilterOutputStream implements DataOutput { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/EOFException.java --- a/jdk/src/share/classes/java/io/EOFException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/EOFException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * @author Frank Yellin * @see java.io.DataInputStream * @see java.io.IOException - * @since JDK1.0 + * @since 1.0 */ public class EOFException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/Externalizable.java --- a/jdk/src/share/classes/java/io/Externalizable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/Externalizable.java Wed Jun 18 13:14:15 2014 -0700 @@ -61,7 +61,7 @@ * @see java.io.ObjectOutput * @see java.io.ObjectInput * @see java.io.Serializable - * @since JDK1.1 + * @since 1.1 */ public interface Externalizable extends java.io.Serializable { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/File.java --- a/jdk/src/share/classes/java/io/File.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/File.java Wed Jun 18 13:14:15 2014 -0700 @@ -143,7 +143,7 @@ * diagnose errors when an operation on a file fails. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class File @@ -608,7 +608,7 @@ * java.lang.SecurityManager#checkRead} method denies * read access to the file * - * @since JDK1.1 + * @since 1.1 * @see Path#toRealPath */ public String getCanonicalPath() throws IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FileInputStream.java --- a/jdk/src/share/classes/java/io/FileInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FileInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,7 +43,7 @@ * @see java.io.FileDescriptor * @see java.io.FileOutputStream * @see java.nio.file.Files#newInputStream - * @since JDK1.0 + * @since 1.0 */ public class FileInputStream extends InputStream diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FileNotFoundException.java --- a/jdk/src/share/classes/java/io/FileNotFoundException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FileNotFoundException.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * example when an attempt is made to open a read-only file for writing. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class FileNotFoundException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FileOutputStream.java --- a/jdk/src/share/classes/java/io/FileOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FileOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -47,7 +47,7 @@ * @see java.io.FileDescriptor * @see java.io.FileInputStream * @see java.nio.file.Files#newOutputStream - * @since JDK1.0 + * @since 1.0 */ public class FileOutputStream extends OutputStream @@ -125,7 +125,7 @@ * checkWrite method denies write access * to the file. * @see java.lang.SecurityManager#checkWrite(java.lang.String) - * @since JDK1.1 + * @since 1.1 */ public FileOutputStream(String name, boolean append) throws FileNotFoundException diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FileReader.java --- a/jdk/src/share/classes/java/io/FileReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FileReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * @see FileInputStream * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class FileReader extends InputStreamReader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FileWriter.java --- a/jdk/src/share/classes/java/io/FileWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FileWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -46,7 +46,7 @@ * @see FileOutputStream * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class FileWriter extends OutputStreamWriter { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FilenameFilter.java --- a/jdk/src/share/classes/java/io/FilenameFilter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FilenameFilter.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * @see java.awt.FileDialog#setFilenameFilter(java.io.FilenameFilter) * @see java.io.File * @see java.io.File#list(java.io.FilenameFilter) - * @since JDK1.0 + * @since 1.0 */ @FunctionalInterface public interface FilenameFilter { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FilterInputStream.java --- a/jdk/src/share/classes/java/io/FilterInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FilterInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * and fields. * * @author Jonathan Payne - * @since JDK1.0 + * @since 1.0 */ public class FilterInputStream extends InputStream { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FilterOutputStream.java --- a/jdk/src/share/classes/java/io/FilterOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FilterOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * methods as well as provide additional methods and fields. * * @author Jonathan Payne - * @since JDK1.0 + * @since 1.0 */ public class FilterOutputStream extends OutputStream { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FilterReader.java --- a/jdk/src/share/classes/java/io/FilterReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FilterReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * additional methods and fields. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public abstract class FilterReader extends Reader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/FilterWriter.java --- a/jdk/src/share/classes/java/io/FilterWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/FilterWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * provide additional methods and fields. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public abstract class FilterWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/IOException.java --- a/jdk/src/share/classes/java/io/IOException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/IOException.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * @author unascribed * @see java.io.InputStream * @see java.io.OutputStream - * @since JDK1.0 + * @since 1.0 */ public class IOException extends Exception { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/InputStream.java --- a/jdk/src/share/classes/java/io/InputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/InputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * @see java.io.InputStream#read() * @see java.io.OutputStream * @see java.io.PushbackInputStream - * @since JDK1.0 + * @since 1.0 */ public abstract class InputStream implements Closeable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/InputStreamReader.java --- a/jdk/src/share/classes/java/io/InputStreamReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/InputStreamReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -56,7 +56,7 @@ * @see java.nio.charset.Charset * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class InputStreamReader extends Reader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/InterruptedIOException.java --- a/jdk/src/share/classes/java/io/InterruptedIOException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/InterruptedIOException.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * @see java.io.InputStream * @see java.io.OutputStream * @see java.lang.Thread#interrupt() - * @since JDK1.0 + * @since 1.0 */ public class InterruptedIOException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/InvalidClassException.java --- a/jdk/src/share/classes/java/io/InvalidClassException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/InvalidClassException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class InvalidClassException extends ObjectStreamException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/InvalidObjectException.java --- a/jdk/src/share/classes/java/io/InvalidObjectException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/InvalidObjectException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,10 +30,10 @@ * tests. The argument should provide the reason for the failure. * * @see ObjectInputValidation - * @since JDK1.1 + * @since 1.1 * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class InvalidObjectException extends ObjectStreamException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/LineNumberInputStream.java --- a/jdk/src/share/classes/java/io/LineNumberInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/LineNumberInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * * @author Arthur van Hoff * @see java.io.LineNumberReader - * @since JDK1.0 + * @since 1.0 * @deprecated This class incorrectly assumes that bytes adequately represent * characters. As of JDK 1.1, the preferred way to operate on * character streams is via the new character-stream classes, which diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/LineNumberReader.java --- a/jdk/src/share/classes/java/io/LineNumberReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/LineNumberReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * immediately by a linefeed. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class LineNumberReader extends BufferedReader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/NotActiveException.java --- a/jdk/src/share/classes/java/io/NotActiveException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/NotActiveException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * Thrown when serialization or deserialization is not active. * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class NotActiveException extends ObjectStreamException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/NotSerializableException.java --- a/jdk/src/share/classes/java/io/NotSerializableException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/NotSerializableException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * this exception. The argument should be the name of the class. * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class NotSerializableException extends ObjectStreamException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectInput.java --- a/jdk/src/share/classes/java/io/ObjectInput.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectInput.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * @see java.io.InputStream * @see java.io.ObjectOutputStream * @see java.io.ObjectInputStream - * @since JDK1.1 + * @since 1.1 */ public interface ObjectInput extends DataInput, AutoCloseable { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectInputStream.java --- a/jdk/src/share/classes/java/io/ObjectInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -200,7 +200,7 @@ * @see java.io.ObjectOutputStream * @see java.io.Serializable * @see Object Serialization Specification, Section 3, Object Input Classes - * @since JDK1.1 + * @since 1.1 */ public class ObjectInputStream extends InputStream implements ObjectInput, ObjectStreamConstants diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectInputValidation.java --- a/jdk/src/share/classes/java/io/ObjectInputValidation.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectInputValidation.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * @author unascribed * @see ObjectInputStream * @see ObjectInputStream#registerValidation(java.io.ObjectInputValidation, int) - * @since JDK1.1 + * @since 1.1 */ public interface ObjectInputValidation { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectOutput.java --- a/jdk/src/share/classes/java/io/ObjectOutput.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectOutput.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * @see java.io.InputStream * @see java.io.ObjectOutputStream * @see java.io.ObjectInputStream - * @since JDK1.1 + * @since 1.1 */ public interface ObjectOutput extends DataOutput, AutoCloseable { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectOutputStream.java --- a/jdk/src/share/classes/java/io/ObjectOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -156,7 +156,7 @@ * @see java.io.Serializable * @see java.io.Externalizable * @see Object Serialization Specification, Section 2, Object Output Classes - * @since JDK1.1 + * @since 1.1 */ public class ObjectOutputStream extends OutputStream implements ObjectOutput, ObjectStreamConstants diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectStreamClass.java --- a/jdk/src/share/classes/java/io/ObjectStreamClass.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectStreamClass.java Wed Jun 18 13:14:15 2014 -0700 @@ -67,7 +67,7 @@ * @author Roger Riggs * @see ObjectStreamField * @see Object Serialization Specification, Section 4, Class Descriptors - * @since JDK1.1 + * @since 1.1 */ public class ObjectStreamClass implements Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectStreamConstants.java --- a/jdk/src/share/classes/java/io/ObjectStreamConstants.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectStreamConstants.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * Constants written into the Object Serialization Stream. * * @author unascribed - * @since JDK 1.1 + * @since 1.1 */ public interface ObjectStreamConstants { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/ObjectStreamException.java --- a/jdk/src/share/classes/java/io/ObjectStreamException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/ObjectStreamException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * Superclass of all exceptions specific to Object Stream classes. * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public abstract class ObjectStreamException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/OptionalDataException.java --- a/jdk/src/share/classes/java/io/OptionalDataException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/OptionalDataException.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,7 +43,7 @@ * * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class OptionalDataException extends ObjectStreamException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/OutputStream.java --- a/jdk/src/share/classes/java/io/OutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/OutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -41,7 +41,7 @@ * @see java.io.FilterOutputStream * @see java.io.InputStream * @see java.io.OutputStream#write(int) - * @since JDK1.0 + * @since 1.0 */ public abstract class OutputStream implements Closeable, Flushable { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/OutputStreamWriter.java --- a/jdk/src/share/classes/java/io/OutputStreamWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/OutputStreamWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -71,7 +71,7 @@ * @see java.nio.charset.Charset * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class OutputStreamWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PipedInputStream.java --- a/jdk/src/share/classes/java/io/PipedInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PipedInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ * * @author James Gosling * @see java.io.PipedOutputStream - * @since JDK1.0 + * @since 1.0 */ public class PipedInputStream extends InputStream { boolean closedByWriter = false; @@ -63,7 +63,7 @@ /** * The default size of the pipe's circular input buffer. - * @since JDK1.1 + * @since 1.1 */ // This used to be a constant before the pipe size was allowed // to change. This field will continue to be maintained @@ -72,7 +72,7 @@ /** * The circular buffer into which incoming data is placed. - * @since JDK1.1 + * @since 1.1 */ protected byte buffer[]; @@ -81,14 +81,14 @@ * next byte of data will be stored when received from the connected * piped output stream. in<0 implies the buffer is empty, * in==out implies the buffer is full - * @since JDK1.1 + * @since 1.1 */ protected int in = -1; /** * The index of the position in the circular buffer at which the next * byte of data will be read by this piped input stream. - * @since JDK1.1 + * @since 1.1 */ protected int out = 0; @@ -195,7 +195,7 @@ * @exception IOException If the pipe is broken, * {@link #connect(java.io.PipedOutputStream) unconnected}, * closed, or if an I/O error occurs. - * @since JDK1.1 + * @since 1.1 */ protected synchronized void receive(int b) throws IOException { checkStateForReceive(); @@ -421,7 +421,7 @@ * broken. * * @exception IOException if an I/O error occurs. - * @since JDK1.0.2 + * @since 1.0.2 */ public synchronized int available() throws IOException { if(in < 0) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PipedOutputStream.java --- a/jdk/src/share/classes/java/io/PipedOutputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PipedOutputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -41,7 +41,7 @@ * * @author James Gosling * @see java.io.PipedInputStream - * @since JDK1.0 + * @since 1.0 */ public class PipedOutputStream extends OutputStream { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PipedReader.java --- a/jdk/src/share/classes/java/io/PipedReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PipedReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * Piped character-input streams. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class PipedReader extends Reader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PipedWriter.java --- a/jdk/src/share/classes/java/io/PipedWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PipedWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * Piped character-output streams. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class PipedWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PrintStream.java --- a/jdk/src/share/classes/java/io/PrintStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PrintStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -51,7 +51,7 @@ * * @author Frank Yellin * @author Mark Reinhold - * @since JDK1.0 + * @since 1.0 */ public class PrintStream extends FilterOutputStream @@ -404,7 +404,7 @@ * #checkError()} to return true until {@link * #clearError()} is invoked. * - * @since JDK1.1 + * @since 1.1 */ protected void setError() { trouble = true; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PrintWriter.java --- a/jdk/src/share/classes/java/io/PrintWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PrintWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -50,7 +50,7 @@ * * @author Frank Yellin * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class PrintWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PushbackInputStream.java --- a/jdk/src/share/classes/java/io/PushbackInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PushbackInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -46,13 +46,13 @@ * * @author David Connelly * @author Jonathan Payne - * @since JDK1.0 + * @since 1.0 */ public class PushbackInputStream extends FilterInputStream { /** * The pushback buffer. - * @since JDK1.1 + * @since 1.1 */ protected byte[] buf; @@ -62,7 +62,7 @@ * buf.length; when the buffer is full, pos is * equal to zero. * - * @since JDK1.1 + * @since 1.1 */ protected int pos; @@ -86,7 +86,7 @@ * @param in the input stream from which bytes will be read. * @param size the size of the pushback buffer. * @exception IllegalArgumentException if {@code size <= 0} - * @since JDK1.1 + * @since 1.1 */ public PushbackInputStream(InputStream in, int size) { super(in); @@ -224,7 +224,7 @@ * buffer for the specified number of bytes, * or this input stream has been closed by * invoking its {@link #close()} method. - * @since JDK1.1 + * @since 1.1 */ public void unread(byte[] b, int off, int len) throws IOException { ensureOpen(); @@ -246,7 +246,7 @@ * buffer for the specified number of bytes, * or this input stream has been closed by * invoking its {@link #close()} method. - * @since JDK1.1 + * @since 1.1 */ public void unread(byte[] b) throws IOException { unread(b, 0, b.length); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/PushbackReader.java --- a/jdk/src/share/classes/java/io/PushbackReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/PushbackReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * stream. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class PushbackReader extends FilterReader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/RandomAccessFile.java --- a/jdk/src/share/classes/java/io/RandomAccessFile.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/RandomAccessFile.java Wed Jun 18 13:14:15 2014 -0700 @@ -53,7 +53,7 @@ * {@code IOException} may be thrown if the stream has been closed. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class RandomAccessFile implements DataOutput, DataInput, Closeable { @@ -890,7 +890,7 @@ */ public final String readLine() throws IOException { - StringBuffer input = new StringBuffer(); + StringBuilder input = new StringBuilder(); int c = -1; boolean eol = false; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/Reader.java --- a/jdk/src/share/classes/java/io/Reader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/Reader.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ * @see Writer * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public abstract class Reader implements Readable, Closeable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/SequenceInputStream.java --- a/jdk/src/share/classes/java/io/SequenceInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/SequenceInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * on the last of the contained input streams. * * @author Author van Hoff - * @since JDK1.0 + * @since 1.0 */ public class SequenceInputStream extends InputStream { @@ -132,7 +132,7 @@ * has been closed by invoking its {@link #close()} method * @exception IOException if an I/O error occurs. * - * @since JDK1.1 + * @since 1.1 */ public int available() throws IOException { if (in == null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/Serializable.java --- a/jdk/src/share/classes/java/io/Serializable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/Serializable.java Wed Jun 18 13:14:15 2014 -0700 @@ -164,7 +164,7 @@ * @see java.io.ObjectOutput * @see java.io.ObjectInput * @see java.io.Externalizable - * @since JDK1.1 + * @since 1.1 */ public interface Serializable { } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/StreamCorruptedException.java --- a/jdk/src/share/classes/java/io/StreamCorruptedException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/StreamCorruptedException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * violates internal consistency checks. * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class StreamCorruptedException extends ObjectStreamException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/StreamTokenizer.java --- a/jdk/src/share/classes/java/io/StreamTokenizer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/StreamTokenizer.java Wed Jun 18 13:14:15 2014 -0700 @@ -59,7 +59,7 @@ * @author James Gosling * @see java.io.StreamTokenizer#nextToken() * @see java.io.StreamTokenizer#TT_EOF - * @since JDK1.0 + * @since 1.0 */ public class StreamTokenizer { @@ -240,7 +240,7 @@ * Create a tokenizer that parses the given character stream. * * @param r a Reader object providing the input stream. - * @since JDK1.1 + * @since 1.1 */ public StreamTokenizer(Reader r) { this(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/StringBufferInputStream.java --- a/jdk/src/share/classes/java/io/StringBufferInputStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/StringBufferInputStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * @author Arthur van Hoff * @see java.io.ByteArrayInputStream * @see java.io.StringReader - * @since JDK1.0 + * @since 1.0 * @deprecated This class does not properly convert characters into bytes. As * of JDK 1.1, the preferred way to create a stream from a * string is via the StringReader class. diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/StringReader.java --- a/jdk/src/share/classes/java/io/StringReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/StringReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * A character stream whose source is a string. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class StringReader extends Reader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/StringWriter.java --- a/jdk/src/share/classes/java/io/StringWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/StringWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * IOException. * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public class StringWriter extends Writer { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/SyncFailedException.java --- a/jdk/src/share/classes/java/io/SyncFailedException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/SyncFailedException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * @author Ken Arnold * @see java.io.FileDescriptor#sync * @see java.io.IOException - * @since JDK1.1 + * @since 1.1 */ public class SyncFailedException extends IOException { private static final long serialVersionUID = -2353342684412443330L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/UTFDataFormatException.java --- a/jdk/src/share/classes/java/io/UTFDataFormatException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/UTFDataFormatException.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * @see java.io.DataInput * @see java.io.DataInputStream#readUTF(java.io.DataInput) * @see java.io.IOException - * @since JDK1.0 + * @since 1.0 */ public class UTFDataFormatException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/UnsupportedEncodingException.java --- a/jdk/src/share/classes/java/io/UnsupportedEncodingException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/UnsupportedEncodingException.java Wed Jun 18 13:14:15 2014 -0700 @@ -28,7 +28,7 @@ * The Character Encoding is not supported. * * @author Asmus Freytag - * @since JDK1.1 + * @since 1.1 */ public class UnsupportedEncodingException extends IOException diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/WriteAbortedException.java --- a/jdk/src/share/classes/java/io/WriteAbortedException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/WriteAbortedException.java Wed Jun 18 13:14:15 2014 -0700 @@ -41,7 +41,7 @@ * method, as well as the aforementioned "legacy field." * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class WriteAbortedException extends ObjectStreamException { private static final long serialVersionUID = -3326426625597282442L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/Writer.java --- a/jdk/src/share/classes/java/io/Writer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/Writer.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @see Reader * * @author Mark Reinhold - * @since JDK1.1 + * @since 1.1 */ public abstract class Writer implements Appendable, Closeable, Flushable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/io/package.html --- a/jdk/src/share/classes/java/io/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/io/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -47,6 +47,6 @@

  • Serialization Enhancements -@since JDK1.0 +@since 1.0 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/AbstractMethodError.java --- a/jdk/src/share/classes/java/lang/AbstractMethodError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/AbstractMethodError.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * compiled. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class AbstractMethodError extends IncompatibleClassChangeError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ArithmeticException.java --- a/jdk/src/share/classes/java/lang/ArithmeticException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ArithmeticException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * stack trace was not writable}. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class ArithmeticException extends RuntimeException { private static final long serialVersionUID = 2256477558314496007L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ArrayIndexOutOfBoundsException.java --- a/jdk/src/share/classes/java/lang/ArrayIndexOutOfBoundsException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ArrayIndexOutOfBoundsException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * equal to the size of the array. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ArrayStoreException.java --- a/jdk/src/share/classes/java/lang/ArrayStoreException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ArrayStoreException.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class ArrayStoreException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Boolean.java --- a/jdk/src/share/classes/java/lang/Boolean.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Boolean.java Wed Jun 18 13:14:15 2014 -0700 @@ -38,7 +38,7 @@ * {@code boolean}. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public final class Boolean implements java.io.Serializable, Comparable @@ -58,7 +58,7 @@ /** * The Class object representing the primitive type boolean. * - * @since JDK1.1 + * @since 1.1 */ @SuppressWarnings("unchecked") public static final Class TYPE = (Class) Class.getPrimitiveClass("boolean"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Byte.java --- a/jdk/src/share/classes/java/lang/Byte.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Byte.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * @author Nakul Saraiya * @author Joseph D. Darcy * @see java.lang.Number - * @since JDK1.1 + * @since 1.1 */ public final class Byte extends Number implements Comparable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Character.java --- a/jdk/src/share/classes/java/lang/Character.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Character.java Wed Jun 18 13:14:15 2014 -0700 @@ -5875,7 +5875,7 @@ * @see Character#isLetter(char) * @see Character#isLetterOrDigit(char) * @see Character#isUnicodeIdentifierStart(char) - * @since 1.02 + * @since 1.0.2 * @deprecated Replaced by isJavaIdentifierStart(char). */ @Deprecated @@ -5911,7 +5911,7 @@ * @see Character#isLetterOrDigit(char) * @see Character#isUnicodeIdentifierPart(char) * @see Character#isIdentifierIgnorable(char) - * @since 1.02 + * @since 1.0.2 * @deprecated Replaced by isJavaIdentifierPart(char). */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Class.java --- a/jdk/src/share/classes/java/lang/Class.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Class.java Wed Jun 18 13:14:15 2014 -0700 @@ -114,7 +114,7 @@ * * @author unascribed * @see java.lang.ClassLoader#defineClass(byte[], int, int) - * @since JDK1.0 + * @since 1.0 */ public final class Class implements java.io.Serializable, GenericDeclaration, @@ -469,7 +469,7 @@ * @param obj the object to check * @return true if {@code obj} is an instance of this class * - * @since JDK1.1 + * @since 1.1 */ public native boolean isInstance(Object obj); @@ -496,7 +496,7 @@ * type {@code cls} can be assigned to objects of this class * @exception NullPointerException if the specified Class parameter is * null. - * @since JDK1.1 + * @since 1.1 */ public native boolean isAssignableFrom(Class cls); @@ -516,7 +516,7 @@ * * @return {@code true} if this object represents an array class; * {@code false} otherwise. - * @since JDK1.1 + * @since 1.1 */ public native boolean isArray(); @@ -547,7 +547,7 @@ * @see java.lang.Float#TYPE * @see java.lang.Double#TYPE * @see java.lang.Void#TYPE - * @since JDK1.1 + * @since 1.1 */ public native boolean isPrimitive(); @@ -909,7 +909,7 @@ * @return the {@code Class} representing the component type of this * class if this class is an array * @see java.lang.reflect.Array - * @since JDK1.1 + * @since 1.1 */ public native Class getComponentType(); @@ -939,7 +939,7 @@ * * @return the {@code int} representing the modifiers for this class * @see java.lang.reflect.Modifier - * @since JDK1.1 + * @since 1.1 */ public native int getModifiers(); @@ -950,7 +950,7 @@ * @return the signers of this class, or null if there are no signers. In * particular, this method returns null if this object represents * a primitive type or void. - * @since JDK1.1 + * @since 1.1 */ public native Object[] getSigners(); @@ -1215,7 +1215,7 @@ * loader for the declaring class and invocation of {@link * SecurityManager#checkPackageAccess s.checkPackageAccess()} * denies access to the package of the declaring class - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Class getDeclaringClass() throws SecurityException { @@ -1470,7 +1470,7 @@ * s.checkPackageAccess()} denies access to the package * of this class. * - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Class[] getClasses() { @@ -1533,7 +1533,7 @@ * s.checkPackageAccess()} denies access to the package * of this class. * - * @since JDK1.1 + * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @@ -1593,7 +1593,7 @@ * * @jls 8.2 Class Members * @jls 8.4 Method Declarations - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Method[] getMethods() throws SecurityException { @@ -1629,7 +1629,7 @@ * s.checkPackageAccess()} denies access to the package * of this class. * - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Constructor[] getConstructors() throws SecurityException { @@ -1676,7 +1676,7 @@ * s.checkPackageAccess()} denies access to the package * of this class. * - * @since JDK1.1 + * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @@ -1761,7 +1761,7 @@ * * @jls 8.2 Class Members * @jls 8.4 Method Declarations - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Method getMethod(String name, Class... parameterTypes) @@ -1802,7 +1802,7 @@ * s.checkPackageAccess()} denies access to the package * of this class. * - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Constructor getConstructor(Class... parameterTypes) @@ -1845,7 +1845,7 @@ * * * - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Class[] getDeclaredClasses() throws SecurityException { @@ -1892,7 +1892,7 @@ * * * - * @since JDK1.1 + * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @@ -1953,7 +1953,7 @@ * * @jls 8.2 Class Members * @jls 8.4 Method Declarations - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Method[] getDeclaredMethods() throws SecurityException { @@ -1998,7 +1998,7 @@ * * * - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Constructor[] getDeclaredConstructors() throws SecurityException { @@ -2043,7 +2043,7 @@ * * * - * @since JDK1.1 + * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @@ -2105,7 +2105,7 @@ * * @jls 8.2 Class Members * @jls 8.4 Method Declarations - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Method getDeclaredMethod(String name, Class... parameterTypes) @@ -2155,7 +2155,7 @@ * * * - * @since JDK1.1 + * @since 1.1 */ @CallerSensitive public Constructor getDeclaredConstructor(Class... parameterTypes) @@ -2197,7 +2197,7 @@ * @return A {@link java.io.InputStream} object or {@code null} if * no resource with this name is found * @throws NullPointerException If {@code name} is {@code null} - * @since JDK1.1 + * @since 1.1 */ public InputStream getResourceAsStream(String name) { name = resolveName(name); @@ -2241,7 +2241,7 @@ * @param name name of the desired resource * @return A {@link java.net.URL} object or {@code null} if no * resource with this name is found - * @since JDK1.1 + * @since 1.1 */ public java.net.URL getResource(String name) { name = resolveName(name); @@ -2696,12 +2696,26 @@ } static class MethodArray { + // Don't add or remove methods except by add() or remove() calls. private Method[] methods; private int length; + private int defaults; MethodArray() { - methods = new Method[20]; + this(20); + } + + MethodArray(int initialSize) { + if (initialSize < 2) + throw new IllegalArgumentException("Size should be 2 or more"); + + methods = new Method[initialSize]; length = 0; + defaults = 0; + } + + boolean hasDefaults() { + return defaults != 0; } void add(Method m) { @@ -2709,6 +2723,9 @@ methods = Arrays.copyOf(methods, 2 * methods.length); } methods[length++] = m; + + if (m != null && m.isDefault()) + defaults++; } void addAll(Method[] ma) { @@ -2742,7 +2759,10 @@ } } - void addAllNonStatic(Method[] methods) { + /* Add Methods declared in an interface to this MethodArray. + * Static methods declared in interfaces are not inherited. + */ + void addInterfaceMethods(Method[] methods) { for (Method candidate : methods) { if (!Modifier.isStatic(candidate.getModifiers())) { add(candidate); @@ -2758,19 +2778,35 @@ return methods[i]; } - void removeByNameAndSignature(Method toRemove) { + Method getFirst() { + for (Method m : methods) + if (m != null) + return m; + return null; + } + + void removeByNameAndDescriptor(Method toRemove) { for (int i = 0; i < length; i++) { Method m = methods[i]; - if (m != null && - m.getReturnType() == toRemove.getReturnType() && - m.getName() == toRemove.getName() && - arrayContentsEq(m.getParameterTypes(), - toRemove.getParameterTypes())) { - methods[i] = null; + if (m != null && matchesNameAndDescriptor(m, toRemove)) { + remove(i); } } } + private void remove(int i) { + if (methods[i] != null && methods[i].isDefault()) + defaults--; + methods[i] = null; + } + + private boolean matchesNameAndDescriptor(Method m1, Method m2) { + return m1.getReturnType() == m2.getReturnType() && + m1.getName() == m2.getName() && // name is guaranteed to be interned + arrayContentsEq(m1.getParameterTypes(), + m2.getParameterTypes()); + } + void compactAndTrim() { int newPos = 0; // Get rid of null slots @@ -2788,9 +2824,48 @@ } } + /* Removes all Methods from this MethodArray that have a more specific + * default Method in this MethodArray. + * + * Users of MethodArray are responsible for pruning Methods that have + * a more specific concrete Method. + */ + void removeLessSpecifics() { + if (!hasDefaults()) + return; + + for (int i = 0; i < length; i++) { + Method m = get(i); + if (m == null || !m.isDefault()) + continue; + + for (int j = 0; j < length; j++) { + if (i == j) + continue; + + Method candidate = get(j); + if (candidate == null) + continue; + + if (!matchesNameAndDescriptor(m, candidate)) + continue; + + if (hasMoreSpecificClass(m, candidate)) + remove(j); + } + } + } + Method[] getArray() { return methods; } + + // Returns true if m1 is more specific than m2 + static boolean hasMoreSpecificClass(Method m1, Method m2) { + Class m1Class = m1.getDeclaringClass(); + Class m2Class = m2.getDeclaringClass(); + return m1Class != m2Class && m2Class.isAssignableFrom(m1Class); + } } @@ -2819,7 +2894,7 @@ // the end. MethodArray inheritedMethods = new MethodArray(); for (Class i : getInterfaces()) { - inheritedMethods.addAllNonStatic(i.privateGetPublicMethods()); + inheritedMethods.addInterfaceMethods(i.privateGetPublicMethods()); } if (!isInterface()) { Class c = getSuperclass(); @@ -2830,8 +2905,10 @@ // interface methods for (int i = 0; i < supers.length(); i++) { Method m = supers.get(i); - if (m != null && !Modifier.isAbstract(m.getModifiers())) { - inheritedMethods.removeByNameAndSignature(m); + if (m != null && + !Modifier.isAbstract(m.getModifiers()) && + !m.isDefault()) { + inheritedMethods.removeByNameAndDescriptor(m); } } // Insert superclass's inherited methods before @@ -2844,9 +2921,10 @@ // Filter out all local methods from inherited ones for (int i = 0; i < methods.length(); i++) { Method m = methods.get(i); - inheritedMethods.removeByNameAndSignature(m); + inheritedMethods.removeByNameAndDescriptor(m); } methods.addAllIfNotPresent(inheritedMethods); + methods.removeLessSpecifics(); methods.compactAndTrim(); res = methods.getArray(); if (rd != null) { @@ -2919,8 +2997,21 @@ return (res == null ? res : getReflectionFactory().copyMethod(res)); } - private Method getMethod0(String name, Class[] parameterTypes, boolean includeStaticMethods) { + MethodArray interfaceCandidates = new MethodArray(2); + Method res = privateGetMethodRecursive(name, parameterTypes, includeStaticMethods, interfaceCandidates); + if (res != null) + return res; + + // Not found on class or superclass directly + interfaceCandidates.removeLessSpecifics(); + return interfaceCandidates.getFirst(); // may be null + } + + private Method privateGetMethodRecursive(String name, + Class[] parameterTypes, + boolean includeStaticMethods, + MethodArray allInterfaceCandidates) { // Note: the intent is that the search algorithm this routine // uses be equivalent to the ordering imposed by // privateGetPublicMethods(). It fetches only the declared @@ -2928,6 +3019,14 @@ // number of Method objects which have to be created for the // common case where the method being requested is declared in // the class which is being queried. + // + // Due to default methods, unless a method is found on a superclass, + // methods declared in any superinterface needs to be considered. + // Collect all candidates declared in superinterfaces in {@code + // allInterfaceCandidates} and select the most specific if no match on + // a superclass is found. + + // Must _not_ return root methods Method res; // Search declared public methods if ((res = searchMethods(privateGetDeclaredMethods(true), @@ -2949,7 +3048,7 @@ Class[] interfaces = getInterfaces(); for (Class c : interfaces) if ((res = c.getMethod0(name, parameterTypes, false)) != null) - return res; + allInterfaceCandidates.add(res); // Not found return null; } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ClassCastException.java --- a/jdk/src/share/classes/java/lang/ClassCastException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ClassCastException.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class ClassCastException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ClassCircularityError.java --- a/jdk/src/share/classes/java/lang/ClassCircularityError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ClassCircularityError.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * superclass hierarchy of a class being loaded. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class ClassCircularityError extends LinkageError { private static final long serialVersionUID = 1054362542914539689L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ClassFormatError.java --- a/jdk/src/share/classes/java/lang/ClassFormatError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ClassFormatError.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * be interpreted as a class file. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class ClassFormatError extends LinkageError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ClassNotFoundException.java --- a/jdk/src/share/classes/java/lang/ClassNotFoundException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ClassNotFoundException.java Wed Jun 18 13:14:15 2014 -0700 @@ -48,7 +48,7 @@ * @see java.lang.Class#forName(java.lang.String) * @see java.lang.ClassLoader#findSystemClass(java.lang.String) * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) - * @since JDK1.0 + * @since 1.0 */ public class ClassNotFoundException extends ReflectiveOperationException { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/CloneNotSupportedException.java --- a/jdk/src/share/classes/java/lang/CloneNotSupportedException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/CloneNotSupportedException.java Wed Jun 18 13:14:15 2014 -0700 @@ -38,7 +38,7 @@ * @author unascribed * @see java.lang.Cloneable * @see java.lang.Object#clone() - * @since JDK1.0 + * @since 1.0 */ public diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Cloneable.java --- a/jdk/src/share/classes/java/lang/Cloneable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Cloneable.java Wed Jun 18 13:14:15 2014 -0700 @@ -48,7 +48,7 @@ * @author unascribed * @see java.lang.CloneNotSupportedException * @see java.lang.Object#clone() - * @since JDK1.0 + * @since 1.0 */ public interface Cloneable { } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Compiler.java --- a/jdk/src/share/classes/java/lang/Compiler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Compiler.java Wed Jun 18 13:14:15 2014 -0700 @@ -42,7 +42,7 @@ *

    If no compiler is available, these methods do nothing. * * @author Frank Yellin - * @since JDK1.0 + * @since 1.0 */ public final class Compiler { private Compiler() {} // don't make instances diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Double.java --- a/jdk/src/share/classes/java/lang/Double.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Double.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,7 +43,7 @@ * @author Lee Boynton * @author Arthur van Hoff * @author Joseph D. Darcy - * @since JDK1.0 + * @since 1.0 */ public final class Double extends Number implements Comparable { /** @@ -132,7 +132,7 @@ * The {@code Class} instance representing the primitive type * {@code double}. * - * @since JDK1.1 + * @since 1.1 */ @SuppressWarnings("unchecked") public static final Class TYPE = (Class) Class.getPrimitiveClass("double"); @@ -650,7 +650,7 @@ * @return the {@code double} value represented by this object * converted to type {@code byte} * @jls 5.1.3 Narrowing Primitive Conversions - * @since JDK1.1 + * @since 1.1 */ public byte byteValue() { return (byte)value; @@ -663,7 +663,7 @@ * @return the {@code double} value represented by this object * converted to type {@code short} * @jls 5.1.3 Narrowing Primitive Conversions - * @since JDK1.1 + * @since 1.1 */ public short shortValue() { return (short)value; @@ -700,7 +700,7 @@ * @return the {@code double} value represented by this object * converted to type {@code float} * @jls 5.1.3 Narrowing Primitive Conversions - * @since JDK1.0 + * @since 1.0 */ public float floatValue() { return (float)value; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Error.java --- a/jdk/src/share/classes/java/lang/Error.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Error.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @author Frank Yellin * @see java.lang.ThreadDeath * @jls 11.2 Compile-Time Checking of Exceptions - * @since JDK1.0 + * @since 1.0 */ public class Error extends Throwable { static final long serialVersionUID = 4980196508277280342L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Exception.java --- a/jdk/src/share/classes/java/lang/Exception.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Exception.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * @author Frank Yellin * @see java.lang.Error * @jls 11.2 Compile-Time Checking of Exceptions - * @since JDK1.0 + * @since 1.0 */ public class Exception extends Throwable { static final long serialVersionUID = -3387516993124229948L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ExceptionInInitializerError.java --- a/jdk/src/share/classes/java/lang/ExceptionInInitializerError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ExceptionInInitializerError.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * as the aforementioned "legacy method." * * @author Frank Yellin - * @since JDK1.1 + * @since 1.1 */ public class ExceptionInInitializerError extends LinkageError { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Float.java --- a/jdk/src/share/classes/java/lang/Float.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Float.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @author Lee Boynton * @author Arthur van Hoff * @author Joseph D. Darcy - * @since JDK1.0 + * @since 1.0 */ public final class Float extends Number implements Comparable { /** @@ -131,7 +131,7 @@ * The {@code Class} instance representing the primitive type * {@code float}. * - * @since JDK1.1 + * @since 1.1 */ @SuppressWarnings("unchecked") public static final Class TYPE = (Class) Class.getPrimitiveClass("float"); @@ -587,7 +587,7 @@ * @return the {@code float} value represented by this object * converted to type {@code short} * @jls 5.1.3 Narrowing Primitive Conversions - * @since JDK1.1 + * @since 1.1 */ public short shortValue() { return (short)value; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IllegalAccessError.java --- a/jdk/src/share/classes/java/lang/IllegalAccessError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IllegalAccessError.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * incompatibly changed. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class IllegalAccessError extends IncompatibleClassChangeError { private static final long serialVersionUID = -8988904074992417891L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IllegalAccessException.java --- a/jdk/src/share/classes/java/lang/IllegalAccessException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IllegalAccessException.java Wed Jun 18 13:14:15 2014 -0700 @@ -54,7 +54,7 @@ * @see java.lang.reflect.Field#getDouble(Object) * @see java.lang.reflect.Method#invoke(Object, Object[]) * @see java.lang.reflect.Constructor#newInstance(Object[]) - * @since JDK1.0 + * @since 1.0 */ public class IllegalAccessException extends ReflectiveOperationException { private static final long serialVersionUID = 6616958222490762034L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IllegalArgumentException.java --- a/jdk/src/share/classes/java/lang/IllegalArgumentException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IllegalArgumentException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * inappropriate argument. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class IllegalArgumentException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IllegalMonitorStateException.java --- a/jdk/src/share/classes/java/lang/IllegalMonitorStateException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IllegalMonitorStateException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * @see java.lang.Object#wait() * @see java.lang.Object#wait(long) * @see java.lang.Object#wait(long, int) - * @since JDK1.0 + * @since 1.0 */ public class IllegalMonitorStateException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IllegalStateException.java --- a/jdk/src/share/classes/java/lang/IllegalStateException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IllegalStateException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * operation. * * @author Jonni Kanerva - * @since JDK1.1 + * @since 1.1 */ public class IllegalStateException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IllegalThreadStateException.java --- a/jdk/src/share/classes/java/lang/IllegalThreadStateException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IllegalThreadStateException.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * @author unascribed * @see java.lang.Thread#resume() * @see java.lang.Thread#suspend() - * @since JDK1.0 + * @since 1.0 */ public class IllegalThreadStateException extends IllegalArgumentException { private static final long serialVersionUID = -7626246362397460174L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IncompatibleClassChangeError.java --- a/jdk/src/share/classes/java/lang/IncompatibleClassChangeError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IncompatibleClassChangeError.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * executing method depends, has since changed. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class IncompatibleClassChangeError extends LinkageError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/IndexOutOfBoundsException.java --- a/jdk/src/share/classes/java/lang/IndexOutOfBoundsException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/IndexOutOfBoundsException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * Applications can subclass this class to indicate similar exceptions. * * @author Frank Yellin - * @since JDK1.0 + * @since 1.0 */ public class IndexOutOfBoundsException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/InstantiationError.java --- a/jdk/src/share/classes/java/lang/InstantiationError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/InstantiationError.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * incompatibly changed. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/InstantiationException.java --- a/jdk/src/share/classes/java/lang/InstantiationException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/InstantiationException.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * * @author unascribed * @see java.lang.Class#newInstance() - * @since JDK1.0 + * @since 1.0 */ public class InstantiationException extends ReflectiveOperationException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Integer.java --- a/jdk/src/share/classes/java/lang/Integer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Integer.java Wed Jun 18 13:14:15 2014 -0700 @@ -47,7 +47,7 @@ * @author Arthur van Hoff * @author Josh Bloch * @author Joseph D. Darcy - * @since JDK1.0 + * @since 1.0 */ public final class Integer extends Number implements Comparable { /** @@ -66,7 +66,7 @@ * The {@code Class} instance representing the primitive type * {@code int}. * - * @since JDK1.1 + * @since 1.1 */ @SuppressWarnings("unchecked") public static final Class TYPE = (Class) Class.getPrimitiveClass("int"); @@ -227,7 +227,7 @@ * represented by the argument in hexadecimal (base 16). * @see #parseUnsignedInt(String, int) * @see #toUnsignedString(int, int) - * @since JDK1.0.2 + * @since 1.0.2 */ public static String toHexString(int i) { return toUnsignedString0(i, 4); @@ -265,7 +265,7 @@ * represented by the argument in octal (base 8). * @see #parseUnsignedInt(String, int) * @see #toUnsignedString(int, int) - * @since JDK1.0.2 + * @since 1.0.2 */ public static String toOctalString(int i) { return toUnsignedString0(i, 3); @@ -297,7 +297,7 @@ * represented by the argument in binary (base 2). * @see #parseUnsignedInt(String, int) * @see #toUnsignedString(int, int) - * @since JDK1.0.2 + * @since 1.0.2 */ public static String toBinaryString(int i) { return toUnsignedString0(i, 1); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/InternalError.java --- a/jdk/src/share/classes/java/lang/InternalError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/InternalError.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * the Java Virtual Machine. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class InternalError extends VirtualMachineError { private static final long serialVersionUID = -9062593416125562365L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/InterruptedException.java --- a/jdk/src/share/classes/java/lang/InterruptedException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/InterruptedException.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @see java.lang.Thread#sleep(long) * @see java.lang.Thread#interrupt() * @see java.lang.Thread#interrupted() - * @since JDK1.0 + * @since 1.0 */ public class InterruptedException extends Exception { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/LinkageError.java --- a/jdk/src/share/classes/java/lang/LinkageError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/LinkageError.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * * * @author Frank Yellin - * @since JDK1.0 + * @since 1.0 */ public class LinkageError extends Error { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Long.java --- a/jdk/src/share/classes/java/lang/Long.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Long.java Wed Jun 18 13:14:15 2014 -0700 @@ -49,7 +49,7 @@ * @author Arthur van Hoff * @author Josh Bloch * @author Joseph D. Darcy - * @since JDK1.0 + * @since 1.0 */ public final class Long extends Number implements Comparable { /** @@ -68,7 +68,7 @@ * The {@code Class} instance representing the primitive type * {@code long}. * - * @since JDK1.1 + * @since 1.1 */ @SuppressWarnings("unchecked") public static final Class TYPE = (Class) Class.getPrimitiveClass("long"); @@ -266,7 +266,7 @@ * (base 16). * @see #parseUnsignedLong(String, int) * @see #toUnsignedString(long, int) - * @since JDK 1.0.2 + * @since 1.0.2 */ public static String toHexString(long i) { return toUnsignedString0(i, 4); @@ -305,7 +305,7 @@ * value represented by the argument in octal (base 8). * @see #parseUnsignedLong(String, int) * @see #toUnsignedString(long, int) - * @since JDK 1.0.2 + * @since 1.0.2 */ public static String toOctalString(long i) { return toUnsignedString0(i, 3); @@ -338,7 +338,7 @@ * value represented by the argument in binary (base 2). * @see #parseUnsignedLong(String, int) * @see #toUnsignedString(long, int) - * @since JDK 1.0.2 + * @since 1.0.2 */ public static String toBinaryString(long i) { return toUnsignedString0(i, 1); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Math.java --- a/jdk/src/share/classes/java/lang/Math.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Math.java Wed Jun 18 13:14:15 2014 -0700 @@ -99,7 +99,7 @@ * * @author unascribed * @author Joseph D. Darcy - * @since JDK1.0 + * @since 1.0 */ public final class Math { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NegativeArraySizeException.java --- a/jdk/src/share/classes/java/lang/NegativeArraySizeException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NegativeArraySizeException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * Thrown if an application tries to create an array with negative size. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class NegativeArraySizeException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NoClassDefFoundError.java --- a/jdk/src/share/classes/java/lang/NoClassDefFoundError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NoClassDefFoundError.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * found. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class NoClassDefFoundError extends LinkageError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NoSuchFieldError.java --- a/jdk/src/share/classes/java/lang/NoSuchFieldError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NoSuchFieldError.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * incompatibly changed. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class NoSuchFieldError extends IncompatibleClassChangeError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NoSuchFieldException.java --- a/jdk/src/share/classes/java/lang/NoSuchFieldException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NoSuchFieldException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * Signals that the class doesn't have a field of a specified name. * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public class NoSuchFieldException extends ReflectiveOperationException { private static final long serialVersionUID = -6143714805279938260L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NoSuchMethodError.java --- a/jdk/src/share/classes/java/lang/NoSuchMethodError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NoSuchMethodError.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * incompatibly changed. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class NoSuchMethodError extends IncompatibleClassChangeError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NoSuchMethodException.java --- a/jdk/src/share/classes/java/lang/NoSuchMethodException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NoSuchMethodException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * Thrown when a particular method cannot be found. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class NoSuchMethodException extends ReflectiveOperationException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NullPointerException.java --- a/jdk/src/share/classes/java/lang/NullPointerException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NullPointerException.java Wed Jun 18 13:14:15 2014 -0700 @@ -47,7 +47,7 @@ * stack trace was not writable}. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class NullPointerException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Number.java --- a/jdk/src/share/classes/java/lang/Number.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Number.java Wed Jun 18 13:14:15 2014 -0700 @@ -50,7 +50,7 @@ * @author Arthur van Hoff * @jls 5.1.2 Widening Primitive Conversions * @jls 5.1.3 Narrowing Primitive Conversions - * @since JDK1.0 + * @since 1.0 */ public abstract class Number implements java.io.Serializable { /** @@ -98,7 +98,7 @@ * * @return the numeric value represented by this object after conversion * to type {@code byte}. - * @since JDK1.1 + * @since 1.1 */ public byte byteValue() { return (byte)intValue(); @@ -113,7 +113,7 @@ * * @return the numeric value represented by this object after conversion * to type {@code short}. - * @since JDK1.1 + * @since 1.1 */ public short shortValue() { return (short)intValue(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/NumberFormatException.java --- a/jdk/src/share/classes/java/lang/NumberFormatException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/NumberFormatException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * * @author unascribed * @see java.lang.Integer#parseInt(String) - * @since JDK1.0 + * @since 1.0 */ public class NumberFormatException extends IllegalArgumentException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Object.java --- a/jdk/src/share/classes/java/lang/Object.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Object.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * * @author unascribed * @see java.lang.Class - * @since JDK1.0 + * @since 1.0 */ public class Object { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/OutOfMemoryError.java --- a/jdk/src/share/classes/java/lang/OutOfMemoryError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/OutOfMemoryError.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * writable}. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class OutOfMemoryError extends VirtualMachineError { private static final long serialVersionUID = 8228564086184010517L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Process.java --- a/jdk/src/share/classes/java/lang/Process.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Process.java Wed Jun 18 13:14:15 2014 -0700 @@ -72,7 +72,7 @@ *

    As of 1.5, {@link ProcessBuilder#start()} is the preferred way * to create a {@code Process}. * - * @since JDK1.0 + * @since 1.0 */ public abstract class Process { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Runnable.java --- a/jdk/src/share/classes/java/lang/Runnable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Runnable.java Wed Jun 18 13:14:15 2014 -0700 @@ -50,7 +50,7 @@ * @author Arthur van Hoff * @see java.lang.Thread * @see java.util.concurrent.Callable - * @since JDK1.0 + * @since 1.0 */ @FunctionalInterface public interface Runnable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Runtime.java --- a/jdk/src/share/classes/java/lang/Runtime.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Runtime.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * * @author unascribed * @see java.lang.Runtime#getRuntime() - * @since JDK1.0 + * @since 1.0 */ public class Runtime { @@ -299,7 +299,7 @@ * @see java.lang.Runtime#exit(int) * @see java.lang.Runtime#gc() * @see java.lang.SecurityManager#checkExit(int) - * @since JDK1.1 + * @since 1.1 */ @Deprecated public static void runFinalizersOnExit(boolean value) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/RuntimeException.java --- a/jdk/src/share/classes/java/lang/RuntimeException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/RuntimeException.java Wed Jun 18 13:14:15 2014 -0700 @@ -38,7 +38,7 @@ * * @author Frank Yellin * @jls 11.2 Compile-Time Checking of Exceptions - * @since JDK1.0 + * @since 1.0 */ public class RuntimeException extends Exception { static final long serialVersionUID = -7034897190745766939L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/SecurityException.java --- a/jdk/src/share/classes/java/lang/SecurityException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/SecurityException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * * @author unascribed * @see java.lang.SecurityManager - * @since JDK1.0 + * @since 1.0 */ public class SecurityException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/SecurityManager.java --- a/jdk/src/share/classes/java/lang/SecurityManager.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/SecurityManager.java Wed Jun 18 13:14:15 2014 -0700 @@ -216,7 +216,7 @@ * @see java.security.SecurityPermission SecurityPermission * @see java.security.ProtectionDomain * - * @since JDK1.0 + * @since 1.0 */ public class SecurityManager { @@ -1179,7 +1179,7 @@ * use (join/leave/send/receive) IP multicast. * @exception NullPointerException if the address argument is * null. - * @since JDK1.1 + * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkMulticast(InetAddress maddr) { @@ -1213,7 +1213,7 @@ * use (join/leave/send/receive) IP multicast. * @exception NullPointerException if the address argument is * null. - * @since JDK1.1 + * @since 1.1 * @deprecated Use #checkPermission(java.security.Permission) instead * @see #checkPermission(java.security.Permission) checkPermission */ @@ -1322,7 +1322,7 @@ * * @exception SecurityException if the calling thread does not have * permission to initiate a print job request. - * @since JDK1.1 + * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkPrintJobAccess() { @@ -1333,7 +1333,7 @@ * Throws {@code SecurityException} if the calling thread does * not have {@code AllPermission}. * - * @since JDK1.1 + * @since 1.1 * @exception SecurityException if the calling thread does not have * {@code AllPermission} * @deprecated This method was originally used to check if the calling @@ -1351,7 +1351,7 @@ * Throws {@code SecurityException} if the calling thread does * not have {@code AllPermission}. * - * @since JDK1.1 + * @since 1.1 * @exception SecurityException if the calling thread does not have * {@code AllPermission} * @deprecated This method was originally used to check if the calling @@ -1610,7 +1610,7 @@ * to check the permission {@code java.security.AllPermission}. * * @see java.lang.reflect.Member - * @since JDK1.1 + * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ @Deprecated @@ -1666,7 +1666,7 @@ * @exception NullPointerException if target is null. * @exception IllegalArgumentException if target is empty. * - * @since JDK1.1 + * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ public void checkSecurityAccess(String target) { @@ -1683,7 +1683,7 @@ * manager to return the appropriate thread group. * * @return ThreadGroup that new threads are instantiated into - * @since JDK1.1 + * @since 1.1 * @see java.lang.ThreadGroup */ public ThreadGroup getThreadGroup() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Short.java --- a/jdk/src/share/classes/java/lang/Short.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Short.java Wed Jun 18 13:14:15 2014 -0700 @@ -38,7 +38,7 @@ * @author Nakul Saraiya * @author Joseph D. Darcy * @see java.lang.Number - * @since JDK1.1 + * @since 1.1 */ public final class Short extends Number implements Comparable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/StackOverflowError.java --- a/jdk/src/share/classes/java/lang/StackOverflowError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/StackOverflowError.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * recurses too deeply. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class StackOverflowError extends VirtualMachineError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/String.java --- a/jdk/src/share/classes/java/lang/String.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/String.java Wed Jun 18 13:14:15 2014 -0700 @@ -105,7 +105,7 @@ * @see java.lang.StringBuffer * @see java.lang.StringBuilder * @see java.nio.charset.Charset - * @since JDK1.0 + * @since 1.0 */ public final class String @@ -404,7 +404,7 @@ * If the {@code offset} and {@code length} arguments index * characters outside the bounds of the {@code bytes} array * - * @since JDK1.1 + * @since 1.1 */ public String(byte bytes[], int offset, int length, String charsetName) throws UnsupportedEncodingException { @@ -472,7 +472,7 @@ * @throws UnsupportedEncodingException * If the named charset is not supported * - * @since JDK1.1 + * @since 1.1 */ public String(byte bytes[], String charsetName) throws UnsupportedEncodingException { @@ -527,7 +527,7 @@ * If the {@code offset} and the {@code length} arguments index * characters outside the bounds of the {@code bytes} array * - * @since JDK1.1 + * @since 1.1 */ public String(byte bytes[], int offset, int length) { checkBounds(bytes, offset, length); @@ -548,7 +548,7 @@ * @param bytes * The bytes to be decoded into characters * - * @since JDK1.1 + * @since 1.1 */ public String(byte bytes[]) { this(bytes, 0, bytes.length); @@ -898,7 +898,7 @@ * @throws UnsupportedEncodingException * If the named charset is not supported * - * @since JDK1.1 + * @since 1.1 */ public byte[] getBytes(String charsetName) throws UnsupportedEncodingException { @@ -940,7 +940,7 @@ * * @return The resultant byte array * - * @since JDK1.1 + * @since 1.1 */ public byte[] getBytes() { return StringCoding.encode(value, 0, value.length); @@ -1415,7 +1415,7 @@ * argument is an empty string or is equal to this * {@code String} object as determined by the * {@link #equals(Object)} method. - * @since 1. 0 + * @since 1.0 */ public boolean startsWith(String prefix) { return startsWith(prefix, 0); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/StringBuffer.java --- a/jdk/src/share/classes/java/lang/StringBuffer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/StringBuffer.java Wed Jun 18 13:14:15 2014 -0700 @@ -92,7 +92,7 @@ * @author Arthur van Hoff * @see java.lang.StringBuilder * @see java.lang.String - * @since JDK1.0 + * @since 1.0 */ public final class StringBuffer extends AbstractStringBuilder @@ -656,7 +656,7 @@ } /** - * @since JDK1.0.2 + * @since 1.0.2 */ @Override public synchronized StringBuffer reverse() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/StringIndexOutOfBoundsException.java --- a/jdk/src/share/classes/java/lang/StringIndexOutOfBoundsException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/StringIndexOutOfBoundsException.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * * @author unascribed * @see java.lang.String#charAt(int) - * @since JDK1.0 + * @since 1.0 */ public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException { @@ -42,8 +42,6 @@ /** * Constructs a {@code StringIndexOutOfBoundsException} with no * detail message. - * - * @since JDK1.0. */ public StringIndexOutOfBoundsException() { super(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/System.java --- a/jdk/src/share/classes/java/lang/System.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/System.java Wed Jun 18 13:14:15 2014 -0700 @@ -54,7 +54,7 @@ * method for quickly copying a portion of an array. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public final class System { @@ -144,7 +144,7 @@ * @see SecurityManager#checkPermission * @see java.lang.RuntimePermission * - * @since JDK1.1 + * @since 1.1 */ public static void setIn(InputStream in) { checkIO(); @@ -168,7 +168,7 @@ * @see SecurityManager#checkPermission * @see java.lang.RuntimePermission * - * @since JDK1.1 + * @since 1.1 */ public static void setOut(PrintStream out) { checkIO(); @@ -192,7 +192,7 @@ * @see SecurityManager#checkPermission * @see java.lang.RuntimePermission * - * @since JDK1.1 + * @since 1.1 */ public static void setErr(PrintStream err) { checkIO(); @@ -502,7 +502,7 @@ * * @param x object for which the hashCode is to be calculated * @return the hashCode - * @since JDK1.1 + * @since 1.1 */ public static native int identityHashCode(Object x); @@ -1032,7 +1032,7 @@ * @see java.lang.Runtime#exit(int) * @see java.lang.Runtime#gc() * @see java.lang.SecurityManager#checkExit(int) - * @since JDK1.1 + * @since 1.1 */ @Deprecated public static void runFinalizersOnExit(boolean value) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Thread.java --- a/jdk/src/share/classes/java/lang/Thread.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Thread.java Wed Jun 18 13:14:15 2014 -0700 @@ -135,7 +135,7 @@ * @see Runtime#exit(int) * @see #run() * @see #stop() - * @since JDK1.0 + * @since 1.0 */ public class Thread implements Runnable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ThreadDeath.java --- a/jdk/src/share/classes/java/lang/ThreadDeath.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ThreadDeath.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,7 +43,7 @@ * "normal occurrence", because many applications catch all * occurrences of {@code Exception} and then discard the exception. * - * @since JDK1.0 + * @since 1.0 */ public class ThreadDeath extends Error { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/ThreadGroup.java --- a/jdk/src/share/classes/java/lang/ThreadGroup.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/ThreadGroup.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * parent thread group or any other thread groups. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ /* The locking strategy for this code is to try to lock only one level of the * tree wherever possible, but otherwise to lock from the bottom up. @@ -90,7 +90,7 @@ * @exception SecurityException if the current thread cannot create a * thread in the specified thread group. * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 */ public ThreadGroup(String name) { this(Thread.currentThread().getThreadGroup(), name); @@ -111,7 +111,7 @@ * thread in the specified thread group. * @see java.lang.SecurityException * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 */ public ThreadGroup(ThreadGroup parent, String name) { this(checkParentAccess(parent), parent, name); @@ -140,7 +140,7 @@ * Returns the name of this thread group. * * @return the name of this thread group. - * @since JDK1.0 + * @since 1.0 */ public final String getName() { return name; @@ -160,7 +160,7 @@ * @see java.lang.ThreadGroup#checkAccess() * @see java.lang.SecurityException * @see java.lang.RuntimePermission - * @since JDK1.0 + * @since 1.0 */ public final ThreadGroup getParent() { if (parent != null) @@ -176,7 +176,7 @@ * @return the maximum priority that a thread in this thread group * can have. * @see #setMaxPriority - * @since JDK1.0 + * @since 1.0 */ public final int getMaxPriority() { return maxPriority; @@ -189,7 +189,7 @@ * * @return true if this thread group is a daemon thread group; * false otherwise. - * @since JDK1.0 + * @since 1.0 */ public final boolean isDaemon() { return daemon; @@ -199,7 +199,7 @@ * Tests if this thread group has been destroyed. * * @return true if this object is destroyed - * @since JDK1.1 + * @since 1.1 */ public synchronized boolean isDestroyed() { return destroyed; @@ -221,7 +221,7 @@ * this thread group. * @see java.lang.SecurityException * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 */ public final void setDaemon(boolean daemon) { checkAccess(); @@ -254,7 +254,7 @@ * @see #getMaxPriority * @see java.lang.SecurityException * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 */ public final void setMaxPriority(int pri) { int ngroupsSnapshot; @@ -285,7 +285,7 @@ * @return true if this thread group is the thread group * argument or one of its ancestor thread groups; * false otherwise. - * @since JDK1.0 + * @since 1.0 */ public final boolean parentOf(ThreadGroup g) { for (; g != null ; g = g.parent) { @@ -307,7 +307,7 @@ * @exception SecurityException if the current thread is not allowed to * access this thread group. * @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup) - * @since JDK1.0 + * @since 1.0 */ public final void checkAccess() { SecurityManager security = System.getSecurityManager(); @@ -331,7 +331,7 @@ * group and in any other thread group that has this thread * group as an ancestor * - * @since JDK1.0 + * @since 1.0 */ public int activeCount() { int result; @@ -377,7 +377,7 @@ * if {@linkplain #checkAccess checkAccess} determines that * the current thread cannot access this thread group * - * @since JDK1.0 + * @since 1.0 */ public int enumerate(Thread list[]) { checkAccess(); @@ -415,7 +415,7 @@ * if {@linkplain #checkAccess checkAccess} determines that * the current thread cannot access this thread group * - * @since JDK1.0 + * @since 1.0 */ public int enumerate(Thread list[], boolean recurse) { checkAccess(); @@ -468,7 +468,7 @@ * @return the number of active thread groups with this thread group as * an ancestor * - * @since JDK1.0 + * @since 1.0 */ public int activeGroupCount() { int ngroupsSnapshot; @@ -511,7 +511,7 @@ * if {@linkplain #checkAccess checkAccess} determines that * the current thread cannot access this thread group * - * @since JDK1.0 + * @since 1.0 */ public int enumerate(ThreadGroup list[]) { checkAccess(); @@ -549,7 +549,7 @@ * if {@linkplain #checkAccess checkAccess} determines that * the current thread cannot access this thread group * - * @since JDK1.0 + * @since 1.0 */ public int enumerate(ThreadGroup list[], boolean recurse) { checkAccess(); @@ -603,7 +603,7 @@ * @see java.lang.SecurityException * @see java.lang.Thread#stop() * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 * @deprecated This method is inherently unsafe. See * {@link Thread#stop} for details. */ @@ -665,7 +665,7 @@ * @see java.lang.Thread#suspend() * @see java.lang.SecurityException * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 * @deprecated This method is inherently deadlock-prone. See * {@link Thread#suspend} for details. */ @@ -726,7 +726,7 @@ * @see java.lang.SecurityException * @see java.lang.Thread#resume() * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 * @deprecated This method is used solely in conjunction with * Thread.suspend and ThreadGroup.suspend, * both of which have been deprecated, as they are inherently @@ -767,7 +767,7 @@ * @exception SecurityException if the current thread cannot modify this * thread group. * @see java.lang.ThreadGroup#checkAccess() - * @since JDK1.0 + * @since 1.0 */ public final void destroy() { int ngroupsSnapshot; @@ -980,7 +980,7 @@ * Prints information about this thread group to the standard * output. This method is useful only for debugging. * - * @since JDK1.0 + * @since 1.0 */ public void list() { list(System.out, 0); @@ -1045,7 +1045,7 @@ * * @param t the thread that is about to exit. * @param e the uncaught exception. - * @since JDK1.0 + * @since 1.0 */ public void uncaughtException(Thread t, Throwable e) { if (parent != null) { @@ -1068,7 +1068,7 @@ * * @param b boolean to allow or disallow suspension * @return true on success - * @since JDK1.1 + * @since 1.1 * @deprecated The definition of this call depends on {@link #suspend}, * which is deprecated. Further, the behavior of this call * was never specified. @@ -1086,7 +1086,7 @@ * Returns a string representation of this Thread group. * * @return a string representation of this thread group. - * @since JDK1.0 + * @since 1.0 */ public String toString() { return getClass().getName() + "[name=" + getName() + ",maxpri=" + maxPriority + "]"; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Throwable.java --- a/jdk/src/share/classes/java/lang/Throwable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Throwable.java Wed Jun 18 13:14:15 2014 -0700 @@ -109,7 +109,7 @@ * @author Josh Bloch (Added exception chaining and programmatic access to * stack trace in 1.4.) * @jls 11.2 Compile-Time Checking of Exceptions - * @since JDK1.0 + * @since 1.0 */ public class Throwable implements Serializable { /** use serialVersionUID from JDK 1.0.2 for interoperability */ @@ -385,7 +385,7 @@ * {@code getMessage()}. * * @return The localized description of this throwable. - * @since JDK1.1 + * @since 1.1 */ public String getLocalizedMessage() { return getMessage(); @@ -714,7 +714,7 @@ * print writer. * * @param s {@code PrintWriter} to use for output - * @since JDK1.1 + * @since 1.1 */ public void printStackTrace(PrintWriter s) { printStackTrace(new WrappedPrintWriter(s)); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/UnknownError.java --- a/jdk/src/share/classes/java/lang/UnknownError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/UnknownError.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * Java Virtual Machine. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class UnknownError extends VirtualMachineError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/UnsatisfiedLinkError.java --- a/jdk/src/share/classes/java/lang/UnsatisfiedLinkError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/UnsatisfiedLinkError.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * * @author unascribed * @see java.lang.Runtime - * @since JDK1.0 + * @since 1.0 */ public class UnsatisfiedLinkError extends LinkageError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/VerifyError.java --- a/jdk/src/share/classes/java/lang/VerifyError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/VerifyError.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * or security problem. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class VerifyError extends LinkageError { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/VirtualMachineError.java --- a/jdk/src/share/classes/java/lang/VirtualMachineError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/VirtualMachineError.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * * * @author Frank Yellin - * @since JDK1.0 + * @since 1.0 */ abstract public class VirtualMachineError extends Error { private static final long serialVersionUID = 4161983926571568670L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/Void.java --- a/jdk/src/share/classes/java/lang/Void.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/Void.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * void. * * @author unascribed - * @since JDK1.1 + * @since 1.1 */ public final class Void { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/instrument/package.html --- a/jdk/src/share/classes/java/lang/instrument/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/instrument/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -274,7 +274,7 @@

  • JDK Tools and Utilities -@since JDK1.5 +@since 1.5 @revised 1.6 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java --- a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,6 +40,7 @@ import static java.lang.invoke.MethodHandleNatives.Constants.*; import static java.lang.invoke.LambdaForm.BasicType.*; import sun.invoke.util.VerifyType; +import sun.reflect.misc.ReflectUtil; /** * Code generation backend for LambdaForm. @@ -594,6 +595,8 @@ return false; // inner class of some sort if (cls.getClassLoader() != MethodHandle.class.getClassLoader()) return false; // not on BCP + if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: switch to supported API once it is added + return false; MethodType mtype = member.getMethodOrFieldType(); if (!isStaticallyNameable(mtype.returnType())) return false; @@ -612,6 +615,8 @@ cls = cls.getComponentType(); if (cls.isPrimitive()) return true; // int[].class, for example + if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: switch to supported API once it is added + return false; // could use VerifyAccess.isClassAccessible but the following is a safe approximation if (cls.getClassLoader() != Object.class.getClassLoader()) return false; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/package-info.java --- a/jdk/src/share/classes/java/lang/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -66,6 +66,6 @@ * that must be supported by every implementation of the Java * platform. * - * @since JDK1.0 + * @since 1.0 */ package java.lang; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/lang/reflect/package-info.java --- a/jdk/src/share/classes/java/lang/reflect/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/lang/reflect/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,6 +44,6 @@ * members of a target object (based on its runtime class) or the * members declared by a given class. * - * @since JDK1.1 + * @since 1.1 */ package java.lang.reflect; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/math/BigInteger.java --- a/jdk/src/share/classes/java/math/BigInteger.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/math/BigInteger.java Wed Jun 18 13:14:15 2014 -0700 @@ -117,7 +117,7 @@ * @author Michael McCloskey * @author Alan Eliasen * @author Timothy Buktu - * @since JDK1.1 + * @since 1.1 */ public class BigInteger extends Number implements Comparable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/math/package-info.java --- a/jdk/src/share/classes/java/math/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/math/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,6 +40,6 @@ * allowing the user to choose from a comprehensive set of eight * rounding modes. * - * @since JDK1.1 + * @since 1.1 */ package java.math; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/BindException.java --- a/jdk/src/share/classes/java/net/BindException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/BindException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * socket to a local address and port. Typically, the port is * in use, or the requested local address could not be assigned. * - * @since JDK1.1 + * @since 1.1 */ public class BindException extends SocketException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/ConnectException.java --- a/jdk/src/share/classes/java/net/ConnectException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/ConnectException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * was refused remotely (e.g., no process is listening on the * remote address/port). * - * @since JDK1.1 + * @since 1.1 */ public class ConnectException extends SocketException { private static final long serialVersionUID = 3831404271622369215L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/ContentHandler.java --- a/jdk/src/share/classes/java/net/ContentHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/ContentHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -79,7 +79,7 @@ * @see java.net.URLConnection * @see java.net.URLConnection#getContent() * @see java.net.URLConnection#setContentHandlerFactory(java.net.ContentHandlerFactory) - * @since JDK1.0 + * @since 1.0 */ abstract public class ContentHandler { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/ContentHandlerFactory.java --- a/jdk/src/share/classes/java/net/ContentHandlerFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/ContentHandlerFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * @author James Gosling * @see java.net.ContentHandler * @see java.net.URLStreamHandler - * @since JDK1.0 + * @since 1.0 */ public interface ContentHandlerFactory { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/DatagramPacket.java --- a/jdk/src/share/classes/java/net/DatagramPacket.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/DatagramPacket.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * * @author Pavani Diwanji * @author Benjamin Renaud - * @since JDK1.0 + * @since 1.0 */ public final class DatagramPacket { @@ -276,7 +276,7 @@ * Sets the IP address of the machine to which this datagram * is being sent. * @param iaddr the {@code InetAddress} - * @since JDK1.1 + * @since 1.1 * @see #getAddress() */ public synchronized void setAddress(InetAddress iaddr) { @@ -287,7 +287,7 @@ * Sets the port number on the remote host to which this datagram * is being sent. * @param iport the port number - * @since JDK1.1 + * @since 1.1 * @see #getPort() */ public synchronized void setPort(int iport) { @@ -342,7 +342,7 @@ * @see #getLength * @see #getData * - * @since JDK1.1 + * @since 1.1 */ public synchronized void setData(byte[] buf) { if (buf == null) { @@ -370,7 +370,7 @@ * @see #getLength * @see #setData * - * @since JDK1.1 + * @since 1.1 */ public synchronized void setLength(int length) { if ((length + offset) > buf.length || length < 0 || diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/DatagramSocket.java --- a/jdk/src/share/classes/java/net/DatagramSocket.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/DatagramSocket.java Wed Jun 18 13:14:15 2014 -0700 @@ -63,7 +63,7 @@ * @author Pavani Diwanji * @see java.net.DatagramPacket * @see java.nio.channels.DatagramChannel - * @since JDK1.0 + * @since 1.0 */ public class DatagramSocket implements java.io.Closeable { @@ -275,7 +275,7 @@ * {@code checkListen} method doesn't allow the operation. * * @see SecurityManager#checkListen - * @since JDK1.1 + * @since 1.1 */ public DatagramSocket(int port, InetAddress laddr) throws SocketException { this(new InetSocketAddress(laddr, port)); @@ -852,7 +852,7 @@ * * @param timeout the specified timeout in milliseconds. * @throws SocketException if there is an error in the underlying protocol, such as an UDP error. - * @since JDK1.1 + * @since 1.1 * @see #getSoTimeout() */ public synchronized void setSoTimeout(int timeout) throws SocketException { @@ -867,7 +867,7 @@ * * @return the setting for SO_TIMEOUT * @throws SocketException if there is an error in the underlying protocol, such as an UDP error. - * @since JDK1.1 + * @since 1.1 * @see #setSoTimeout(int) */ public synchronized int getSoTimeout() throws SocketException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/DatagramSocketImpl.java --- a/jdk/src/share/classes/java/net/DatagramSocketImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/DatagramSocketImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ /** * Abstract datagram and multicast socket implementation base class. * @author Pavani Diwanji - * @since JDK1.1 + * @since 1.1 */ public abstract class DatagramSocketImpl implements SocketOptions { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/FileNameMap.java --- a/jdk/src/share/classes/java/net/FileNameMap.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/FileNameMap.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * between a file name and a MIME type string. * * @author Steven B. Byrne - * @since JDK1.1 + * @since 1.1 */ public interface FileNameMap { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/HttpURLConnection.java --- a/jdk/src/share/classes/java/net/HttpURLConnection.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/HttpURLConnection.java Wed Jun 18 13:14:15 2014 -0700 @@ -64,7 +64,7 @@ * redirected host/URL. * * @see java.net.HttpURLConnection#disconnect() - * @since JDK1.1 + * @since 1.1 */ abstract public class HttpURLConnection extends URLConnection { /* instance variables */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/IDN.java --- a/jdk/src/share/classes/java/net/IDN.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/IDN.java Wed Jun 18 13:14:15 2014 -0700 @@ -111,7 +111,7 @@ public static String toASCII(String input, int flag) { int p = 0, q = 0; - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (isRootLabel(input)) { return "."; @@ -172,7 +172,7 @@ */ public static String toUnicode(String input, int flag) { int p = 0, q = 0; - StringBuffer out = new StringBuffer(); + StringBuilder out = new StringBuilder(); if (isRootLabel(input)) { return "."; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/Inet4Address.java --- a/jdk/src/share/classes/java/net/Inet4Address.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/Inet4Address.java Wed Jun 18 13:14:15 2014 -0700 @@ -155,7 +155,7 @@ * address i.e first four bits of the address are 1110. * @return a {@code boolean} indicating if the InetAddress is * an IP multicast address - * @since JDK1.1 + * @since 1.1 */ public boolean isMulticastAddress() { return ((holder().getAddress() & 0xf0000000) == 0xe0000000); @@ -320,7 +320,7 @@ * Returns the IP address string in textual presentation form. * * @return the raw IP address in a string format. - * @since JDK1.0.2 + * @since 1.0.2 */ public String getHostAddress() { return numericToTextFormat(getAddress()); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/Inet6Address.java --- a/jdk/src/share/classes/java/net/Inet6Address.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/Inet6Address.java Wed Jun 18 13:14:15 2014 -0700 @@ -683,7 +683,7 @@ * @return a {@code boolean} indicating if the InetAddress is an IP * multicast address * - * @since JDK1.1 + * @since 1.1 */ @Override public boolean isMulticastAddress() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/InetAddress.java --- a/jdk/src/share/classes/java/net/InetAddress.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/InetAddress.java Wed Jun 18 13:14:15 2014 -0700 @@ -183,7 +183,7 @@ * @see java.net.InetAddress#getAllByName(java.lang.String) * @see java.net.InetAddress#getByName(java.lang.String) * @see java.net.InetAddress#getLocalHost() - * @since JDK1.0 + * @since 1.0 */ public class InetAddress implements java.io.Serializable { @@ -305,7 +305,7 @@ * IP multicast address. * @return a {@code boolean} indicating if the InetAddress is * an IP multicast address - * @since JDK1.1 + * @since 1.1 */ public boolean isMulticastAddress() { return false; @@ -654,7 +654,7 @@ * Returns the IP address string in textual presentation. * * @return the raw IP address in a string format. - * @since JDK1.0.2 + * @since 1.0.2 */ public String getHostAddress() { return null; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/MalformedURLException.java --- a/jdk/src/share/classes/java/net/MalformedURLException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/MalformedURLException.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * string could not be parsed. * * @author Arthur van Hoff - * @since JDK1.0 + * @since 1.0 */ public class MalformedURLException extends IOException { private static final long serialVersionUID = -182787522200415866L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/MulticastSocket.java --- a/jdk/src/share/classes/java/net/MulticastSocket.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/MulticastSocket.java Wed Jun 18 13:14:15 2014 -0700 @@ -77,7 +77,7 @@ * Currently applets are not allowed to use multicast sockets. * * @author Pavani Diwanji - * @since JDK1.1 + * @since 1.1 */ public class MulticastSocket extends DatagramSocket { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/NoRouteToHostException.java --- a/jdk/src/share/classes/java/net/NoRouteToHostException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/NoRouteToHostException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * host cannot be reached because of an intervening firewall, or * if an intermediate router is down. * - * @since JDK1.1 + * @since 1.1 */ public class NoRouteToHostException extends SocketException { private static final long serialVersionUID = -1897550894873493790L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/ProtocolException.java --- a/jdk/src/share/classes/java/net/ProtocolException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/ProtocolException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * protocol, such as a TCP error. * * @author Chris Warth - * @since JDK1.0 + * @since 1.0 */ public class ProtocolException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/ServerSocket.java --- a/jdk/src/share/classes/java/net/ServerSocket.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/ServerSocket.java Wed Jun 18 13:14:15 2014 -0700 @@ -48,7 +48,7 @@ * @see java.net.SocketImpl * @see java.net.ServerSocket#setSocketFactory(java.net.SocketImplFactory) * @see java.nio.channels.ServerSocketChannel - * @since JDK1.0 + * @since 1.0 */ public class ServerSocket implements java.io.Closeable { @@ -225,7 +225,7 @@ * @see SocketOptions * @see SocketImpl * @see SecurityManager#checkListen - * @since JDK1.1 + * @since 1.1 */ public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException { setImpl(); @@ -527,7 +527,7 @@ * and the channel is in non-blocking mode * @throws IOException if an I/O error occurs when waiting * for a connection. - * @since JDK1.1 + * @since 1.1 * @revised 1.4 * @spec JSR-51 */ @@ -644,7 +644,7 @@ * @param timeout the specified timeout, in milliseconds * @exception SocketException if there is an error in * the underlying protocol, such as a TCP error. - * @since JDK1.1 + * @since 1.1 * @see #getSoTimeout() */ public synchronized void setSoTimeout(int timeout) throws SocketException { @@ -658,7 +658,7 @@ * 0 returns implies that the option is disabled (i.e., timeout of infinity). * @return the {@link SocketOptions#SO_TIMEOUT SO_TIMEOUT} value * @exception IOException if an I/O error occurs - * @since JDK1.1 + * @since 1.1 * @see #setSoTimeout(int) */ public synchronized int getSoTimeout() throws IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/Socket.java --- a/jdk/src/share/classes/java/net/Socket.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/Socket.java Wed Jun 18 13:14:15 2014 -0700 @@ -50,7 +50,7 @@ * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) * @see java.net.SocketImpl * @see java.nio.channels.SocketChannel - * @since JDK1.0 + * @since 1.0 */ public class Socket implements java.io.Closeable { @@ -79,7 +79,7 @@ * Creates an unconnected socket, with the * system-default type of SocketImpl. * - * @since JDK1.1 + * @since 1.1 * @revised 1.4 */ public Socket() { @@ -161,7 +161,7 @@ * * @exception SocketException if there is an error in the underlying protocol, * such as a TCP error. - * @since JDK1.1 + * @since 1.1 */ protected Socket(SocketImpl impl) throws SocketException { this.impl = impl; @@ -281,7 +281,7 @@ * parameter is outside the specified range of valid port values, * which is between 0 and 65535, inclusive. * @see SecurityManager#checkConnect - * @since JDK1.1 + * @since 1.1 */ public Socket(String host, int port, InetAddress localAddr, int localPort) throws IOException { @@ -323,7 +323,7 @@ * which is between 0 and 65535, inclusive. * @exception NullPointerException if {@code address} is null. * @see SecurityManager#checkConnect - * @since JDK1.1 + * @since 1.1 */ public Socket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException { @@ -708,7 +708,7 @@ * @return the local address to which the socket is bound, * the loopback address if denied by the security manager, or * the wildcard address if the socket is closed or not bound yet. - * @since JDK1.1 + * @since 1.1 * * @see SecurityManager#checkConnect */ @@ -972,7 +972,7 @@ * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. * - * @since JDK1.1 + * @since 1.1 * * @see #getTcpNoDelay() */ @@ -989,7 +989,7 @@ * {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled. * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. - * @since JDK1.1 + * @since 1.1 * @see #setTcpNoDelay(boolean) */ public boolean getTcpNoDelay() throws SocketException { @@ -1010,7 +1010,7 @@ * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. * @exception IllegalArgumentException if the linger value is negative. - * @since JDK1.1 + * @since 1.1 * @see #getSoLinger() */ public void setSoLinger(boolean on, int linger) throws SocketException { @@ -1038,7 +1038,7 @@ * @return the setting for {@link SocketOptions#SO_LINGER SO_LINGER}. * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. - * @since JDK1.1 + * @since 1.1 * @see #setSoLinger(boolean, int) */ public int getSoLinger() throws SocketException { @@ -1131,7 +1131,7 @@ * @param timeout the specified timeout, in milliseconds. * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. - * @since JDK 1.1 + * @since 1.1 * @see #getSoTimeout() */ public synchronized void setSoTimeout(int timeout) throws SocketException { @@ -1151,7 +1151,7 @@ * @exception SocketException if there is an error * in the underlying protocol, such as a TCP error. * - * @since JDK1.1 + * @since 1.1 * @see #setSoTimeout(int) */ public synchronized int getSoTimeout() throws SocketException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/SocketException.java --- a/jdk/src/share/classes/java/net/SocketException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/SocketException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * Thrown to indicate that there is an error creating or accessing a Socket. * * @author Jonathan Payne - * @since JDK1.0 + * @since 1.0 */ public class SocketException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/SocketImpl.java --- a/jdk/src/share/classes/java/net/SocketImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/SocketImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -42,7 +42,7 @@ * described, without attempting to go through a firewall or proxy. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public abstract class SocketImpl implements SocketOptions { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/SocketImplFactory.java --- a/jdk/src/share/classes/java/net/SocketImplFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/SocketImplFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * @author Arthur van Hoff * @see java.net.Socket * @see java.net.ServerSocket - * @since JDK1.0 + * @since 1.0 */ public interface SocketImplFactory { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/SocketPermission.java --- a/jdk/src/share/classes/java/net/SocketPermission.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/SocketPermission.java Wed Jun 18 13:14:15 2014 -0700 @@ -733,7 +733,7 @@ InetAddress auth; try { - StringBuffer sb = new StringBuffer(39); + StringBuilder sb = new StringBuilder(39); for (int i = 15; i >= 0; i--) { sb.append(Integer.toHexString(((addr[i]) & 0x0f))); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URI.java --- a/jdk/src/share/classes/java/net/URI.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URI.java Wed Jun 18 13:14:15 2014 -0700 @@ -1957,7 +1957,7 @@ private void defineString() { if (string != null) return; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (scheme != null) { sb.append(scheme); sb.append(':'); @@ -2015,7 +2015,7 @@ if (i >= 0) path = base.substring(0, i + 1); } else { - StringBuffer sb = new StringBuffer(base.length() + cn); + StringBuilder sb = new StringBuilder(base.length() + cn); // 5.2 (6a) if (i >= 0) sb.append(base.substring(0, i + 1)); @@ -2778,7 +2778,7 @@ if (s.indexOf('%') < 0) return s; - StringBuffer sb = new StringBuffer(n); + StringBuilder sb = new StringBuilder(n); ByteBuffer bb = ByteBuffer.allocate(n); CharBuffer cb = CharBuffer.allocate(n); CharsetDecoder dec = ThreadLocalCoders.decoderFor("UTF-8") diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URISyntaxException.java --- a/jdk/src/share/classes/java/net/URISyntaxException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URISyntaxException.java Wed Jun 18 13:14:15 2014 -0700 @@ -121,7 +121,7 @@ * @return A string describing the parse error */ public String getMessage() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getReason()); if (index > -1) { sb.append(" at index "); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URL.java --- a/jdk/src/share/classes/java/net/URL.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URL.java Wed Jun 18 13:14:15 2014 -0700 @@ -131,7 +131,7 @@ * as the encoding scheme defined in RFC2396. * * @author James Gosling - * @since JDK1.0 + * @since 1.0 */ public final class URL implements java.io.Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URLConnection.java --- a/jdk/src/share/classes/java/net/URLConnection.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URLConnection.java Wed Jun 18 13:14:15 2014 -0700 @@ -155,7 +155,7 @@ * @see java.net.URLConnection#setIfModifiedSince(long) * @see java.net.URLConnection#setRequestProperty(java.lang.String, java.lang.String) * @see java.net.URLConnection#setUseCaches(boolean) - * @since JDK1.0 + * @since 1.0 */ public abstract class URLConnection { @@ -283,7 +283,7 @@ private MessageHeader requests; /** - * @since JDK1.1 + * @since 1.1 */ private static FileNameMap fileNameMap; @@ -495,7 +495,7 @@ * @return the content length of the resource that this connection's URL * references, or {@code -1} if the content length is * not known. - * @since 7.0 + * @since 1.7 */ public long getContentLengthLong() { return getHeaderFieldLong("content-length", -1); @@ -623,7 +623,7 @@ * @return the value of the named field, parsed as a long. The * {@code Default} value is returned if the field is * missing or malformed. - * @since 7.0 + * @since 1.7 */ public long getHeaderFieldLong(String name, long Default) { String value = getHeaderField(name); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URLDecoder.java --- a/jdk/src/share/classes/java/net/URLDecoder.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URLDecoder.java Wed Jun 18 13:14:15 2014 -0700 @@ -134,7 +134,7 @@ boolean needToChange = false; int numChars = s.length(); - StringBuffer sb = new StringBuffer(numChars > 500 ? numChars / 2 : numChars); + StringBuilder sb = new StringBuilder(numChars > 500 ? numChars / 2 : numChars); int i = 0; if (enc.length() == 0) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URLEncoder.java --- a/jdk/src/share/classes/java/net/URLEncoder.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URLEncoder.java Wed Jun 18 13:14:15 2014 -0700 @@ -77,7 +77,7 @@ * character @ is encoded as one byte 40 (hex). * * @author Herb Jellinek - * @since JDK1.0 + * @since 1.0 */ public class URLEncoder { static BitSet dontNeedEncoding; @@ -201,7 +201,7 @@ throws UnsupportedEncodingException { boolean needToChange = false; - StringBuffer out = new StringBuffer(s.length()); + StringBuilder out = new StringBuilder(s.length()); Charset charset; CharArrayWriter charArrayWriter = new CharArrayWriter(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URLStreamHandler.java --- a/jdk/src/share/classes/java/net/URLStreamHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URLStreamHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -47,7 +47,7 @@ * * @author James Gosling * @see java.net.URL#URL(java.lang.String, java.lang.String, int, java.lang.String) - * @since JDK1.0 + * @since 1.0 */ public abstract class URLStreamHandler { /** @@ -486,7 +486,7 @@ if (u.getRef() != null) len += 1 + u.getRef().length(); - StringBuffer result = new StringBuffer(len); + StringBuilder result = new StringBuilder(len); result.append(u.getProtocol()); result.append(":"); if (u.getAuthority() != null && u.getAuthority().length() > 0) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/URLStreamHandlerFactory.java --- a/jdk/src/share/classes/java/net/URLStreamHandlerFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/URLStreamHandlerFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * @author Arthur van Hoff * @see java.net.URL * @see java.net.URLStreamHandler - * @since JDK1.0 + * @since 1.0 */ public interface URLStreamHandlerFactory { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/UnknownHostException.java --- a/jdk/src/share/classes/java/net/UnknownHostException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/UnknownHostException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * Thrown to indicate that the IP address of a host could not be determined. * * @author Jonathan Payne - * @since JDK1.0 + * @since 1.0 */ public class UnknownHostException extends IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/UnknownServiceException.java --- a/jdk/src/share/classes/java/net/UnknownServiceException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/UnknownServiceException.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * read-only URL connection. * * @author unascribed - * @since JDK1.0 + * @since 1.0 */ public class UnknownServiceException extends IOException { private static final long serialVersionUID = -4169033248853639508L; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/net/package-info.java --- a/jdk/src/share/classes/java/net/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/net/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -156,6 +156,6 @@ * Networking System Properties
  • * * - * @since JDK1.0 + * @since 1.0 */ package java.net; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/nio/file/InvalidPathException.java --- a/jdk/src/share/classes/java/nio/file/InvalidPathException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/nio/file/InvalidPathException.java Wed Jun 18 13:14:15 2014 -0700 @@ -117,7 +117,7 @@ * @return a string describing the error */ public String getMessage() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getReason()); if (index > -1) { sb.append(" at index "); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/AccessException.java --- a/jdk/src/share/classes/java/rmi/AccessException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/AccessException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * * @author Ann Wollrath * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 * @see java.rmi.Naming * @see java.rmi.activation.ActivationSystem */ @@ -50,7 +50,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public AccessException(String s) { super(s); @@ -62,7 +62,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public AccessException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/AlreadyBoundException.java --- a/jdk/src/share/classes/java/rmi/AlreadyBoundException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/AlreadyBoundException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * is made to bind an object in the registry to a name that already * has an associated binding. * - * @since JDK1.1 + * @since 1.1 * @author Ann Wollrath * @author Roger Riggs * @see java.rmi.Naming#bind(String, java.rmi.Remote) @@ -43,7 +43,7 @@ /** * Constructs an AlreadyBoundException with no * specified detail message. - * @since JDK1.1 + * @since 1.1 */ public AlreadyBoundException() { super(); @@ -54,7 +54,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public AlreadyBoundException(String s) { super(s); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/ConnectException.java --- a/jdk/src/share/classes/java/rmi/ConnectException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/ConnectException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * to the remote host for a remote method call. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class ConnectException extends RemoteException { @@ -42,7 +42,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public ConnectException(String s) { super(s); @@ -54,7 +54,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public ConnectException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/ConnectIOException.java --- a/jdk/src/share/classes/java/rmi/ConnectIOException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/ConnectIOException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * to the remote host for a remote method call. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class ConnectIOException extends RemoteException { @@ -43,7 +43,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public ConnectIOException(String s) { super(s); @@ -56,7 +56,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public ConnectIOException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/MarshalException.java --- a/jdk/src/share/classes/java/rmi/MarshalException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/MarshalException.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * "at most once" call semantics. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class MarshalException extends RemoteException { @@ -51,7 +51,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public MarshalException(String s) { super(s); @@ -63,7 +63,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public MarshalException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/Naming.java --- a/jdk/src/share/classes/java/rmi/Naming.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/Naming.java Wed Jun 18 13:14:15 2014 -0700 @@ -64,7 +64,7 @@ * * @author Ann Wollrath * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 * @see java.rmi.registry.Registry * @see java.rmi.registry.LocateRegistry * @see java.rmi.registry.LocateRegistry#createRegistry(int) @@ -86,7 +86,7 @@ * @exception AccessException if this operation is not permitted * @exception MalformedURLException if the name is not an appropriately * formatted URL - * @since JDK1.1 + * @since 1.1 */ public static Remote lookup(String name) throws NotBoundException, @@ -112,7 +112,7 @@ * @exception RemoteException if registry could not be contacted * @exception AccessException if this operation is not permitted (if * originating from a non-local host, for example) - * @since JDK1.1 + * @since 1.1 */ public static void bind(String name, Remote obj) throws AlreadyBoundException, @@ -139,7 +139,7 @@ * @exception RemoteException if registry could not be contacted * @exception AccessException if this operation is not permitted (if * originating from a non-local host, for example) - * @since JDK1.1 + * @since 1.1 */ public static void unbind(String name) throws RemoteException, @@ -163,7 +163,7 @@ * @exception RemoteException if registry could not be contacted * @exception AccessException if this operation is not permitted (if * originating from a non-local host, for example) - * @since JDK1.1 + * @since 1.1 */ public static void rebind(String name, Remote obj) throws RemoteException, java.net.MalformedURLException @@ -190,7 +190,7 @@ * @exception MalformedURLException if the name is not an appropriately * formatted URL * @exception RemoteException if registry could not be contacted. - * @since JDK1.1 + * @since 1.1 */ public static String[] list(String name) throws RemoteException, java.net.MalformedURLException diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/NoSuchObjectException.java --- a/jdk/src/share/classes/java/rmi/NoSuchObjectException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/NoSuchObjectException.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * java.rmi.activation.Activatable and * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @see java.rmi.server.RemoteObject#toStub(Remote) * @see java.rmi.server.UnicastRemoteObject#unexportObject(Remote,boolean) * @see java.rmi.activation.Activatable#unexportObject(Remote,boolean) @@ -54,7 +54,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public NoSuchObjectException(String s) { super(s); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/NotBoundException.java --- a/jdk/src/share/classes/java/rmi/NotBoundException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/NotBoundException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * is made to lookup or unbind in the registry a name that has * no associated binding. * - * @since JDK1.1 + * @since 1.1 * @author Ann Wollrath * @author Roger Riggs * @see java.rmi.Naming#lookup(String) @@ -45,7 +45,7 @@ /** * Constructs a NotBoundException with no * specified detail message. - * @since JDK1.1 + * @since 1.1 */ public NotBoundException() { super(); @@ -56,7 +56,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public NotBoundException(String s) { super(s); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/RMISecurityException.java --- a/jdk/src/share/classes/java/rmi/RMISecurityException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/RMISecurityException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * java.rmi.RMISecurityManager's methods. * * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 * @deprecated Use {@link java.lang.SecurityException} instead. * Application code should never directly reference this class, and * RMISecurityManager no longer throws this subclass of @@ -45,7 +45,7 @@ /** * Construct an RMISecurityException with a detail message. * @param name the detail message - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -57,7 +57,7 @@ * Construct an RMISecurityException with a detail message. * @param name the detail message * @param arg ignored - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/RMISecurityManager.java --- a/jdk/src/share/classes/java/rmi/RMISecurityManager.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/RMISecurityManager.java Wed Jun 18 13:14:15 2014 -0700 @@ -52,7 +52,7 @@ * * @author Roger Riggs * @author Peter Jones - * @since JDK1.1 + * @since 1.1 * @deprecated Use {@link SecurityManager} instead. */ @Deprecated @@ -60,7 +60,7 @@ /** * Constructs a new {@code RMISecurityManager}. - * @since JDK1.1 + * @since 1.1 */ public RMISecurityManager() { } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/Remote.java --- a/jdk/src/share/classes/java/rmi/Remote.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/Remote.java Wed Jun 18 13:14:15 2014 -0700 @@ -42,7 +42,7 @@ *

    For complete details on RMI, see the RMI Specification which describes the RMI API and system. * - * @since JDK1.1 + * @since 1.1 * @author Ann Wollrath * @see java.rmi.server.UnicastRemoteObject * @see java.rmi.activation.Activatable diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/RemoteException.java --- a/jdk/src/share/classes/java/rmi/RemoteException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/RemoteException.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * IllegalStateException}. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class RemoteException extends java.io.IOException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/ServerError.java --- a/jdk/src/share/classes/java/rmi/ServerError.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/ServerError.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * Error that occurred as its cause. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class ServerError extends RemoteException { @@ -48,7 +48,7 @@ * * @param s the detail message * @param err the nested error - * @since JDK1.1 + * @since 1.1 */ public ServerError(String s, Error err) { super(s, err); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/ServerException.java --- a/jdk/src/share/classes/java/rmi/ServerException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/ServerException.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * RemoteException that occurred as its cause. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class ServerException extends RemoteException { @@ -47,7 +47,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public ServerException(String s) { super(s); @@ -59,7 +59,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public ServerException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/ServerRuntimeException.java --- a/jdk/src/share/classes/java/rmi/ServerRuntimeException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/ServerRuntimeException.java Wed Jun 18 13:14:15 2014 -0700 @@ -40,7 +40,7 @@ * executing on the Java 2 platform v1.2 or later versions. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -56,7 +56,7 @@ * @param s the detail message * @param ex the nested exception * @deprecated no replacement - * @since JDK1.1 + * @since 1.1 */ @Deprecated public ServerRuntimeException(String s, Exception ex) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/StubNotFoundException.java --- a/jdk/src/share/classes/java/rmi/StubNotFoundException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/StubNotFoundException.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * java.rmi.activation.Activatable.register method. * * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 * @see java.rmi.server.UnicastRemoteObject * @see java.rmi.activation.Activatable */ @@ -47,7 +47,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public StubNotFoundException(String s) { super(s); @@ -59,7 +59,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public StubNotFoundException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/UnexpectedException.java --- a/jdk/src/share/classes/java/rmi/UnexpectedException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/UnexpectedException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * throws clause of the method in the remote interface. * * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 */ public class UnexpectedException extends RemoteException { @@ -44,7 +44,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public UnexpectedException(String s) { super(s); @@ -56,7 +56,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public UnexpectedException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/UnknownHostException.java --- a/jdk/src/share/classes/java/rmi/UnknownHostException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/UnknownHostException.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * java.net.UnknownHostException occurs while creating * a connection to the remote host for a remote method call. * - * @since JDK1.1 + * @since 1.1 */ public class UnknownHostException extends RemoteException { @@ -42,7 +42,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public UnknownHostException(String s) { super(s); @@ -54,7 +54,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public UnknownHostException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/UnmarshalException.java --- a/jdk/src/share/classes/java/rmi/UnmarshalException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/UnmarshalException.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public class UnmarshalException extends RemoteException { @@ -56,7 +56,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public UnmarshalException(String s) { super(s); @@ -68,7 +68,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public UnmarshalException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/dgc/VMID.java --- a/jdk/src/share/classes/java/rmi/dgc/VMID.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/dgc/VMID.java Wed Jun 18 13:14:15 2014 -0700 @@ -120,15 +120,15 @@ * Return string representation of this VMID. */ public String toString() { - StringBuffer result = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if (addr != null) for (int i = 0; i < addr.length; ++ i) { int x = addr[i] & 0xFF; - result.append((x < 0x10 ? "0" : "") + - Integer.toString(x, 16)); + sb.append((x < 0x10 ? "0" : "") + + Integer.toString(x, 16)); } - result.append(':'); - result.append(uid.toString()); - return result.toString(); + sb.append(':'); + sb.append(uid.toString()); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/dgc/package.html --- a/jdk/src/share/classes/java/rmi/dgc/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/dgc/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -50,6 +50,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/package.html --- a/jdk/src/share/classes/java/rmi/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -54,6 +54,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/registry/LocateRegistry.java --- a/jdk/src/share/classes/java/rmi/registry/LocateRegistry.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/registry/LocateRegistry.java Wed Jun 18 13:14:15 2014 -0700 @@ -51,7 +51,7 @@ * * @author Ann Wollrath * @author Peter Jones - * @since JDK1.1 + * @since 1.1 * @see java.rmi.registry.Registry */ public final class LocateRegistry { @@ -67,7 +67,7 @@ * * @return reference (a stub) to the remote object registry * @exception RemoteException if the reference could not be created - * @since JDK1.1 + * @since 1.1 */ public static Registry getRegistry() throws RemoteException @@ -82,7 +82,7 @@ * @param port port on which the registry accepts requests * @return reference (a stub) to the remote object registry * @exception RemoteException if the reference could not be created - * @since JDK1.1 + * @since 1.1 */ public static Registry getRegistry(int port) throws RemoteException @@ -98,7 +98,7 @@ * @param host host for the remote registry * @return reference (a stub) to the remote object registry * @exception RemoteException if the reference could not be created - * @since JDK1.1 + * @since 1.1 */ public static Registry getRegistry(String host) throws RemoteException @@ -115,7 +115,7 @@ * @param port port on which the registry accepts requests * @return reference (a stub) to the remote object registry * @exception RemoteException if the reference could not be created - * @since JDK1.1 + * @since 1.1 */ public static Registry getRegistry(String host, int port) throws RemoteException @@ -197,7 +197,7 @@ * @param port the port on which the registry accepts requests * @return the registry * @exception RemoteException if the registry could not be exported - * @since JDK1.1 + * @since 1.1 **/ public static Registry createRegistry(int port) throws RemoteException { return new RegistryImpl(port); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/registry/Registry.java --- a/jdk/src/share/classes/java/rmi/registry/Registry.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/registry/Registry.java Wed Jun 18 13:14:15 2014 -0700 @@ -72,7 +72,7 @@ * * @author Ann Wollrath * @author Peter Jones - * @since JDK1.1 + * @since 1.1 * @see LocateRegistry */ public interface Registry extends Remote { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/registry/RegistryHandler.java --- a/jdk/src/share/classes/java/rmi/registry/RegistryHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/registry/RegistryHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * by application code. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/registry/package.html --- a/jdk/src/share/classes/java/rmi/registry/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/registry/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -52,6 +52,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/ExportException.java --- a/jdk/src/share/classes/java/rmi/server/ExportException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/ExportException.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * java.rmi.activation.Activatable. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @see java.rmi.server.UnicastRemoteObject * @see java.rmi.activation.Activatable */ @@ -47,7 +47,7 @@ * detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 */ public ExportException(String s) { super(s); @@ -59,7 +59,7 @@ * * @param s the detail message * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public ExportException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/LoaderHandler.java --- a/jdk/src/share/classes/java/rmi/server/LoaderHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/LoaderHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,7 +34,7 @@ * by application code. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * * @deprecated no replacement */ @@ -56,7 +56,7 @@ * @exception ClassNotFoundException * if a definition for the class could not * be found at the codebase location. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -75,7 +75,7 @@ * @exception ClassNotFoundException * if a definition for the class could not * be found at the specified URL - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -87,7 +87,7 @@ * * @param loader a class loader from which to get the security context * @return the security context - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/LogStream.java --- a/jdk/src/share/classes/java/rmi/server/LogStream.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/LogStream.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * of possible interest to those monitoring a system. * * @author Ann Wollrath (lots of code stolen from Ken Arnold) - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -64,7 +64,7 @@ * method. * @param name string identifying messages from this log * @out output stream that log messages will be sent to - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -83,7 +83,7 @@ * the default stream is created. * @param name name identifying the desired LogStream * @return log associated with given name - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -103,7 +103,7 @@ * Return the current default stream for new logs. * @return default log stream * @see #setDefaultStream - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -115,7 +115,7 @@ * Set the default stream for new logs. * @param newDefault new default log stream * @see #getDefaultStream - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -134,7 +134,7 @@ * Return the current stream to which output from this log is sent. * @return output stream for this log * @see #setOutputStream - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -147,7 +147,7 @@ * Set the stream to which output from this log is sent. * @param out new output stream for this log * @see #getOutputStream - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -164,7 +164,7 @@ * the byte is appended to the internal buffer. If it is a newline, * then the currently buffered line is sent to the log's output * stream, prefixed with the appropriate logging information. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -208,7 +208,7 @@ /** * Write a subarray of bytes. Pass each through write byte method. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -223,7 +223,7 @@ /** * Return log name as string representation. * @return log name - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -244,7 +244,7 @@ * integer representation. * @param s name of logging level (e.g., 'SILENT', 'BRIEF', 'VERBOSE') * @return corresponding integer log level - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/ObjID.java --- a/jdk/src/share/classes/java/rmi/server/ObjID.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/ObjID.java Wed Jun 18 13:14:15 2014 -0700 @@ -65,7 +65,7 @@ * * @author Ann Wollrath * @author Peter Jones - * @since JDK1.1 + * @since 1.1 */ public final class ObjID implements Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/Operation.java --- a/jdk/src/share/classes/java/rmi/server/Operation.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/Operation.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * stubs (stubs generated with rmic -v1.2); hence, this class * is deprecated. * - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -43,7 +43,7 @@ * Creates a new Operation object. * @param op method name * @deprecated no replacement - * @since JDK1.1 + * @since 1.1 */ @Deprecated public Operation(String op) { @@ -54,7 +54,7 @@ * Returns the name of the method. * @return method name * @deprecated no replacement - * @since JDK1.1 + * @since 1.1 */ @Deprecated public String getOperation() { @@ -64,7 +64,7 @@ /** * Returns the string representation of the operation. * @deprecated no replacement - * @since JDK1.1 + * @since 1.1 */ @Deprecated public String toString() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RMIClassLoader.java --- a/jdk/src/share/classes/java/rmi/server/RMIClassLoader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RMIClassLoader.java Wed Jun 18 13:14:15 2014 -0700 @@ -105,7 +105,7 @@ * @author Peter Jones * @author Laird Dornin * @see RMIClassLoaderSpi - * @since JDK1.1 + * @since 1.1 */ public class RMIClassLoader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RMIFailureHandler.java --- a/jdk/src/share/classes/java/rmi/server/RMIFailureHandler.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RMIFailureHandler.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,7 +35,7 @@ * ServerSocket. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public interface RMIFailureHandler { @@ -53,7 +53,7 @@ * @return if true, the RMI runtime attempts to retry * ServerSocket creation * @see java.rmi.server.RMISocketFactory#setFailureHandler(RMIFailureHandler) - * @since JDK1.1 + * @since 1.1 */ public boolean failure(Exception ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RMISocketFactory.java --- a/jdk/src/share/classes/java/rmi/server/RMISocketFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RMISocketFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -85,7 +85,7 @@ * * @author Ann Wollrath * @author Peter Jones - * @since JDK1.1 + * @since 1.1 */ public abstract class RMISocketFactory implements RMIClientSocketFactory, RMIServerSocketFactory @@ -100,7 +100,7 @@ /** * Constructs an RMISocketFactory. - * @since JDK1.1 + * @since 1.1 */ public RMISocketFactory() { super(); @@ -112,7 +112,7 @@ * @param port the port number * @return a socket connected to the specified host and port. * @exception IOException if an I/O error occurs during socket creation - * @since JDK1.1 + * @since 1.1 */ public abstract Socket createSocket(String host, int port) throws IOException; @@ -124,7 +124,7 @@ * @return the server socket on the specified port * @exception IOException if an I/O error occurs during server socket * creation - * @since JDK1.1 + * @since 1.1 */ public abstract ServerSocket createServerSocket(int port) throws IOException; @@ -142,7 +142,7 @@ * checkSetFactory method doesn't allow the operation. * @see #getSocketFactory * @see java.lang.SecurityManager#checkSetFactory() - * @since JDK1.1 + * @since 1.1 */ public synchronized static void setSocketFactory(RMISocketFactory fac) throws IOException @@ -163,7 +163,7 @@ * set. * @return the socket factory * @see #setSocketFactory(RMISocketFactory) - * @since JDK1.1 + * @since 1.1 */ public synchronized static RMISocketFactory getSocketFactory() { @@ -176,7 +176,7 @@ * by the RMI runtime when getSocketFactory * returns null. * @return the default RMI socket factory - * @since JDK1.1 + * @since 1.1 */ public synchronized static RMISocketFactory getDefaultSocketFactory() { if (defaultSocketFactory == null) { @@ -203,7 +203,7 @@ * operation. * @see #getFailureHandler * @see java.rmi.server.RMIFailureHandler#failure(Exception) - * @since JDK1.1 + * @since 1.1 */ public synchronized static void setFailureHandler(RMIFailureHandler fh) { @@ -219,7 +219,7 @@ * setFailureHandler method. * @return the failure handler * @see #setFailureHandler(RMIFailureHandler) - * @since JDK1.1 + * @since 1.1 */ public synchronized static RMIFailureHandler getFailureHandler() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RemoteCall.java --- a/jdk/src/share/classes/java/rmi/server/RemoteCall.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RemoteCall.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * deprecated because it is only used by deprecated methods of * java.rmi.server.RemoteRef. * - * @since JDK1.1 + * @since 1.1 * @author Ann Wollrath * @author Roger Riggs * @see java.rmi.server.RemoteRef @@ -52,7 +52,7 @@ * * @return output stream for arguments/results * @exception java.io.IOException if an I/O error occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -63,7 +63,7 @@ * the stream. * * @exception java.io.IOException if an I/O error occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -75,7 +75,7 @@ * * @return input stream for reading arguments/results * @exception java.io.IOException if an I/O error occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -87,7 +87,7 @@ * the channel early. * * @exception java.io.IOException if an I/O error occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -103,7 +103,7 @@ * @return output stream for writing call result * @exception java.io.IOException if an I/O error occurs. * @exception java.io.StreamCorruptedException If already been called. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -114,7 +114,7 @@ * Do whatever it takes to execute the call. * * @exception java.lang.Exception if a general exception occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -124,7 +124,7 @@ * Allow cleanup after the remote call has completed. * * @exception java.io.IOException if an I/O error occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RemoteObject.java --- a/jdk/src/share/classes/java/rmi/server/RemoteObject.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RemoteObject.java Wed Jun 18 13:14:15 2014 -0700 @@ -39,7 +39,7 @@ * @author Ann Wollrath * @author Laird Dornin * @author Peter Jones - * @since JDK1.1 + * @since 1.1 */ public abstract class RemoteObject implements Remote, java.io.Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RemoteRef.java --- a/jdk/src/share/classes/java/rmi/server/RemoteRef.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RemoteRef.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * remote method invocation to a remote object. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @see java.rmi.server.RemoteStub */ public interface RemoteRef extends java.io.Externalizable { @@ -84,7 +84,7 @@ * interpret them. The remote reference may need the operation to * encode in the call. * - * @since JDK1.1 + * @since 1.1 * @deprecated 1.2 style stubs no longer use this method. Instead of * using a sequence of method calls on the stub's the remote reference * (newCall, invoke, and done), a @@ -114,7 +114,7 @@ * take care of cleaning up the connection before raising the * "user" or remote exception. * - * @since JDK1.1 + * @since 1.1 * @deprecated 1.2 style stubs no longer use this method. Instead of * using a sequence of method calls to the remote reference * (newCall, invoke, and done), a @@ -135,7 +135,7 @@ * Done should only be called if the invoke returns successfully * (non-exceptionally) to the stub. * - * @since JDK1.1 + * @since 1.1 * @deprecated 1.2 style stubs no longer use this method. Instead of * using a sequence of method calls to the remote reference * (newCall, invoke, and done), a @@ -157,7 +157,7 @@ * @param out the output stream to which the reference will be serialized * @return the class name (without package qualification) of the reference * type - * @since JDK1.1 + * @since 1.1 */ String getRefClass(java.io.ObjectOutput out); @@ -168,7 +168,7 @@ * * @return remote object hashcode * @see java.util.Hashtable - * @since JDK1.1 + * @since 1.1 */ int remoteHashCode(); @@ -180,7 +180,7 @@ * @param obj the Object to compare with * @return true if these Objects are equal; false otherwise. * @see java.util.Hashtable - * @since JDK1.1 + * @since 1.1 */ boolean remoteEquals(RemoteRef obj); @@ -188,7 +188,7 @@ * Returns a String that represents the reference of this remote * object. * @return string representing remote object reference - * @since JDK1.1 + * @since 1.1 */ String remoteToString(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RemoteServer.java --- a/jdk/src/share/classes/java/rmi/server/RemoteServer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RemoteServer.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * concretely by its subclass(es). * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 */ public abstract class RemoteServer extends RemoteObject { @@ -46,7 +46,7 @@ /** * Constructs a RemoteServer. - * @since JDK1.1 + * @since 1.1 */ protected RemoteServer() { super(); @@ -56,7 +56,7 @@ * Constructs a RemoteServer with the given reference type. * * @param ref the remote reference - * @since JDK1.1 + * @since 1.1 */ protected RemoteServer(RemoteRef ref) { super(ref); @@ -71,7 +71,7 @@ * @throws ServerNotActiveException if no remote method invocation * is being processed in the current thread * - * @since JDK1.1 + * @since 1.1 */ public static String getClientHost() throws ServerNotActiveException { return sun.rmi.transport.tcp.TCPTransport.getClientHost(); @@ -91,7 +91,7 @@ * the invocation of its checkPermission method * fails * @see #getLog - * @since JDK1.1 + * @since 1.1 */ public static void setLog(java.io.OutputStream out) { @@ -103,7 +103,7 @@ * Returns stream for the RMI call log. * @return the call log * @see #setLog - * @since JDK1.1 + * @since 1.1 */ public static java.io.PrintStream getLog() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/RemoteStub.java --- a/jdk/src/share/classes/java/rmi/server/RemoteStub.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/RemoteStub.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * implementation of the remote object. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * * @deprecated Statically generated stubs are deprecated, since * stubs are generated dynamically. See {@link UnicastRemoteObject} @@ -57,7 +57,7 @@ * reference. * * @param ref the remote reference - * @since JDK1.1 + * @since 1.1 */ protected RemoteStub(RemoteRef ref) { super(ref); @@ -69,7 +69,7 @@ * @param stub the remote stub * @param ref the remote reference * @throws UnsupportedOperationException always - * @since JDK1.1 + * @since 1.1 * @deprecated No replacement. The {@code setRef} method * was intended for setting the remote reference of a remote * stub. This is unnecessary, since {@code RemoteStub}s can be created diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/ServerCloneException.java --- a/jdk/src/share/classes/java/rmi/server/ServerCloneException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/ServerCloneException.java Wed Jun 18 13:14:15 2014 -0700 @@ -41,7 +41,7 @@ * IllegalStateException}. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @see java.rmi.server.UnicastRemoteObject#clone() */ public class ServerCloneException extends CloneNotSupportedException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/ServerNotActiveException.java --- a/jdk/src/share/classes/java/rmi/server/ServerNotActiveException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/ServerNotActiveException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * method call. * * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 * @see java.rmi.server.RemoteServer#getClientHost() */ public class ServerNotActiveException extends java.lang.Exception { @@ -43,7 +43,7 @@ /** * Constructs an ServerNotActiveException with no specified * detail message. - * @since JDK1.1 + * @since 1.1 */ public ServerNotActiveException() {} @@ -52,7 +52,7 @@ * detail message. * * @param s the detail message. - * @since JDK1.1 + * @since 1.1 */ public ServerNotActiveException(String s) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/ServerRef.java --- a/jdk/src/share/classes/java/rmi/server/ServerRef.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/ServerRef.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * implementation. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @deprecated No replacement. This interface is unused and is obsolete. */ @Deprecated @@ -50,7 +50,7 @@ * @return the stub for the remote object * @exception RemoteException if an exception occurs attempting * to export the object (e.g., stub class could not be found) - * @since JDK1.1 + * @since 1.1 */ RemoteStub exportObject(Remote obj, Object data) throws RemoteException; @@ -62,7 +62,7 @@ * @return the client's host name * @exception ServerNotActiveException if called outside of servicing * a remote method invocation - * @since JDK1.1 + * @since 1.1 */ String getClientHost() throws ServerNotActiveException; } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/Skeleton.java --- a/jdk/src/share/classes/java/rmi/server/Skeleton.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/Skeleton.java Wed Jun 18 13:14:15 2014 -0700 @@ -37,7 +37,7 @@ * implementation. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement. Skeletons are no longer required for remote * method calls in the Java 2 platform v1.2 and greater. */ @@ -52,7 +52,7 @@ * @param opnum operation number * @param hash stub/skeleton interface hash * @exception java.lang.Exception if a general exception occurs. - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated @@ -62,7 +62,7 @@ /** * Returns the operations supported by the skeleton. * @return operations supported by skeleton - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/SkeletonMismatchException.java --- a/jdk/src/share/classes/java/rmi/server/SkeletonMismatchException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/SkeletonMismatchException.java Wed Jun 18 13:14:15 2014 -0700 @@ -36,7 +36,7 @@ * the stub compiler (rmic). * * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement. Skeletons are no longer required for remote * method calls in the Java 2 platform v1.2 and greater. */ @@ -51,7 +51,7 @@ * a specified detail message. * * @param s the detail message - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement */ @Deprecated diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/SkeletonNotFoundException.java --- a/jdk/src/share/classes/java/rmi/server/SkeletonNotFoundException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/SkeletonNotFoundException.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * exported is not found. Skeletons are no longer required, so this * exception is never thrown. * - * @since JDK1.1 + * @since 1.1 * @deprecated no replacement. Skeletons are no longer required for remote * method calls in the Java 2 platform v1.2 and greater. */ @@ -48,7 +48,7 @@ * detail message. * * @param s the detail message. - * @since JDK1.1 + * @since 1.1 */ public SkeletonNotFoundException(String s) { super(s); @@ -60,7 +60,7 @@ * * @param s the detail message. * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public SkeletonNotFoundException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/SocketSecurityException.java --- a/jdk/src/share/classes/java/rmi/server/SocketSecurityException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/SocketSecurityException.java Wed Jun 18 13:14:15 2014 -0700 @@ -29,7 +29,7 @@ * An obsolete subclass of {@link ExportException}. * * @author Ann Wollrath - * @since JDK1.1 + * @since 1.1 * @deprecated This class is obsolete. Use {@link ExportException} instead. */ @Deprecated @@ -43,7 +43,7 @@ * detail message. * * @param s the detail message. - * @since JDK1.1 + * @since 1.1 */ public SocketSecurityException(String s) { super(s); @@ -55,7 +55,7 @@ * * @param s the detail message. * @param ex the nested exception - * @since JDK1.1 + * @since 1.1 */ public SocketSecurityException(String s, Exception ex) { super(s, ex); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/UID.java --- a/jdk/src/share/classes/java/rmi/server/UID.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/UID.java Wed Jun 18 13:14:15 2014 -0700 @@ -66,7 +66,7 @@ * * @author Ann Wollrath * @author Peter Jones - * @since JDK1.1 + * @since 1.1 */ public final class UID implements Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/UnicastRemoteObject.java --- a/jdk/src/share/classes/java/rmi/server/UnicastRemoteObject.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/UnicastRemoteObject.java Wed Jun 18 13:14:15 2014 -0700 @@ -142,7 +142,7 @@ * * @author Ann Wollrath * @author Peter Jones - * @since JDK1.1 + * @since 1.1 **/ public class UnicastRemoteObject extends RemoteServer { @@ -173,7 +173,7 @@ * created using the {@link RMISocketFactory} class. * * @throws RemoteException if failed to export object - * @since JDK1.1 + * @since 1.1 */ protected UnicastRemoteObject() throws RemoteException { @@ -242,7 +242,7 @@ * @exception CloneNotSupportedException if clone failed due to * a RemoteException. * @return the new remote object - * @since JDK1.1 + * @since 1.1 */ public Object clone() throws CloneNotSupportedException { @@ -280,7 +280,7 @@ * @param obj the remote object to be exported * @return remote object stub * @exception RemoteException if export fails - * @since JDK1.1 + * @since 1.1 * @deprecated This method is deprecated because it supports only static stubs. * Use {@link #exportObject(Remote, int) exportObject(Remote, port)} or * {@link #exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/Unreferenced.java --- a/jdk/src/share/classes/java/rmi/server/Unreferenced.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/Unreferenced.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,14 +32,14 @@ * * @author Ann Wollrath * @author Roger Riggs - * @since JDK1.1 + * @since 1.1 */ public interface Unreferenced { /** * Called by the RMI runtime sometime after the runtime determines that * the reference list, the list of clients referencing the remote object, * becomes empty. - * @since JDK1.1 + * @since 1.1 */ public void unreferenced(); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/rmi/server/package.html --- a/jdk/src/share/classes/java/rmi/server/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/rmi/server/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -69,6 +69,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/CodeSigner.java --- a/jdk/src/share/classes/java/security/CodeSigner.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/CodeSigner.java Wed Jun 18 13:14:15 2014 -0700 @@ -154,7 +154,7 @@ * if present. */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("("); sb.append("Signer: " + signerCertPath.getCertificates().get(0)); if (timestamp != null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/Timestamp.java --- a/jdk/src/share/classes/java/security/Timestamp.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/Timestamp.java Wed Jun 18 13:14:15 2014 -0700 @@ -141,7 +141,7 @@ * its signer's certificate. */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("("); sb.append("timestamp: " + timestamp); List certs = signerCertPath.getCertificates(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/acl/package-info.java --- a/jdk/src/share/classes/java/security/acl/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/acl/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -28,6 +28,6 @@ * superseded by classes in the java.security package. * See that package and, for example, java.security.Permission for details. * - * @since JDK1.1 + * @since 1.1 */ package java.security.acl; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/CertPath.java --- a/jdk/src/share/classes/java/security/cert/CertPath.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/CertPath.java Wed Jun 18 13:14:15 2014 -0700 @@ -220,7 +220,7 @@ * @return a string representation of this certification path */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Iterator stringIterator = getCertificates().iterator(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/CollectionCertStoreParameters.java --- a/jdk/src/share/classes/java/security/cert/CollectionCertStoreParameters.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/CollectionCertStoreParameters.java Wed Jun 18 13:14:15 2014 -0700 @@ -132,7 +132,7 @@ * @return a formatted string describing the parameters */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("CollectionCertStoreParameters: [\n"); sb.append(" collection: " + coll + "\n"); sb.append("]"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/LDAPCertStoreParameters.java --- a/jdk/src/share/classes/java/security/cert/LDAPCertStoreParameters.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/LDAPCertStoreParameters.java Wed Jun 18 13:14:15 2014 -0700 @@ -138,7 +138,7 @@ * @return a formatted string describing the parameters */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("LDAPCertStoreParameters: [\n"); sb.append(" serverName: " + serverName + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/PKIXBuilderParameters.java --- a/jdk/src/share/classes/java/security/cert/PKIXBuilderParameters.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/PKIXBuilderParameters.java Wed Jun 18 13:14:15 2014 -0700 @@ -189,7 +189,7 @@ * @return a formatted string describing the parameters */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("[\n"); sb.append(super.toString()); sb.append(" Maximum Path Length: " + maxPathLength + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java --- a/jdk/src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java Wed Jun 18 13:14:15 2014 -0700 @@ -107,7 +107,7 @@ * {@code PKIXCertPathBuilderResult} */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("PKIXCertPathBuilderResult: [\n"); sb.append(" Certification Path: " + certPath + "\n"); sb.append(" Trust Anchor: " + getTrustAnchor().toString() + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java --- a/jdk/src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java Wed Jun 18 13:14:15 2014 -0700 @@ -148,7 +148,7 @@ * {@code PKIXCertPathValidatorResult} */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("PKIXCertPathValidatorResult: [\n"); sb.append(" Trust Anchor: " + trustAnchor.toString() + "\n"); sb.append(" Policy Tree: " + String.valueOf(policyTree) + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/PKIXParameters.java --- a/jdk/src/share/classes/java/security/cert/PKIXParameters.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/PKIXParameters.java Wed Jun 18 13:14:15 2014 -0700 @@ -693,7 +693,7 @@ * @return a formatted string describing the parameters. */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("[\n"); /* start with trusted anchor info */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/PolicyQualifierInfo.java --- a/jdk/src/share/classes/java/security/cert/PolicyQualifierInfo.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/PolicyQualifierInfo.java Wed Jun 18 13:14:15 2014 -0700 @@ -161,7 +161,7 @@ if (pqiString != null) return pqiString; HexDumpEncoder enc = new HexDumpEncoder(); - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("PolicyQualifierInfo: [\n"); sb.append(" qualifierID: " + mId + "\n"); sb.append(" qualifier: " + diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/TrustAnchor.java --- a/jdk/src/share/classes/java/security/cert/TrustAnchor.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/TrustAnchor.java Wed Jun 18 13:14:15 2014 -0700 @@ -317,7 +317,7 @@ * @return a formatted string describing the {@code TrustAnchor} */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("[\n"); if (pubKey != null) { sb.append(" Trusted CA Public Key: " + pubKey.toString() + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/X509CRLSelector.java --- a/jdk/src/share/classes/java/security/cert/X509CRLSelector.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/X509CRLSelector.java Wed Jun 18 13:14:15 2014 -0700 @@ -566,7 +566,7 @@ * {@code X509CRLSelector}. */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("X509CRLSelector: [\n"); if (issuerNames != null) { sb.append(" IssuerNames:\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/cert/X509CertSelector.java --- a/jdk/src/share/classes/java/security/cert/X509CertSelector.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/cert/X509CertSelector.java Wed Jun 18 13:14:15 2014 -0700 @@ -1811,7 +1811,7 @@ * {@code CertSelector} */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("X509CertSelector: [\n"); if (x509Cert != null) { sb.append(" Certificate: " + x509Cert.toString() + "\n"); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/interfaces/package-info.java --- a/jdk/src/share/classes/java/security/interfaces/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/interfaces/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -69,6 +69,6 @@ * * * - * @since JDK1.1 + * @since 1.1 */ package java.security.interfaces; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/security/spec/DSAGenParameterSpec.java --- a/jdk/src/share/classes/java/security/spec/DSAGenParameterSpec.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/security/spec/DSAGenParameterSpec.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * * @see AlgorithmParameterSpec * - * @since 8 + * @since 1.8 */ public final class DSAGenParameterSpec implements AlgorithmParameterSpec { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/text/AttributedString.java --- a/jdk/src/share/classes/java/text/AttributedString.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/text/AttributedString.java Wed Jun 18 13:14:15 2014 -0700 @@ -243,11 +243,11 @@ throw new IllegalArgumentException("Invalid substring range"); // Copy the given string - StringBuffer textBuffer = new StringBuffer(); + StringBuilder textBuilder = new StringBuilder(); text.setIndex(beginIndex); for (char c = text.current(); text.getIndex() < endIndex; c = text.next()) - textBuffer.append(c); - this.text = textBuffer.toString(); + textBuilder.append(c); + this.text = textBuilder.toString(); if (beginIndex == endIndex) return; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/text/ChoiceFormat.java --- a/jdk/src/share/classes/java/text/ChoiceFormat.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/text/ChoiceFormat.java Wed Jun 18 13:14:15 2014 -0700 @@ -259,7 +259,7 @@ * @return the pattern string */ public String toPattern() { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); for (int i = 0; i < choiceLimits.length; ++i) { if (i != 0) { result.append('|'); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/text/DecimalFormatSymbols.java --- a/jdk/src/share/classes/java/text/DecimalFormatSymbols.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/text/DecimalFormatSymbols.java Wed Jun 18 13:14:15 2014 -0700 @@ -679,7 +679,7 @@ * default serialization will work properly if this object is streamed out again. * Initializes the currency from the intlCurrencySymbol field. * - * @since JDK 1.1.6 + * @since 1.1.6 */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { @@ -802,7 +802,7 @@ /** * The decimal separator used when formatting currency values. * @serial - * @since JDK 1.1.6 + * @since 1.1.6 * @see #getMonetaryDecimalSeparator */ private char monetarySeparator; // Field new in JDK 1.1.6 @@ -816,7 +816,7 @@ * The intent is that this will be added to the API in the future. * * @serial - * @since JDK 1.1.6 + * @since 1.1.6 */ private char exponential; // Field new in JDK 1.1.6 @@ -872,7 +872,7 @@ * is always written. * * @serial - * @since JDK 1.1.6 + * @since 1.1.6 */ private int serialVersionOnStream = currentSerialVersion; } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/text/SimpleDateFormat.java --- a/jdk/src/share/classes/java/text/SimpleDateFormat.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java Wed Jun 18 13:14:15 2014 -0700 @@ -441,7 +441,7 @@ * and the highest allowable serialVersionOnStream * is written. * @serial - * @since JDK1.1.4 + * @since 1.1.4 */ private int serialVersionOnStream = currentSerialVersion; @@ -506,7 +506,7 @@ * defaultCenturyStart, which may be any date. May * not be null. * @serial - * @since JDK1.1.4 + * @since 1.1.4 */ private Date defaultCenturyStart; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/text/package.html --- a/jdk/src/share/classes/java/text/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/text/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -60,6 +60,6 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/Instant.java --- a/jdk/src/share/classes/java/time/Instant.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/Instant.java Wed Jun 18 13:14:15 2014 -0700 @@ -375,7 +375,7 @@ return Instant.ofEpochSecond(instantSecs, nanoOfSecond); } catch (DateTimeException ex) { throw new DateTimeException("Unable to obtain Instant from TemporalAccessor: " + - temporal + " of type " + temporal.getClass().getName()); + temporal + " of type " + temporal.getClass().getName(), ex); } } @@ -1058,7 +1058,8 @@ } // inline TemporalAccessor.super.query(query) as an optimization if (query == TemporalQueries.chronology() || query == TemporalQueries.zoneId() || - query == TemporalQueries.zone() || query == TemporalQueries.offset()) { + query == TemporalQueries.zone() || query == TemporalQueries.offset() || + query == TemporalQueries.localDate() || query == TemporalQueries.localTime()) { return null; } return query.queryFrom(this); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/OffsetDateTime.java --- a/jdk/src/share/classes/java/time/OffsetDateTime.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/OffsetDateTime.java Wed Jun 18 13:14:15 2014 -0700 @@ -357,10 +357,11 @@ } try { ZoneOffset offset = ZoneOffset.from(temporal); - try { - LocalDateTime ldt = LocalDateTime.from(temporal); - return OffsetDateTime.of(ldt, offset); - } catch (DateTimeException ignore) { + LocalDate date = temporal.query(TemporalQueries.localDate()); + LocalTime time = temporal.query(TemporalQueries.localTime()); + if (date != null && time != null) { + return OffsetDateTime.of(date, time, offset); + } else { Instant instant = Instant.from(temporal); return OffsetDateTime.ofInstant(instant, offset); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/ZonedDateTime.java --- a/jdk/src/share/classes/java/time/ZonedDateTime.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/ZonedDateTime.java Wed Jun 18 13:14:15 2014 -0700 @@ -81,6 +81,7 @@ import java.time.temporal.TemporalAdjuster; import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQueries; import java.time.temporal.TemporalQuery; import java.time.temporal.TemporalUnit; import java.time.temporal.UnsupportedTemporalTypeException; @@ -551,14 +552,14 @@ } try { ZoneId zone = ZoneId.from(temporal); - try { + if (temporal.isSupported(INSTANT_SECONDS)) { long epochSecond = temporal.getLong(INSTANT_SECONDS); int nanoOfSecond = temporal.get(NANO_OF_SECOND); return create(epochSecond, nanoOfSecond, zone); - - } catch (DateTimeException ex1) { - LocalDateTime ldt = LocalDateTime.from(temporal); - return of(ldt, zone); + } else { + LocalDate date = LocalDate.from(temporal); + LocalTime time = LocalTime.from(temporal); + return of(date, time, zone); } } catch (DateTimeException ex) { throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " + @@ -2039,8 +2040,12 @@ * @throws DateTimeException if unable to query (defined by the query) * @throws ArithmeticException if numeric overflow occurs (defined by the query) */ + @SuppressWarnings("unchecked") @Override // override for Javadoc public R query(TemporalQuery query) { + if (query == TemporalQueries.localDate()) { + return (R) toLocalDate(); + } return ChronoZonedDateTime.super.query(query); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/chrono/package-info.java --- a/jdk/src/share/classes/java/time/chrono/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/chrono/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -166,6 +166,6 @@ * All calculations should check for numeric overflow and throw either an {@link java.lang.ArithmeticException} * or a {@link java.time.DateTimeException}. *

    - * @since JDK1.8 + * @since 1.8 */ package java.time.chrono; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java --- a/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java Wed Jun 18 13:14:15 2014 -0700 @@ -3283,7 +3283,7 @@ } catch (RuntimeException ex) { return ~position; } - int successPos = text.length(); + int successPos = pos; successPos = context.setParsedField(INSTANT_SECONDS, instantSecs, position, successPos); return context.setParsedField(NANO_OF_SECOND, nano, position, successPos); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/format/Parsed.java --- a/jdk/src/share/classes/java/time/format/Parsed.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/format/Parsed.java Wed Jun 18 13:14:15 2014 -0700 @@ -66,6 +66,7 @@ import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; import static java.time.temporal.ChronoField.HOUR_OF_AMPM; import static java.time.temporal.ChronoField.HOUR_OF_DAY; +import static java.time.temporal.ChronoField.INSTANT_SECONDS; import static java.time.temporal.ChronoField.MICRO_OF_DAY; import static java.time.temporal.ChronoField.MICRO_OF_SECOND; import static java.time.temporal.ChronoField.MILLI_OF_DAY; @@ -74,14 +75,17 @@ import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; import static java.time.temporal.ChronoField.NANO_OF_DAY; import static java.time.temporal.ChronoField.NANO_OF_SECOND; +import static java.time.temporal.ChronoField.OFFSET_SECONDS; import static java.time.temporal.ChronoField.SECOND_OF_DAY; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; import java.time.DateTimeException; +import java.time.Instant; import java.time.LocalDate; import java.time.LocalTime; import java.time.Period; import java.time.ZoneId; +import java.time.ZoneOffset; import java.time.chrono.ChronoLocalDate; import java.time.chrono.ChronoLocalDateTime; import java.time.chrono.ChronoZonedDateTime; @@ -241,12 +245,15 @@ resolveTimeLenient(); crossCheck(); resolvePeriod(); + resolveFractional(); + resolveInstant(); return this; } //----------------------------------------------------------------------- private void resolveFields() { // resolve ChronoField + resolveInstantFields(); resolveDateFields(); resolveTimeFields(); @@ -300,6 +307,7 @@ } // if something changed then have to redo ChronoField resolve if (changedCount > 0) { + resolveInstantFields(); resolveDateFields(); resolveTimeFields(); } @@ -316,6 +324,29 @@ } //----------------------------------------------------------------------- + private void resolveInstantFields() { + // resolve parsed instant seconds to date and time if zone available + if (fieldValues.containsKey(INSTANT_SECONDS)) { + if (zone != null) { + resolveInstantFields0(zone); + } else { + Long offsetSecs = fieldValues.get(OFFSET_SECONDS); + if (offsetSecs != null) { + ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue()); + resolveInstantFields0(offset); + } + } + } + } + + private void resolveInstantFields0(ZoneId selectedZone) { + Instant instant = Instant.ofEpochSecond(fieldValues.remove(INSTANT_SECONDS)); + ChronoZonedDateTime zdt = chrono.zonedDateTime(instant, selectedZone); + updateCheckConflict(zdt.toLocalDate()); + updateCheckConflict(INSTANT_SECONDS, SECOND_OF_DAY, (long) zdt.toLocalTime().toSecondOfDay()); + } + + //----------------------------------------------------------------------- private void resolveDateFields() { updateCheckConflict(chrono.resolveDate(fieldValues, resolverStyle)); } @@ -533,6 +564,42 @@ } } + private void resolveFractional() { + // ensure fractional seconds available as ChronoField requires + // resolveTimeLenient() will have merged MICRO_OF_SECOND/MILLI_OF_SECOND to NANO_OF_SECOND + if (time == null && + (fieldValues.containsKey(INSTANT_SECONDS) || + fieldValues.containsKey(SECOND_OF_DAY) || + fieldValues.containsKey(SECOND_OF_MINUTE))) { + if (fieldValues.containsKey(NANO_OF_SECOND)) { + long nos = fieldValues.get(NANO_OF_SECOND); + fieldValues.put(MICRO_OF_SECOND, nos / 1000); + fieldValues.put(MILLI_OF_SECOND, nos / 1000000); + } else { + fieldValues.put(NANO_OF_SECOND, 0L); + fieldValues.put(MICRO_OF_SECOND, 0L); + fieldValues.put(MILLI_OF_SECOND, 0L); + } + } + } + + private void resolveInstant() { + // add instant seconds if we have date, time and zone + if (date != null && time != null) { + if (zone != null) { + long instant = date.atTime(time).atZone(zone).getLong(ChronoField.INSTANT_SECONDS); + fieldValues.put(INSTANT_SECONDS, instant); + } else { + Long offsetSecs = fieldValues.get(OFFSET_SECONDS); + if (offsetSecs != null) { + ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue()); + long instant = date.atTime(time).atZone(offset).getLong(ChronoField.INSTANT_SECONDS); + fieldValues.put(INSTANT_SECONDS, instant); + } + } + } + } + private void updateCheckConflict(LocalTime timeToSet, Period periodToSet) { if (time != null) { if (time.equals(timeToSet) == false) { @@ -568,18 +635,20 @@ for (Iterator> it = fieldValues.entrySet().iterator(); it.hasNext(); ) { Entry entry = it.next(); TemporalField field = entry.getKey(); - long val1; - try { - val1 = target.getLong(field); - } catch (RuntimeException ex) { - continue; + if (target.isSupported(field)) { + long val1; + try { + val1 = target.getLong(field); + } catch (RuntimeException ex) { + continue; + } + long val2 = entry.getValue(); + if (val1 != val2) { + throw new DateTimeException("Conflict found: Field " + field + " " + val1 + + " differs from " + field + " " + val2 + " derived from " + target); + } + it.remove(); } - long val2 = entry.getValue(); - if (val1 != val2) { - throw new DateTimeException("Conflict found: Field " + field + " " + val1 + - " differs from " + field + " " + val2 + " derived from " + target); - } - it.remove(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/format/TextStyle.java --- a/jdk/src/share/classes/java/time/format/TextStyle.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/format/TextStyle.java Wed Jun 18 13:14:15 2014 -0700 @@ -82,6 +82,8 @@ * * @implSpec * This is immutable and thread-safe enum. + * + * @since 1.8 */ public enum TextStyle { // ordered from large to small diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/format/package-info.java --- a/jdk/src/share/classes/java/time/format/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/format/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -90,6 +90,6 @@ * All calculations should check for numeric overflow and throw either an {@link java.lang.ArithmeticException} * or a {@link java.time.DateTimeException}. *

    - * @since JDK1.8 + * @since 1.8 */ package java.time.format; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/package-info.java --- a/jdk/src/share/classes/java/time/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -282,6 +282,6 @@ * * * - * @since JDK1.8 + * @since 1.8 */ package java.time; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/temporal/package-info.java --- a/jdk/src/share/classes/java/time/temporal/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/temporal/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -154,6 +154,6 @@ * All calculations should check for numeric overflow and throw either an {@link java.lang.ArithmeticException} * or a {@link java.time.DateTimeException}. *

    - * @since JDK1.8 + * @since 1.8 */ package java.time.temporal; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/time/zone/package-info.java --- a/jdk/src/share/classes/java/time/zone/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/time/zone/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -81,6 +81,6 @@ * All calculations should check for numeric overflow and throw either an {@link java.lang.ArithmeticException} * or a {@link java.time.DateTimeException}. *

    - * @since JDK1.8 + * @since 1.8 */ package java.time.zone; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/BitSet.java --- a/jdk/src/share/classes/java/util/BitSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/BitSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -60,7 +60,7 @@ * @author Arthur van Hoff * @author Michael McCloskey * @author Martin Buchholz - * @since JDK1.0 + * @since 1.0 */ public class BitSet implements Cloneable, java.io.Serializable { /* @@ -437,7 +437,7 @@ * * @param bitIndex a bit index * @throws IndexOutOfBoundsException if the specified index is negative - * @since JDK1.0 + * @since 1.0 */ public void set(int bitIndex) { if (bitIndex < 0) @@ -533,7 +533,7 @@ * * @param bitIndex the index of the bit to be cleared * @throws IndexOutOfBoundsException if the specified index is negative - * @since JDK1.0 + * @since 1.0 */ public void clear(int bitIndex) { if (bitIndex < 0) diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Calendar.java --- a/jdk/src/share/classes/java/util/Calendar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Calendar.java Wed Jun 18 13:14:15 2014 -0700 @@ -308,7 +308,7 @@ * @see TimeZone * @see java.text.DateFormat * @author Mark Davis, David Goldsmith, Chen-Lieh Huang, Alan Liu - * @since JDK1.1 + * @since 1.1 */ public abstract class Calendar implements Serializable, Cloneable, Comparable { @@ -994,7 +994,7 @@ * and the highest allowable serialVersionOnStream * is written. * @serial - * @since JDK1.1.6 + * @since 1.1.6 */ private int serialVersionOnStream = currentSerialVersion; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Date.java --- a/jdk/src/share/classes/java/util/Date.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Date.java Wed Jun 18 13:14:15 2014 -0700 @@ -126,7 +126,7 @@ * @see java.text.DateFormat * @see java.util.Calendar * @see java.util.TimeZone - * @since JDK1.0 + * @since 1.0 */ public class Date implements java.io.Serializable, Cloneable, Comparable diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Dictionary.java --- a/jdk/src/share/classes/java/util/Dictionary.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Dictionary.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @see java.lang.Object#equals(java.lang.Object) * @see java.lang.Object#hashCode() * @see java.util.Hashtable - * @since JDK1.0 + * @since 1.0 */ public abstract class Dictionary { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/EmptyStackException.java --- a/jdk/src/share/classes/java/util/EmptyStackException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/EmptyStackException.java Wed Jun 18 13:14:15 2014 -0700 @@ -31,7 +31,7 @@ * * @author Jonathan Payne * @see java.util.Stack - * @since JDK1.0 + * @since 1.0 */ public class EmptyStackException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Enumeration.java --- a/jdk/src/share/classes/java/util/Enumeration.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Enumeration.java Wed Jun 18 13:14:15 2014 -0700 @@ -56,7 +56,7 @@ * @see java.util.Vector#elements() * * @author Lee Boynton - * @since JDK1.0 + * @since 1.0 */ public interface Enumeration { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/EventListener.java --- a/jdk/src/share/classes/java/util/EventListener.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/EventListener.java Wed Jun 18 13:14:15 2014 -0700 @@ -27,7 +27,7 @@ /** * A tagging interface that all event listener interfaces must extend. - * @since JDK1.1 + * @since 1.1 */ public interface EventListener { } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/EventObject.java --- a/jdk/src/share/classes/java/util/EventObject.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/EventObject.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,7 +33,7 @@ * that is logically deemed to be the object upon which the Event in question * initially occurred upon. * - * @since JDK1.1 + * @since 1.1 */ public class EventObject implements java.io.Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/GregorianCalendar.java --- a/jdk/src/share/classes/java/util/GregorianCalendar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/GregorianCalendar.java Wed Jun 18 13:14:15 2014 -0700 @@ -325,7 +325,7 @@ * * @see TimeZone * @author David Goldsmith, Mark Davis, Chen-Lieh Huang, Alan Liu - * @since JDK1.1 + * @since 1.1 */ public class GregorianCalendar extends Calendar { /* diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Hashtable.java --- a/jdk/src/share/classes/java/util/Hashtable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Hashtable.java Wed Jun 18 13:14:15 2014 -0700 @@ -129,7 +129,7 @@ * @see Map * @see HashMap * @see TreeMap - * @since JDK1.0 + * @since 1.0 */ public class Hashtable extends Dictionary diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/ListResourceBundle.java --- a/jdk/src/share/classes/java/util/ListResourceBundle.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/ListResourceBundle.java Wed Jun 18 13:14:15 2014 -0700 @@ -113,7 +113,7 @@ * * @see ResourceBundle * @see PropertyResourceBundle - * @since JDK1.1 + * @since 1.1 */ public abstract class ListResourceBundle extends ResourceBundle { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/MissingResourceException.java --- a/jdk/src/share/classes/java/util/MissingResourceException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/MissingResourceException.java Wed Jun 18 13:14:15 2014 -0700 @@ -45,7 +45,7 @@ * @see java.lang.Exception * @see ResourceBundle * @author Mark Davis - * @since JDK1.1 + * @since 1.1 */ public class MissingResourceException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/NoSuchElementException.java --- a/jdk/src/share/classes/java/util/NoSuchElementException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/NoSuchElementException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * @author unascribed * @see java.util.Enumeration#nextElement() * @see java.util.Iterator#next() - * @since JDK1.0 + * @since 1.0 */ public class NoSuchElementException extends RuntimeException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Observable.java --- a/jdk/src/share/classes/java/util/Observable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Observable.java Wed Jun 18 13:14:15 2014 -0700 @@ -57,7 +57,7 @@ * @see java.util.Observable#notifyObservers(java.lang.Object) * @see java.util.Observer * @see java.util.Observer#update(java.util.Observable, java.lang.Object) - * @since JDK1.0 + * @since 1.0 */ public class Observable { private boolean changed = false; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Observer.java --- a/jdk/src/share/classes/java/util/Observer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Observer.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,7 +30,7 @@ * * @author Chris Warth * @see java.util.Observable - * @since JDK1.0 + * @since 1.0 */ public interface Observer { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Properties.java --- a/jdk/src/share/classes/java/util/Properties.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Properties.java Wed Jun 18 13:14:15 2014 -0700 @@ -116,7 +116,7 @@ * @author Arthur van Hoff * @author Michael McCloskey * @author Xueming Shen - * @since JDK1.0 + * @since 1.0 */ public class Properties extends Hashtable { @@ -602,7 +602,7 @@ if (bufLen < 0) { bufLen = Integer.MAX_VALUE; } - StringBuffer outBuffer = new StringBuffer(bufLen); + StringBuilder outBuffer = new StringBuilder(bufLen); for(int x=0; x stack = new ArrayDeque();} * * @author Jonathan Payne - * @since JDK1.0 + * @since 1.0 */ public class Stack extends Vector { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/StringTokenizer.java --- a/jdk/src/share/classes/java/util/StringTokenizer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/StringTokenizer.java Wed Jun 18 13:14:15 2014 -0700 @@ -97,7 +97,7 @@ * * @author unascribed * @see java.io.StreamTokenizer - * @since JDK1.0 + * @since 1.0 */ public class StringTokenizer implements Enumeration { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/TimeZone.java --- a/jdk/src/share/classes/java/util/TimeZone.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/TimeZone.java Wed Jun 18 13:14:15 2014 -0700 @@ -128,7 +128,7 @@ * @see GregorianCalendar * @see SimpleTimeZone * @author Mark Davis, David Goldsmith, Chen-Lieh Huang, Alan Liu - * @since JDK1.1 + * @since 1.1 */ abstract public class TimeZone implements Serializable, Cloneable { /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/TooManyListenersException.java --- a/jdk/src/share/classes/java/util/TooManyListenersException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/TooManyListenersException.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,7 +44,7 @@ * @see java.util.EventListener * * @author Laurence P. G. Cable - * @since JDK1.1 + * @since 1.1 */ public class TooManyListenersException extends Exception { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/Vector.java --- a/jdk/src/share/classes/java/util/Vector.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/Vector.java Wed Jun 18 13:14:15 2014 -0700 @@ -82,7 +82,7 @@ * @author Jonathan Payne * @see Collection * @see LinkedList - * @since JDK1.0 + * @since 1.0 */ public class Vector extends AbstractList diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java --- a/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java Wed Jun 18 13:14:15 2014 -0700 @@ -133,12 +133,12 @@ * mapped values are (perhaps transiently) not used or all take the * same mapping value. * - *

    A ConcurrentHashMap can be used as scalable frequency map (a + *

    A ConcurrentHashMap can be used as a scalable frequency map (a * form of histogram or multiset) by using {@link * java.util.concurrent.atomic.LongAdder} values and initializing via * {@link #computeIfAbsent computeIfAbsent}. For example, to add a count * to a {@code ConcurrentHashMap freqs}, you can use - * {@code freqs.computeIfAbsent(k -> new LongAdder()).increment();} + * {@code freqs.computeIfAbsent(key, k -> new LongAdder()).increment();} * *

    This class and its views and iterators implement all of the * optional methods of the {@link Map} and {@link Iterator} diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/concurrent/atomic/LongAdder.java --- a/jdk/src/share/classes/java/util/concurrent/atomic/LongAdder.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/concurrent/atomic/LongAdder.java Wed Jun 18 13:14:15 2014 -0700 @@ -57,7 +57,7 @@ * frequency map (a form of histogram or multiset). For example, to * add a count to a {@code ConcurrentHashMap freqs}, * initializing if not already present, you can use {@code - * freqs.computeIfAbsent(k -> new LongAdder()).increment();} + * freqs.computeIfAbsent(key, k -> new LongAdder()).increment();} * *

    This class extends {@link Number}, but does not define * methods such as {@code equals}, {@code hashCode} and {@code diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/package.html --- a/jdk/src/share/classes/java/util/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -50,6 +50,6 @@ Framework Design FAQ -@since JDK1.0 +@since 1.0 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/prefs/Base64.java --- a/jdk/src/share/classes/java/util/prefs/Base64.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/prefs/Base64.java Wed Jun 18 13:14:15 2014 -0700 @@ -57,7 +57,7 @@ int numFullGroups = aLen/3; int numBytesInPartialGroup = aLen - 3*numFullGroups; int resultLen = 4*((aLen + 2)/3); - StringBuffer result = new StringBuffer(resultLen); + StringBuilder result = new StringBuilder(resultLen); char[] intToAlpha = (alternate ? intToAltBase64 : intToBase64); // Translate all full groups from byte array elements to Base64 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/prefs/package.html --- a/jdk/src/share/classes/java/util/prefs/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/prefs/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -39,6 +39,6 @@

    Related Documentation

    --> -@since JDK1.4 +@since 1.4 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/regex/PatternSyntaxException.java --- a/jdk/src/share/classes/java/util/regex/PatternSyntaxException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/regex/PatternSyntaxException.java Wed Jun 18 13:14:15 2014 -0700 @@ -105,7 +105,7 @@ * @return The full detail message */ public String getMessage() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(desc); if (index >= 0) { sb.append(" near index "); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/zip/ZipException.java --- a/jdk/src/share/classes/java/util/zip/ZipException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/zip/ZipException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,7 +32,7 @@ * * @author unascribed * @see java.io.IOException - * @since JDK1.0 + * @since 1.0 */ public diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/java/util/zip/package.html --- a/jdk/src/share/classes/java/util/zip/package.html Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/java/util/zip/package.html Wed Jun 18 13:14:15 2014 -0700 @@ -81,7 +81,7 @@ --> -@since JDK1.1 +@since 1.1 diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java --- a/jdk/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -289,7 +289,7 @@ } public String readLine() throws IOException { - StringBuffer input = new StringBuffer(); + StringBuilder input = new StringBuilder(); int c = -1; boolean eol = false; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java --- a/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Wed Jun 18 13:14:15 2014 -0700 @@ -1215,7 +1215,7 @@ ReflectUtil.checkPackageAccess(className); final ClassLoader targetClassLoader = rmmbClass.getClassLoader(); - Class clz = Class.forName(className, false, + Class clz = Class.forName(className, false, targetClassLoader); if (!rmmbClass.isAssignableFrom(clz)) return null; @@ -1673,12 +1673,12 @@ // inequality may come from type subclassing boolean subtype; try { - final Class respClass = response.getClass(); + final Class respClass = response.getClass(); final Exception[] caughException = new Exception[1]; AccessControlContext stack = AccessController.getContext(); - Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { + Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { @Override public Class run() { @@ -2855,7 +2855,7 @@ AccessControlContext stack = AccessController.getContext(); final ClassNotFoundException[] caughtException = new ClassNotFoundException[1]; - Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { + Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { @Override public Class run() { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java --- a/jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/management/remote/rmi/RMIConnector.java Wed Jun 18 13:14:15 2014 -0700 @@ -2011,13 +2011,13 @@ if (nullSubjectConnRef == null || (conn = nullSubjectConnRef.get()) == null) { conn = new RemoteMBeanServerConnection(null); - nullSubjectConnRef = new WeakReference(conn); + nullSubjectConnRef = new WeakReference(conn); } } else { WeakReference wr = rmbscMap.get(delegationSubject); if (wr == null || (conn = wr.get()) == null) { conn = new RemoteMBeanServerConnection(delegationSubject); - rmbscMap.put(delegationSubject, new WeakReference(conn)); + rmbscMap.put(delegationSubject, new WeakReference(conn)); } } return conn; @@ -2115,7 +2115,7 @@ PrivilegedExceptionAction> action = new PrivilegedExceptionAction>() { public Constructor run() throws Exception { - Class thisClass = RMIConnector.class; + Class thisClass = RMIConnector.class; ClassLoader thisLoader = thisClass.getClassLoader(); ProtectionDomain thisProtectionDomain = thisClass.getProtectionDomain(); @@ -2354,7 +2354,7 @@ PrivilegedExceptionAction> action = new PrivilegedExceptionAction>() { public Class run() throws Exception { - Class thisClass = RMIConnector.class; + Class thisClass = RMIConnector.class; ClassLoader thisLoader = thisClass.getClassLoader(); ProtectionDomain thisProtectionDomain = thisClass.getProtectionDomain(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/naming/BinaryRefAddr.java --- a/jdk/src/share/classes/javax/naming/BinaryRefAddr.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/naming/BinaryRefAddr.java Wed Jun 18 13:14:15 2014 -0700 @@ -165,7 +165,7 @@ * @return The non-null string representation of this address. */ public String toString(){ - StringBuffer str = new StringBuffer("Address Type: " + addrType + "\n"); + StringBuilder str = new StringBuilder("Address Type: " + addrType + "\n"); str.append("AddressContents: "); for (int i = 0; i"i-j" otherwise. */ public String toString() { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); int n = members.length; for (int i = 0; i < n; i++) { if (i > 0) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/print/attribute/Size2DSyntax.java --- a/jdk/src/share/classes/javax/print/attribute/Size2DSyntax.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/print/attribute/Size2DSyntax.java Wed Jun 18 13:14:15 2014 -0700 @@ -257,7 +257,7 @@ * (unchecked exception) Thrown if {@code units < 1}. */ public String toString(int units, String unitsName) { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); result.append(getX (units)); result.append('x'); result.append(getY (units)); @@ -312,7 +312,7 @@ * The values are reported in the internal units of micrometers. */ public String toString() { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); result.append(x); result.append('x'); result.append(y); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/security/auth/callback/package-info.java --- a/jdk/src/share/classes/javax/security/auth/callback/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/security/auth/callback/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -30,6 +30,6 @@ * or passwords, for example) or to display information * (error and warning messages, for example). * - * @since JDK1.4 + * @since 1.4 */ package javax.security.auth.callback; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java --- a/jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java Wed Jun 18 13:14:15 2014 -0700 @@ -636,11 +636,11 @@ public String toString() { if (destroyed) throw new IllegalStateException("This ticket is no longer valid"); - StringBuffer caddrBuf = new StringBuffer(); + StringBuilder caddrString = new StringBuilder(); if (clientAddresses != null) { for (int i = 0; i < clientAddresses.length; i++) { - caddrBuf.append("clientAddresses[" + i + "] = " + - clientAddresses[i].toString()); + caddrString.append("clientAddresses[" + i + "] = " + + clientAddresses[i].toString()); } } return ("Ticket (hex) = " + "\n" + @@ -660,7 +660,7 @@ "End Time = " + endTime.toString() + "\n" + "Renew Till = " + String.valueOf(renewTill) + "\n" + "Client Addresses " + - (clientAddresses == null ? " Null " : caddrBuf.toString() + + (clientAddresses == null ? " Null " : caddrString.toString() + "\n")); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/security/auth/kerberos/package-info.java --- a/jdk/src/share/classes/javax/security/auth/kerberos/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/security/auth/kerberos/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -54,6 +54,6 @@ * string or a boolean value. A boolean value can be one of "true", "false", * "yes", or "no", case-insensitive.

    * - * @since JDK1.4 + * @since 1.4 */ package javax.security.auth.kerberos; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/security/auth/package-info.java --- a/jdk/src/share/classes/javax/security/auth/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/security/auth/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -33,6 +33,6 @@ * based on code location, code signers and code executors * (Subjects). * - * @since JDK1.4 + * @since 1.4 */ package javax.security.auth; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/security/auth/spi/package-info.java --- a/jdk/src/share/classes/javax/security/auth/spi/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/security/auth/spi/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -27,6 +27,6 @@ * This package provides the interface to be used for * implementing pluggable authentication modules. * - * @since JDK1.4 + * @since 1.4 */ package javax.security.auth.spi; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/security/auth/x500/package-info.java --- a/jdk/src/share/classes/javax/security/auth/x500/package-info.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/security/auth/x500/package-info.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,6 +44,6 @@ * Directory Information Models * * - * @since JDK1.4 + * @since 1.4 */ package javax.security.auth.x500; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sound/sampled/CompoundControl.java --- a/jdk/src/share/classes/javax/sound/sampled/CompoundControl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sound/sampled/CompoundControl.java Wed Jun 18 13:14:15 2014 -0700 @@ -74,18 +74,18 @@ @Override public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < controls.length; i++) { if (i != 0) { - buf.append(", "); + sb.append(", "); if ((i + 1) == controls.length) { - buf.append("and "); + sb.append("and "); } } - buf.append(controls[i].getType()); + sb.append(controls[i].getType()); } - return new String(getType() + " Control containing " + buf + " Controls."); + return new String(getType() + " Control containing " + sb + " Controls."); } /** diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sound/sampled/DataLine.java --- a/jdk/src/share/classes/javax/sound/sampled/DataLine.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sound/sampled/DataLine.java Wed Jun 18 13:14:15 2014 -0700 @@ -470,23 +470,23 @@ @Override public String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if ( (formats.length == 1) && (formats[0] != null) ) { - buf.append(" supporting format " + formats[0]); + sb.append(" supporting format " + formats[0]); } else if (getFormats().length > 1) { - buf.append(" supporting " + getFormats().length + " audio formats"); + sb.append(" supporting " + getFormats().length + " audio formats"); } if ( (minBufferSize != AudioSystem.NOT_SPECIFIED) && (maxBufferSize != AudioSystem.NOT_SPECIFIED) ) { - buf.append(", and buffers of " + minBufferSize + " to " + maxBufferSize + " bytes"); + sb.append(", and buffers of " + minBufferSize + " to " + maxBufferSize + " bytes"); } else if ( (minBufferSize != AudioSystem.NOT_SPECIFIED) && (minBufferSize > 0) ) { - buf.append(", and buffers of at least " + minBufferSize + " bytes"); + sb.append(", and buffers of at least " + minBufferSize + " bytes"); } else if (maxBufferSize != AudioSystem.NOT_SPECIFIED) { - buf.append(", and buffers of up to " + minBufferSize + " bytes"); + sb.append(", and buffers of up to " + minBufferSize + " bytes"); } - return new String(super.toString() + buf); + return new String(super.toString() + sb); } } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/CommonDataSource.java --- a/jdk/src/share/classes/javax/sql/CommonDataSource.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/CommonDataSource.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,6 +34,7 @@ * Interface that defines the methods which are common between DataSource, * XADataSource and ConnectionPoolDataSource. * + * @since 1.6 */ public interface CommonDataSource { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/BaseRowSet.java --- a/jdk/src/share/classes/javax/sql/rowset/BaseRowSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/BaseRowSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -291,6 +291,8 @@ * extending class overrides and reimplements any BaseRowSet method and encounters * connectivity or underlying data source issues, that method may in addition throw an * SQLException object for that reason. +* +* @since 1.5 */ public abstract class BaseRowSet implements Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/CachedRowSet.java --- a/jdk/src/share/classes/javax/sql/rowset/CachedRowSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/CachedRowSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -626,6 +626,7 @@ * * * @author Jonathan Bruce + * @since 1.5 */ public interface CachedRowSet extends RowSet, Joinable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/FilteredRowSet.java --- a/jdk/src/share/classes/javax/sql/rowset/FilteredRowSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/FilteredRowSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -122,6 +122,7 @@ * synchronized with the data source. * * @author Jonathan Bruce + * @since 1.5 */ public interface FilteredRowSet extends WebRowSet { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/JdbcRowSet.java --- a/jdk/src/share/classes/javax/sql/rowset/JdbcRowSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/JdbcRowSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -118,6 +118,7 @@ * requirements of connected and disconnected RowSet objects. * * @author Jonathan Bruce + * @since 1.5 */ public interface JdbcRowSet extends RowSet, Joinable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/JoinRowSet.java --- a/jdk/src/share/classes/javax/sql/rowset/JoinRowSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/JoinRowSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -217,6 +217,7 @@ * This method creates a copy that can be persisted to the data source. * * + * @since 1.5 */ public interface JoinRowSet extends WebRowSet { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/Joinable.java --- a/jdk/src/share/classes/javax/sql/rowset/Joinable.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/Joinable.java Wed Jun 18 13:14:15 2014 -0700 @@ -129,6 +129,7 @@ * * @see JoinRowSet * @author Jonathan Bruce + * @since 1.5 */ public interface Joinable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/Predicate.java --- a/jdk/src/share/classes/javax/sql/rowset/Predicate.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/Predicate.java Wed Jun 18 13:14:15 2014 -0700 @@ -97,6 +97,7 @@ * applications that use both column identification conventions. * * @author Jonathan Bruce, Amit Handa + * @since 1.5 * */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java --- a/jdk/src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -48,6 +48,8 @@ * Therefore, any RowSetMetaDataImpl method that retrieves information * is defined as having unspecified behavior when it is called * before the RowSet object contains data. + * + * @since 1.5 */ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/RowSetWarning.java --- a/jdk/src/share/classes/javax/sql/rowset/RowSetWarning.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/RowSetWarning.java Wed Jun 18 13:14:15 2014 -0700 @@ -50,6 +50,8 @@ * The inherited methods getMessage, getSQLState, * and getErrorCode retrieve information contained in a * RowSetWarning object. + * + * @since 1.5 */ public class RowSetWarning extends SQLException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/WebRowSet.java --- a/jdk/src/share/classes/javax/sql/rowset/WebRowSet.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/WebRowSet.java Wed Jun 18 13:14:15 2014 -0700 @@ -408,6 +408,7 @@ * @see javax.sql.rowset.CachedRowSet * @see javax.sql.rowset.FilteredRowSet * @see javax.sql.rowset.JoinRowSet + * @since 1.5 */ public interface WebRowSet extends CachedRowSet { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java Wed Jun 18 13:14:15 2014 -0700 @@ -52,6 +52,8 @@ * to write data from the SQLData object to * the SQLOutputImpl output stream as the * representation of an SQL user-defined type. + * + * @since 1.5 */ public class SQLOutputImpl implements SQLOutput { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialArray.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialArray.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialArray.java Wed Jun 18 13:14:15 2014 -0700 @@ -56,6 +56,7 @@ * SerialArray is to be used by more than one thread then access to the * SerialArray should be controlled by appropriate synchronization. * + * @since 1.5 */ public class SerialArray implements Array, Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialBlob.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialBlob.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialBlob.java Wed Jun 18 13:14:15 2014 -0700 @@ -58,6 +58,7 @@ * should be controlled by appropriate synchronization. * * @author Jonathan Bruce + * @since 1.5 */ public class SerialBlob implements Blob, Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialClob.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialClob.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialClob.java Wed Jun 18 13:14:15 2014 -0700 @@ -49,7 +49,9 @@ *

    A SerialClob is not safe for use by multiple concurrent threads. If a * SerialClob is to be used by more than one thread then access to the SerialClob * should be controlled by appropriate synchronization. + * * @author Jonathan Bruce + * @since 1.5 */ public class SerialClob implements Clob, Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java Wed Jun 18 13:14:15 2014 -0700 @@ -48,6 +48,8 @@ * A SerialDatalink is not safe for use by multiple concurrent threads. If a * SerialDatalink is to be used by more than one thread then access to the * SerialDatalink should be controlled by appropriate synchronization. + * + * @since 1.5 */ public class SerialDatalink implements Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialException.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialException.java Wed Jun 18 13:14:15 2014 -0700 @@ -32,6 +32,7 @@ * SQL types such as BLOB, CLOB, STRUCT or ARRAY in * addition to SQL types such as DATALINK and JAVAOBJECT * + * @since 1.5 */ public class SerialException extends java.sql.SQLException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java Wed Jun 18 13:14:15 2014 -0700 @@ -54,6 +54,7 @@ * SerialJavaObject should be controlled by appropriate synchronization. * * @author Jonathan Bruce + * @since 1.5 */ public class SerialJavaObject implements Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialRef.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialRef.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialRef.java Wed Jun 18 13:14:15 2014 -0700 @@ -43,6 +43,7 @@ * SerialRef is to be used by more than one thread then access to the SerialRef * should be controlled by appropriate synchronization. * + * @since 1.5 */ public class SerialRef implements Ref, Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/serial/SerialStruct.java --- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialStruct.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialStruct.java Wed Jun 18 13:14:15 2014 -0700 @@ -57,6 +57,7 @@ * SerialStruct is to be used by more than one thread then access to the * SerialStruct should be controlled by appropriate synchronization. * + * @since 1.5 */ public class SerialStruct implements Struct, Serializable, Cloneable { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactory.java Wed Jun 18 13:14:15 2014 -0700 @@ -200,6 +200,7 @@ * @author Jonathan Bruce * @see javax.sql.rowset.spi.SyncProvider * @see javax.sql.rowset.spi.SyncFactoryException + * @since 1.5 */ public class SyncFactory { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/SyncFactoryException.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactoryException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncFactoryException.java Wed Jun 18 13:14:15 2014 -0700 @@ -35,6 +35,7 @@ * @author Jonathan Bruce * @see javax.sql.rowset.spi.SyncFactory * @see javax.sql.rowset.spi.SyncFactoryException + * @since 1.5 */ public class SyncFactoryException extends java.sql.SQLException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java Wed Jun 18 13:14:15 2014 -0700 @@ -209,6 +209,7 @@ * @author Jonathan Bruce * @see javax.sql.rowset.spi.SyncFactory * @see javax.sql.rowset.spi.SyncFactoryException + * @since 1.5 */ public abstract class SyncProvider { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/SyncProviderException.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncProviderException.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncProviderException.java Wed Jun 18 13:14:15 2014 -0700 @@ -61,6 +61,7 @@ * @see javax.sql.rowset.spi.SyncFactory * @see javax.sql.rowset.spi.SyncResolver * @see javax.sql.rowset.spi.SyncFactoryException + * @since 1.5 */ public class SyncProviderException extends java.sql.SQLException { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/SyncResolver.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncResolver.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncResolver.java Wed Jun 18 13:14:15 2014 -0700 @@ -231,7 +231,9 @@ * } * } * } + * * @author Jonathan Bruce + * @since 1.5 */ public interface SyncResolver extends RowSet { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,6 +44,8 @@ * the CachedRowSet constant COMMIT_ON_ACCEPT_CHANGES * to false and use the commit and rollback * methods defined in this interface to manage transaction boundaries. + * + * @since 1.5 */ public interface TransactionalWriter extends RowSetWriter { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/XmlReader.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/XmlReader.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/XmlReader.java Wed Jun 18 13:14:15 2014 -0700 @@ -46,6 +46,8 @@ * rowset's xmlReader field. When the WebRowSet * object's readXml method is invoked, it in turn invokes * its XML reader's readXML method. + * + * @since 1.5 */ public interface XmlReader extends RowSetReader { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/sql/rowset/spi/XmlWriter.java --- a/jdk/src/share/classes/javax/sql/rowset/spi/XmlWriter.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/sql/rowset/spi/XmlWriter.java Wed Jun 18 13:14:15 2014 -0700 @@ -44,6 +44,8 @@ * Writing a WebRowSet object includes printing the * rowset's data, metadata, and properties, all with the * appropriate XML tags. + * + * @since 1.5 */ public interface XmlWriter extends RowSetWriter { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/AbstractButton.java --- a/jdk/src/share/classes/javax/swing/AbstractButton.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/AbstractButton.java Wed Jun 18 13:14:15 2014 -0700 @@ -947,6 +947,7 @@ *

    * This is a JavaBeans bound property. * + * @param iconTextGap the space between icon and text if these properties are set. * @since 1.4 * @see #getIconTextGap * @beaninfo @@ -1337,6 +1338,7 @@ * that of the Action. * * @param a the button's action + * @return the {@code PropertyChangeListener} * @since 1.3 * @see Action * @see #setAction @@ -2070,12 +2072,20 @@ } } - + /** + * Returns {@code ActionListener} that is added to model. + * + * @return the {@code ActionListener} + */ protected ActionListener createActionListener() { return getHandler(); } - + /** + * Returns {@code ItemListener} that is added to model. + * + * @return the {@code ItemListener} + */ protected ItemListener createItemListener() { return getHandler(); } @@ -2148,7 +2158,7 @@ return listenerList.getListeners(ItemListener.class); } - /** + /** * Returns an array (length 1) containing the label or * null if the button is not selected. * @@ -2164,6 +2174,12 @@ return selectedObjects; } + /** + * Initialization of the {@code AbstractButton}. + * + * @param text the text of the button + * @param icon the Icon image to display on the button + */ protected void init(String text, Icon icon) { if(text != null) { setText(text); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/AbstractSpinnerModel.java --- a/jdk/src/share/classes/javax/swing/AbstractSpinnerModel.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/AbstractSpinnerModel.java Wed Jun 18 13:14:15 2014 -0700 @@ -131,6 +131,7 @@ * myAbstractSpinnerModel.getListeners(ChangeListener.class); * * + * @param the type of requested listeners * @param listenerType the type of listeners to return, e.g. ChangeListener.class * @return all of the objects receiving listenerType notifications * from this model diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/Action.java --- a/jdk/src/share/classes/javax/swing/Action.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/Action.java Wed Jun 18 13:14:15 2014 -0700 @@ -337,6 +337,9 @@ /** * Gets one of this object's properties * using the associated key. + * + * @param key a {@code String} containing the key + * @return the {@code Object} value * @see #putValue */ public Object getValue(String key); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/ActionMap.java --- a/jdk/src/share/classes/javax/swing/ActionMap.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/ActionMap.java Wed Jun 18 13:14:15 2014 -0700 @@ -94,6 +94,9 @@ * for key. *

    In most instances, key will be * action.getValue(NAME). + * + * @param key a key + * @param action a binding for {@code key} */ public void put(Object key, Action action) { if (key == null) { @@ -113,6 +116,9 @@ /** * Returns the binding for key, messaging the * parent ActionMap if the binding is not locally defined. + * + * @param key a key + * @return the binding for {@code key} */ public Action get(Object key) { Action value = (arrayTable == null) ? null : @@ -130,6 +136,8 @@ /** * Removes the binding for key from this ActionMap. + * + * @param key a key */ public void remove(Object key) { if (arrayTable != null) { @@ -148,6 +156,8 @@ /** * Returns the Action names that are bound in this ActionMap. + * + * @return an array of the keys */ public Object[] keys() { if (arrayTable == null) { @@ -172,6 +182,8 @@ * Returns an array of the keys defined in this ActionMap and * its parent. This method differs from keys() in that * this method includes the keys defined in the parent. + * + * @return an array of the keys */ public Object[] allKeys() { int count = size(); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/ButtonGroup.java --- a/jdk/src/share/classes/javax/swing/ButtonGroup.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/ButtonGroup.java Wed Jun 18 13:14:15 2014 -0700 @@ -167,9 +167,11 @@ } /** - * Returns whether a ButtonModel is selected. - * @return true if the button is selected, - * otherwise returns false + * Returns whether a {@code ButtonModel} is selected. + * + * @param m an isntance of {@code ButtonModel} + * @return {@code true} if the button is selected, + * otherwise returns {@code false} */ public boolean isSelected(ButtonModel m) { return (m == selection); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/ComboBoxEditor.java --- a/jdk/src/share/classes/javax/swing/ComboBoxEditor.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/ComboBoxEditor.java Wed Jun 18 13:14:15 2014 -0700 @@ -34,23 +34,44 @@ */ public interface ComboBoxEditor { - /** Return the component that should be added to the tree hierarchy for - * this editor - */ + /** + * Returns the component that should be added to the tree hierarchy for + * this editor + * + * @return the component + */ public Component getEditorComponent(); - /** Set the item that should be edited. Cancel any editing if necessary **/ + /** + * Set the item that should be edited. Cancel any editing if necessary + * + * @param anObject an item + */ public void setItem(Object anObject); - /** Return the edited item **/ + /** + * Returns the edited item + * + * @return the edited item + */ public Object getItem(); - /** Ask the editor to start editing and to select everything **/ + /** + * Ask the editor to start editing and to select everything + */ public void selectAll(); - /** Add an ActionListener. An action event is generated when the edited item changes **/ + /** + * Add an ActionListener. An action event is generated when the edited item changes + * + * @param l an {@code ActionListener} + */ public void addActionListener(ActionListener l); - /** Remove an ActionListener **/ + /** + * Remove an ActionListener + * + * @param l an {@code ActionListener} + */ public void removeActionListener(ActionListener l); } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/ComponentInputMap.java --- a/jdk/src/share/classes/javax/swing/ComponentInputMap.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/ComponentInputMap.java Wed Jun 18 13:14:15 2014 -0700 @@ -78,7 +78,9 @@ } /** - * Returns the component the InputMap was created for. + * Returns the component the {@code InputMap} was created for. + * + * @return the component the {@code InputMap} was created for. */ public JComponent getComponent() { return component; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/DefaultButtonModel.java --- a/jdk/src/share/classes/javax/swing/DefaultButtonModel.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/DefaultButtonModel.java Wed Jun 18 13:14:15 2014 -0700 @@ -477,6 +477,7 @@ * If no such listeners exist, * this method returns an empty array. * + * @param the type of requested listeners * @param listenerType the type of listeners requested; * this parameter should specify an interface * that descends from java.util.EventListener diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/FocusManager.java --- a/jdk/src/share/classes/javax/swing/FocusManager.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/FocusManager.java Wed Jun 18 13:14:15 2014 -0700 @@ -140,6 +140,7 @@ * Returns whether the application has invoked * disableSwingFocusManager(). * + * @return {@code true} if focus manager is enabled. * @see #disableSwingFocusManager * @deprecated As of 1.4, replaced by * KeyboardFocusManager.getDefaultFocusTraversalPolicy() diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/GroupLayout.java --- a/jdk/src/share/classes/javax/swing/GroupLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/GroupLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -670,6 +670,7 @@ * @param resizable whether the group is resizable * @param anchorBaselineToTop whether the baseline is anchored to * the top or bottom of the group + * @return the {@code ParallelGroup} * @see #createBaselineGroup * @see ParallelGroup */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JColorChooser.java --- a/jdk/src/share/classes/javax/swing/JColorChooser.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JColorChooser.java Wed Jun 18 13:14:15 2014 -0700 @@ -542,7 +542,7 @@ * @return a string representation of this JColorChooser */ protected String paramString() { - StringBuffer chooserPanelsString = new StringBuffer(""); + StringBuilder chooserPanelsString = new StringBuilder(""); for (int i=0; iAction. * * @param a the combobox's action + * @return the {@code PropertyChangeListener} * @since 1.3 * @see Action * @see #setAction @@ -1359,6 +1369,8 @@ * * @param keyChar a char, typically this is a keyboard key * typed by the user + * @return {@code true} if there is an item corresponding to that character. + * Otherwise, returns {@code false}. */ public boolean selectWithKeyChar(char keyChar) { int index; @@ -1445,6 +1457,7 @@ * selection. Typically, the first selection with a matching first * character becomes the selected item. * + * @param aManager a key selection manager * @beaninfo * expert: true * description: The objects that changes the selection when a key is pressed. diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JOptionPane.java --- a/jdk/src/share/classes/javax/swing/JOptionPane.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JOptionPane.java Wed Jun 18 13:14:15 2014 -0700 @@ -435,6 +435,7 @@ * @exception HeadlessException if * GraphicsEnvironment.isHeadless returns * true + * @return user's input * @see java.awt.GraphicsEnvironment#isHeadless */ public static String showInputDialog(Object message) @@ -451,6 +452,7 @@ * @param message the Object to display * @param initialSelectionValue the value used to initialize the input * field + * @return user's input * @since 1.4 */ public static String showInputDialog(Object message, Object initialSelectionValue) { @@ -469,6 +471,7 @@ * @exception HeadlessException if * GraphicsEnvironment.isHeadless returns * true + * @return user's input * @see java.awt.GraphicsEnvironment#isHeadless */ public static String showInputDialog(Component parentComponent, @@ -489,6 +492,7 @@ * @param message the Object to display * @param initialSelectionValue the value used to initialize the input * field + * @return user's input * @since 1.4 */ public static String showInputDialog(Component parentComponent, Object message, @@ -515,6 +519,7 @@ * WARNING_MESSAGE, * QUESTION_MESSAGE, * or PLAIN_MESSAGE + * @return user's input * @exception HeadlessException if * GraphicsEnvironment.isHeadless returns * true @@ -1348,6 +1353,7 @@ * @param parentComponent the parent Component * for the dialog * @param message the Object to display + * @return user's input */ public static String showInternalInputDialog(Component parentComponent, Object message) { @@ -1368,6 +1374,7 @@ * @param messageType the type of message that is to be displayed: * ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, * QUESTION_MESSAGE, or PLAIN_MESSAGE + * @return user's input */ public static String showInternalInputDialog(Component parentComponent, Object message, String title, int messageType) { @@ -2246,6 +2253,8 @@ *

    * This is a bound property. * + * @param newValue if true, an input component whose parent is {@code parentComponent} + * is provided to allow the user to input a value. * @see #setSelectionValues * @see #setInputValue * @beaninfo diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JProgressBar.java --- a/jdk/src/share/classes/javax/swing/JProgressBar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JProgressBar.java Wed Jun 18 13:14:15 2014 -0700 @@ -665,6 +665,7 @@ * to the {@code ChangeListener}s that have been added directly to the * progress bar. * + * @return the instance of a custom {@code ChangeListener} implementation. * @see #changeListener * @see #fireStateChanged * @see javax.swing.event.ChangeListener diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JRadioButton.java --- a/jdk/src/share/classes/javax/swing/JRadioButton.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JRadioButton.java Wed Jun 18 13:14:15 2014 -0700 @@ -118,6 +118,7 @@ * Creates a radiobutton where properties are taken from the * Action supplied. * + * @param a an {@code Action} * @since 1.3 */ public JRadioButton(Action a) { @@ -175,6 +176,8 @@ * * @param text the string displayed on the radio button * @param icon the image that the button should display + * @param selected if {@code true}, the button is initially selected + * otherwise, the button is initially unselected */ public JRadioButton (String text, Icon icon, boolean selected) { super(text, icon, selected); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java --- a/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java Wed Jun 18 13:14:15 2014 -0700 @@ -173,6 +173,8 @@ * * @param text the string displayed on the radio button * @param icon the image that the button should display + * @param selected if {@code true}, the button is initially selected, + * otherwise, the button is initially unselected */ public JRadioButtonMenuItem(String text, Icon icon, boolean selected) { super(text, icon); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JScrollBar.java --- a/jdk/src/share/classes/javax/swing/JScrollBar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JScrollBar.java Wed Jun 18 13:14:15 2014 -0700 @@ -149,6 +149,12 @@ * @see #setVisibleAmount * @see #setMinimum * @see #setMaximum + * + * @param orientation an orientation of the {@code JScrollBar} + * @param value an int giving the current value + * @param extent an int giving the amount by which the value can "jump" + * @param min an int giving the minimum value + * @param max an int giving the maximum value */ public JScrollBar(int orientation, int value, int extent, int min, int max) { @@ -172,6 +178,8 @@ * value = 0 * extent = 10 * + * + * @param orientation an orientation of the {@code JScrollBar} */ public JScrollBar(int orientation) { this(orientation, 0, 10, 0, 100); @@ -213,6 +221,7 @@ * Returns the delegate that implements the look and feel for * this component. * + * @return the scroll bar's current UI. * @see JComponent#setUI */ public ScrollBarUI getUI() { @@ -258,6 +267,7 @@ * Set the scrollbar's orientation to either VERTICAL or * HORIZONTAL. * + * @param orientation an orientation of the {@code JScrollBar} * @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL * @see #getOrientation * @beaninfo @@ -293,6 +303,8 @@ * Returns data model that handles the scrollbar's four * fundamental properties: minimum, maximum, value, extent. * + * @return the data model + * * @see #setModel */ public BoundedRangeModel getModel() { @@ -304,6 +316,7 @@ * Sets the model that handles the scrollbar's four * fundamental properties: minimum, maximum, value, extent. * + * @param newModel a new model * @see #getModel * @beaninfo * bound: true @@ -583,6 +596,8 @@ * scrollbar model will not generate ChangeEvents while * valueIsAdjusting is true. * + * @param b {@code true} if the upcoming changes to the value property are part of a series + * * @see #getValueIsAdjusting * @see BoundedRangeModel#setValueIsAdjusting * @beaninfo @@ -610,6 +625,10 @@ * minimum ≤ value ≤ value+extent ≤ maximum * * + * @param newValue an int giving the current value + * @param newExtent an int giving the amount by which the value can "jump" + * @param newMin an int giving the minimum value + * @param newMax an int giving the maximum value * * @see BoundedRangeModel#setRangeProperties * @see #setValue @@ -681,6 +700,10 @@ /** * Notify listeners that the scrollbar's model has changed. * + * @param id an integer indicating the type of event. + * @param type an integer indicating the adjustment type. + * @param value the current value of the adjustment + * * @see #addAdjustmentListener * @see EventListenerList */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JToggleButton.java --- a/jdk/src/share/classes/javax/swing/JToggleButton.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JToggleButton.java Wed Jun 18 13:14:15 2014 -0700 @@ -140,6 +140,7 @@ * Creates a toggle button where properties are taken from the * Action supplied. * + * @param a an instance of an {@code Action} * @since 1.3 */ public JToggleButton(Action a) { @@ -390,6 +391,9 @@ protected class AccessibleJToggleButton extends AccessibleAbstractButton implements ItemListener { + /** + * Constructs {@code AccessibleJToggleButton} + */ public AccessibleJToggleButton() { super(); JToggleButton.this.addItemListener(this); diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JToolBar.java --- a/jdk/src/share/classes/javax/swing/JToolBar.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JToolBar.java Wed Jun 18 13:14:15 2014 -0700 @@ -161,6 +161,8 @@ /** * Returns the tool bar's current UI. + * + * @return the tool bar's current UI. * @see #setUI */ public ToolBarUI getUI() { @@ -555,7 +557,8 @@ * or null if the default * property change listener for the control is desired. * - * @return null + * @param b a {@code JButton} + * @return {@code null} */ protected PropertyChangeListener createActionChangeListener(JButton b) { return null; diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/JTree.java --- a/jdk/src/share/classes/javax/swing/JTree.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/JTree.java Wed Jun 18 13:14:15 2014 -0700 @@ -986,6 +986,7 @@ * or equal to 0 the height for each row is determined by the * renderer. * + * @return the height of each row */ public int getRowHeight() { @@ -1115,6 +1116,7 @@ *

    * This is a bound property. * + * @param clickCount the number of mouse clicks to get a node expanded or closed * @since 1.3 * @beaninfo * bound: true @@ -1508,6 +1510,7 @@ * is provided as an entry point for subclassers to add filtered * editing without having to resort to creating a new editor. * + * @param path a {@code TreePath} identifying a node * @return true if every parent node and the node itself is editable * @see #isEditable */ @@ -1984,6 +1987,8 @@ /** * Returns true if the node identified by the path has ever been * expanded. + * + * @param path a {@code TreePath} identifying a node * @return true if the path has ever been expanded */ public boolean hasBeenExpanded(TreePath path) { @@ -2079,6 +2084,7 @@ * which means it is either the root or all of its parents are expanded. * Otherwise, this method returns false. * + * @param path {@code TreePath} identifying a node * @return true if the node is viewable, otherwise false */ public boolean isVisible(TreePath path) { @@ -2472,6 +2478,7 @@ * set the selection model to null, which forces an empty * selection model to be used. * + * @return the model for selections * @see #setSelectionModel */ public TreeSelectionModel getSelectionModel() { @@ -2817,6 +2824,7 @@ * * @param path the TreePath indicating the node that was * expanded + * @throws ExpandVetoException if the expansion is prevented from occurring * @see EventListenerList */ public void fireTreeWillExpand(TreePath path) throws ExpandVetoException { @@ -2843,6 +2851,7 @@ * * @param path the TreePath indicating the node that was * expanded + * @throws ExpandVetoException if the collapse is prevented from occurring * @see EventListenerList */ public void fireTreeWillCollapse(TreePath path) throws ExpandVetoException { @@ -3541,6 +3550,11 @@ * path are marked EXPANDED, but path itself * is marked collapsed.

    * This will fail if a TreeWillExpandListener vetos it. + * + * @param path a {@code TreePath} identifying a node + * @param state if {@code true}, all parents of @{code path} and path are marked as expanded. + * Otherwise, all parents of {@code path} are marked EXPANDED, + * but {@code path} itself is marked collapsed. */ protected void setExpandedState(TreePath path, boolean state) { if(path != null) { @@ -3636,9 +3650,12 @@ } /** - * Returns an Enumeration of TreePaths + * Returns an {@code Enumeration} of {@code TreePaths} * that have been expanded that - * are descendants of parent. + * are descendants of {@code parent}. + * + * @param parent a path + * @return the {@code Enumeration} of {@code TreePaths} */ protected Enumeration getDescendantToggledPaths(TreePath parent) @@ -3701,6 +3718,8 @@ *

    * For more information on what expanded state means, see the * JTree description above. + * + * @return the instance of {@code TreeModelHandler} */ protected TreeModelListener createTreeModelListener() { return new TreeModelHandler(); @@ -3711,6 +3730,9 @@ * path. If includePath is true and * path is selected, it will be removed from the selection. * + * @param path a path + * @param includePath is {@code true} and {@code path} is selected, + * it will be removed from the selection. * @return true if a descendant was selected * @since 1.3 */ @@ -3891,6 +3913,9 @@ * elements are added is children, otherwise if children * is a hashtable all the key/value pairs are added in the order * Enumeration returns them. + * + * @param parent the parent node + * @param children the children */ public static void createChildren(DefaultMutableTreeNode parent, Object children) { @@ -4113,6 +4138,9 @@ TreePath leadSelectionPath; Accessible leadSelectionAccessible; + /** + * Constructs {@code AccessibleJTree} + */ public AccessibleJTree() { // Add a tree model listener for JTree TreeModel model = JTree.this.getModel(); @@ -4551,7 +4579,11 @@ private boolean isLeaf = false; /** - * Constructs an AccessibleJTreeNode + * Constructs an AccessibleJTreeNode + * + * @param t an instance of {@code JTree} + * @param p an instance of {@code TreePath} + * @param ap an instance of {@code Accessible} * @since 1.4 */ public AccessibleJTreeNode(JTree t, TreePath p, Accessible ap) { @@ -5183,6 +5215,11 @@ } } + /** + * Returns the relative location of the node + * + * @return the relative location of the node + */ protected Point getLocationInJTree() { Rectangle r = tree.getPathBounds(path); if (r != null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/ListSelectionModel.java --- a/jdk/src/share/classes/javax/swing/ListSelectionModel.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/ListSelectionModel.java Wed Jun 18 13:14:15 2014 -0700 @@ -134,18 +134,25 @@ /** * Returns the first selected index or -1 if the selection is empty. + * + * @return the first selected index or -1 if the selection is empty. */ int getMinSelectionIndex(); /** * Returns the last selected index or -1 if the selection is empty. + * + * @return the last selected index or -1 if the selection is empty. */ int getMaxSelectionIndex(); /** * Returns true if the specified index is selected. + * + * @param index an index + * @return {@code true} if the specified index is selected */ boolean isSelectedIndex(int index); @@ -158,6 +165,7 @@ * indices specially, e.g. Windows95 displays the lead index with a * dotted yellow outline. * + * @return the anchor selection index * @see #getLeadSelectionIndex * @see #setSelectionInterval * @see #addSelectionInterval @@ -168,6 +176,7 @@ /** * Set the anchor selection index. * + * @param index the anchor selection index * @see #getAnchorSelectionIndex */ void setAnchorSelectionIndex(int index); @@ -177,6 +186,7 @@ * Return the second index argument from the most recent call to * setSelectionInterval(), addSelectionInterval() or removeSelectionInterval(). * + * @return the lead selection index. * @see #getAnchorSelectionIndex * @see #setSelectionInterval * @see #addSelectionInterval @@ -186,6 +196,7 @@ /** * Set the lead selection index. * + * @param index the lead selection index * @see #getLeadSelectionIndex */ void setLeadSelectionIndex(int index); @@ -200,20 +211,30 @@ /** * Returns true if no indices are selected. + * + * @return {@code true} if no indices are selected. */ boolean isSelectionEmpty(); /** - * Insert length indices beginning before/after index. This is typically + * Insert {@code length} indices beginning before/after {@code index}. This is typically * called to sync the selection model with a corresponding change * in the data model. + * + * @param index the beginning of the interval + * @param length the length of the interval + * @param before if {@code true}, interval inserts before the {@code index}, + * otherwise, interval inserts after the {@code index} */ void insertIndexInterval(int index, int length, boolean before); /** - * Remove the indices in the interval index0,index1 (inclusive) from + * Remove the indices in the interval {@code index0,index1} (inclusive) from * the selection model. This is typically called to sync the selection * model width a corresponding change in the data model. + * + * @param index0 the beginning of the interval + * @param index1 the end of the interval */ void removeIndexInterval(int index0, int index1); @@ -272,6 +293,7 @@ * In this mode, there's no restriction on what can be selected. * * + * @param selectionMode the selection mode * @see #getSelectionMode * @throws IllegalArgumentException if the selection mode isn't * one of those allowed diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/MultiUIDefaults.java --- a/jdk/src/share/classes/javax/swing/MultiUIDefaults.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/MultiUIDefaults.java Wed Jun 18 13:14:15 2014 -0700 @@ -190,18 +190,18 @@ @Override public synchronized String toString() { - StringBuffer buf = new StringBuffer(); - buf.append("{"); + StringBuilder sb = new StringBuilder(); + sb.append("{"); Enumeration keys = keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); - buf.append(key + "=" + get(key) + ", "); + sb.append(key + "=" + get(key) + ", "); } - int length = buf.length(); + int length = sb.length(); if (length > 1) { - buf.delete(length-2, length); + sb.delete(length-2, length); } - buf.append("}"); - return buf.toString(); + sb.append("}"); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/RepaintManager.java --- a/jdk/src/share/classes/javax/swing/RepaintManager.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/RepaintManager.java Wed Jun 18 13:14:15 2014 -0700 @@ -331,6 +331,7 @@ * for the event dispatching thread that will validate the components * first isValidateRoot() ancestor. * + * @param invalidComponent a component * @see JComponent#isValidateRoot * @see #removeInvalidComponent */ @@ -374,6 +375,7 @@ /** * Remove a component from the list of invalid components. * + * @param component a component * @see #addInvalidComponent */ public synchronized void removeInvalidComponent(JComponent component) { @@ -610,9 +612,13 @@ return false; } - /** Return the current dirty region for a component. - * Return an empty rectangle if the component is not - * dirty. + /** + * Return the current dirty region for a component. + * Return an empty rectangle if the component is not + * dirty. + * + * @param aComponent a component + * @return the region */ public Rectangle getDirtyRegion(JComponent aComponent) { RepaintManager delegate = getDelegate(aComponent); @@ -632,6 +638,8 @@ /** * Mark a component completely dirty. aComponent will be * completely painted during the next paintDirtyRegions() call. + * + * @param aComponent a component */ public void markCompletelyDirty(JComponent aComponent) { RepaintManager delegate = getDelegate(aComponent); @@ -645,6 +653,8 @@ /** * Mark a component completely clean. aComponent will not * get painted during the next paintDirtyRegions() call. + * + * @param aComponent a component */ public void markCompletelyClean(JComponent aComponent) { RepaintManager delegate = getDelegate(aComponent); @@ -662,6 +672,10 @@ * painted during the next paintDirtyRegions(). If computing dirty regions is * expensive for your component, use this method and avoid computing dirty region * if it return true. + * + * @param aComponent a component + * @return {@code true} if aComponent will be completely + * painted during the next paintDirtyRegions(). */ public boolean isCompletelyDirty(JComponent aComponent) { RepaintManager delegate = getDelegate(aComponent); @@ -975,20 +989,26 @@ * @return a String representation of this object */ public synchronized String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); if(dirtyComponents != null) sb.append("" + dirtyComponents); return sb.toString(); } - /** + /** * Return the offscreen buffer that should be used as a double buffer with * the component c. * By default there is a double buffer per RepaintManager. * The buffer might be smaller than (proposedWidth,proposedHeight) * This happens when the maximum double buffer size as been set for the receiving * repaint manager. + * + * @param c the component + * @param proposedWidth the width of the buffer + * @param proposedHeight the height of the buffer + * + * @return the image */ public Image getOffscreenBuffer(Component c,int proposedWidth,int proposedHeight) { RepaintManager delegate = getDelegate(c); @@ -998,18 +1018,23 @@ return _getOffscreenBuffer(c, proposedWidth, proposedHeight); } - /** - * Return a volatile offscreen buffer that should be used as a - * double buffer with the specified component c. - * The image returned will be an instance of VolatileImage, or null - * if a VolatileImage object could not be instantiated. - * This buffer might be smaller than (proposedWidth,proposedHeight). - * This happens when the maximum double buffer size has been set for this - * repaint manager. - * - * @see java.awt.image.VolatileImage - * @since 1.4 - */ + /** + * Return a volatile offscreen buffer that should be used as a + * double buffer with the specified component c. + * The image returned will be an instance of VolatileImage, or null + * if a VolatileImage object could not be instantiated. + * This buffer might be smaller than (proposedWidth,proposedHeight). + * This happens when the maximum double buffer size has been set for this + * repaint manager. + * + * @param c the component + * @param proposedWidth the width of the buffer + * @param proposedHeight the height of the buffer + * + * @return the volatile image + * @see java.awt.image.VolatileImage + * @since 1.4 + */ public Image getVolatileOffscreenBuffer(Component c, int proposedWidth,int proposedHeight) { RepaintManager delegate = getDelegate(c); @@ -1104,7 +1129,11 @@ } - /** Set the maximum double buffer size. **/ + /** + * Set the maximum double buffer size. + * + * @param d the dimension + */ public void setDoubleBufferMaximumSize(Dimension d) { doubleBufferMaxSize = d; if (doubleBufferMaxSize == null) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/RootPaneContainer.java --- a/jdk/src/share/classes/javax/swing/RootPaneContainer.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/RootPaneContainer.java Wed Jun 18 13:14:15 2014 -0700 @@ -132,6 +132,7 @@ * Generally implemented with

          *    getRootPane().setLayeredPane(layeredPane);
    * + * @param layeredPane the layered pane * @exception java.awt.IllegalComponentStateException (a runtime * exception) if the layered pane parameter is null * @see #getLayeredPane @@ -162,6 +163,7 @@ * Generally implemented with * getRootPane().setGlassPane(glassPane); * + * @param glassPane the glass pane * @see #getGlassPane * @see JRootPane#setGlassPane */ diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/ScrollPaneLayout.java --- a/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/ScrollPaneLayout.java Wed Jun 18 13:14:15 2014 -0700 @@ -168,6 +168,8 @@ * }; * scrollpane.setLayout(mySPLayout): * + * + * @param sp an instance of the {@code JScrollPane} */ public void syncWithScrollPane(JScrollPane sp) { viewport = sp.getViewport(); @@ -1106,6 +1108,7 @@ * Returns the bounds of the border around the specified scroll pane's * viewport. * + * @param scrollpane an instance of the {@code JScrollPane} * @return the size and position of the viewport border * @deprecated As of JDK version Swing1.1 * replaced by JScrollPane.getViewportBorderBounds(). diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/SwingUtilities.java --- a/jdk/src/share/classes/javax/swing/SwingUtilities.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/SwingUtilities.java Wed Jun 18 13:14:15 2014 -0700 @@ -103,15 +103,23 @@ } /** - * Return true if a contains b + * Return {@code true} if @{code a} contains {@code b} + * + * @param a the first rectangle + * @param b the second rectangle + * + * @return {@code true} if @{code a} contains {@code b} */ - public static final boolean isRectangleContainingRectangle(Rectangle a,Rectangle b) { + public static boolean isRectangleContainingRectangle(Rectangle a,Rectangle b) { return b.x >= a.x && (b.x + b.width) <= (a.x + a.width) && b.y >= a.y && (b.y + b.height) <= (a.y + a.height); } /** - * Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent + * Return the rectangle (0,0,bounds.width,bounds.height) for the component {@code aComponent} + * + * @param aComponent a component + * @return the local bounds for the component {@code aComponent} */ public static Rectangle getLocalBounds(Component aComponent) { Rectangle b = new Rectangle(aComponent.getBounds()); @@ -165,6 +173,12 @@ * root component coordinate system. * If both source and destination are {@code null}, return aPoint * without any conversion. + * + * @param source the source component + * @param aPoint the point + * @param destination the destination component + * + * @return the converted coordinate */ public static Point convertPoint(Component source,Point aPoint,Component destination) { Point p; @@ -196,6 +210,13 @@ * root component coordinate system. * If both source and destination are {@code null}, return (x,y) * without any conversion. + * + * @param source the source component + * @param x the x-coordinate of the point + * @param y the y-coordinate of the point + * @param destination the destination component + * + * @return the converted coordinate */ public static Point convertPoint(Component source,int x, int y,Component destination) { Point point = new Point(x,y); @@ -211,6 +232,12 @@ * root component coordinate system. * If both source and destination are {@code null}, return aRectangle * without any conversion. + * + * @param source the source component + * @param aRectangle a rectangle + * @param destination the destination component + * + * @return the converted rectangle */ public static Rectangle convertRectangle(Component source,Rectangle aRectangle,Component destination) { Point point = new Point(aRectangle.x,aRectangle.y); @@ -222,6 +249,12 @@ * Convenience method for searching above comp in the * component hierarchy and returns the first object of class c it * finds. Can return {@code null}, if a class c cannot be found. + * + * @param c the class of a component + * @param comp the component + * + * @return the ancestor of the {@code comp}, + * or {@code null} if {@code c} cannot be found. */ public static Container getAncestorOfClass(Class c, Component comp) { @@ -238,6 +271,12 @@ * Convenience method for searching above comp in the * component hierarchy and returns the first object of name it * finds. Can return {@code null}, if name cannot be found. + * + * @param name the name of a component + * @param comp the component + * + * @return the ancestor of the {@code comp}, + * or {@code null} if {@code name} cannot be found. */ public static Container getAncestorNamed(String name, Component comp) { if(comp == null || name == null) @@ -260,6 +299,8 @@ * @param parent the root component to begin the search * @param x the x target location * @param y the y target location + * + * @return the deepest component */ public static Component getDeepestComponentAt(Component parent, int x, int y) { if (!parent.contains(x, y)) { @@ -297,6 +338,12 @@ * to destination if destination is non-{@code null} * use the translateMouseEvent() method to translate a mouse event from * one component to another without changing the source. + * + * @param source the source component + * @param sourceEvent the source mouse event + * @param destination the destination component + * + * @return the new mouse event */ public static MouseEvent convertMouseEvent(Component source, MouseEvent sourceEvent, @@ -456,7 +503,11 @@ } /** - * Return true if a component a descends from a component b + * Return {@code true} if a component {@code a} descends from a component {@code b} + * + * @param a the first component + * @param b the second component + * @return {@code true} if a component {@code a} descends from a component {@code b} */ public static boolean isDescendingFrom(Component a,Component b) { if(a == b) @@ -531,6 +582,12 @@ * Convenience returning an array of rect representing the regions within * rectA that do not overlap with rectB. If the * two Rects do not overlap, returns an empty array + * + * @param rectA the first rectangle + * @param rectB the second rectangle + * + * @return an array of rectangles representing the regions within {@code rectA} + * that do not overlap with {@code rectB}. */ public static Rectangle[] computeDifference(Rectangle rectA,Rectangle rectB) { if (rectB == null || !rectA.intersects(rectB) || isRectangleContainingRectangle(rectB,rectA)) { @@ -841,6 +898,21 @@ * relative to the viewR rectangle. * The JComponents orientation (LEADING/TRAILING) will also be taken * into account and translated into LEFT/RIGHT values accordingly. + * + * @param c the component + * @param fm the instance of {@code FontMetrics} + * @param text the text + * @param icon the icon + * @param verticalAlignment the vertical alignment + * @param horizontalAlignment the horizontal alignment + * @param verticalTextPosition the vertical text position + * @param horizontalTextPosition the horizontal text position + * @param viewR the available rectangle + * @param iconR the rectangle for the icon + * @param textR the rectangle for the text + * @param textIconGap the gap between text and icon + * + * @return the possibly clipped version of the compound labels string */ public static String layoutCompoundLabel(JComponent c, FontMetrics fm, @@ -910,6 +982,20 @@ * values in horizontalTextPosition (they will default to RIGHT) and in * horizontalAlignment (they will default to CENTER). * Use the other version of layoutCompoundLabel() instead. + * + * @param fm the instance of {@code FontMetrics} + * @param text the text + * @param icon the icon + * @param verticalAlignment the vertical alignment + * @param horizontalAlignment the horizontal alignment + * @param verticalTextPosition the vertical text position + * @param horizontalTextPosition the horizontal text position + * @param viewR the available rectangle + * @param iconR the rectangle for the icon + * @param textR the rectangle for the text + * @param textIconGap the gap between text and icon + * + * @return the possibly clipped version of the compound labels string */ public static String layoutCompoundLabel( FontMetrics fm, @@ -1219,6 +1305,8 @@ * A simple minded look and feel change: ask each node in the tree * to updateUI() -- that is, to initialize its UI property * with the current look and feel. + * + * @param c the component */ public static void updateComponentTreeUI(Component c) { updateComponentTreeUI0(c); @@ -1284,6 +1372,7 @@ *

    * Unlike the rest of Swing, this method can be invoked from any thread. * + * @param doRun the instance of {@code Runnable} * @see #invokeAndWait */ public static void invokeLater(Runnable doRun) { @@ -1334,6 +1423,7 @@ * As of 1.3 this method is just a cover for * java.awt.EventQueue.invokeAndWait(). * + * @param doRun the instance of {@code Runnable} * @exception InterruptedException if we're interrupted while waiting for * the event dispatching thread to finish executing * doRun.run() @@ -1374,6 +1464,7 @@ * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead * of using this method. * + * @param c the component * @return -1 of this object does not have an accessible parent. * Otherwise, the index of the child in its accessible parent. */ @@ -1386,6 +1477,8 @@ * local coordinate Point, if one exists. * Otherwise returns null. * + * @param c the component + * @param p the local coordinate * @return the Accessible at the specified location, * if it exists; otherwise null */ @@ -1431,6 +1524,7 @@ * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead * of using this method. * + * @param c the component * @return an instance of AccessibleStateSet containing the current state * set of the object * @see AccessibleState @@ -1448,6 +1542,7 @@ * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead * of using this method. * + * @param c the component * @return the number of accessible children in the object. */ public static int getAccessibleChildrenCount(Component c) { @@ -1461,6 +1556,7 @@ * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead * of using this method. * + * @param c the component * @param i zero-based index of child * @return the nth Accessible child of the object */ @@ -1502,6 +1598,8 @@ /** * If c is a JRootPane descendant return its JRootPane ancestor. * If c is a RootPaneContainer then return its JRootPane. + * + * @param c the component * @return the JRootPane for Component c or {@code null}. */ public static JRootPane getRootPane(Component c) { @@ -1519,6 +1617,8 @@ /** * Returns the root component for the current component tree. + * + * @param c the component * @return the first ancestor of c that's a Window or the last Applet ancestor */ public static Component getRoot(Component c) { @@ -1616,6 +1716,14 @@ * This will return true if action is non-{@code null} and * actionPerformed is invoked on it. * + * @param action an action + * @param ks a key stroke + * @param event a key event + * @param sender a sender + * @param modifiers action modifiers + * @return {@code true} if {@code action} is non-{@code null} and + * actionPerformed is invoked on it. + * * @since 1.3 */ public static boolean notifyAction(Action action, KeyStroke ks, @@ -1672,6 +1780,9 @@ * to uiInputMap. If uiInputMap is {@code null}, * this removes any previously installed UI InputMap. * + * @param component a component + * @param type a type + * @param uiInputMap an {@code InputMap} * @since 1.3 */ public static void replaceUIInputMap(JComponent component, int type, @@ -1694,6 +1805,8 @@ * to uiActionMap. If uiActionMap is {@code null}, * this removes any previously installed UI ActionMap. * + * @param component a component + * @param uiActionMap an {@code ActionMap} * @since 1.3 */ public static void replaceUIActionMap(JComponent component, @@ -1714,9 +1827,14 @@ /** * Returns the InputMap provided by the UI for condition * condition in component component. - *

    This will return {@code null} if the UI has not installed a InputMap + *

    This will return {@code null} if the UI has not installed an InputMap * of the specified type. * + * @param component a component + * @param condition a condition + * @return the {@code ActionMap} provided by the UI for {@code condition} + * in the component, or {@code null} if the UI has not installed + * an InputMap of the specified type. * @since 1.3 */ public static InputMap getUIInputMap(JComponent component, int condition) { @@ -1736,6 +1854,9 @@ * in component component. *

    This will return {@code null} if the UI has not installed an ActionMap. * + * @param component a component + * @return the {@code ActionMap} provided by the UI in the component, + * or {@code null} if the UI has not installed an ActionMap. * @since 1.3 */ public static ActionMap getUIActionMap(JComponent component) { diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/event/TreeModelEvent.java --- a/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/event/TreeModelEvent.java Wed Jun 18 13:14:15 2014 -0700 @@ -292,24 +292,24 @@ * @return a String representation of this object */ public String toString() { - StringBuffer retBuffer = new StringBuffer(); + StringBuilder sb = new StringBuilder(); - retBuffer.append(getClass().getName() + " " + - Integer.toString(hashCode())); + sb.append(getClass().getName() + " " + + Integer.toString(hashCode())); if(path != null) - retBuffer.append(" path " + path); + sb.append(" path " + path); if(childIndices != null) { - retBuffer.append(" indices [ "); + sb.append(" indices [ "); for(int counter = 0; counter < childIndices.length; counter++) - retBuffer.append(Integer.toString(childIndices[counter])+ " "); - retBuffer.append("]"); + sb.append(Integer.toString(childIndices[counter])+ " "); + sb.append("]"); } if(children != null) { - retBuffer.append(" children [ "); + sb.append(" children [ "); for(int counter = 0; counter < children.length; counter++) - retBuffer.append(children[counter] + " "); - retBuffer.append("]"); + sb.append(children[counter] + " "); + sb.append("]"); } - return retBuffer.toString(); + return sb.toString(); } } diff -r aade36e70da0 -r e2bf17cee34b jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java Wed Jun 11 10:53:27 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java Wed Jun 18 13:14:15 2014 -0700 @@ -1322,8 +1322,8 @@ return null; } - StringBuffer plainBuf = new StringBuffer(); - StringBuffer htmlBuf = new StringBuffer(); + StringBuilder plainBuf = new StringBuilder(); + StringBuilder htmlBuf = new StringBuilder(); htmlBuf.append("\n\n