--- a/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
711eb4aa87de68de78250e0549980936bab53d54 jdk8-b98
2d3875b0d18b3ad1c2bebf385a697e309e4005a4 jdk8-b99
3d34036aae4ea90b2ca59712d5a69db3221f0875 jdk8-b100
+edb01c460d4cab21ff0ff13512df7b746efaa0e7 jdk8-b101
--- a/.hgtags-top-repo Mon Aug 12 09:03:51 2013 -0400
+++ b/.hgtags-top-repo Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
0d0c983a817bbe8518a5ff201306334a8de267f2 jdk8-b98
59dc9da813794c924a0383c2a6241af94defdfed jdk8-b99
d2dcb110e9dbaf9903c05b211df800e78e4b394e jdk8-b100
+9f74a220677dc265a724515d8e2617548cef62f1 jdk8-b101
--- a/corba/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/corba/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
3370fb6146e47a6cc05a213fc213e12fc0a38d07 jdk8-b98
3f67804ab61303782df57e54989ef5e0e4629beb jdk8-b99
8d492f1dfd1b131a4c7886ee6b59528609f7e4fe jdk8-b100
+a013024b07475782f1fa8e196e950b34b4077663 jdk8-b101
--- a/hotspot/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -363,3 +363,5 @@
9f71e36a471ae4a668e08827d33035963ed10c08 hs25-b42
5787fac72e760c6a5fd9efa113b0c75caf554136 jdk8-b100
46487ba40ff225654d0c51787ed3839bafcbd9f3 hs25-b43
+f6921c876db192bba389cec062855a66372da01c jdk8-b101
+530fe88b3b2c710f42810b3580d86a0d83ad6c1c hs25-b44
--- a/hotspot/make/bsd/makefiles/minimal1.make Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/make/bsd/makefiles/minimal1.make Mon Aug 12 09:29:06 2013 -0400
@@ -24,16 +24,20 @@
TYPE=MINIMAL1
-INCLUDE_JVMTI ?= false
-INCLUDE_FPROF ?= false
-INCLUDE_VM_STRUCTS ?= false
-INCLUDE_JNI_CHECK ?= false
-INCLUDE_SERVICES ?= false
-INCLUDE_MANAGEMENT ?= false
-INCLUDE_ALL_GCS ?= false
-INCLUDE_NMT ?= false
-INCLUDE_TRACE ?= false
-INCLUDE_CDS ?= false
+# Force all variables to false, overriding any other
+# setting that may have occurred in the makefiles. These
+# can still be overridden by passing the variable as an
+# argument to 'make'
+INCLUDE_JVMTI := false
+INCLUDE_FPROF := false
+INCLUDE_VM_STRUCTS := false
+INCLUDE_JNI_CHECK := false
+INCLUDE_SERVICES := false
+INCLUDE_MANAGEMENT := false
+INCLUDE_ALL_GCS := false
+INCLUDE_NMT := false
+INCLUDE_TRACE := false
+INCLUDE_CDS := false
CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
--- a/hotspot/make/hotspot_version Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/make/hotspot_version Mon Aug 12 09:29:06 2013 -0400
@@ -35,7 +35,7 @@
HS_MAJOR_VER=25
HS_MINOR_VER=0
-HS_BUILD_NUMBER=43
+HS_BUILD_NUMBER=44
JDK_MAJOR_VER=1
JDK_MINOR_VER=8
--- a/hotspot/make/linux/makefiles/minimal1.make Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/make/linux/makefiles/minimal1.make Mon Aug 12 09:29:06 2013 -0400
@@ -24,16 +24,20 @@
TYPE=MINIMAL1
-INCLUDE_JVMTI ?= false
-INCLUDE_FPROF ?= false
-INCLUDE_VM_STRUCTS ?= false
-INCLUDE_JNI_CHECK ?= false
-INCLUDE_SERVICES ?= false
-INCLUDE_MANAGEMENT ?= false
-INCLUDE_ALL_GCS ?= false
-INCLUDE_NMT ?= false
-INCLUDE_TRACE ?= false
-INCLUDE_CDS ?= false
+# Force all variables to false, overriding any other
+# setting that may have occurred in the makefiles. These
+# can still be overridden by passing the variable as an
+# argument to 'make'
+INCLUDE_JVMTI := false
+INCLUDE_FPROF := false
+INCLUDE_VM_STRUCTS := false
+INCLUDE_JNI_CHECK := false
+INCLUDE_SERVICES := false
+INCLUDE_MANAGEMENT := false
+INCLUDE_ALL_GCS := false
+INCLUDE_NMT := false
+INCLUDE_TRACE := false
+INCLUDE_CDS := false
CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
--- a/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/cpu/sparc/vm/c2_globals_sparc.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -42,7 +42,7 @@
#else
define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP
-define_pd_global(bool, TieredCompilation, false);
+define_pd_global(bool, TieredCompilation, trueInTiered);
define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 140000);
--- a/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -44,7 +44,7 @@
#else
define_pd_global(bool, ProfileInterpreter, true);
#endif // CC_INTERP
-define_pd_global(bool, TieredCompilation, false);
+define_pd_global(bool, TieredCompilation, trueInTiered);
define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, BackEdgeThreshold, 100000);
--- a/hotspot/src/share/vm/ci/ciReplay.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/ci/ciReplay.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -299,7 +299,7 @@
Symbol* method_signature = parse_symbol(CHECK_NULL);
Method* m = k->find_method(method_name, method_signature);
if (m == NULL) {
- report_error("can't find method");
+ report_error("Can't find method");
}
return m;
}
@@ -398,8 +398,8 @@
// compile <klass> <name> <signature> <entry_bci> <comp_level>
void process_compile(TRAPS) {
- // methodHandle method;
Method* method = parse_method(CHECK);
+ if (had_error()) return;
int entry_bci = parse_int("entry_bci");
const char* comp_level_label = "comp_level";
int comp_level = parse_int(comp_level_label);
@@ -440,6 +440,7 @@
//
void process_ciMethod(TRAPS) {
Method* method = parse_method(CHECK);
+ if (had_error()) return;
ciMethodRecord* rec = new_ciMethod(method);
rec->invocation_counter = parse_int("invocation_counter");
rec->backedge_counter = parse_int("backedge_counter");
@@ -451,6 +452,7 @@
// ciMethodData <klass> <name> <signature> <state> <current mileage> orig <length> # # ... data <length> # # ... oops <length>
void process_ciMethodData(TRAPS) {
Method* method = parse_method(CHECK);
+ if (had_error()) return;
/* jsut copied from Method, to build interpret data*/
if (InstanceRefKlass::owns_pending_list_lock((JavaThread*)THREAD)) {
return;
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -122,6 +122,22 @@
}
};
+class Par_MarkRefsIntoClosure: public CMSOopsInGenClosure {
+ private:
+ const MemRegion _span;
+ CMSBitMap* _bitMap;
+ protected:
+ DO_OOP_WORK_DEFN
+ public:
+ Par_MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
+ virtual void do_oop(oop* p);
+ virtual void do_oop(narrowOop* p);
+
+ Prefetch::style prefetch_style() {
+ return Prefetch::do_read;
+ }
+};
+
// A variant of the above used in certain kinds of CMS
// marking verification.
class MarkRefsIntoVerifyClosure: public CMSOopsInGenClosure {
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -569,6 +569,7 @@
_restart_addr(NULL),
_overflow_list(NULL),
_stats(cmsGen),
+ _eden_chunk_lock(new Mutex(Mutex::leaf + 1, "CMS_eden_chunk_lock", true)),
_eden_chunk_array(NULL), // may be set in ctor body
_eden_chunk_capacity(0), // -- ditto --
_eden_chunk_index(0), // -- ditto --
@@ -732,7 +733,7 @@
assert(_eden_chunk_array != NULL || _eden_chunk_capacity == 0, "Error");
// Support for parallelizing survivor space rescan
- if (CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) {
+ if ((CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) || CMSParallelInitialMarkEnabled) {
const size_t max_plab_samples =
((DefNewGeneration*)_young_gen)->max_survivor_size()/MinTLABSize;
@@ -2137,6 +2138,39 @@
}
+void CMSCollector::print_eden_and_survivor_chunk_arrays() {
+ DefNewGeneration* dng = _young_gen->as_DefNewGeneration();
+ EdenSpace* eden_space = dng->eden();
+ ContiguousSpace* from_space = dng->from();
+ ContiguousSpace* to_space = dng->to();
+ // Eden
+ if (_eden_chunk_array != NULL) {
+ gclog_or_tty->print_cr("eden " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")",
+ eden_space->bottom(), eden_space->top(),
+ eden_space->end(), eden_space->capacity());
+ gclog_or_tty->print_cr("_eden_chunk_index=" SIZE_FORMAT ", "
+ "_eden_chunk_capacity=" SIZE_FORMAT,
+ _eden_chunk_index, _eden_chunk_capacity);
+ for (size_t i = 0; i < _eden_chunk_index; i++) {
+ gclog_or_tty->print_cr("_eden_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT,
+ i, _eden_chunk_array[i]);
+ }
+ }
+ // Survivor
+ if (_survivor_chunk_array != NULL) {
+ gclog_or_tty->print_cr("survivor " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")",
+ from_space->bottom(), from_space->top(),
+ from_space->end(), from_space->capacity());
+ gclog_or_tty->print_cr("_survivor_chunk_index=" SIZE_FORMAT ", "
+ "_survivor_chunk_capacity=" SIZE_FORMAT,
+ _survivor_chunk_index, _survivor_chunk_capacity);
+ for (size_t i = 0; i < _survivor_chunk_index; i++) {
+ gclog_or_tty->print_cr("_survivor_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT,
+ i, _survivor_chunk_array[i]);
+ }
+ }
+}
+
void CMSCollector::getFreelistLocks() const {
// Get locks for all free lists in all generations that this
// collector is responsible for
@@ -3549,6 +3583,31 @@
// CMS work
+// The common parts of CMSParInitialMarkTask and CMSParRemarkTask.
+class CMSParMarkTask : public AbstractGangTask {
+ protected:
+ CMSCollector* _collector;
+ int _n_workers;
+ CMSParMarkTask(const char* name, CMSCollector* collector, int n_workers) :
+ AbstractGangTask(name),
+ _collector(collector),
+ _n_workers(n_workers) {}
+ // Work method in support of parallel rescan ... of young gen spaces
+ void do_young_space_rescan(uint worker_id, OopsInGenClosure* cl,
+ ContiguousSpace* space,
+ HeapWord** chunk_array, size_t chunk_top);
+ void work_on_young_gen_roots(uint worker_id, OopsInGenClosure* cl);
+};
+
+// Parallel initial mark task
+class CMSParInitialMarkTask: public CMSParMarkTask {
+ public:
+ CMSParInitialMarkTask(CMSCollector* collector, int n_workers) :
+ CMSParMarkTask("Scan roots and young gen for initial mark in parallel",
+ collector, n_workers) {}
+ void work(uint worker_id);
+};
+
// Checkpoint the roots into this generation from outside
// this generation. [Note this initial checkpoint need only
// be approximate -- we'll do a catch up phase subsequently.]
@@ -3646,19 +3705,42 @@
// the klasses. The claimed marks need to be cleared before marking starts.
ClassLoaderDataGraph::clear_claimed_marks();
- CMKlassClosure klass_closure(¬Older);
+ if (CMSPrintEdenSurvivorChunks) {
+ print_eden_and_survivor_chunk_arrays();
+ }
+
{
COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;)
- gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
- gch->gen_process_strong_roots(_cmsGen->level(),
- true, // younger gens are roots
- true, // activate StrongRootsScope
- false, // not scavenging
- SharedHeap::ScanningOption(roots_scanning_options()),
- ¬Older,
- true, // walk all of code cache if (so & SO_CodeCache)
- NULL,
- &klass_closure);
+ if (CMSParallelInitialMarkEnabled && CollectedHeap::use_parallel_gc_threads()) {
+ // The parallel version.
+ FlexibleWorkGang* workers = gch->workers();
+ assert(workers != NULL, "Need parallel worker threads.");
+ int n_workers = workers->active_workers();
+ CMSParInitialMarkTask tsk(this, n_workers);
+ gch->set_par_threads(n_workers);
+ initialize_sequential_subtasks_for_young_gen_rescan(n_workers);
+ if (n_workers > 1) {
+ GenCollectedHeap::StrongRootsScope srs(gch);
+ workers->run_task(&tsk);
+ } else {
+ GenCollectedHeap::StrongRootsScope srs(gch);
+ tsk.work(0);
+ }
+ gch->set_par_threads(0);
+ } else {
+ // The serial version.
+ CMKlassClosure klass_closure(¬Older);
+ gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
+ gch->gen_process_strong_roots(_cmsGen->level(),
+ true, // younger gens are roots
+ true, // activate StrongRootsScope
+ false, // not scavenging
+ SharedHeap::ScanningOption(roots_scanning_options()),
+ ¬Older,
+ true, // walk all of code cache if (so & SO_CodeCache)
+ NULL,
+ &klass_closure);
+ }
}
// Clear mod-union table; it will be dirtied in the prologue of
@@ -4417,7 +4499,9 @@
verify_overflow_empty();
_abort_preclean = false;
if (CMSPrecleaningEnabled) {
- _eden_chunk_index = 0;
+ if (!CMSEdenChunksRecordAlways) {
+ _eden_chunk_index = 0;
+ }
size_t used = get_eden_used();
size_t capacity = get_eden_capacity();
// Don't start sampling unless we will get sufficiently
@@ -4526,7 +4610,9 @@
if (!_start_sampling) {
return;
}
- if (_eden_chunk_array) {
+ // When CMSEdenChunksRecordAlways is true, the eden chunk array
+ // is populated by the young generation.
+ if (_eden_chunk_array != NULL && !CMSEdenChunksRecordAlways) {
if (_eden_chunk_index < _eden_chunk_capacity) {
_eden_chunk_array[_eden_chunk_index] = *_top_addr; // take sample
assert(_eden_chunk_array[_eden_chunk_index] <= *_end_addr,
@@ -5010,6 +5096,10 @@
// Update the saved marks which may affect the root scans.
gch->save_marks();
+ if (CMSPrintEdenSurvivorChunks) {
+ print_eden_and_survivor_chunk_arrays();
+ }
+
{
COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact;)
@@ -5116,10 +5206,53 @@
}
}
+void CMSParInitialMarkTask::work(uint worker_id) {
+ elapsedTimer _timer;
+ ResourceMark rm;
+ HandleMark hm;
+
+ // ---------- scan from roots --------------
+ _timer.start();
+ GenCollectedHeap* gch = GenCollectedHeap::heap();
+ Par_MarkRefsIntoClosure par_mri_cl(_collector->_span, &(_collector->_markBitMap));
+ CMKlassClosure klass_closure(&par_mri_cl);
+
+ // ---------- young gen roots --------------
+ {
+ work_on_young_gen_roots(worker_id, &par_mri_cl);
+ _timer.stop();
+ if (PrintCMSStatistics != 0) {
+ gclog_or_tty->print_cr(
+ "Finished young gen initial mark scan work in %dth thread: %3.3f sec",
+ worker_id, _timer.seconds());
+ }
+ }
+
+ // ---------- remaining roots --------------
+ _timer.reset();
+ _timer.start();
+ gch->gen_process_strong_roots(_collector->_cmsGen->level(),
+ false, // yg was scanned above
+ false, // this is parallel code
+ false, // not scavenging
+ SharedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
+ &par_mri_cl,
+ true, // walk all of code cache if (so & SO_CodeCache)
+ NULL,
+ &klass_closure);
+ assert(_collector->should_unload_classes()
+ || (_collector->CMSCollector::roots_scanning_options() & SharedHeap::SO_CodeCache),
+ "if we didn't scan the code cache, we have to be ready to drop nmethods with expired weak oops");
+ _timer.stop();
+ if (PrintCMSStatistics != 0) {
+ gclog_or_tty->print_cr(
+ "Finished remaining root initial mark scan work in %dth thread: %3.3f sec",
+ worker_id, _timer.seconds());
+ }
+}
+
// Parallel remark task
-class CMSParRemarkTask: public AbstractGangTask {
- CMSCollector* _collector;
- int _n_workers;
+class CMSParRemarkTask: public CMSParMarkTask {
CompactibleFreeListSpace* _cms_space;
// The per-thread work queues, available here for stealing.
@@ -5133,10 +5266,9 @@
CompactibleFreeListSpace* cms_space,
int n_workers, FlexibleWorkGang* workers,
OopTaskQueueSet* task_queues):
- AbstractGangTask("Rescan roots and grey objects in parallel"),
- _collector(collector),
+ CMSParMarkTask("Rescan roots and grey objects in parallel",
+ collector, n_workers),
_cms_space(cms_space),
- _n_workers(n_workers),
_task_queues(task_queues),
_term(n_workers, task_queues) { }
@@ -5150,11 +5282,6 @@
void work(uint worker_id);
private:
- // Work method in support of parallel rescan ... of young gen spaces
- void do_young_space_rescan(int i, Par_MarkRefsIntoAndScanClosure* cl,
- ContiguousSpace* space,
- HeapWord** chunk_array, size_t chunk_top);
-
// ... of dirty cards in old space
void do_dirty_card_rescan_tasks(CompactibleFreeListSpace* sp, int i,
Par_MarkRefsIntoAndScanClosure* cl);
@@ -5186,6 +5313,25 @@
}
};
+void CMSParMarkTask::work_on_young_gen_roots(uint worker_id, OopsInGenClosure* cl) {
+ DefNewGeneration* dng = _collector->_young_gen->as_DefNewGeneration();
+ EdenSpace* eden_space = dng->eden();
+ ContiguousSpace* from_space = dng->from();
+ ContiguousSpace* to_space = dng->to();
+
+ HeapWord** eca = _collector->_eden_chunk_array;
+ size_t ect = _collector->_eden_chunk_index;
+ HeapWord** sca = _collector->_survivor_chunk_array;
+ size_t sct = _collector->_survivor_chunk_index;
+
+ assert(ect <= _collector->_eden_chunk_capacity, "out of bounds");
+ assert(sct <= _collector->_survivor_chunk_capacity, "out of bounds");
+
+ do_young_space_rescan(worker_id, cl, to_space, NULL, 0);
+ do_young_space_rescan(worker_id, cl, from_space, sca, sct);
+ do_young_space_rescan(worker_id, cl, eden_space, eca, ect);
+}
+
// work_queue(i) is passed to the closure
// Par_MarkRefsIntoAndScanClosure. The "i" parameter
// also is passed to do_dirty_card_rescan_tasks() and to
@@ -5210,23 +5356,7 @@
// work first.
// ---------- young gen roots --------------
{
- DefNewGeneration* dng = _collector->_young_gen->as_DefNewGeneration();
- EdenSpace* eden_space = dng->eden();
- ContiguousSpace* from_space = dng->from();
- ContiguousSpace* to_space = dng->to();
-
- HeapWord** eca = _collector->_eden_chunk_array;
- size_t ect = _collector->_eden_chunk_index;
- HeapWord** sca = _collector->_survivor_chunk_array;
- size_t sct = _collector->_survivor_chunk_index;
-
- assert(ect <= _collector->_eden_chunk_capacity, "out of bounds");
- assert(sct <= _collector->_survivor_chunk_capacity, "out of bounds");
-
- do_young_space_rescan(worker_id, &par_mrias_cl, to_space, NULL, 0);
- do_young_space_rescan(worker_id, &par_mrias_cl, from_space, sca, sct);
- do_young_space_rescan(worker_id, &par_mrias_cl, eden_space, eca, ect);
-
+ work_on_young_gen_roots(worker_id, &par_mrias_cl);
_timer.stop();
if (PrintCMSStatistics != 0) {
gclog_or_tty->print_cr(
@@ -5334,8 +5464,8 @@
// Note that parameter "i" is not used.
void
-CMSParRemarkTask::do_young_space_rescan(int i,
- Par_MarkRefsIntoAndScanClosure* cl, ContiguousSpace* space,
+CMSParMarkTask::do_young_space_rescan(uint worker_id,
+ OopsInGenClosure* cl, ContiguousSpace* space,
HeapWord** chunk_array, size_t chunk_top) {
// Until all tasks completed:
// . claim an unclaimed task
@@ -5530,6 +5660,32 @@
"Else our work is not yet done");
}
+// Record object boundaries in _eden_chunk_array by sampling the eden
+// top in the slow-path eden object allocation code path and record
+// the boundaries, if CMSEdenChunksRecordAlways is true. If
+// CMSEdenChunksRecordAlways is false, we use the other asynchronous
+// sampling in sample_eden() that activates during the part of the
+// preclean phase.
+void CMSCollector::sample_eden_chunk() {
+ if (CMSEdenChunksRecordAlways && _eden_chunk_array != NULL) {
+ if (_eden_chunk_lock->try_lock()) {
+ // Record a sample. This is the critical section. The contents
+ // of the _eden_chunk_array have to be non-decreasing in the
+ // address order.
+ _eden_chunk_array[_eden_chunk_index] = *_top_addr;
+ assert(_eden_chunk_array[_eden_chunk_index] <= *_end_addr,
+ "Unexpected state of Eden");
+ if (_eden_chunk_index == 0 ||
+ ((_eden_chunk_array[_eden_chunk_index] > _eden_chunk_array[_eden_chunk_index-1]) &&
+ (pointer_delta(_eden_chunk_array[_eden_chunk_index],
+ _eden_chunk_array[_eden_chunk_index-1]) >= CMSSamplingGrain))) {
+ _eden_chunk_index++; // commit sample
+ }
+ _eden_chunk_lock->unlock();
+ }
+ }
+}
+
// Return a thread-local PLAB recording array, as appropriate.
void* CMSCollector::get_data_recorder(int thr_num) {
if (_survivor_plab_array != NULL &&
@@ -5553,12 +5709,13 @@
// Merge the per-thread plab arrays into the global survivor chunk
// array which will provide the partitioning of the survivor space
-// for CMS rescan.
+// for CMS initial scan and rescan.
void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv,
int no_of_gc_threads) {
assert(_survivor_plab_array != NULL, "Error");
assert(_survivor_chunk_array != NULL, "Error");
- assert(_collectorState == FinalMarking, "Error");
+ assert(_collectorState == FinalMarking ||
+ (CMSParallelInitialMarkEnabled && _collectorState == InitialMarking), "Error");
for (int j = 0; j < no_of_gc_threads; j++) {
_cursor[j] = 0;
}
@@ -5621,7 +5778,7 @@
}
// Set up the space's par_seq_tasks structure for work claiming
-// for parallel rescan of young gen.
+// for parallel initial scan and rescan of young gen.
// See ParRescanTask where this is currently used.
void
CMSCollector::
@@ -6748,6 +6905,28 @@
void MarkRefsIntoClosure::do_oop(oop* p) { MarkRefsIntoClosure::do_oop_work(p); }
void MarkRefsIntoClosure::do_oop(narrowOop* p) { MarkRefsIntoClosure::do_oop_work(p); }
+Par_MarkRefsIntoClosure::Par_MarkRefsIntoClosure(
+ MemRegion span, CMSBitMap* bitMap):
+ _span(span),
+ _bitMap(bitMap)
+{
+ assert(_ref_processor == NULL, "deliberately left NULL");
+ assert(_bitMap->covers(_span), "_bitMap/_span mismatch");
+}
+
+void Par_MarkRefsIntoClosure::do_oop(oop obj) {
+ // if p points into _span, then mark corresponding bit in _markBitMap
+ assert(obj->is_oop(), "expected an oop");
+ HeapWord* addr = (HeapWord*)obj;
+ if (_span.contains(addr)) {
+ // this should be made more efficient
+ _bitMap->par_mark(addr);
+ }
+}
+
+void Par_MarkRefsIntoClosure::do_oop(oop* p) { Par_MarkRefsIntoClosure::do_oop_work(p); }
+void Par_MarkRefsIntoClosure::do_oop(narrowOop* p) { Par_MarkRefsIntoClosure::do_oop_work(p); }
+
// A variant of the above, used for CMS marking verification.
MarkRefsIntoVerifyClosure::MarkRefsIntoVerifyClosure(
MemRegion span, CMSBitMap* verification_bm, CMSBitMap* cms_bm):
@@ -9305,7 +9484,6 @@
return;
}
}
-
// Transfer some number of overflown objects to usual marking
// stack. Return true if some objects were transferred.
bool MarkRefsIntoAndScanClosure::take_from_overflow_list() {
@@ -9377,4 +9555,3 @@
ShouldNotReachHere();
}
}
-
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -515,6 +515,8 @@
friend class ConcurrentMarkSweepThread;
friend class ConcurrentMarkSweepGeneration;
friend class CompactibleFreeListSpace;
+ friend class CMSParMarkTask;
+ friend class CMSParInitialMarkTask;
friend class CMSParRemarkTask;
friend class CMSConcMarkingTask;
friend class CMSRefProcTaskProxy;
@@ -749,6 +751,7 @@
Generation* _young_gen; // the younger gen
HeapWord** _top_addr; // ... Top of Eden
HeapWord** _end_addr; // ... End of Eden
+ Mutex* _eden_chunk_lock;
HeapWord** _eden_chunk_array; // ... Eden partitioning array
size_t _eden_chunk_index; // ... top (exclusive) of array
size_t _eden_chunk_capacity; // ... max entries in array
@@ -950,6 +953,7 @@
// Support for parallel remark of survivor space
void* get_data_recorder(int thr_num);
+ void sample_eden_chunk();
CMSBitMap* markBitMap() { return &_markBitMap; }
void directAllocated(HeapWord* start, size_t size);
@@ -1027,6 +1031,8 @@
// Initialization errors
bool completed_initialization() { return _completed_initialization; }
+
+ void print_eden_and_survivor_chunk_arrays();
};
class CMSExpansionCause : public AllStatic {
@@ -1317,6 +1323,10 @@
//Delegate to collector
return collector()->get_data_recorder(thr_num);
}
+ void sample_eden_chunk() {
+ //Delegate to collector
+ return collector()->sample_eden_chunk();
+ }
// Printing
const char* name() const;
--- a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -96,11 +96,6 @@
"the buffer will be enqueued for processing. A value of 0 " \
"specifies that mutator threads should not do such filtering.") \
\
- develop(intx, G1ExtraRegionSurvRate, 33, \
- "If the young survival rate is S, and there's room left in " \
- "to-space, we will allow regions whose survival rate is up to " \
- "S + (1 - S)*X, where X is this parameter (as a fraction.)") \
- \
develop(bool, G1SATBPrintStubs, false, \
"If true, print generated stubs for the SATB barrier") \
\
@@ -110,9 +105,6 @@
develop(bool, G1RSBarrierRegionFilter, true, \
"If true, generate region filtering code in RS barrier") \
\
- develop(bool, G1RSBarrierNullFilter, true, \
- "If true, generate null-pointer filtering code in RS barrier") \
- \
develop(bool, G1DeferredRSUpdate, true, \
"If true, use deferred RS updates") \
\
@@ -120,9 +112,6 @@
"If true, verify that no dirty cards remain after RS log " \
"processing.") \
\
- develop(bool, G1RSCountHisto, false, \
- "If true, print a histogram of RS occupancies after each pause") \
- \
diagnostic(bool, G1PrintRegionLivenessInfo, false, \
"Prints the liveness information for all regions in the heap " \
"at the end of a marking cycle.") \
@@ -169,9 +158,6 @@
product(uintx, G1ConcRSHotCardLimit, 4, \
"The threshold that defines (>=) a hot card.") \
\
- develop(bool, G1PrintOopAppls, false, \
- "When true, print applications of closures to external locs.") \
- \
develop(intx, G1RSetRegionEntriesBase, 256, \
"Max number of regions in a fine-grain table per MB.") \
\
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -314,6 +314,11 @@
region_size = MAX_REGION_SIZE;
}
+ if (region_size != G1HeapRegionSize) {
+ // Update the flag to make sure that PrintFlagsFinal logs the correct value
+ FLAG_SET_ERGO(uintx, G1HeapRegionSize, region_size);
+ }
+
// And recalculate the log.
region_size_log = log2_long((jlong) region_size);
--- a/hotspot/src/share/vm/memory/defNewGeneration.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/memory/defNewGeneration.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -1033,6 +1033,9 @@
// have to use it here, as well.
HeapWord* result = eden()->par_allocate(word_size);
if (result != NULL) {
+ if (CMSEdenChunksRecordAlways && _next_gen != NULL) {
+ _next_gen->sample_eden_chunk();
+ }
return result;
}
do {
@@ -1063,13 +1066,19 @@
// circular dependency at compile time.
if (result == NULL) {
result = allocate_from_space(word_size);
+ } else if (CMSEdenChunksRecordAlways && _next_gen != NULL) {
+ _next_gen->sample_eden_chunk();
}
return result;
}
HeapWord* DefNewGeneration::par_allocate(size_t word_size,
bool is_tlab) {
- return eden()->par_allocate(word_size);
+ HeapWord* res = eden()->par_allocate(word_size);
+ if (CMSEdenChunksRecordAlways && _next_gen != NULL) {
+ _next_gen->sample_eden_chunk();
+ }
+ return res;
}
void DefNewGeneration::gc_prologue(bool full) {
--- a/hotspot/src/share/vm/memory/generation.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/memory/generation.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -455,6 +455,7 @@
// expected to be GC worker thread-local, with the worker index
// indicated by "thr_num".
virtual void* get_data_recorder(int thr_num) { return NULL; }
+ virtual void sample_eden_chunk() {}
// Some generations may require some cleanup actions before allowing
// a verification.
--- a/hotspot/src/share/vm/memory/metaspace.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/memory/metaspace.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -2254,10 +2254,11 @@
void SpaceManager::deallocate(MetaWord* p, size_t word_size) {
assert_lock_strong(_lock);
+ size_t raw_word_size = get_raw_word_size(word_size);
size_t min_size = TreeChunk<Metablock, FreeList>::min_size();
- assert(word_size >= min_size,
+ assert(raw_word_size >= min_size,
err_msg("Should not deallocate dark matter " SIZE_FORMAT, word_size));
- block_freelists()->return_block(p, word_size);
+ block_freelists()->return_block(p, raw_word_size);
}
// Adds a chunk to the list of chunks in use.
--- a/hotspot/src/share/vm/memory/sharedHeap.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/memory/sharedHeap.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -65,7 +65,8 @@
}
_sh = this; // ch is static, should be set only once.
if ((UseParNewGC ||
- (UseConcMarkSweepGC && CMSParallelRemarkEnabled) ||
+ (UseConcMarkSweepGC && (CMSParallelInitialMarkEnabled ||
+ CMSParallelRemarkEnabled)) ||
UseG1GC) &&
ParallelGCThreads > 0) {
_workers = new FlexibleWorkGang("Parallel GC Threads", ParallelGCThreads,
--- a/hotspot/src/share/vm/runtime/arguments.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -1891,6 +1891,10 @@
warning("Using MaxGCMinorPauseMillis as minor pause goal is deprecated"
"and will likely be removed in future release");
}
+ if (FLAG_IS_CMDLINE(DefaultMaxRAMFraction)) {
+ warning("DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. "
+ "Use MaxRAMFraction instead.");
+ }
}
// Check stack pages settings
--- a/hotspot/src/share/vm/runtime/globals.hpp Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp Mon Aug 12 09:29:06 2013 -0400
@@ -1689,6 +1689,9 @@
product(bool, CMSAbortSemantics, false, \
"Whether abort-on-overflow semantics is implemented") \
\
+ product(bool, CMSParallelInitialMarkEnabled, true, \
+ "Use the parallel initial mark.") \
+ \
product(bool, CMSParallelRemarkEnabled, true, \
"Whether parallel remark enabled (only if ParNewGC)") \
\
@@ -1700,6 +1703,14 @@
"Whether to always record survivor space PLAB bdries" \
" (effective only if CMSParallelSurvivorRemarkEnabled)") \
\
+ product(bool, CMSEdenChunksRecordAlways, true, \
+ "Whether to always record eden chunks used for " \
+ "the parallel initial mark or remark of eden" ) \
+ \
+ product(bool, CMSPrintEdenSurvivorChunks, false, \
+ "Print the eden and the survivor chunks used for the parallel " \
+ "initial mark or remark of the eden/survivor spaces") \
+ \
product(bool, CMSConcurrentMTEnabled, true, \
"Whether multi-threaded concurrent work enabled (if ParNewGC)") \
\
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/gc/arguments/TestG1HeapRegionSize.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,64 @@
+/*
+* 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.
+*/
+
+/*
+ * @test TestG1HeapRegionSize
+ * @key gc
+ * @bug 8021879
+ * @summary Verify that the flag G1HeapRegionSize is updated properly
+ * @run main/othervm -Xmx64m TestG1HeapRegionSize 1048576
+ * @run main/othervm -XX:G1HeapRegionSize=2m -Xmx64m TestG1HeapRegionSize 2097152
+ * @run main/othervm -XX:G1HeapRegionSize=3m -Xmx64m TestG1HeapRegionSize 2097152
+ * @run main/othervm -XX:G1HeapRegionSize=64m -Xmx256m TestG1HeapRegionSize 33554432
+ */
+
+import sun.management.ManagementFactoryHelper;
+import com.sun.management.HotSpotDiagnosticMXBean;
+import com.sun.management.VMOption;
+
+public class TestG1HeapRegionSize {
+
+ public static void main(String[] args) {
+ HotSpotDiagnosticMXBean diagnostic = ManagementFactoryHelper.getDiagnosticMXBean();
+
+ VMOption option = diagnostic.getVMOption("UseG1GC");
+ if (option.getValue().equals("false")) {
+ System.out.println("Skipping this test. It is only a G1 test.");
+ return;
+ }
+
+ String expectedValue = getExpectedValue(args);
+ option = diagnostic.getVMOption("G1HeapRegionSize");
+ if (!expectedValue.equals(option.getValue())) {
+ throw new RuntimeException("Wrong value for G1HeapRegionSize. Expected " + expectedValue + " but got " + option.getValue());
+ }
+ }
+
+ private static String getExpectedValue(String[] args) {
+ if (args.length != 1) {
+ throw new RuntimeException("Wrong number of arguments. Expected 1 but got " + args.length);
+ }
+ return args[0];
+ }
+
+}
--- a/hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java Mon Aug 12 09:29:06 2013 -0400
@@ -27,7 +27,7 @@
* @bug 8014240
* @summary Test output of G1PrintRegionRememberedSetInfo
* @library /testlibrary
- * @build TestPrintRegionRememberedSetInfo
+ * @run main TestPrintRegionRememberedSetInfo
* @author thomas.schatzl@oracle.com
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/gc/startup_warnings/TestDefaultMaxRAMFraction.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,44 @@
+/*
+* 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.
+*/
+
+/*
+* @test TestDefaultMaxRAMFraction
+* @key gc
+* @bug 8021967
+* @summary Test that the deprecated TestDefaultMaxRAMFraction flag print a warning message
+* @library /testlibrary
+*/
+
+import com.oracle.java.testlibrary.OutputAnalyzer;
+import com.oracle.java.testlibrary.ProcessTools;
+
+public class TestDefaultMaxRAMFraction {
+ public static void main(String[] args) throws Exception {
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:DefaultMaxRAMFraction=4", "-version");
+ OutputAnalyzer output = new OutputAnalyzer(pb.start());
+ output.shouldContain("warning: DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. Use MaxRAMFraction instead.");
+ output.shouldNotContain("error");
+ output.shouldHaveExitValue(0);
+ }
+
+}
--- a/hotspot/test/runtime/6929067/Test6929067.sh Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/test/runtime/6929067/Test6929067.sh Mon Aug 12 09:29:06 2013 -0400
@@ -3,6 +3,7 @@
##
## @test Test6929067.sh
## @bug 6929067
+## @bug 8021296
## @summary Stack guard pages should be removed when thread is detached
## @compile T.java
## @run shell Test6929067.sh
@@ -21,6 +22,11 @@
OS=`uname -s`
case "$OS" in
Linux)
+ gcc_cmd=`which gcc`
+ if [ "x$gcc_cmd" == "x" ]; then
+ echo "WARNING: gcc not found. Cannot execute test." 2>&1
+ exit 0;
+ fi
NULL=/dev/null
PS=":"
FS="/"
@@ -119,10 +125,10 @@
# Check to ensure you have a /usr/lib/libpthread.so if you don't please look
# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.
-gcc -DLINUX ${COMP_FLAG} -o invoke \
- -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
- -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
- -ljvm -lpthread invoke.c
+$gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \
+ -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
+ -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \
+ -ljvm -lpthread invoke.c
./invoke
exit $?
--- a/hotspot/test/runtime/7107135/Test7107135.sh Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/test/runtime/7107135/Test7107135.sh Mon Aug 12 09:29:06 2013 -0400
@@ -27,6 +27,7 @@
##
## @test Test7107135.sh
## @bug 7107135
+## @bug 8021296
## @summary Stack guard pages lost after loading library with executable stack.
## @run shell Test7107135.sh
##
@@ -45,6 +46,11 @@
case "$OS" in
Linux)
echo "Testing on Linux"
+ gcc_cmd=`which gcc`
+ if [ "x$gcc_cmd" == "x" ]; then
+ echo "WARNING: gcc not found. Cannot execute test." 2>&1
+ exit 0;
+ fi
;;
*)
NULL=NUL
@@ -62,7 +68,10 @@
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java
-gcc -fPIC -shared -c -o test.o -I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux ${TESTSRC}${FS}test.c
+$gcc_cmd -fPIC -shared -c -o test.o \
+ -I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
+ ${TESTSRC}${FS}test.c
+
ld -shared -z execstack -o libtest-rwx.so test.o
ld -shared -z noexecstack -o libtest-rw.so test.o
--- a/hotspot/test/runtime/jsig/Test8017498.sh Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/test/runtime/jsig/Test8017498.sh Mon Aug 12 09:29:06 2013 -0400
@@ -27,6 +27,7 @@
## @test Test8017498.sh
## @bug 8017498
## @bug 8020791
+## @bug 8021296
## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
## @run shell/timeout=30 Test8017498.sh
##
@@ -45,6 +46,11 @@
case "$OS" in
Linux)
echo "Testing on Linux"
+ gcc_cmd=`which gcc`
+ if [ "x$gcc_cmd" == "x" ]; then
+ echo "WARNING: gcc not found. Cannot execute test." 2>&1
+ exit 0;
+ fi
if [ "$VM_BITS" = "64" ]
then
MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so
@@ -64,15 +70,11 @@
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java
-gcc -DLINUX -fPIC -shared \
+$gcc_cmd -DLINUX -fPIC -shared \
-o ${TESTSRC}${FS}libTestJNI.so \
-I${TESTJAVA}${FS}include \
-I${TESTJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}TestJNI.c
-if [ $? != 0 ]
-then
- echo "WARNING: the gcc command failed." 2>&1
-fi
# run the java test in the background
cmd="LD_PRELOAD=$MY_LD_PRELOAD \
--- a/hotspot/test/runtime/jsig/TestJNI.c Mon Aug 12 09:03:51 2013 -0400
+++ b/hotspot/test/runtime/jsig/TestJNI.c Mon Aug 12 09:29:06 2013 -0400
@@ -21,7 +21,6 @@
* questions.
*/
-#define _GNU_SOURCE // for the definition of REG_RIP in ucontext.h
#include <stdio.h>
#include <jni.h>
#include <signal.h>
@@ -32,11 +31,8 @@
#endif
void sig_handler(int sig, siginfo_t *info, ucontext_t *context) {
- int thrNum;
printf( " HANDLER (1) " );
- // Move forward RIP to skip failing instruction
- context->uc_mcontext.gregs[REG_RIP] += 6;
}
JNIEXPORT void JNICALL Java_TestJNI_doSomething(JNIEnv *env, jclass klass, jint val) {
--- a/jaxp/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/jaxp/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
15e5bb51bc0cd89304dc2f7f29b4c8002e632353 jdk8-b98
adf49c3ef83c160d53ece623049b2cdccaf78fc7 jdk8-b99
5d1974c1d7b9a86431bc253dc5a6a52d4586622e jdk8-b100
+0a7432f898e579ea35e8c51e3edab37f949168e4 jdk8-b101
--- a/jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -112,7 +112,7 @@
/** Initial EntityResolver */
private final EntityResolver fInitEntityResolver;
- private XMLSecurityPropertyManager fSecurityPropertyMgr;
+ private final XMLSecurityPropertyManager fSecurityPropertyMgr;
/**
* Create a SAX parser with the associated features
@@ -130,8 +130,10 @@
SAXParserImpl(SAXParserFactoryImpl spf, Hashtable features, boolean secureProcessing)
throws SAXException
{
+ fSecurityPropertyMgr = new XMLSecurityPropertyManager();
+
// Instantiate a SAXParser directly and not through SAX so that we use the right ClassLoader
- xmlReader = new JAXPSAXParser(this);
+ xmlReader = new JAXPSAXParser(this, fSecurityPropertyMgr);
// JAXP "namespaceAware" == SAX Namespaces feature
// Note: there is a compatibility problem here with default values:
@@ -150,7 +152,6 @@
xmlReader.setFeature0(XINCLUDE_FEATURE, true);
}
- fSecurityPropertyMgr = new XMLSecurityPropertyManager();
xmlReader.setProperty0(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
// If the secure processing feature is on set a security manager.
@@ -397,14 +398,30 @@
private final HashMap fInitFeatures = new HashMap();
private final HashMap fInitProperties = new HashMap();
private final SAXParserImpl fSAXParser;
+ private XMLSecurityPropertyManager fSecurityPropertyMgr;
+
public JAXPSAXParser() {
- this(null);
+ this(null, null);
}
- JAXPSAXParser(SAXParserImpl saxParser) {
+ JAXPSAXParser(SAXParserImpl saxParser, XMLSecurityPropertyManager spm) {
super();
fSAXParser = saxParser;
+ fSecurityPropertyMgr = spm;
+
+ /**
+ * This class may be used directly. So initialize the security manager if
+ * it is null.
+ */
+ if (fSecurityPropertyMgr == null) {
+ fSecurityPropertyMgr = new XMLSecurityPropertyManager();
+ try {
+ super.setProperty(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
+ } catch (Exception ex) {
+ //shall not happen
+ }
+ }
}
/**
@@ -542,9 +559,9 @@
setSchemaValidatorProperty(name, value);
}
/** Check to see if the property is managed by the property manager **/
- int index = fSAXParser.fSecurityPropertyMgr.getIndex(name);
+ int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(name) : -1;
if (index > -1) {
- fSAXParser.fSecurityPropertyMgr.setValue(index,
+ fSecurityPropertyMgr.setValue(index,
XMLSecurityPropertyManager.State.APIPROPERTY, (String)value);
} else {
if (!fInitProperties.containsKey(name)) {
@@ -564,9 +581,9 @@
// JAXP 1.2 support
return fSAXParser.schemaLanguage;
}
- int index = fSAXParser.fSecurityPropertyMgr.getIndex(name);
+ int index = (fSecurityPropertyMgr != null) ? fSecurityPropertyMgr.getIndex(name) : -1;
if (index > -1) {
- return fSAXParser.fSecurityPropertyMgr.getValueByIndex(index);
+ return fSecurityPropertyMgr.getValueByIndex(index);
}
return super.getProperty(name);
--- a/jaxws/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/jaxws/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
b1fb4612a2caea52b5661b87509e560fa044b194 jdk8-b98
8ef83d4b23c933935e28f59b282cea920b1b1f5f jdk8-b99
4fd722afae5c02f00bbd44c3a34425ee474afb1c jdk8-b100
+60b623a361642a0f5aef5f06dad9e5f279b9d9a9 jdk8-b101
--- a/jdk/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
6a099a36589bd933957272ba63e5263bede29971 jdk8-b99
5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100
+6901612328239fbd471d20823113c1cf3fdaebee jdk8-b101
--- a/jdk/make/sun/javazic/tzdata/VERSION Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/VERSION Mon Aug 12 09:29:06 2013 -0400
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2013c
+tzdata2013d
--- a/jdk/make/sun/javazic/tzdata/africa Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/africa Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -875,12 +875,18 @@
# announced that year's Ramadan daylight-saving transitions would be
# 2012-07-20 and 2012-08-20; see
# <http://www.mmsp.gov.ma/fr/actualites.aspx?id=288>.
-#
+
+# From Andrew Paprocki (2013-07-02):
+# Morocco announced that the year's Ramadan daylight-savings
+# transitions would be 2013-07-07 and 2013-08-10; see:
+# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
+
+# From Paul Eggert (2013-07-03):
# To estimate what the Moroccan government will do in future years,
-# transition dates for 2013 through 2021 were determined by running
+# transition dates for 2014 through 2021 were determined by running
# the following program under GNU Emacs 24.3:
#
-# (let ((islamic-year 1434))
+# (let ((islamic-year 1435))
# (while (< islamic-year 1444)
# (let ((a
# (calendar-gregorian-from-absolute
@@ -933,8 +939,8 @@
Rule Morocco 2012 max - Sep lastSun 3:00 0 -
Rule Morocco 2012 only - Jul 20 3:00 0 -
Rule Morocco 2012 only - Aug 20 2:00 1:00 S
-Rule Morocco 2013 only - Jul 9 3:00 0 -
-Rule Morocco 2013 only - Aug 8 2:00 1:00 S
+Rule Morocco 2013 only - Jul 7 3:00 0 -
+Rule Morocco 2013 only - Aug 10 2:00 1:00 S
Rule Morocco 2014 only - Jun 29 3:00 0 -
Rule Morocco 2014 only - Jul 29 2:00 1:00 S
Rule Morocco 2015 only - Jun 18 3:00 0 -
--- a/jdk/make/sun/javazic/tzdata/antarctica Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/antarctica Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/asia Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/asia Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -1235,39 +1235,21 @@
Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D
Rule Zion 2012 only - Sep 23 2:00 0 S
-# From Ephraim Silverberg (2012-10-18):
-# Yesterday, the Interior Ministry Committee, after more than a year
-# past, approved sending the proposed June 2011 changes to the Time
-# Decree Law back to the Knesset for second and third (final) votes
-# before the upcoming elections on Jan. 22, 2013. Hence, although the
-# changes are not yet law, they are expected to be so before February 2013.
+# From Ephraim Silverberg (2013-06-27):
+# On June 23, 2013, the Israeli government approved changes to the
+# Time Decree Law. The next day, the changes passed the First Reading
+# in the Knesset. The law is expected to pass the Second and Third
+# (final) Readings by the beginning of September 2013.
#
-# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March.
-# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the
-# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day
-# later (i.e. at 02:00 the first Monday after October 2).
-# [Rosh Hashana holidays are factored in until 2100.]
-
-# From Ephraim Silverberg (2012-11-05):
-# The Knesset passed today (in second and final readings) the amendment to the
-# Time Decree Law making the changes ... law.
+# As of 2013, DST starts at 02:00 on the Friday before the last Sunday
+# in March. DST ends at 02:00 on the last Sunday of October.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D
-Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S
-Rule Zion 2027 only - Oct Mon>=3 2:00 0 S
-Rule Zion 2028 max - Oct Sun>=2 2:00 0 S
-# The following rules are commented out for now, as they break older
-# versions of zic that support only signed 32-bit timestamps, i.e.,
-# through 2038-01-19 03:14:07 UTC.
-#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S
-#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S
-#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S
-#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S
-#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S
+Rule Zion 2013 max - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Jerusalem 2:20:56 - LMT 1880
+Zone Asia/Jerusalem 2:20:54 - LMT 1880
2:20:40 - JMT 1918 # Jerusalem Mean Time?
2:00 Zion I%sT
@@ -2570,8 +2552,8 @@
Rule Syria 2007 only - Mar lastFri 0:00 1:00 S
# From Jesper Norgard (2007-10-27):
# The sister center ICARDA of my work CIMMYT is confirming that Syria DST will
-# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or
-# rather Midnight between Thursday and Friday. This does make more sence than
+# not take place 1st November at 0:00 o'clock but 1st November at 24:00 or
+# rather Midnight between Thursday and Friday. This does make more sense than
# having it between Wednesday and Thursday (two workdays in Syria) since the
# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
# it is implemented at midnight of the last workday before weekend...
--- a/jdk/make/sun/javazic/tzdata/australasia Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/australasia Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -253,10 +253,16 @@
# - Macquarie Island will stay on UTC+11 for winter and therefore not
# switch back from daylight savings time when other parts of Australia do
# on 4 April.
+#
+# From Arthur David Olson (2013-05-23):
+# The 1919 transition is overspecified below so pre-2013 zics
+# will produce a binary file with an EST-type as the first 32-bit type;
+# this is required for correct handling of times before 1916 by
+# pre-2013 versions of localtime.
Zone Antarctica/Macquarie 0 - zzz 1899 Nov
10:00 - EST 1916 Oct 1 2:00
10:00 1:00 EST 1917 Feb
- 10:00 Aus EST 1919 Apr
+ 10:00 Aus EST 1919 Apr 1 0:00s
0 - zzz 1948 Mar 25
10:00 Aus EST 1967
10:00 AT EST 2010 Apr 4 3:00
@@ -1498,12 +1504,12 @@
# From Paul Eggert (2000-01-08):
# IATA SSIM (1999-09) says DST ends 0100 local time. Go with McDow.
-# From the BBC World Service (1998-10-31 11:32 UTC):
+# From the BBC World Service in
+# http://news.bbc.co.uk/2/hi/asia-pacific/205226.stm (1998-10-31 16:03 UTC):
# The Fijiian government says the main reasons for the time change is to
-# improve productivity and reduce road accidents. But correspondents say it
-# also hopes the move will boost Fiji's ability to compete with other pacific
-# islands in the effort to attract tourists to witness the dawning of the new
-# millenium.
+# improve productivity and reduce road accidents.... [T]he move is also
+# intended to boost Fiji's ability to attract tourists to witness the dawning
+# of the new millennium.
# http://www.fiji.gov.fj/press/2000_09/2000_09_13-05.shtml (2000-09-13)
# reports that Fiji has discontinued DST.
@@ -1648,7 +1654,7 @@
# Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell.
# From Eric Ulevik (1999-05-03):
-# Tonga's director of tourism, who is also secretary of the National Millenium
+# Tonga's director of tourism, who is also secretary of the National Millennium
# Committee, has a plan to get Tonga back in front.
# He has proposed a one-off move to tropical daylight saving for Tonga from
# October to March, which has won approval in principle from the Tongan
--- a/jdk/make/sun/javazic/tzdata/backward Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/backward Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/etcetera Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/etcetera Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/europe Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/europe Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -546,7 +546,7 @@
# It seems that Paris, Monaco, Rule France, Rule Belgium all agree on
# 2:00 standard time, e.g. 3:00 local time. However there are no
# countries that use C-Eur rules in September 1945, so the only items
-# affected are apparently these ficticious zones that translates acronyms
+# affected are apparently these fictitious zones that translate acronyms
# CET and MET:
#
# Zone CET 1:00 C-Eur CE%sT
@@ -2802,9 +2802,9 @@
# Ukraine
#
-# From Igor Karpov, who works for the Ukranian Ministry of Justice,
+# From Igor Karpov, who works for the Ukrainian Ministry of Justice,
# via Garrett Wollman (2003-01-27):
-# BTW, I've found the official document on this matter. It's goverment
+# BTW, I've found the official document on this matter. It's government
# regulations number 509, May 13, 1996. In my poor translation it says:
# "Time in Ukraine is set to second timezone (Kiev time). Each last Sunday
# of March at 3am the time is changing to 4am and each last Sunday of
@@ -2838,7 +2838,7 @@
# time this year after all.
#
# From Udo Schwedt (2011-10-18):
-# As far as I understand, the recent change to the Ukranian time zone
+# As far as I understand, the recent change to the Ukrainian time zone
# (Europe/Kiev) to introduce permanent daylight saving time (similar
# to Russia) was reverted today:
#
--- a/jdk/make/sun/javazic/tzdata/factory Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/factory Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/iso3166.tab Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/iso3166.tab Mon Aug 12 09:29:06 2013 -0400
@@ -1,39 +1,37 @@
#
# 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.
#
-# <pre>
+# ISO 3166 alpha-2 country codes
+#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
-# ISO 3166 alpha-2 country codes
#
-# From Paul Eggert (2006-09-27):
+# From Paul Eggert (2013-05-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166-1 alpha-2 country code, current as of
-# ISO 3166-1 Newsletter VI-1 (2007-09-21). See:
-# <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
-# ISO 3166 Maintenance agency (ISO 3166/MA)
-# </a>.
+# ISO 3166-1 Newsletter VI-15 (2013-05-10). See: Updates on ISO 3166
+# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
# 2. The usual English name for the country,
# chosen so that alphabetic sorting of subsets produces helpful lists.
# This is not the same as the English name in the ISO 3166 tables.
@@ -43,8 +41,9 @@
#
# Lines beginning with `#' are comments.
#
-# From Arthur David Olson (2011-08-17):
-# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs. It is not intended
+# to take or endorse any position on legal or territorial claims.
#
#country-
#code country name
@@ -77,7 +76,7 @@
BM Bermuda
BN Brunei
BO Bolivia
-BQ Bonaire Sint Eustatius & Saba
+BQ Bonaire, St Eustatius & Saba
BR Brazil
BS Bahamas
BT Bhutan
@@ -258,7 +257,7 @@
SS South Sudan
ST Sao Tome & Principe
SV El Salvador
-SX Sint Maarten
+SX St Maarten (Dutch part)
SY Syria
SZ Swaziland
TC Turks & Caicos Is
--- a/jdk/make/sun/javazic/tzdata/leapseconds Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/leapseconds Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/northamerica Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/northamerica Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/pacificnew Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/pacificnew Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/solar87 Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/solar87 Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/solar88 Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/solar88 Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/solar89 Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/solar89 Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/southamerica Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/southamerica Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -994,7 +994,7 @@
# adopted by the same states as before.
Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S
# From Frederico A. C. Neves (2008-09-10):
-# Acording to this decree
+# According to this decree
# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm">
# http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm
# </a>
@@ -1226,7 +1226,7 @@
# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
# </a>
#
-# This is not yet reflected in the offical "cambio de hora" site, but
+# This is not yet reflected in the official "cambio de hora" site, but
# probably will be soon:
# <a href="http://www.horaoficial.cl/cambio.htm">
# http://www.horaoficial.cl/cambio.htm
--- a/jdk/make/sun/javazic/tzdata/systemv Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/systemv Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/make/sun/javazic/tzdata/zone.tab Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/sun/javazic/tzdata/zone.tab Mon Aug 12 09:29:06 2013 -0400
@@ -1,41 +1,44 @@
#
# 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.
#
-# <pre>
+# TZ zone descriptions
+#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
-# TZ zone descriptions
-#
-# From Paul Eggert (1996-08-05):
+# From Paul Eggert (2013-05-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166 2-character country code. See the file `iso3166.tab'.
+# This identifies a country that overlaps the zone. The country may
+# overlap other zones and the zone may overlap other countries.
# 2. Latitude and longitude of the zone's principal location
# in ISO 6709 sign-degrees-minutes-seconds format,
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
# first latitude (+ is north), then longitude (+ is east).
+# This location need not lie within the column-1 country.
# 3. Zone name used in value of TZ environment variable.
+# Please see the 'Theory' file for how zone names are chosen.
# 4. Comments; present if and only if the country has multiple rows.
#
# Columns are separated by a single tab.
@@ -45,6 +48,10 @@
#
# Lines beginning with `#' are comments.
#
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs. It is not intended
+# to take or endorse any position on legal or territorial claims.
+#
#country-
#code coordinates TZ comments
AD +4230+00131 Europe/Andorra
@@ -239,7 +246,7 @@
ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas)
IE +5320-00615 Europe/Dublin
-IL +3146+03514 Asia/Jerusalem
+IL +314650+0351326 Asia/Jerusalem
IM +5409-00428 Europe/Isle_of_Man
IN +2232+08822 Asia/Kolkata
IO -0720+07225 Indian/Chagos
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/CharsetMapping/IBM290.c2b Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,100 @@
+#
+# Diff of
+# b2c: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
+# c2b: cdctables.zip/Package2.zip/IBM-290.zip/012234B0.UPMAP100
+#
+# fullwidth form
+0x4B U+FF0E
+0x4C U+FF1C
+0x4D U+FF08
+0x4E U+FF0B
+0x4F U+FF5C
+0x50 U+FF06
+0x5A U+FF01
+0x5C U+FF0A
+0x5D U+FF09
+0x5E U+FF1B
+0x60 U+FF0D
+0x61 U+FF0F
+0x62 U+FF41
+0x63 U+FF42
+0x64 U+FF43
+0x65 U+FF44
+0x66 U+FF45
+0x67 U+FF46
+0x68 U+FF47
+0x69 U+FF48
+0x6B U+FF0C
+0x6C U+FF05
+0x6D U+FF3F
+0x6E U+FF1E
+0x6F U+FF1F
+0x70 U+FF3B
+0x71 U+FF49
+0x72 U+FF4A
+0x73 U+FF4B
+0x74 U+FF4C
+0x75 U+FF4D
+0x76 U+FF4E
+0x77 U+FF4F
+0x78 U+FF50
+0x79 U+FF40
+0x7A U+FF1A
+0x7B U+FF03
+0x7C U+FF20
+0x7D U+FF07
+0x7E U+FF1D
+0x7F U+FF02
+0x80 U+FF3D
+0x8B U+FF51
+0x9B U+FF52
+0xA0 U+FF5E
+0xAB U+FF53
+0xB0 U+FF3E
+0xB2 U+FF3C
+0xB3 U+FF54
+0xB4 U+FF55
+0xB5 U+FF56
+0xB6 U+FF57
+0xB7 U+FF58
+0xB8 U+FF59
+0xB9 U+FF5A
+0xC0 U+FF5B
+0xC1 U+FF21
+0xC2 U+FF22
+0xC3 U+FF23
+0xC4 U+FF24
+0xC5 U+FF25
+0xC6 U+FF26
+0xC7 U+FF27
+0xC8 U+FF28
+0xC9 U+FF29
+0xD0 U+FF5D
+0xD1 U+FF2A
+0xD2 U+FF2B
+0xD3 U+FF2C
+0xD4 U+FF2D
+0xD5 U+FF2E
+0xD6 U+FF2F
+0xD7 U+FF30
+0xD8 U+FF31
+0xD9 U+FF32
+0xE0 U+FF04
+0xE2 U+FF33
+0xE3 U+FF34
+0xE4 U+FF35
+0xE5 U+FF36
+0xE6 U+FF37
+0xE7 U+FF38
+0xE8 U+FF39
+0xE9 U+FF3A
+0xF0 U+FF10
+0xF1 U+FF11
+0xF2 U+FF12
+0xF3 U+FF13
+0xF4 U+FF14
+0xF5 U+FF15
+0xF6 U+FF16
+0xF7 U+FF17
+0xF8 U+FF18
+0xF9 U+FF19
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/CharsetMapping/IBM290.map Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,232 @@
+#
+# b2c mapping for IBM290, generated from
+# cdctables.zip/Package2.zip/IBM-290.zip/012234B0.TPMAP100
+#
+0x00 U+0000
+0x01 U+0001
+0x02 U+0002
+0x03 U+0003
+0x04 U+009C
+0x05 U+0009
+0x06 U+0086
+0x07 U+007F
+0x08 U+0097
+0x09 U+008D
+0x0A U+008E
+0x0B U+000B
+0x0C U+000C
+0x0D U+000D
+0x0E U+000E
+0x0F U+000F
+0x10 U+0010
+0x11 U+0011
+0x12 U+0012
+0x13 U+0013
+0x14 U+009D
+0x15 U+0085
+0x16 U+0008
+0x17 U+0087
+0x18 U+0018
+0x19 U+0019
+0x1A U+0092
+0x1B U+008F
+0x1C U+001C
+0x1D U+001D
+0x1E U+001E
+0x1F U+001F
+0x20 U+0080
+0x21 U+0081
+0x22 U+0082
+0x23 U+0083
+0x24 U+0084
+0x25 U+000A
+0x26 U+0017
+0x27 U+001B
+0x28 U+0088
+0x29 U+0089
+0x2A U+008A
+0x2B U+008B
+0x2C U+008C
+0x2D U+0005
+0x2E U+0006
+0x2F U+0007
+0x30 U+0090
+0x31 U+0091
+0x32 U+0016
+0x33 U+0093
+0x34 U+0094
+0x35 U+0095
+0x36 U+0096
+0x37 U+0004
+0x38 U+0098
+0x39 U+0099
+0x3A U+009A
+0x3B U+009B
+0x3C U+0014
+0x3D U+0015
+0x3E U+009E
+0x3F U+001A
+0x40 U+0020
+0x41 U+FF61
+0x42 U+FF62
+0x43 U+FF63
+0x44 U+FF64
+0x45 U+FF65
+0x46 U+FF66
+0x47 U+FF67
+0x48 U+FF68
+0x49 U+FF69
+0x4A U+00A3
+0x4B U+002E
+0x4C U+003C
+0x4D U+0028
+0x4E U+002B
+0x4F U+007C
+0x50 U+0026
+0x51 U+FF6A
+0x52 U+FF6B
+0x53 U+FF6C
+0x54 U+FF6D
+0x55 U+FF6E
+0x56 U+FF6F
+0x58 U+FF70
+0x5A U+0021
+0x5B U+00A5
+0x5C U+002A
+0x5D U+0029
+0x5E U+003B
+0x5F U+00AC
+0x60 U+002D
+0x61 U+002F
+0x62 U+0061
+0x63 U+0062
+0x64 U+0063
+0x65 U+0064
+0x66 U+0065
+0x67 U+0066
+0x68 U+0067
+0x69 U+0068
+0x6B U+002C
+0x6C U+0025
+0x6D U+005F
+0x6E U+003E
+0x6F U+003F
+0x70 U+005B
+0x71 U+0069
+0x72 U+006A
+0x73 U+006B
+0x74 U+006C
+0x75 U+006D
+0x76 U+006E
+0x77 U+006F
+0x78 U+0070
+0x79 U+0060
+0x7A U+003A
+0x7B U+0023
+0x7C U+0040
+0x7D U+0027
+0x7E U+003D
+0x7F U+0022
+0x80 U+005D
+0x81 U+FF71
+0x82 U+FF72
+0x83 U+FF73
+0x84 U+FF74
+0x85 U+FF75
+0x86 U+FF76
+0x87 U+FF77
+0x88 U+FF78
+0x89 U+FF79
+0x8A U+FF7A
+0x8B U+0071
+0x8C U+FF7B
+0x8D U+FF7C
+0x8E U+FF7D
+0x8F U+FF7E
+0x90 U+FF7F
+0x91 U+FF80
+0x92 U+FF81
+0x93 U+FF82
+0x94 U+FF83
+0x95 U+FF84
+0x96 U+FF85
+0x97 U+FF86
+0x98 U+FF87
+0x99 U+FF88
+0x9A U+FF89
+0x9B U+0072
+0x9D U+FF8A
+0x9E U+FF8B
+0x9F U+FF8C
+0xA0 U+007E
+0xA1 U+203E
+0xA2 U+FF8D
+0xA3 U+FF8E
+0xA4 U+FF8F
+0xA5 U+FF90
+0xA6 U+FF91
+0xA7 U+FF92
+0xA8 U+FF93
+0xA9 U+FF94
+0xAA U+FF95
+0xAB U+0073
+0xAC U+FF96
+0xAD U+FF97
+0xAE U+FF98
+0xAF U+FF99
+0xB0 U+005E
+0xB1 U+00A2
+0xB2 U+005C
+0xB3 U+0074
+0xB4 U+0075
+0xB5 U+0076
+0xB6 U+0077
+0xB7 U+0078
+0xB8 U+0079
+0xB9 U+007A
+0xBA U+FF9A
+0xBB U+FF9B
+0xBC U+FF9C
+0xBD U+FF9D
+0xBE U+FF9E
+0xBF U+FF9F
+0xC0 U+007B
+0xC1 U+0041
+0xC2 U+0042
+0xC3 U+0043
+0xC4 U+0044
+0xC5 U+0045
+0xC6 U+0046
+0xC7 U+0047
+0xC8 U+0048
+0xC9 U+0049
+0xD0 U+007D
+0xD1 U+004A
+0xD2 U+004B
+0xD3 U+004C
+0xD4 U+004D
+0xD5 U+004E
+0xD6 U+004F
+0xD7 U+0050
+0xD8 U+0051
+0xD9 U+0052
+0xE0 U+0024
+0xE2 U+0053
+0xE3 U+0054
+0xE4 U+0055
+0xE5 U+0056
+0xE6 U+0057
+0xE7 U+0058
+0xE8 U+0059
+0xE9 U+005A
+0xF0 U+0030
+0xF1 U+0031
+0xF2 U+0032
+0xF3 U+0033
+0xF4 U+0034
+0xF5 U+0035
+0xF6 U+0036
+0xF7 U+0037
+0xF8 U+0038
+0xF9 U+0039
+0xFF U+009F
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/CharsetMapping/IBM300.c2b Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,50 @@
+#
+# Diff of
+# b2c: cdctables.zip/Package2.zip/IBM-300.zip/012C34B0.TPMAP120
+# c2b: cdctables.zip/Package2.zip/IBM-300.zip/012C34B0.UPMAP120
+#
+4260 2212
+426A 00A6
+43A1 301C
+444A 2014
+446E F86F
+447C 2016
+4C7D 9E7C
+4EB3 9830
+4F5E 5861
+507F 91AC
+5190 56CA
+51F1 6805
+51FA 91B1
+5261 9EB4
+52A1 881F
+52C9 840A
+52DA 7E61
+52EC 4FE0
+5353 8EC0
+5373 7E6B
+53B3 8346
+53DA 9A52
+53E8 87EC
+53EE 7130
+53F8 8523
+5443 5C5B
+5464 9DD7
+547D 5699
+5481 525D
+54A3 6414
+54A4 7626
+54CA 7C1E
+54CD 6451
+54D4 555E
+54FA 6F51
+5550 7006
+5553 79B1
+555F 9EB5
+55C0 5C62
+55C1 985A
+5B72 6522
+5BFE 688E
+60F1 7E48
+61B0 8141
+66C8 9839
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/CharsetMapping/IBM300.map Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,11644 @@
+#
+# b2c mapping for IBM300, generated from
+# cdctables.zip/Package2.zip/IBM-300.zip/012C34B0.TPMAP120
+#
+# <subchar> FEFE
+# Note: subchar FEFE itself is not a defined character in
+# 300 character set, we use fullwidth question mark
+# <0x426f U+FF1F> instead
+#
+4040 3000
+4141 03B1
+4142 03B2
+4143 03B3
+4144 03B4
+4145 03B5
+4146 03B6
+4147 03B7
+4148 03B8
+4149 03B9
+414A 03BA
+414B 03BB
+414C 03BC
+414D 03BD
+414E 03BE
+414F 03BF
+4150 03C0
+4151 03C1
+4152 03C3
+4153 03C4
+4154 03C5
+4155 03C6
+4156 03C7
+4157 03C8
+4158 03C9
+4161 0391
+4162 0392
+4163 0393
+4164 0394
+4165 0395
+4166 0396
+4167 0397
+4168 0398
+4169 0399
+416A 039A
+416B 039B
+416C 039C
+416D 039D
+416E 039E
+416F 039F
+4170 03A0
+4171 03A1
+4172 03A3
+4173 03A4
+4174 03A5
+4175 03A6
+4176 03A7
+4177 03A8
+4178 03A9
+4180 0430
+4181 0431
+4182 0432
+4183 0433
+4184 0434
+4185 0435
+4186 0451
+4187 0436
+4188 0437
+4189 0438
+418A 0439
+418B 043A
+418C 043B
+418D 043C
+418E 043D
+418F 043E
+4190 043F
+4191 0440
+4192 0441
+4193 0442
+4194 0443
+4195 0444
+4196 0445
+4197 0446
+4198 0447
+4199 0448
+419A 0449
+419B 044A
+419C 044B
+419D 044C
+419E 044D
+419F 044E
+41A0 044F
+41B1 2170
+41B2 2171
+41B3 2172
+41B4 2173
+41B5 2174
+41B6 2175
+41B7 2176
+41B8 2177
+41B9 2178
+41BA 2179
+41C0 0410
+41C1 0411
+41C2 0412
+41C3 0413
+41C4 0414
+41C5 0415
+41C6 0401
+41C7 0416
+41C8 0417
+41C9 0418
+41CA 0419
+41CB 041A
+41CC 041B
+41CD 041C
+41CE 041D
+41CF 041E
+41D0 041F
+41D1 0420
+41D2 0421
+41D3 0422
+41D4 0423
+41D5 0424
+41D6 0425
+41D7 0426
+41D8 0427
+41D9 0428
+41DA 0429
+41DB 042A
+41DC 042B
+41DD 042C
+41DE 042D
+41DF 042E
+41E0 042F
+41F1 2160
+41F2 2161
+41F3 2162
+41F4 2163
+41F5 2164
+41F6 2165
+41F7 2166
+41F8 2167
+41F9 2168
+41FA 2169
+424A FFE1
+424B FF0E
+424C FF1C
+424D FF08
+424E FF0B
+424F FF5C
+4250 FF06
+425A FF01
+425B FFE5
+425C FF0A
+425D FF09
+425E FF1B
+425F FFE2
+4260 FF0D
+4261 FF0F
+426A FFE4
+426B FF0C
+426C FF05
+426D FF3F
+426E FF1E
+426F FF1F
+4279 FF40
+427A FF1A
+427B FF03
+427C FF20
+427D FF07
+427E FF1D
+427F FF02
+4281 FF41
+4282 FF42
+4283 FF43
+4284 FF44
+4285 FF45
+4286 FF46
+4287 FF47
+4288 FF48
+4289 FF49
+4291 FF4A
+4292 FF4B
+4293 FF4C
+4294 FF4D
+4295 FF4E
+4296 FF4F
+4297 FF50
+4298 FF51
+4299 FF52
+42A1 FFE3
+42A2 FF53
+42A3 FF54
+42A4 FF55
+42A5 FF56
+42A6 FF57
+42A7 FF58
+42A8 FF59
+42A9 FF5A
+42C0 FF5B
+42C1 FF21
+42C2 FF22
+42C3 FF23
+42C4 FF24
+42C5 FF25
+42C6 FF26
+42C7 FF27
+42C8 FF28
+42C9 FF29
+42D0 FF5D
+42D1 FF2A
+42D2 FF2B
+42D3 FF2C
+42D4 FF2D
+42D5 FF2E
+42D6 FF2F
+42D7 FF30
+42D8 FF31
+42D9 FF32
+42E0 FF04
+42E2 FF33
+42E3 FF34
+42E4 FF35
+42E5 FF36
+42E6 FF37
+42E7 FF38
+42E8 FF39
+42E9 FF3A
+42F0 FF10
+42F1 FF11
+42F2 FF12
+42F3 FF13
+42F4 FF14
+42F5 FF15
+42F6 FF16
+42F7 FF17
+42F8 FF18
+42F9 FF19
+4341 3002
+4342 300C
+4343 300D
+4344 3001
+4345 30FB
+4346 30F2
+4347 30A1
+4348 30A3
+4349 30A5
+434A FFE0
+434B 2220
+434C 22A5
+434D 2312
+434E 2202
+434F 2207
+4351 30A7
+4352 30A9
+4353 30E3
+4354 30E5
+4355 30E7
+4356 30C3
+4357 30EE
+4358 30FC
+4359 30F5
+435A 30F6
+435B 2261
+435C 2252
+435D 226A
+435E 226B
+435F 221A
+4360 223D
+4361 221D
+4362 222B
+4363 222C
+4364 2208
+4365 220B
+4366 2286
+4367 2287
+4368 2282
+4369 2283
+436A 222A
+436B 2229
+436C 2227
+436D 2228
+436E 21D2
+436F 21D4
+4370 2200
+4371 2203
+4372 212B
+4373 2030
+4374 266F
+4375 266D
+4376 266A
+4377 2020
+4378 2021
+4379 00B6
+437A 25EF
+437C 2500
+437D 2502
+437E 250C
+437F 2510
+4381 30A2
+4382 30A4
+4383 30A6
+4384 30A8
+4385 30AA
+4386 30AB
+4387 30AD
+4388 30AF
+4389 30B1
+438A 30B3
+438C 30B5
+438D 30B7
+438E 30B9
+438F 30BB
+4390 30BD
+4391 30BF
+4392 30C1
+4393 30C4
+4394 30C6
+4395 30C8
+4396 30CA
+4397 30CB
+4398 30CC
+4399 30CD
+439A 30CE
+439D 30CF
+439E 30D2
+439F 30D5
+43A1 FF5E
+43A2 30D8
+43A3 30DB
+43A4 30DE
+43A5 30DF
+43A6 30E0
+43A7 30E1
+43A8 30E2
+43A9 30E4
+43AA 30E6
+43AC 30E8
+43AD 30E9
+43AE 30EA
+43AF 30EB
+43B0 2518
+43B1 2514
+43B2 251C
+43B3 252C
+43B4 2524
+43B5 2534
+43B6 253C
+43B7 2501
+43B8 2503
+43B9 250F
+43BA 30EC
+43BB 30ED
+43BC 30EF
+43BD 30F3
+43BE 309B
+43BF 309C
+43C0 30AC
+43C1 30AE
+43C2 30B0
+43C3 30B2
+43C4 30B4
+43C5 30B6
+43C6 30B8
+43C7 30BA
+43C8 30BC
+43C9 30BE
+43CA 30C0
+43CB 30C2
+43CC 30C5
+43CD 30C7
+43CE 30C9
+43CF 30D0
+43D0 30D3
+43D1 30D6
+43D2 30D9
+43D3 30DC
+43D4 30F4
+43D5 30D1
+43D6 30D4
+43D7 30D7
+43D8 30DA
+43D9 30DD
+43DA 30F0
+43DB 30F1
+43DC 30FD
+43DD 30FE
+43E0 FF3C
+43E1 2513
+43E2 251B
+43E3 2517
+43E4 2523
+43E5 2533
+43E6 252B
+43E7 253B
+43E8 254B
+43E9 2520
+43EA 252F
+43EB 2528
+43EC 2537
+43ED 253F
+43EE 251D
+43EF 2530
+43F0 2525
+43F1 2538
+43F2 2542
+4442 300E
+4443 300F
+4444 FF3B
+4445 FF3D
+4446 3092
+4447 3041
+4448 3043
+4449 3045
+444A 2015
+444B 00B1
+444C 2260
+444D 221E
+444E 2103
+4450 00B4
+4451 3047
+4452 3049
+4453 3083
+4454 3085
+4455 3087
+4456 3063
+4457 308E
+445A 2010
+445B 3003
+445C 4EDD
+445D 3005
+445E 3006
+445F 3007
+4460 00A8
+4461 2018
+4462 201C
+4463 3014
+4464 3008
+4465 300A
+4466 3010
+4467 2266
+4468 2234
+4469 2642
+446A 00A7
+446B 203B
+446C 3012
+446D 3231
+446E 2116
+446F 2121
+4470 FF3E
+4471 2019
+4472 201D
+4473 3015
+4474 3009
+4475 300B
+4476 3011
+4477 2267
+4478 2235
+4479 2640
+447A 00D7
+447B 00F7
+447C 2225
+447D 3013
+447E 2025
+447F 2026
+4481 3042
+4482 3044
+4483 3046
+4484 3048
+4485 304A
+4486 304B
+4487 304D
+4488 304F
+4489 3051
+448A 3053
+448C 3055
+448D 3057
+448E 3059
+448F 305B
+4490 305D
+4491 305F
+4492 3061
+4493 3064
+4494 3066
+4495 3068
+4496 306A
+4497 306B
+4498 306C
+4499 306D
+449A 306E
+449D 306F
+449E 3072
+449F 3075
+44A2 3078
+44A3 307B
+44A4 307E
+44A5 307F
+44A6 3080
+44A7 3081
+44A8 3082
+44A9 3084
+44AA 3086
+44AC 3088
+44AD 3089
+44AE 308A
+44AF 308B
+44BA 308C
+44BB 308D
+44BC 308F
+44BD 3093
+44C0 304C
+44C1 304E
+44C2 3050
+44C3 3052
+44C4 3054
+44C5 3056
+44C6 3058
+44C7 305A
+44C8 305C
+44C9 305E
+44CA 3060
+44CB 3062
+44CC 3065
+44CD 3067
+44CE 3069
+44CF 3070
+44D0 3073
+44D1 3076
+44D2 3079
+44D3 307C
+44D5 3071
+44D6 3074
+44D7 3077
+44D8 307A
+44D9 307D
+44DA 3090
+44DB 3091
+44DC 309D
+44DD 309E
+44E0 25CB
+44E1 25CF
+44E2 25B3
+44E3 25B2
+44E4 25CE
+44E5 2606
+44E6 2605
+44E7 25C7
+44E8 25C6
+44E9 25A1
+44EA 25A0
+44EB 25BD
+44EC 25BC
+44ED 00B0
+44EE 2032
+44EF 2033
+44F0 2192
+44F1 2190
+44F2 2191
+44F3 2193
+4541 4E00
+4542 4E8C
+4543 4E09
+4544 56DB
+4545 4E94
+4546 516D
+4547 4E03
+4548 516B
+4549 4E5D
+454A 5341
+454B 767E
+454C 5343
+454D 4E07
+454E 5104
+454F 90FD
+4550 9053
+4551 5E9C
+4552 770C
+4553 5E02
+4554 533A
+4555 753A
+4556 6751
+4557 6771
+4558 897F
+4559 5357
+455A 5317
+455B 5927
+455C 4E2D
+455D 5C0F
+455E 4E0A
+455F 4E0B
+4560 5E74
+4561 6708
+4562 65E5
+4563 7530
+4564 5B50
+4565 5C71
+4566 672C
+4567 5DDD
+4568 85E4
+4569 91CE
+456A 5DE5
+456B 696D
+456C 6728
+456D 4E95
+456E 90CE
+456F 5CF6
+4570 96C4
+4571 9AD8
+4572 5CA1
+4573 592B
+4574 539F
+4575 4EAC
+4576 4F50
+4577 6B63
+4578 677E
+4579 6A5F
+457A 548C
+457B 88FD
+457C 7537
+457D 7F8E
+457E 5409
+457F 5D0E
+4580 77F3
+4581 8C37
+4582 96FB
+4583 9577
+4584 6CBB
+4585 6CA2
+4586 91D1
+4587 65B0
+4588 53E3
+4589 6A4B
+458A 4E45
+458B 798F
+458C 6240
+458D 5E73
+458E 5185
+458F 56FD
+4590 5316
+4591 962A
+4592 5BAE
+4593 4EBA
+4594 4F5C
+4595 90E8
+4596 6E05
+4597 6B21
+4598 7FA9
+4599 751F
+459A 4EE3
+459B 51FA
+459C 6C34
+459D 68EE
+459E 5149
+459F 52A0
+45A0 5408
+45A1 795E
+45A2 6797
+45A3 91CD
+45A4 884C
+45A5 4FE1
+45A6 660E
+45A7 6D77
+45A8 5B89
+45A9 5E78
+45AA 4FDD
+45AB 592A
+45AC 5BCC
+45AD 6C5F
+45AE 9234
+45AF 524D
+45B0 77E5
+45B1 6B66
+45B2 4F0A
+45B3 662D
+45B4 5206
+45B5 52DD
+45B6 7528
+45B7 5E83
+45B8 9020
+45B9 6C17
+45BA 6210
+45BB 898B
+45BC 5229
+45BD 4F1A
+45BE 5B66
+45BF 5CA9
+45C0 7523
+45C1 9593
+45C2 5730
+45C3 81EA
+45C4 826F
+45C5 95A2
+45C6 611B
+45C7 653F
+45C8 5C3E
+45C9 8A08
+45CA 6587
+45CB 624B
+45CC 7236
+45CD 65B9
+45CE 4E8B
+45CF 6238
+45D0 54C1
+45D1 559C
+45D2 6E21
+45D3 5F18
+45D4 53E4
+45D5 8FBA
+45D6 5009
+45D7 9244
+45D8 4E4B
+45D9 5834
+45DA 6D0B
+45DB 57CE
+45DC 6D25
+45DD 7ACB
+45DE 5EA6
+45DF 5348
+45E0 4ECA
+45E1 5F66
+45E2 8A2D
+45E3 901A
+45E4 52D5
+45E5 5F8C
+45E6 5948
+45E7 5B9A
+45E8 6C60
+45E9 5C4B
+45EA 6D5C
+45EB 7406
+45EC 5742
+45ED 5B9F
+45EE 82F1
+45EF 7684
+45F0 53F8
+45F1 79C0
+45F2 6A2A
+45F3 540D
+45F4 5B5D
+45F5 7AF9
+45F6 535A
+45F7 529B
+45F8 5EAB
+45F9 8449
+45FA 6804
+45FB 6C38
+45FC 5668
+45FD 7389
+45FE 591A
+4641 8CC0
+4642 771F
+4643 6075
+4644 9759
+4645 5186
+4646 8302
+4647 654F
+4648 8C4A
+4649 5175
+464A 6CD5
+464B 767A
+464C 9752
+464D 5897
+464E 6599
+464F 5FE0
+4650 8CC7
+4651 6642
+4652 7269
+4653 8ECA
+4654 5FB3
+4655 8981
+4656 5BFE
+4657 585A
+4658 79CB
+4659 767D
+465A 6CB3
+465B 702C
+465C 6CB9
+465D 9686
+465E 8535
+465F 5F53
+4660 4FCA
+4661 5FD7
+4662 6625
+4663 793E
+4664 99AC
+4665 5165
+4666 5EFA
+4667 6839
+4668 6749
+4669 9032
+466A 8208
+466B 6D66
+466C 7CBE
+466D 540C
+466E 6027
+466F 7C73
+4670 8005
+4671 52A9
+4672 679D
+4673 8FD1
+4674 76F4
+4675 76EE
+4676 6765
+4677 753B
+4678 76F8
+4679 9ED2
+467A 4E38
+467B 8239
+467C 7531
+467D 58EB
+467E 7B2C
+467F 718A
+4680 7D19
+4681 5065
+4682 68B0
+4683 82B3
+4684 571F
+4685 6709
+4686 5BB6
+4687 7DDA
+4688 7D4C
+4689 8ABF
+468A 5929
+468B 671F
+468C 7F6E
+468D 6D45
+468E 6589
+468F 5F0F
+4690 5F62
+4691 9762
+4692 7A2E
+4693 8F38
+4694 5916
+4695 5143
+4696 4F53
+4697 9E7F
+4698 5FA1
+4699 5973
+469A 5EB7
+469B 4E16
+469C 52C7
+469D 5800
+469E 597D
+469F 5150
+46A0 5BFA
+46A1 92FC
+46A2 7279
+46A3 57FC
+46A4 9054
+46A5 5411
+46A6 53D6
+46A7 7B49
+46A8 667A
+46A9 56DE
+46AA 9580
+46AB 904B
+46AC 5099
+46AD 601D
+46AE 963F
+46AF 4E0D
+46B0 9808
+46B1 5168
+46B2 5BFF
+46B3 5584
+46B4 677F
+46B5 98EF
+46B6 8C9E
+46B7 73FE
+46B8 98DF
+46B9 7D44
+46BA 985E
+46BB 516C
+46BC 6750
+46BD 9999
+46BE 5546
+46BF 7D50
+46C0 8868
+46C1 77E2
+46C2 6F5F
+46C3 79C1
+46C4 5236
+46C5 90A6
+46C6 6CBC
+46C7 7CF8
+46C8 5B8F
+46C9 7B56
+46CA 6CE2
+46CB 54E1
+46CC 6570
+46CD 958B
+46CE 6E96
+46CF 6A39
+46D0 8CBB
+46D1 660C
+46D2 5F37
+46D3 7814
+46D4 53CB
+46D5 5B87
+46D6 82E5
+46D7 83CA
+46D8 6301
+46D9 82B1
+46DA 5F15
+46DB 7D00
+46DC 8352
+46DD 5225
+46DE 4FEE
+46DF 8D8A
+46E0 4F4F
+46E1 85AC
+46E2 6BDB
+46E3 9060
+46E4 554F
+46E5 5965
+46E6 578B
+46E7 5FC3
+46E8 767B
+46E9 65E9
+46EA 67F3
+46EB 6D69
+46EC 8CEA
+46ED 52D9
+46EE 6CC9
+46EF 5E38
+46F0 5B88
+46F1 57FA
+46F2 7BA1
+46F3 6CF0
+46F4 4F38
+46F5 6700
+46F6 4EE5
+46F7 6B4C
+46F8 88D5
+46F9 8D64
+46FA 8DB3
+46FB 898F
+46FC 6D41
+46FD 8AA0
+46FE 6607
+4741 5DDE
+4742 7167
+4743 5869
+4744 9001
+4745 96C5
+4746 672B
+4747 54F2
+4748 5CB8
+4749 4E5F
+474A 5C90
+474B 521D
+474C 8328
+474D 5247
+474E 6BD4
+474F 80FD
+4750 8A71
+4751 6295
+4752 8EE2
+4753 83C5
+4754 9023
+4755 4ED6
+4756 6C11
+4757 7D66
+4758 9152
+4759 7E41
+475A 4FA1
+475B 6E80
+475C 671D
+475D 4ED8
+475E 6761
+475F 7121
+4760 8003
+4761 697D
+4762 4E3B
+4763 610F
+4764 6226
+4765 5207
+4766 5264
+4767 7247
+4768 7D30
+4769 6E08
+476A 7A32
+476B 5E03
+476C 91CC
+476D 5C5E
+476E 7AE0
+476F 5909
+4770 4F55
+4771 685C
+4772 5F7C
+4773 67FB
+4774 76CA
+4775 58F2
+4776 4EC1
+4777 6DF1
+4778 53F0
+4779 9CE5
+477A 9DB4
+477B 652F
+477C 6574
+477D 89D2
+477E 5609
+477F 5473
+4780 885B
+4781 8B70
+4782 5727
+4783 7387
+4784 8DEF
+4785 706B
+4786 961C
+4787 8F1D
+4788 70B9
+4789 4E0E
+478A 6E1B
+478B 7551
+478C 9280
+478D 7A7A
+478E 4EA4
+478F 7FBD
+4790 534A
+4791 53CE
+4792 592E
+4793 7DCF
+4794 8A18
+4795 6674
+4796 69CB
+4797 969B
+4798 6885
+4799 5370
+479A 8A00
+479B 6817
+479C 8EAB
+479D 66F8
+479E 514B
+479F 7D20
+47A0 96C6
+47A1 7BC0
+47A2 5148
+47A3 6EDD
+47A4 6C7A
+47A5 6559
+47A6 7D14
+47A7 67F4
+47A8 63A5
+47A9 661F
+47AA 7740
+47AB 7559
+47AC 6620
+47AD 5DF1
+47AE 754C
+47AF 5177
+47B0 656C
+47B1 7FA4
+47B2 9806
+47B3 5171
+47B4 6D3B
+47B5 91CF
+47B6 6307
+47B7 89E3
+47B8 5BA4
+47B9 679C
+47BA 5404
+47BB 671B
+47BC 9632
+47BD 7D04
+47BE 61B2
+47BF 967D
+47C0 4E80
+47C1 56F3
+47C2 4E88
+47C3 8272
+47C4 7A0E
+47C5 690D
+47C6 53EF
+47C7 6052
+47C8 4F4D
+47C9 5178
+47CA 5FC5
+47CB 7D9A
+47CC 6025
+47CD 5728
+47CE 57A3
+47CF 541B
+47D0 5EF6
+47D1 5D8B
+47D2 4F01
+47D3 6803
+47D4 670D
+47D5 71B1
+47D6 5272
+47D7 5354
+47D8 6B69
+47D9 53F2
+47DA 512A
+47DB 658E
+47DC 623F
+47DD 5B97
+47DE 683C
+47DF 8FB0
+47E0 7B20
+47E1 5712
+47E2 8AF8
+47E3 8107
+47E4 5553
+47E5 8CE2
+47E6 5F25
+47E7 98A8
+47E8 5F97
+47E9 6613
+47EA 6253
+47EB 982D
+47EC 65ED
+47ED 6BB5
+47EE 52E2
+47EF 7136
+47F0 56E3
+47F1 984D
+47F2 843D
+47F3 914D
+47F4 7A0B
+47F5 8FBB
+47F6 543E
+47F7 611F
+47F8 5BDB
+47F9 53CD
+47FA 7A14
+47FB 9700
+47FC 6E90
+47FD 6C96
+47FE 984C
+4841 8FBC
+4842 8349
+4843 7B97
+4844 76DB
+4845 8FB2
+4846 90A3
+4847 7701
+4848 69D8
+4849 6BBF
+484A 5C11
+484B 4ECB
+484C 53D7
+484D 97F3
+484E 7DE8
+484F 59D4
+4850 5E84
+4851 4FC2
+4852 72B6
+4853 793A
+4854 5E97
+4855 5A9B
+4856 682A
+4857 6ECB
+4858 68A8
+4859 7E04
+485A 53F3
+485B 5DE6
+485C 53CA
+485D 9078
+485E 5C45
+485F 60C5
+4860 7DF4
+4861 70AD
+4862 9928
+4863 9271
+4864 6A21
+4865 6B8A
+4866 7E3E
+4867 4E9C
+4868 7E4A
+4869 4EF2
+486A 5857
+486B 6D88
+486C 8853
+486D 691C
+486E 6717
+486F 5B85
+4870 529F
+4871 5C1A
+4872 8CBF
+4873 60A6
+4874 8102
+4875 7BE0
+4876 4F73
+4877 7D21
+4878 51A8
+4879 6851
+487A 78BA
+487B 7267
+487C 4E26
+487D 5024
+487E 89B3
+487F 8CB4
+4880 7DAD
+4881 7D71
+4882 5BBF
+4883 4E21
+4884 7CD6
+4885 89AA
+4886 9332
+4887 6F84
+4888 65BD
+4889 5BB9
+488A 98DB
+488B 5C40
+488C 7950
+488D 904E
+488E 6C0F
+488F 6539
+4890 76E4
+4891 7A4D
+4892 6E0B
+4893 5DFB
+4894 6DF3
+4895 5FDC
+4896 4E89
+4897 8ECD
+4898 88C5
+4899 9178
+489A 7E54
+489B 67D3
+489C 5E1D
+489D 7DBF
+489E 7C89
+489F 822A
+48A0 7532
+48A1 5468
+48A2 4ED9
+48A3 5F85
+48A4 4F4E
+48A5 7DD1
+48A6 8EFD
+48A7 9EBB
+48A8 6176
+48A9 52B4
+48AA 78EF
+48AB 4E39
+48AC 80B2
+48AD 9650
+48AE 5C0E
+48AF 653E
+48B0 6643
+48B1 5EA7
+48B2 4EF6
+48B3 60F3
+48B4 9A13
+48B5 4ED5
+48B6 4F7F
+48B7 8F2A
+48B8 9854
+48B9 756A
+48BA 5F35
+48BB 805E
+48BC 4F9B
+48BD 6E6F
+48BE 6EB6
+48BF 6821
+48C0 9285
+48C1 92F3
+48C2 878D
+48C3 9756
+48C4 5199
+48C5 5B8C
+48C6 6E2F
+48C7 935B
+48C8 591C
+48C9 5145
+48CA 9F8D
+48CB 7DB1
+48CC 83F1
+48CD 901F
+48CE 52C9
+48CF 5237
+48D0 8D77
+48D1 6469
+48D2 53C2
+48D3 55B6
+48D4 7A42
+48D5 63A8
+48D6 8FD4
+48D7 8077
+48D8 6B62
+48D9 4F1D
+48DA 5E79
+48DB 7403
+48DC 6A29
+48DD 5C55
+48DE 5E61
+48DF 845B
+48E0 5EAD
+48E1 975E
+48E2 53F7
+48E3 5358
+48E4 6B73
+48E5 62E1
+48E6 51E6
+48E7 8A9E
+48E8 6628
+48E9 57DF
+48EA 6DF5
+48EB 518D
+48EC 50CD
+48ED 79D1
+48EE 9B5A
+48EF 7AEF
+48F0 9014
+48F1 6848
+48F2 5B57
+48F3 8AD6
+48F4 517C
+48F5 53C8
+48F6 632F
+48F7 6280
+48F8 5FB9
+48F9 672D
+48FA 7CFB
+48FB 5F93
+48FC 51B7
+48FD 614B
+48FE 5CF0
+4941 5931
+4942 539A
+4943 5074
+4944 6CE8
+4945 6E2C
+4946 9803
+4947 4E57
+4948 8A66
+4949 576A
+494A 8429
+494B 515A
+494C 6C7D
+494D 5B9D
+494E 606D
+494F 6A0B
+4950 6E29
+4951 6577
+4952 8AAC
+4953 82B8
+4954 544A
+4955 6B74
+4956 822C
+4957 98FE
+4958 793C
+4959 5C06
+495A 96E3
+495B 7802
+495C 5224
+495D 5F79
+495E 5F71
+495F 66FD
+4960 5E2F
+4961 9678
+4962 938C
+4963 8AC7
+4964 5F70
+4965 60AA
+4966 6A19
+4967 7533
+4968 5BB3
+4969 6BCD
+496A 88DC
+496B 5E4C
+496C 58F0
+496D 9664
+496E 7B39
+496F 5A66
+4970 4E7E
+4971 7AF6
+4972 829D
+4973 725B
+4974 8CB7
+4975 79FB
+4976 785D
+4977 8336
+4978 52B9
+4979 990A
+497A 52F2
+497B 80A5
+497C 8B19
+497D 7089
+497E 590F
+497F 5802
+4980 67CF
+4981 6255
+4982 5E30
+4983 713C
+4984 786B
+4985 8001
+4986 7A76
+4987 5BE9
+4988 91DD
+4989 65AD
+498A 5C04
+498B 5DEE
+498C 5D50
+498D 6298
+498E 8010
+498F 5BA3
+4990 59CB
+4991 5F8B
+4992 6B8B
+4993 666F
+4994 8C61
+4995 90F7
+4996 5353
+4997 96E2
+4998 85AB
+4999 6B7B
+499A 8015
+499B 64CD
+499C 4EAE
+499D 4E91
+499E 90E1
+499F 52E4
+49A0 6C42
+49A1 8CAB
+49A2 5B98
+49A3 59BB
+49A4 88CF
+49A5 773C
+49A6 4F2F
+49A7 7AAF
+49A8 7BC9
+49A9 968E
+49AA 63DB
+49AB 6842
+49AC 99C5
+49AD 68B6
+49AE 5747
+49AF 8CA1
+49B0 547D
+49B1 738B
+49B2 84B2
+49B3 90C1
+49B4 78E8
+49B5 7B11
+49B6 66F2
+49B7 6975
+49B8 5831
+49B9 63D0
+49BA 8A3C
+49BB 96EA
+49BC 9055
+49BD 88C1
+49BE 9996
+49BF 75C5
+49C0 6850
+49C1 4F59
+49C2 74E6
+49C3 4EE4
+49C4 5439
+49C5 732A
+49C6 672A
+49C7 525B
+49C8 8CA0
+49C9 4F34
+49CA 5100
+49CB 542B
+49CC 9069
+49CD 8FC4
+49CE 5C3B
+49CF 5DCC
+49D0 7B54
+49D1 8FFD
+49D2 8A0E
+49D3 4E08
+49D4 925B
+49D5 71C3
+49D6 8AB2
+49D7 70BA
+49D8 9662
+49D9 679A
+49DA 76AE
+49DB 8B77
+49DC 7DBE
+49DD 96E8
+49DE 6211
+49DF 5BC4
+49E0 837B
+49E1 62BC
+49E2 7D0D
+49E3 76E3
+49E4 7E2B
+49E5 964D
+49E6 572D
+49E7 7ADC
+49E8 7BC4
+49E9 6BBA
+49EA 8C9D
+49EB 698E
+49EC 9047
+49ED 6F14
+49EE 5360
+49EF 8FEB
+49F0 5287
+49F1 624D
+49F2 6566
+49F3 7D1A
+49F4 7D42
+49F5 6BCE
+49F6 7D79
+49F7 7E2E
+49F8 666E
+49F9 7965
+49FA 500B
+49FB 5C02
+49FC 99D2
+49FD 8A55
+49FE 7560
+4A41 5B58
+4A42 8089
+4A43 50BE
+4A44 5E2B
+4A45 6DB2
+4A46 4F8B
+4A47 81E3
+4A48 81F3
+4A49 56E0
+4A4A 7D99
+4A4B 5DF2
+4A4C 899A
+4A4D 6E9D
+4A4E 6D17
+4A4F 8AAD
+4A50 8996
+4A51 731B
+4A52 5DE8
+4A53 7DB2
+4A54 888B
+4A55 4EFB
+4A56 5BC6
+4A57 8896
+4A58 6CC1
+4A59 8457
+4A5A 8F03
+4A5B 6BC5
+4A5C 97FF
+4A5D 8CA9
+4A5E 5E45
+4A5F 82E6
+4A60 63AA
+4A61 5F81
+4A62 78C1
+4A63 821E
+4A64 52AA
+4A65 7AAA
+4A66 5999
+4A67 6297
+4A68 8F14
+4A69 7FD2
+4A6A 4FC3
+4A6B 54C9
+4A6C 967A
+4A6D 66F4
+4A6E 8B1B
+4A6F 5E72
+4A70 5FA9
+4A71 8A2A
+4A72 6D3E
+4A73 7763
+4A74 6483
+4A75 8B58
+4A76 614E
+4A77 5A5A
+4A78 8D85
+4A79 71D0
+4A7A 983C
+4A7B 72E9
+4A7C 583A
+4A7D 5DFE
+4A7E 8A8D
+4A7F 67C4
+4A80 7DE0
+4A81 4F11
+4A82 77ED
+4A83 4F0F
+4A84 5BC5
+4A85 629C
+4A86 5C3C
+4A87 533B
+4A88 6DC0
+4A89 81FC
+4A8A 96D1
+4A8B 904A
+4A8C 6D6E
+4A8D 93E1
+4A8E 5C64
+4A8F 98FC
+4A90 524A
+4A91 6DFB
+4A92 8584
+4A93 968A
+4A94 56FA
+4A95 5883
+4A96 7766
+4A97 9805
+4A98 4E73
+4A99 8C46
+4A9A 8A31
+4A9B 7DD2
+4A9C 8FF0
+4A9D 6D6A
+4A9E 4F9D
+4A9F 6B6F
+4AA0 6B27
+4AA1 62C5
+4AA2 511F
+4AA3 9769
+4AA4 5374
+4AA5 9AA8
+4AA6 6775
+4AA7 887F
+4AA8 5305
+4AA9 7570
+4AAA 8D70
+4AAB 864E
+4AAC 5CEF
+4AAD 8CDE
+4AAE 5FF5
+4AAF 725F
+4AB0 7686
+4AB1 609F
+4AB2 80CC
+4AB3 59EB
+4AB4 8131
+4AB5 5E0C
+4AB6 8A17
+4AB7 9676
+4AB8 82D7
+4AB9 74B0
+4ABA 84B8
+4ABB 50D5
+4ABC 96F2
+4ABD 7248
+4ABE 7834
+4ABF 6DD1
+4AC0 6E09
+4AC1 67FF
+4AC2 6F54
+4AC3 5915
+4AC4 500D
+4AC5 72AC
+4AC6 9EC4
+4AC7 7B46
+4AC8 9B3C
+4AC9 6563
+4ACA 53BB
+4ACB 8A98
+4ACC 91DC
+4ACD 9818
+4ACE 6FC3
+4ACF 65C5
+4AD0 501F
+4AD1 7F8A
+4AD2 6F64
+4AD3 9031
+4AD4 5F3E
+4AD5 63F4
+4AD6 9038
+4AD7 8B66
+4AD8 7BE4
+4AD9 7206
+4ADA 6843
+4ADB 72EC
+4ADC 65CF
+4ADD 82A6
+4ADE 5BA2
+4ADF 6960
+4AE0 9EA6
+4AE1 52DF
+4AE2 6790
+4AE3 639B
+4AE4 7D75
+4AE5 9855
+4AE6 5DF3
+4AE7 5805
+4AE8 8ACB
+4AE9 95A3
+4AEA 8863
+4AEB 8CA8
+4AEC 5B63
+4AED 5E8A
+4AEE 5449
+4AEF 786C
+4AF0 7D2B
+4AF1 8CA2
+4AF2 5352
+4AF3 7D76
+4AF4 8CB8
+4AF5 7070
+4AF6 547C
+4AF7 6545
+4AF8 6676
+4AF9 73B2
+4AFA 56F2
+4AFB 7BB1
+4AFC 58A8
+4AFD 7A81
+4AFE 66AE
+4B41 8087
+4B42 59FF
+4B43 8840
+4B44 56F0
+4B45 7B51
+4B46 6DF7
+4B47 5F01
+4B48 934B
+4B49 9000
+4B4A 4FE3
+4B4B 675F
+4B4C 4FBF
+4B4D 8CC3
+4B4E 526F
+4B4F 63A1
+4B50 5442
+4B51 8907
+4B52 698A
+4B53 5E2D
+4B54 5A18
+4B55 7518
+4B56 514D
+4B57 5E7E
+4B58 50B5
+4B59 5BDD
+4B5A 68D2
+4B5B 745E
+4B5C 69FB
+4B5D 5FAE
+4B5E 55E3
+4B5F 8A70
+4B60 5BF8
+4B61 5824
+4B62 8358
+4B63 5F13
+4B64 5E95
+4B65 706F
+4B66 751A
+4B67 7D05
+4B68 60E3
+4B69 7E70
+4B6A 5012
+4B6B 5238
+4B6C 83EF
+4B6D 5373
+4B6E 5F31
+4B6F 6A2B
+4B70 9CF4
+4B71 53CC
+4B72 6D32
+4B73 4EAB
+4B74 4E92
+4B75 842C
+4B76 8A8C
+4B77 65E2
+4B78 6F01
+4B79 80A9
+4B7A 9DF9
+4B7B 8B72
+4B7C 7B52
+4B7D 9589
+4B7E 6D74
+4B7F 63A2
+4B80 6590
+4B81 5BD2
+4B82 6319
+4B83 8AB0
+4B84 76DF
+4B85 99A8
+4B86 7A74
+4B87 8236
+4B88 8846
+4B89 8061
+4B8A 6557
+4B8B 5922
+4B8C 9644
+4B8D 88AB
+4B8E 9326
+4B8F 7B4B
+4B90 62B5
+4B91 5371
+4B92 5E81
+4B93 5BDF
+4B94 4F75
+4B95 58C1
+4B96 7058
+4B97 7DCA
+4B98 5438
+4B99 73E0
+4B9A 52D8
+4B9B 5208
+4B9C 78D0
+4B9D 6B23
+4B9E 6838
+4B9F 4E43
+4BA0 690E
+4BA1 8377
+4BA2 6ED1
+4BA3 98F2
+4BA4 8170
+4BA5 8857
+4BA6 8EF8
+4BA7 798E
+4BA8 83DC
+4BA9 8FCE
+4BAA 7E01
+4BAB 5510
+4BAC 4EA8
+4BAD 8A33
+4BAE 9162
+4BAF 5EFB
+4BB0 606F
+4BB1 4E86
+4BB2 664B
+4BB3 6368
+4BB4 5217
+4BB5 8056
+4BB6 51FD
+4BB7 7642
+4BB8 821F
+4BB9 9685
+4BBA 50CF
+4BBB 662F
+4BBC 4F3C
+4BBD 4E59
+4BBE 6A3D
+4BBF 4E71
+4BC0 523A
+4BC1 8ACF
+4BC2 6A58
+4BC3 66FF
+4BC4 670B
+4BC5 653B
+4BC6 9732
+4BC7 5EC3
+4BC8 8A13
+4BC9 5782
+4BCA 604B
+4BCB 866B
+4BCC 95D8
+4BCD 60A9
+4BCE 4E01
+4BCF 63CF
+4BD0 6FC0
+4BD1 659C
+4BD2 8CAC
+4BD3 8305
+4BD4 7CA7
+4BD5 6050
+4BD6 96F7
+4BD7 5FCD
+4BD8 640D
+4BD9 5B54
+4BDA 900F
+4BDB 62D3
+4BDC 59B9
+4BDD 7159
+4BDE 51AC
+4BDF 79F0
+4BE0 552F
+4BE1 5275
+4BE2 6697
+4BE3 80F8
+4BE4 4E98
+4BE5 4ECF
+4BE6 51CD
+4BE7 9D5C
+4BE8 5144
+4BE9 7A93
+4BEA 67F1
+4BEB 5841
+4BEC 7C21
+4BED 8861
+4BEE 5C31
+4BEF 68DA
+4BF0 91E7
+4BF1 9DF2
+4BF2 63EE
+4BF3 6575
+4BF4 84EE
+4BF5 523B
+4BF6 6B32
+4BF7 7C98
+4BF8 5982
+4BF9 969C
+4BFA 8987
+4BFB 7C9F
+4BFC 9006
+4BFD 62DB
+4BFE 66DC
+4C41 6355
+4C42 6982
+4C43 50AC
+4C44 623B
+4C45 5FD8
+4C46 63DA
+4C47 75DB
+4C48 627F
+4C49 616E
+4C4A 8266
+4C4B 7C95
+4C4C 716E
+4C4D 96C7
+4C4E 7F6A
+4C4F 5426
+4C50 5200
+4C51 83D3
+4C52 5211
+4C53 594F
+4C54 9D28
+4C55 574A
+4C56 66C7
+4C57 9858
+4C58 820E
+4C59 6614
+4C5A 733F
+4C5B 50B7
+4C5C 6551
+4C5D 5EB8
+4C5E 5B6B
+4C5F 55AC
+4C60 5FEB
+4C61 6388
+4C62 8CAF
+4C63 676F
+4C64 5951
+4C65 5A01
+4C66 71E5
+4C67 5DE3
+4C68 8C6A
+4C69 6271
+4C6A 81F4
+4C6B 5C3A
+4C6C 5F92
+4C6D 9045
+4C6E 7384
+4C6F 7149
+4C70 79D8
+4C71 796D
+4C72 9003
+4C73 83CC
+4C74 5FB4
+4C75 5B8D
+4C76 6279
+4C77 64AE
+4C78 7D18
+4C79 723E
+4C7A 5BEE
+4C7B 65E7
+4C7C 8D08
+4C7D 9E78
+4C7E 52E7
+4C7F 5D07
+4C80 9F62
+4C81 6069
+4C82 536F
+4C83 6681
+4C84 9663
+4C85 5E3D
+4C86 62B1
+4C87 722A
+4C88 6E4A
+4C89 93AE
+4C8A 79E6
+4C8B 53E5
+4C8C 809D
+4C8D 88FE
+4C8E 53B3
+4C8F 6C88
+4C90 6E7F
+4C91 5141
+4C92 9091
+4C93 6F6E
+4C94 84C4
+4C95 85EA
+4C96 8129
+4C97 6BD2
+4C98 663C
+4C99 7F72
+4C9A 73C2
+4C9B 5F1F
+4C9C 790E
+4C9D 60B2
+4C9E 72ED
+4C9F 58EE
+4CA0 8179
+4CA1 8E8D
+4CA2 5C65
+4CA3 5DE7
+4CA4 6C37
+4CA5 6DE1
+4CA6 862D
+4CA7 72AF
+4CA8 8E0A
+4CA9 7C92
+4CAA 8218
+4CAB 8033
+4CAC 63A7
+4CAD 9291
+4CAE 5019
+4CAF 8155
+4CB0 8A69
+4CB1 8EDF
+4CB2 66B4
+4CB3 8133
+4CB4 7591
+4CB5 6B20
+4CB6 6669
+4CB7 90F5
+4CB8 4E32
+4CB9 73EA
+4CBA 693F
+4CBB 7687
+4CBC 707D
+4CBD 7D3A
+4CBE 6148
+4CBF 8607
+4CC0 99FF
+4CC1 59C9
+4CC2 7832
+4CC3 7815
+4CC4 907F
+4CC5 80A1
+4CC6 5C3F
+4CC7 66A2
+4CC8 9418
+4CC9 6D44
+4CCA 5E55
+4CCB 5854
+4CCC 7B95
+4CCD 8DE1
+4CCE 4EA1
+4CCF 8C5A
+4CD0 81E8
+4CD1 89E6
+4CD2 9670
+4CD3 5263
+4CD4 74F6
+4CD5 9A5A
+4CD6 6012
+4CD7 520A
+4CD8 7434
+4CD9 9801
+4CDA 907A
+4CDB 5504
+4CDC 7956
+4CDD 5230
+4CDE 54B2
+4CDF 8A34
+4CE0 96A3
+4CE1 4FF3
+4CE2 9283
+4CE3 91E3
+4CE4 7D39
+4CE5 9688
+4CE6 4F51
+4CE7 7D61
+4CE8 5DBA
+4CE9 9BAE
+4CEA 5F80
+4CEB 795D
+4CEC 8597
+4CED 8DA3
+4CEE 7C60
+4CEF 5C0A
+4CF0 7565
+4CF1 85A9
+4CF2 63D6
+4CF3 9E97
+4CF4 7D22
+4CF5 5375
+4CF6 9AEA
+4CF7 9042
+4CF8 6B3D
+4CF9 7D0B
+4CFA 6392
+4CFB 80AA
+4CFC 7DE9
+4CFD 9F3B
+4CFE 99C6
+4D41 6D78
+4D42 6731
+4D43 5531
+4D44 6398
+4D45 7825
+4D46 5CB3
+4D47 5DE1
+4D48 92AD
+4D49 98FD
+4D4A 9810
+4D4B 6CE3
+4D4C 6B64
+4D4D 5321
+4D4E 6B53
+4D4F 5E8F
+4D50 7AE5
+4D51 502B
+4D52 6E56
+4D53 62BD
+4D54 8276
+4D55 6A9C
+4D56 4E18
+4D57 57F7
+4D58 752B
+4D59 7C97
+4D5A 82EB
+4D5B 9802
+4D5C 811A
+4D5D 73CD
+4D5E 8F9B
+4D5F 5C0B
+4D60 63E1
+4D61 7372
+4D62 8150
+4D63 80E1
+4D64 5B99
+4D65 76D7
+4D66 6291
+4D67 65EC
+4D68 8A3A
+4D69 5947
+4D6A 65E8
+4D6B 6E7E
+4D6C 6696
+4D6D 55AB
+4D6E 8F09
+4D6F 92ED
+4D70 9396
+4D71 4EEE
+4D72 755C
+4D73 6F38
+4D74 8F9E
+4D75 7981
+4D76 5C01
+4D77 62E0
+4D78 9BE8
+4D79 91C8
+4D7A 6276
+4D7B 65CB
+4D7C 8E0F
+4D7D 8B21
+4D7E 699B
+4D7F 6216
+4D80 5A92
+4D81 90B8
+4D82 50DA
+4D83 79DF
+4D84 6C41
+4D85 5270
+4D86 9175
+4D87 8B39
+4D88 685D
+4D89 5875
+4D8A 819C
+4D8B 5B9C
+4D8C 8A89
+4D8D 8A72
+4D8E 9D8F
+4D8F 6377
+4D90 5974
+4D91 8AA4
+4D92 52B1
+4D93 6962
+4D94 5C48
+4D95 9CE9
+4D96 673A
+4D97 75B2
+4D98 6D1E
+4D99 4F0D
+4D9A 7E6D
+4D9B 7B48
+4D9C 7FCC
+4D9D 65E6
+4D9E 59A5
+4D9F 79E9
+4DA0 6212
+4DA1 6EDE
+4DA2 770B
+4DA3 8CA7
+4DA4 65BC
+4DA5 885D
+4DA6 6ADB
+4DA7 5C4A
+4DA8 8074
+4DA9 9084
+4DAA 8ECC
+4DAB 65D7
+4DAC 57F9
+4DAD 708E
+4DAE 6F06
+4DAF 5E7C
+4DB0 77AC
+4DB1 4FF5
+4DB2 5949
+4DB3 81ED
+4DB4 9B45
+4DB5 7FFC
+4DB6 8178
+4DB7 69FD
+4DB8 6CCA
+4DB9 69C7
+4DBA 79D2
+4DBB 8B1D
+4DBC 9ED9
+4DBD 81D3
+4DBE 7A3C
+4DBF 7968
+4DC0 6F5C
+4DC1 63B2
+4DC2 8DDD
+4DC3 6383
+4DC4 6E9C
+4DC5 5E33
+4DC6 61F8
+4DC7 76BF
+4DC8 642C
+4DC9 7DB4
+4DCA 6247
+4DCB 6458
+4DCC 6816
+4DCD 5F69
+4DCE 9022
+4DCF 7A1A
+4DD0 82B9
+4DD1 70C8
+4DD2 9A12
+4DD3 6163
+4DD4 6FEF
+4DD5 53EB
+4DD6 9D3B
+4DD7 62FE
+4DD8 60A0
+4DD9 9591
+4DDA 6D99
+4DDB 6162
+4DDC 9298
+4DDD 635C
+4DDE 9707
+4DDF 8972
+4DE0 683D
+4DE1 51E1
+4DE2 9B54
+4DE3 608C
+4DE4 5B22
+4DE5 99C4
+4DE6 7126
+4DE7 8A73
+4DE8 971C
+4DE9 7396
+4DEA 67D4
+4DEB 60A3
+4DEC 4E11
+4DED 4EF0
+4DEE 8CDB
+4DEF 8CB0
+4DF0 7912
+4DF1 9774
+4DF2 8986
+4DF3 5146
+4DF4 57DC
+4DF5 99D0
+4DF6 80C3
+4DF7 8338
+4DF8 78A7
+4DF9 86CD
+4DFA 7F85
+4DFB 5049
+4DFC 8247
+4DFD 690B
+4DFE 7C4D
+4E41 53EA
+4E42 5F26
+4E43 6E25
+4E44 6881
+4E45 9375
+4E46 5DFD
+4E47 5347
+4E48 9727
+4E49 643A
+4E4A 75C7
+4E4B 6FA4
+4E4C 73A9
+4E4D 77E9
+4E4E 9451
+4E4F 8B5C
+4E50 808C
+4E51 674E
+4E52 4EAD
+4E53 582F
+4E54 7573
+4E55 8ED2
+4E56 6CE5
+4E57 9320
+4E58 8FF7
+4E59 7D33
+4E5A 72C2
+4E5B 8217
+4E5C 7422
+4E5D 82C5
+4E5E 9A30
+4E5F 773A
+4E60 5F84
+4E61 9673
+4E62 64AD
+4E63 920D
+4E64 74DC
+4E65 60C7
+4E66 86ED
+4E67 4FFA
+4E68 52A3
+4E69 6A3A
+4E6A 7720
+4E6B 5320
+4E6C 61B6
+4E6D 5674
+4E6E 8776
+4E6F 6CBF
+4E70 505C
+4E71 602A
+4E72 8466
+4E73 6B96
+4E74 6DBC
+4E75 97D3
+4E76 968F
+4E77 6876
+4E78 60D1
+4E79 5378
+4E7A 64A4
+4E7B 51A0
+4E7C 9154
+4E7D 5DF4
+4E7E 629E
+4E7F 5E63
+4E80 929A
+4E81 7693
+4E82 6C5A
+4E83 6597
+4E84 50E7
+4E85 7C82
+4E86 5F6B
+4E87 6CE1
+4E88 5F6C
+4E89 5AC1
+4E8A 6F2C
+4E8B 852D
+4E8C 6442
+4E8D 5750
+4E8E 58C7
+4E8F 8CFC
+4E90 8A5E
+4E91 7A7F
+4E92 689D
+4E93 7E26
+4E94 7A40
+4E95 7344
+4E96 8AEB
+4E97 4FD7
+4E98 7A63
+4E99 8036
+4E9A 7DEF
+4E9B 80C6
+4E9C 8AED
+4E9D 731F
+4E9E 8FEA
+4E9F 4F0E
+4EA0 758B
+4EA1 518A
+4EA2 6734
+4EA3 5FD9
+4EA4 61C7
+4EA5 65AF
+4EA6 9CF3
+4EA7 5ECA
+4EA8 9262
+4EA9 68DF
+4EAA 6CB8
+4EAB 80F4
+4EAC 57CB
+4EAD 6C99
+4EAE 96A0
+4EAF 5B64
+4EB0 58F1
+4EB1 68C4
+4EB2 5410
+4EB3 982C
+4EB4 8A87
+4EB5 4E5E
+4EB6 6167
+4EB7 9BAB
+4EB8 90AA
+4EB9 55B0
+4EBA 82BD
+4EBB 596A
+4EBC 66F3
+4EBD 8299
+4EBE 5893
+4EBF 719F
+4EC0 6284
+4EC1 67D1
+4EC2 9063
+4EC3 5ACC
+4EC4 6C57
+4EC5 7CE7
+4EC6 5851
+4EC7 64B2
+4EC8 58CA
+4EC9 830E
+4ECA 5968
+4ECB 5302
+4ECC 5A46
+4ECD 8702
+4ECE 6065
+4ECF 72D9
+4ED0 89A7
+4ED1 6689
+4ED2 66F9
+4ED3 5D6F
+4ED4 5BB0
+4ED5 96BC
+4ED6 636E
+4ED7 60DC
+4ED8 7948
+4ED9 51DD
+4EDA 8606
+4EDB 5EC9
+4EDC 7554
+4EDD 596E
+4EDE 6B04
+4EDF 4F43
+4EE0 7B94
+4EE1 67DA
+4EE2 62DD
+4EE3 628A
+4EE4 971E
+4EE5 62ED
+4EE6 6EC5
+4EE7 508D
+4EE8 67B6
+4EE9 80E4
+4EEA 9EBF
+4EEB 5EB5
+4EEC 638C
+4EED 85CD
+4EEE 9867
+4EEF 52C5
+4EF0 6016
+4EF1 68CB
+4EF2 61D0
+4EF3 5751
+4EF4 8F29
+4EF5 5FAA
+4EF6 81A8
+4EF7 7D62
+4EF8 71C8
+4EF9 54C0
+4EFA 69CC
+4EFB 6B3E
+4EFC 65AC
+4EFD 63C3
+4EFE 4F46
+4F41 7B1B
+4F42 6B86
+4F43 88F8
+4F44 5203
+4F45 732E
+4F46 6687
+4F47 7D17
+4F48 57F4
+4F49 570F
+4F4A 618E
+4F4B 970A
+4F4C 7C3F
+4F4D 8B00
+4F4E 7881
+4F4F 8CE0
+4F50 548B
+4F51 7B87
+4F52 745B
+4F53 7C11
+4F54 8870
+4F55 5398
+4F56 5448
+4F57 6CF3
+4F58 6F22
+4F59 53F6
+4F5A 88B4
+4F5B 5301
+4F5C 7A6B
+4F5D 8695
+4F5E 586B
+4F5F 5D29
+4F60 88C2
+4F61 62D2
+4F62 4E1E
+4F63 5036
+4F64 96C0
+4F65 7363
+4F66 8A3B
+4F67 5176
+4F68 7199
+4F69 7FE0
+4F6A 8888
+4F6B 7E1E
+4F6C 4E4F
+4F6D 84CB
+4F6E 6F2B
+4F6F 5859
+4F70 936C
+4F71 53E9
+4F72 865A
+4F73 9149
+4F74 86EF
+4F75 5E06
+4F76 5507
+4F77 902E
+4F78 6795
+4F79 846C
+4F7A 5BA5
+4F7B 82A5
+4F7C 8431
+4F7D 6D8C
+4F7E 63FA
+4F7F 4EA5
+4F80 51C6
+4F81 6328
+4F82 7F70
+4F83 5B5F
+4F84 5DBD
+4F85 99C8
+4F86 53EC
+4F87 7985
+4F88 8A54
+4F89 7962
+4F8A 88DF
+4F8B 5B09
+4F8C 4FB5
+4F8D 4F91
+4F8E 9B8E
+4F8F 5192
+4F90 96F0
+4F91 6DAF
+4F92 622F
+4F93 8490
+4F94 8CDC
+4F95 5075
+4F96 5CE0
+4F97 4E14
+4F98 4F83
+4F99 7C54
+4F9A 84D1
+4F9B 77B3
+4F9C 8AEE
+4F9D 5CE8
+4F9E 62F6
+4F9F 663B
+4FA0 8A93
+4FA1 8526
+4FA2 8A95
+4FA3 65FA
+4FA4 6714
+4FA5 53D4
+4FA6 62AB
+4FA7 8CE6
+4FA8 88F3
+4FA9 5BE7
+4FAA 868A
+4FAB 668E
+4FAC 582A
+4FAD 6170
+4FAE 696F
+4FAF 9F13
+4FB0 7A92
+4FB1 7893
+4FB2 6A7F
+4FB3 9017
+4FB4 9266
+4FB5 7D10
+4FB6 7BC7
+4FB7 6EF4
+4FB8 821C
+4FB9 5C3D
+4FBA 62CD
+4FBB 85C1
+4FBC 6F02
+4FBD 6E67
+4FBE 6691
+4FBF 85A6
+4FC0 637A
+4FC1 821B
+4FC2 4F8D
+4FC3 5091
+4FC4 8A02
+4FC5 62EC
+4FC6 9BC9
+4FC7 7A3D
+4FC8 7C9B
+4FC9 50C5
+4FCA 9019
+4FCB 708A
+4FCC 7C8B
+4FCD 64EC
+4FCE 665F
+4FCF 6562
+4FD0 732B
+4FD1 5339
+4FD2 67A0
+4FD3 55A7
+4FD4 6D2A
+4FD5 7A3F
+4FD6 64E6
+4FD7 79A7
+4FD8 67D8
+4FD9 7B26
+4FDA 96BB
+4FDB 6311
+4FDC 72A0
+4FDD 5C6F
+4FDE 7026
+4FDF 97EE
+4FE0 60DF
+4FE1 8AFE
+4FE2 8B04
+4FE3 8494
+4FE4 9BD6
+4FE5 82AF
+4FE6 932C
+4FE7 6606
+4FE8 9640
+4FE9 5BC2
+4FEA 86C7
+4FEB 7949
+4FEC 8017
+4FED 6919
+4FEE 7092
+4FEF 963B
+4FF0 7C7E
+4FF1 59D3
+4FF2 5B5C
+4FF3 7D1B
+4FF4 91D8
+4FF5 6A80
+4FF6 85E9
+4FF7 6905
+4FF8 6C93
+4FF9 502D
+4FFA 4EA6
+4FFB 7FC1
+4FFC 61A4
+4FFD 8CCA
+4FFE 9665
+5041 93D1
+5042 53F1
+5043 598A
+5044 8EAC
+5045 62D8
+5046 6867
+5047 71D5
+5048 7B67
+5049 504F
+504A 67D0
+504B 82D1
+504C 978D
+504D 748B
+504E 80BA
+504F 7336
+5050 514E
+5051 8105
+5052 90CA
+5053 584A
+5054 67FE
+5055 6FF1
+5056 5FFD
+5057 76C6
+5058 9A0E
+5059 507D
+505A 9694
+505B 5EF7
+505C 7BB8
+505D 904D
+505E 6C4E
+505F 85FB
+5060 819D
+5061 67AF
+5062 564C
+5063 5606
+5064 8C8C
+5065 56DA
+5066 73ED
+5067 8CC4
+5068 8FC5
+5069 96F6
+506A 6C50
+506B 8944
+506C 8F3F
+506D 7D5E
+506E 60E8
+506F 72FC
+5070 7D9C
+5071 8463
+5072 5CFB
+5073 5446
+5074 5D16
+5075 6CA1
+5076 81B3
+5077 58FA
+5078 5BB4
+5079 8108
+507A 541F
+507B 8CBC
+507C 6182
+507D 78A9
+507E 6FE1
+507F 91A4
+5080 76F2
+5081 6020
+5082 76FE
+5083 84C9
+5084 7F36
+5085 4EC7
+5086 755D
+5087 7A17
+5088 84EC
+5089 75F4
+508A 4F3A
+508B 676D
+508C 7460
+508D 62F3
+508E 6F20
+508F 79E4
+5090 87F9
+5091 6094
+5092 6234
+5093 66AB
+5094 820C
+5095 8499
+5096 723A
+5097 5FCC
+5098 6109
+5099 70CF
+509A 7261
+509B 7A50
+509C 5098
+509D 9AED
+509E 5D69
+509F 601C
+50A0 6667
+50A1 99B4
+50A2 5E7B
+50A3 643E
+50A4 5830
+50A5 53C9
+50A6 7A9F
+50A7 990C
+50A8 9B42
+50A9 8F5F
+50AA 7AAE
+50AB 5B9B
+50AC 68A2
+50AD 6249
+50AE 7984
+50AF 9DFA
+50B0 5451
+50B1 932F
+50B2 8AC4
+50B3 5F90
+50B4 8DF3
+50B5 5A2F
+50B6 80DE
+50B7 6D29
+50B8 7A4F
+50B9 84BC
+50BA 9D2B
+50BB 9010
+50BC 6D38
+50BD 916A
+50BE 6FC1
+50BF 9905
+50C0 6BBB
+50C1 5EB6
+50C2 91B8
+50C3 5076
+50C4 6F0F
+50C5 4E19
+50C6 540F
+50C7 9675
+50C8 6C72
+50C9 51B4
+50CA 5631
+50CB 9F20
+50CC 66A6
+50CD 5F0A
+50CE 75AB
+50CF 51F8
+50D0 674F
+50D1 8DF5
+50D2 6C70
+50D3 8A6B
+50D4 757F
+50D5 5CAC
+50D6 6841
+50D7 8CD3
+50D8 9BDB
+50D9 8475
+50DA 6893
+50DB 840C
+50DC 72DB
+50DD 7577
+50DE 8568
+50DF 783A
+50E0 847A
+50E1 5F10
+50E2 831C
+50E3 6813
+50E4 6E1A
+50E5 9DAF
+50E6 51F9
+50E7 7980
+50E8 4E99
+50E9 5EE3
+50EA 908A
+50EB 80AF
+50EC 59A8
+50ED 77DB
+50EE 8D74
+50EF 8A1F
+50F0 673D
+50F1 533F
+50F2 8A0A
+50F3 5618
+50F4 6756
+50F5 53D9
+50F6 4F10
+50F7 7409
+50F8 5A41
+50F9 4FF8
+50FA 79B0
+50FB 9838
+50FC 8E2A
+50FD 9D60
+50FE 8F44
+5141 65A5
+5142 75BE
+5143 906D
+5144 867B
+5145 60BC
+5146 51B6
+5147 5937
+5148 7D2F
+5149 916C
+514A 69AE
+514B 7CE0
+514C 792A
+514D 5D14
+514E 64C1
+514F 58EC
+5150 589C
+5151 8D66
+5152 66D9
+5153 61F2
+5154 912D
+5155 6E58
+5156 9435
+5157 965B
+5158 7272
+5159 5F6A
+515A 5E9A
+515B 8F1B
+515C 5B95
+515D 5C39
+515E 9013
+515F 834F
+5160 7CCE
+5161 620A
+5162 90ED
+5163 691B
+5164 6E15
+5165 65DB
+5166 66FE
+5167 4E9F
+5168 55AA
+5169 7A83
+516A 83E9
+516B 8B83
+516C 846D
+516D 83F0
+516E 7F50
+516F 918D
+5170 9190
+5171 758E
+5172 95A5
+5173 81E7
+5174 75E2
+5175 61A9
+5176 8A50
+5177 95B2
+5178 53A8
+5179 59F6
+517A 9813
+517B 7891
+517C 7C17
+517D 6B3A
+517E 57E0
+517F 620E
+5180 83D6
+5181 8AD2
+5182 75D4
+5183 927E
+5184 59DC
+5185 5289
+5186 9087
+5187 6FFE
+5188 7473
+5189 5C09
+518A 9D6C
+518B 84FC
+518C 7CDF
+518D 7BAD
+518E 8A6E
+518F 594E
+5190 56A2
+5191 819A
+5192 7947
+5193 6636
+5194 53E1
+5195 7887
+5196 58CC
+5197 9397
+5198 6E13
+5199 5256
+519A 828B
+519B 9E9F
+519C 9583
+519D 658C
+519E 9E93
+519F 7345
+51A0 6E26
+51A1 9D07
+51A2 5983
+51A3 7DAC
+51A4 96C1
+51A5 61BE
+51A6 6762
+51A7 9ECE
+51A8 90A8
+51A9 9187
+51AA 9F0E
+51AB 7C38
+51AC 51F1
+51AD 8599
+51AE 524C
+51AF 540E
+51B0 7901
+51B1 655E
+51B2 6668
+51B3 5CE1
+51B4 7566
+51B5 76C8
+51B6 8679
+51B7 531D
+51B8 5506
+51B9 7926
+51BA 8912
+51BB 77EF
+51BC 7CC0
+51BD 570B
+51BE 515C
+51BF 7E8A
+51C0 535C
+51C1 8A60
+51C2 65A7
+51C3 8766
+51C4 5766
+51C5 6AE8
+51C6 87FB
+51C7 5E16
+51C8 7AEA
+51C9 8D73
+51CA 771E
+51CB 737A
+51CC 66E0
+51CD 9410
+51CE 816B
+51CF 7B08
+51D0 91FC
+51D1 5737
+51D2 6FE4
+51D3 856A
+51D4 7E55
+51D5 9957
+51D6 87BA
+51D7 694A
+51D8 818F
+51D9 5EFF
+51DA 891C
+51DB 72D0
+51DC 9846
+51DD 9EDB
+51DE 8D99
+51DF 5DD6
+51E0 62B9
+51E1 64AB
+51E2 4F76
+51E3 613F
+51E4 68AF
+51E5 5F14
+51E6 800C
+51E7 92F8
+51E8 7BC1
+51E9 52FE
+51EA 664F
+51EB 9177
+51EC 51F6
+51ED 97A0
+51EE 839E
+51EF 647A
+51F0 9C3A
+51F1 67F5
+51F2 7C4F
+51F3 685F
+51F4 9B6F
+51F5 9F4B
+51F6 7FFB
+51F7 9348
+51F8 4FF6
+51F9 9E92
+51FA 9197
+51FB 96DB
+51FC 5BE6
+51FD 6CCC
+51FE 7CFE
+5241 9453
+5242 6822
+5243 66B9
+5244 5BD4
+5245 98F4
+5246 8AE6
+5247 8154
+5248 7827
+5249 74BD
+524A 6ED3
+524B 9288
+524C 5A20
+524D 5B8B
+524E 86F8
+524F 760D
+5250 865C
+5251 6641
+5252 91C9
+5253 5589
+5254 7A4E
+5255 59E5
+5256 6042
+5257 932B
+5258 5B5A
+5259 849C
+525A 5C91
+525B 96CD
+525C 62D9
+525D 675C
+525E 6787
+525F 5E7D
+5260 8650
+5261 9EB9
+5262 5CB1
+5263 80CE
+5264 7A00
+5265 8ABC
+5266 5700
+5267 8096
+5268 7D72
+5269 9211
+526A 8098
+526B 907C
+526C 7761
+526D 8737
+526E 9075
+526F 817A
+5270 7C3E
+5271 6EA2
+5272 965E
+5273 7E90
+5274 72D7
+5275 58FD
+5276 60B3
+5277 9786
+5278 7E88
+5279 587E
+527A 6E20
+527B 84DC
+527C 6961
+527D 77AD
+527E 5197
+527F 652A
+5280 6777
+5281 5DCD
+5282 6101
+5283 932E
+5284 5954
+5285 6367
+5286 798D
+5287 7AFF
+5288 80D6
+5289 58B3
+528A 6168
+528B 6AC3
+528C 7483
+528D 9B92
+528E 660A
+528F 642D
+5290 5118
+5291 6763
+5292 809B
+5293 9C10
+5294 4FC9
+5295 6953
+5296 7A1C
+5297 52FF
+5298 6055
+5299 768E
+529A 817F
+529B 5642
+529C 5F6D
+529D 7194
+529E 70BB
+529F 7436
+52A0 8000
+52A1 874B
+52A2 55DA
+52A3 7435
+52A4 7690
+52A5 96EB
+52A6 66DD
+52A7 751C
+52A8 633D
+52A9 6EC9
+52AA 7C64
+52AB 7CA5
+52AC 6D35
+52AD 935C
+52AE 7027
+52AF 5E25
+52B0 701D
+52B1 54BD
+52B2 611A
+52B3 6973
+52B4 6C6A
+52B5 559A
+52B6 6D19
+52B7 96CC
+52B8 5BE1
+52B9 59FB
+52BA 697C
+52BB 914C
+52BC 7709
+52BD 8500
+52BE 7A46
+52BF 7872
+52C0 92E4
+52C1 8CED
+52C2 7CFA
+52C3 9D1B
+52C4 814E
+52C5 9AC4
+52C6 68A0
+52C7 6DCB
+52C8 5918
+52C9 83B1
+52CA 5629
+52CB 9B41
+52CC 6897
+52CD 70B3
+52CE 9771
+52CF 9419
+52D0 67A2
+52D1 6802
+52D2 7895
+52D3 68A7
+52D4 50D6
+52D5 80B1
+52D6 5EF8
+52D7 82D4
+52D8 797A
+52D9 67CA
+52DA 7E4D
+52DB 69CD
+52DC 51C4
+52DD 723D
+52DE 6829
+52DF 99B3
+52E0 5F3C
+52E1 8F61
+52E2 682B
+52E3 6155
+52E4 6591
+52E5 8FB1
+52E6 7E1B
+52E7 9798
+52E8 9952
+52E9 8877
+52EA 5B2C
+52EB 6631
+52EC 4FA0
+52ED 6939
+52EE 6AFB
+52EF 5BB5
+52F0 7AC8
+52F1 5026
+52F2 5944
+52F3 9059
+52F4 7B25
+52F5 7B4F
+52F6 8E74
+52F7 8543
+52F8 5858
+52F9 8B0E
+52FA 5039
+52FB 8654
+52FC 97F6
+52FD 7569
+52FE 72F8
+5341 4EF7
+5342 9D89
+5343 5016
+5344 51CC
+5345 62CC
+5346 91C6
+5347 8755
+5348 649A
+5349 88F4
+534A 91E6
+534B 6854
+534C 695A
+534D 6C40
+534E 7B6C
+534F 6741
+5350 77D7
+5351 8823
+5352 5384
+5353 8EAF
+5354 7280
+5355 8C6B
+5356 788D
+5357 7165
+5358 8207
+5359 68B1
+535A 8D04
+535B 9077
+535C 701E
+535D 8FE6
+535E 810A
+535F 81BF
+5360 89DC
+5361 68B3
+5362 6ADF
+5363 92EA
+5364 95C7
+5365 7957
+5366 7A20
+5367 53A9
+5368 8E5F
+5369 786F
+536A 79B9
+536B 5F27
+536C 5ED6
+536D 6853
+536E 93AC
+536F 919C
+5370 691A
+5371 5806
+5372 64B0
+5373 7E4B
+5374 7D8F
+5375 68F2
+5376 6EA5
+5377 82DB
+5378 9192
+5379 5243
+537A 8EB0
+537B 9081
+537C 721B
+537D 7DCB
+537E 7656
+537F 59AC
+5380 6FE0
+5381 8B28
+5382 80A2
+5383 5544
+5384 6070
+5385 5F4A
+5386 68C8
+5387 633A
+5388 9438
+5389 9B4F
+538A 81E5
+538B 6A17
+538C 70DD
+538D 69A7
+538E 614C
+538F 920E
+5390 9310
+5391 9BAD
+5392 52D7
+5393 925E
+5394 92F9
+5395 5993
+5396 7696
+5397 66FB
+5398 5769
+5399 73CA
+539A 7678
+539B 6A1F
+539C 7E9C
+539D 9811
+539E 8CD1
+539F 5840
+53A0 6349
+53A1 871C
+53A2 62D0
+53A3 60B4
+53A4 6B89
+53A5 86EE
+53A6 5764
+53A7 581D
+53A8 8549
+53A9 7235
+53AA 7652
+53AB 983B
+53AC 8237
+53AD 5351
+53AE 5C24
+53AF 59BE
+53B0 5815
+53B1 901D
+53B2 69B4
+53B3 834A
+53B4 9EA9
+53B5 976B
+53B6 8086
+53B7 53AD
+53B8 6068
+53B9 4FAE
+53BA 76C3
+53BB 6A05
+53BC 689B
+53BD 937E
+53BE 99D5
+53BF 91C7
+53C0 5C16
+53C1 585E
+53C2 61A7
+53C3 9699
+53C4 4FDF
+53C5 8278
+53C6 9C52
+53C7 5F45
+53C8 6108
+53C9 7C8D
+53CA 806F
+53CB 5DF7
+53CC 8D6B
+53CD 57B0
+53CE 98E2
+53CF 5703
+53D0 79BF
+53D1 5996
+53D2 7941
+53D3 540A
+53D4 83DF
+53D5 9C39
+53D6 52D2
+53D7 6BD8
+53D8 86CB
+53D9 4EC0
+53DA 9A28
+53DB 5366
+53DC 8006
+53DD 7337
+53DE 6492
+53DF 8FED
+53E0 5AC9
+53E1 5420
+53E2 537F
+53E3 4FAF
+53E4 807E
+53E5 543B
+53E6 7515
+53E7 7B18
+53E8 8749
+53E9 54B3
+53EA 704C
+53EB 8997
+53EC 6CAB
+53ED 85FA
+53EE 7114
+53EF 696E
+53F0 9328
+53F1 745A
+53F2 59D1
+53F3 6E5B
+53F4 617E
+53F5 53E2
+53F6 8317
+53F7 76E7
+53F8 848B
+53F9 85AF
+53FA 6925
+53FB 5C60
+53FC 7259
+53FD 75D5
+53FE 8B90
+5441 6E07
+5442 82AD
+5443 5C4F
+5444 7BED
+5445 9784
+5446 6F70
+5447 764C
+5448 88B7
+5449 92D2
+544A 4F36
+544B 5EFE
+544C 9061
+544D 88E1
+544E 8471
+544F 711A
+5450 6D1B
+5451 80B4
+5452 74E2
+5453 7433
+5454 5A7F
+5455 905C
+5456 980C
+5457 5319
+5458 906E
+5459 6BB4
+545A 85AA
+545B 7897
+545C 7AFA
+545D 6AAE
+545E 8910
+545F 958F
+5460 620C
+5461 4F3D
+5462 4F7C
+5463 79BE
+5464 9D0E
+5465 4ED4
+5466 57A2
+5467 51A5
+5468 6900
+5469 6089
+546A 707C
+546B 7AE3
+546C 8956
+546D 93A7
+546E 9C2D
+546F 5112
+5470 52FA
+5471 7CCA
+5472 60F9
+5473 7078
+5474 81C6
+5475 559D
+5476 6991
+5477 96C9
+5478 553E
+5479 805A
+547A 8304
+547B 8332
+547C 54FA
+547D 565B
+547E 8FBF
+547F 5634
+5480 6760
+5481 5265
+5482 840E
+5483 5E5F
+5484 7B65
+5485 9035
+5486 8387
+5487 6B4E
+5488 58BE
+5489 6309
+548A 727D
+548B 97AD
+548C 69D0
+548D 546A
+548E 984E
+548F 632B
+5490 714E
+5491 8557
+5492 7CDE
+5493 6372
+5494 68F9
+5495 7511
+5496 8602
+5497 6EBA
+5498 5A3C
+5499 7A84
+549A 851A
+549B 95A4
+549C 59D0
+549D 60DA
+549E 51EA
+549F 5A29
+54A0 7169
+54A1 6F15
+54A2 696B
+54A3 63BB
+54A4 75E9
+54A5 4E4E
+54A6 7DBB
+54A7 6934
+54A8 8521
+54A9 8FFA
+54AA 9354
+54AB 9C3B
+54AC 5F17
+54AD 5ED3
+54AE 8258
+54AF 895F
+54B0 82E7
+54B1 52C3
+54B2 5C51
+54B3 83AB
+54B4 7826
+54B5 79E1
+54B6 7FF0
+54B7 626E
+54B8 60F0
+54B9 5CA8
+54BA 6F97
+54BB 71A8
+54BC 9909
+54BD 5132
+54BE 5E37
+54BF 5F04
+54C0 637B
+54C1 6753
+54C2 68D7
+54C3 6652
+54C4 9CF6
+54C5 88B0
+54C6 52AB
+54C7 4FC4
+54C8 4E3C
+54C9 67B3
+54CA 7BAA
+54CB 7F4D
+54CC 8A23
+54CD 63B4
+54CE 71E6
+54CF 65A4
+54D0 6F09
+54D1 853D
+54D2 5072
+54D3 7DBA
+54D4 5516
+54D5 7B04
+54D6 72FD
+54D7 6CD3
+54D8 8422
+54D9 621F
+54DA 50AD
+54DB 8235
+54DC 8718
+54DD 5919
+54DE 6028
+54DF 677C
+54E0 6F23
+54E1 75B9
+54E2 695C
+54E3 520E
+54E4 8018
+54E5 8B01
+54E6 71ED
+54E7 5713
+54E8 660F
+54E9 83EB
+54EA 7164
+54EB 7D9B
+54EC 5617
+54ED 7D7D
+54EE 8F4D
+54EF 9318
+54F0 8569
+54F1 5D17
+54F2 678C
+54F3 67DE
+54F4 87C7
+54F5 79AE
+54F6 5835
+54F7 8404
+54F8 9041
+54F9 7FD4
+54FA 6E8C
+54FB 8A63
+54FC 9D08
+54FD 670F
+54FE 939A
+5541 63AC
+5542 602F
+5543 64E2
+5544 608D
+5545 96B7
+5546 6357
+5547 8461
+5548 914B
+5549 75D8
+554A 60E7
+554B 9913
+554C 9C57
+554D 5984
+554E 6DEB
+554F 5E96
+5550 6D9C
+5551 9BF0
+5552 58BB
+5553 7977
+5554 60B6
+5555 633F
+5556 5BF5
+5557 9812
+5558 558B
+5559 82D3
+555A 5147
+555B 6190
+555C 7953
+555D 79BD
+555E 6C5D
+555F 9EBA
+5560 9C48
+5561 8DA8
+5562 5EE0
+5563 7D43
+5564 5EFC
+5565 854E
+5566 8CE4
+5567 5AE1
+5568 54E8
+5569 5023
+556A 52BE
+556B 7DEC
+556C 8511
+556D 6666
+556E 6C3E
+556F 724C
+5570 8ADC
+5571 9C0D
+5572 77A5
+5573 8B02
+5574 8D05
+5575 6F11
+5576 9834
+5577 97FB
+5578 50FB
+5579 7F75
+557A 5A03
+557B 8513
+557C 4FB6
+557D 634C
+557E 9D61
+557F 808B
+5580 5294
+5581 65A1
+5582 567A
+5583 5957
+5584 8D0B
+5585 6A35
+5586 6AD3
+5587 70F9
+5588 865E
+5589 6FB1
+558A 51E7
+558B 7FEB
+558C 59EA
+558D 5E87
+558E 6B6A
+558F 754F
+5590 717D
+5591 914E
+5592 7D2C
+5593 8C79
+5594 6062
+5595 621A
+5596 7FA8
+5597 5F1B
+5598 6C8C
+5599 86FE
+559A 7562
+559B 7B86
+559C 9AB8
+559D 6627
+559E 7ABA
+559F 844E
+55A0 6F81
+55A1 8B2C
+55A2 86A4
+55A3 6FEB
+55A4 7B8B
+55A5 7F77
+55A6 8F2F
+55A7 8E44
+55A8 7E23
+55A9 4E4D
+55AA 79A6
+55AB 8AFA
+55AC 903C
+55AD 50D1
+55AE 9ECD
+55AF 5EDF
+55B0 758F
+55B1 631F
+55B2 53DB
+55B3 9910
+55B4 826E
+55B5 62F7
+55B6 68FA
+55B7 725D
+55B8 803D
+55B9 58D5
+55BA 5C4D
+55BB 86D9
+55BC 540B
+55BD 8805
+55BE 92F2
+55BF 9237
+55C0 5C61
+55C1 985B
+55C2 86E4
+55C3 966A
+55C4 7262
+55C5 6955
+55C6 6CD7
+55C7 6994
+55C8 9C2F
+55C9 77E7
+55CA 68C9
+55CB 8DE8
+55CC 6D6C
+55CD 67C1
+55CE 9BAA
+55CF 619A
+55D0 63A9
+55D1 7015
+55D2 9306
+55D3 934D
+55D4 6A61
+55D5 6258
+55D6 5283
+55D7 7525
+55D8 5687
+55D9 6C83
+55DA 6834
+55DB 649E
+55DC 4E9B
+55DD 7252
+55DE 59E6
+55DF 8FC2
+55E0 5FBD
+55E1 6DD8
+55E2 85F7
+55E3 8A51
+55E4 9817
+55E5 99C1
+55E6 63A0
+55E7 7C81
+55E8 5B30
+55E9 8139
+55EA 5403
+55EB 7E82
+55EC 8106
+55ED 532A
+55EE 6A8E
+55EF 7F6B
+55F0 54E9
+55F1 5678
+55F2 8AB9
+55F3 6715
+55F4 5BD3
+55F5 6478
+55F6 64FE
+55F7 6B1D
+55F8 8CC2
+55F9 51CB
+55FA 7E8F
+5641 5F0C
+5642 4E10
+5643 4E15
+5644 4E28
+5645 4E2A
+5646 4E31
+5647 4E36
+5648 4E3F
+5649 4E42
+564A 4E56
+564B 4E58
+564C 4E62
+564D 4E82
+564E 4E85
+564F 4E8A
+5650 4E8E
+5651 5F0D
+5652 4E9E
+5653 4EA0
+5654 4EA2
+5655 4EB0
+5656 4EB3
+5657 4EB6
+5658 4ECE
+5659 4ECD
+565A 4EC4
+565B 4EC6
+565C 4EC2
+565D 4EE1
+565E 4ED7
+565F 4EDE
+5660 4EED
+5661 4EDF
+5662 4EFC
+5663 4F09
+5664 4F1C
+5665 4F00
+5666 4F03
+5667 4F5A
+5668 4F30
+5669 4F5D
+566A 4F39
+566B 4F57
+566C 4F47
+566D 4F5E
+566E 4F56
+566F 4F5B
+5670 4F92
+5671 4F8A
+5672 4F88
+5673 4F8F
+5674 4F9A
+5675 4FAD
+5676 4F98
+5677 4F7B
+5678 4FAB
+5679 4F69
+567A 4F70
+567B 4F94
+567C 4F6F
+567D 4F86
+567E 4F96
+567F 4FD4
+5680 4FCE
+5681 4FD8
+5682 4FDB
+5683 4FD1
+5684 4FDA
+5685 4FD0
+5686 4FCD
+5687 4FE4
+5688 4FE5
+5689 501A
+568A 5040
+568B 5028
+568C 5014
+568D 502A
+568E 5025
+568F 5005
+5690 5021
+5691 5022
+5692 5029
+5693 502C
+5694 4FFF
+5695 4FFE
+5696 4FEF
+5697 5011
+5698 501E
+5699 5006
+569A 5043
+569B 5047
+569C 5055
+569D 5050
+569E 5048
+569F 505A
+56A0 5056
+56A1 500F
+56A2 5046
+56A3 5070
+56A4 5042
+56A5 506C
+56A6 5078
+56A7 5080
+56A8 5094
+56A9 509A
+56AA 5085
+56AB 50B4
+56AC 6703
+56AD 50B2
+56AE 50C9
+56AF 50CA
+56B0 50B3
+56B1 50C2
+56B2 50F4
+56B3 50DE
+56B4 50E5
+56B5 50D8
+56B6 50ED
+56B7 50E3
+56B8 50EE
+56B9 50F9
+56BA 50F5
+56BB 5109
+56BC 5101
+56BD 5102
+56BE 511A
+56BF 5115
+56C0 5114
+56C1 5116
+56C2 5121
+56C3 513A
+56C4 5137
+56C5 513C
+56C6 513B
+56C7 513F
+56C8 5140
+56C9 514A
+56CA 514C
+56CB 5152
+56CC 5154
+56CD 5162
+56CE 5164
+56CF 5169
+56D0 516A
+56D1 516E
+56D2 5180
+56D3 5182
+56D4 56D8
+56D5 518C
+56D6 5189
+56D7 518F
+56D8 5191
+56D9 5193
+56DA 5195
+56DB 5196
+56DC 519D
+56DD 51A4
+56DE 51A6
+56DF 51A2
+56E0 51A9
+56E1 51AA
+56E2 51AB
+56E3 51B3
+56E4 51B1
+56E5 51B2
+56E6 51B0
+56E7 51B5
+56E8 51BE
+56E9 51BD
+56EA 51C5
+56EB 51C9
+56EC 51DB
+56ED 51E0
+56EE 51E9
+56EF 51EC
+56F0 51ED
+56F1 51F0
+56F2 51F5
+56F3 51FE
+56F4 5204
+56F5 520B
+56F6 5214
+56F7 5215
+56F8 5227
+56F9 522A
+56FA 522E
+56FB 5233
+56FC 5239
+56FD 5244
+56FE 524B
+5741 524F
+5742 525E
+5743 5254
+5744 5271
+5745 526A
+5746 5273
+5747 5274
+5748 5269
+5749 527F
+574A 527D
+574B 528D
+574C 5288
+574D 5292
+574E 5291
+574F 529C
+5750 52A6
+5751 52AC
+5752 52AD
+5753 52BC
+5754 52B5
+5755 52C1
+5756 52C0
+5757 52CD
+5758 52DB
+5759 52DE
+575A 52E3
+575B 52E6
+575C 52E0
+575D 52F3
+575E 52F5
+575F 52F8
+5760 52F9
+5761 5300
+5762 5306
+5763 5307
+5764 5308
+5765 7538
+5766 530D
+5767 5310
+5768 530F
+5769 5315
+576A 531A
+576B 5324
+576C 5323
+576D 532F
+576E 5331
+576F 5333
+5770 5338
+5771 5340
+5772 5345
+5773 5346
+5774 5349
+5775 4E17
+5776 534D
+5777 51D6
+5778 8209
+5779 535E
+577A 5369
+577B 536E
+577C 5372
+577D 5377
+577E 537B
+577F 5382
+5780 5393
+5781 5396
+5782 53A0
+5783 53A6
+5784 53A5
+5785 53AE
+5786 53B0
+5787 53B2
+5788 53B6
+5789 53C3
+578A 7C12
+578B 53DD
+578C 53DF
+578D 66FC
+578E FA0E
+578F 71EE
+5790 53EE
+5791 53E8
+5792 53ED
+5793 53FA
+5794 5401
+5795 543D
+5796 5440
+5797 542C
+5798 542D
+5799 543C
+579A 542E
+579B 5436
+579C 5429
+579D 541D
+579E 544E
+579F 548F
+57A0 5475
+57A1 548E
+57A2 545F
+57A3 5471
+57A4 5477
+57A5 5470
+57A6 5492
+57A7 547B
+57A8 5480
+57A9 549C
+57AA 5476
+57AB 5484
+57AC 5490
+57AD 5486
+57AE 548A
+57AF 54C7
+57B0 54BC
+57B1 54AF
+57B2 54A2
+57B3 54B8
+57B4 54A5
+57B5 54AC
+57B6 54C4
+57B7 54D8
+57B8 54C8
+57B9 54A8
+57BA 54AB
+57BB 54C2
+57BC 54A4
+57BD 54A9
+57BE 54BE
+57BF 54E5
+57C0 54FF
+57C1 54E6
+57C2 550F
+57C3 5514
+57C4 54FD
+57C5 54EE
+57C6 54ED
+57C7 54E2
+57C8 5539
+57C9 5540
+57CA 5563
+57CB 554C
+57CC 552E
+57CD 555C
+57CE 5545
+57CF 5556
+57D0 5557
+57D1 5538
+57D2 5533
+57D3 555D
+57D4 5599
+57D5 5580
+57D6 558A
+57D7 559F
+57D8 557B
+57D9 557E
+57DA 5598
+57DB 559E
+57DC 55AE
+57DD 557C
+57DE 5586
+57DF 5583
+57E0 55A9
+57E1 5587
+57E2 55A8
+57E3 55C5
+57E4 55DF
+57E5 55C4
+57E6 55DC
+57E7 55E4
+57E8 55D4
+57E9 55F9
+57EA 5614
+57EB 55F7
+57EC 5616
+57ED 55FE
+57EE 55FD
+57EF 561B
+57F0 564E
+57F1 5650
+57F2 5636
+57F3 5632
+57F4 5638
+57F5 566B
+57F6 5664
+57F7 5686
+57F8 562F
+57F9 566C
+57FA 566A
+57FB 71DF
+57FC 5694
+57FD 568F
+57FE 5680
+5841 568A
+5842 56A0
+5843 56A5
+5844 56AE
+5845 56B6
+5846 56B4
+5847 56C8
+5848 56C2
+5849 56BC
+584A 56C1
+584B 56C3
+584C 56C0
+584D 56CE
+584E 56D3
+584F 56D1
+5850 56D7
+5851 56EE
+5852 56F9
+5853 56FF
+5854 5704
+5855 5709
+5856 5708
+5857 570D
+5858 55C7
+5859 5718
+585A 5716
+585B 571C
+585C 5726
+585D 5738
+585E 574E
+585F 573B
+5860 5759
+5861 5740
+5862 574F
+5863 5765
+5864 5788
+5865 5761
+5866 577F
+5867 5789
+5868 5793
+5869 57A0
+586A 57A4
+586B 57B3
+586C 57AC
+586D 57AA
+586E 57C3
+586F 57C6
+5870 57C8
+5871 57C0
+5872 57D4
+5873 57C7
+5874 57D2
+5875 57D3
+5876 57D6
+5877 FA0F
+5878 580A
+5879 57E3
+587A 580B
+587B 5819
+587C 5821
+587D 584B
+587E 5862
+587F 6BC0
+5880 583D
+5881 5852
+5882 FA10
+5883 5870
+5884 5879
+5885 5885
+5886 5872
+5887 589F
+5888 58AB
+5889 58B8
+588A 589E
+588B 58AE
+588C 58B2
+588D 58B9
+588E 58BA
+588F 58C5
+5890 58D3
+5891 58D1
+5892 58D7
+5893 58D9
+5894 58D8
+5895 58DE
+5896 58DC
+5897 58DF
+5898 58E4
+5899 58E5
+589A 58EF
+589B 58F7
+589C 58F9
+589D 58FB
+589E 58FC
+589F 5902
+58A0 590A
+58A1 590B
+58A2 5910
+58A3 591B
+58A4 68A6
+58A5 5925
+58A6 592C
+58A7 592D
+58A8 5932
+58A9 5938
+58AA 593E
+58AB 5955
+58AC 5950
+58AD 5953
+58AE 595A
+58AF 5958
+58B0 595B
+58B1 595D
+58B2 5963
+58B3 5962
+58B4 5960
+58B5 5967
+58B6 596C
+58B7 5969
+58B8 5978
+58B9 5981
+58BA 598D
+58BB 599B
+58BC 599D
+58BD 59A3
+58BE 59A4
+58BF 59B2
+58C0 59BA
+58C1 59C6
+58C2 59E8
+58C3 59D9
+58C4 59DA
+58C5 5A25
+58C6 5A1F
+58C7 5A11
+58C8 5A1C
+58C9 5A1A
+58CA 5A09
+58CB 5A40
+58CC 5A6C
+58CD 5A49
+58CE 5A35
+58CF 5A36
+58D0 5A62
+58D1 5A6A
+58D2 5A9A
+58D3 5ABC
+58D4 5ABE
+58D5 5AD0
+58D6 5ACB
+58D7 5AC2
+58D8 5ABD
+58D9 5AE3
+58DA 5AD7
+58DB 5AE6
+58DC 5AE9
+58DD 5AD6
+58DE 5AFA
+58DF 5AFB
+58E0 5B0C
+58E1 5B0B
+58E2 5B16
+58E3 5B32
+58E4 5B2A
+58E5 5B36
+58E6 5B3E
+58E7 5B43
+58E8 5B45
+58E9 5B40
+58EA 5B51
+58EB 5B55
+58EC 5B56
+58ED 6588
+58EE 5B5B
+58EF 5B65
+58F0 5B69
+58F1 5B70
+58F2 5B73
+58F3 5B75
+58F4 5B78
+58F5 5B7A
+58F6 5B80
+58F7 5B83
+58F8 5BA6
+58F9 5BB8
+58FA 5BC3
+58FB 5BC7
+58FC 5BC0
+58FD 5BC9
+58FE 752F
+5941 5BD0
+5942 5BD8
+5943 5BDE
+5944 5BEC
+5945 5BE4
+5946 5BE2
+5947 5BE5
+5948 5BEB
+5949 5BF0
+594A 5BF3
+594B 5BF6
+594C 5C05
+594D 5C07
+594E 5C08
+594F 5C0D
+5950 5C13
+5951 5C1E
+5952 5C20
+5953 5C22
+5954 5C28
+5955 5C38
+5956 5C41
+5957 5C46
+5958 5C4E
+5959 5C53
+595A 5C50
+595B 5B71
+595C 5C6C
+595D 5C6E
+595E 5C76
+595F 5C79
+5960 5C8C
+5961 5C94
+5962 5CBE
+5963 5CAB
+5964 5CBB
+5965 5CB6
+5966 5CB7
+5967 5CA6
+5968 5CBA
+5969 5CC5
+596A 5CBC
+596B 5CC7
+596C 5CD9
+596D 5CE9
+596E 5CFD
+596F 5CFA
+5970 5CF5
+5971 5CED
+5972 5CEA
+5973 5D0B
+5974 5D15
+5975 5D1F
+5976 5D1B
+5977 5D11
+5978 5D27
+5979 5D22
+597A 5D1A
+597B 5D19
+597C 5D18
+597D 5D4C
+597E 5D52
+597F 5D53
+5980 FA11
+5981 5D5C
+5982 5D4E
+5983 5D4B
+5984 5D42
+5985 5D6C
+5986 5D73
+5987 5D6D
+5988 5D76
+5989 5D87
+598A 5D84
+598B 5D82
+598C 5D8C
+598D 5DA2
+598E 5D9D
+598F 5D90
+5990 5DAC
+5991 5DAE
+5992 5DB7
+5993 5DB8
+5994 5DBC
+5995 5DB9
+5996 5DC9
+5997 5DD0
+5998 5DD3
+5999 5DD2
+599A 5DDB
+599B 5DEB
+599C 5DF5
+599D 5E0B
+599E 5E1A
+599F 5E19
+59A0 5E11
+59A1 5E1B
+59A2 5E36
+59A3 5E44
+59A4 5E43
+59A5 5E40
+59A6 5E47
+59A7 5E4E
+59A8 5E57
+59A9 5E54
+59AA 5E62
+59AB 5E64
+59AC 5E75
+59AD 5E76
+59AE 5E7A
+59AF 5E7F
+59B0 5EA0
+59B1 5EC1
+59B2 5EC2
+59B3 5EC8
+59B4 5ED0
+59B5 5ECF
+59B6 5EDD
+59B7 5EDA
+59B8 5EDB
+59B9 5EE2
+59BA 5EE1
+59BB 5EE8
+59BC 5EE9
+59BD 5EEC
+59BE 5EF0
+59BF 5EF1
+59C0 5EF3
+59C1 5EF4
+59C2 5F03
+59C3 5F09
+59C4 5F0B
+59C5 5F11
+59C6 5F16
+59C7 5F21
+59C8 5F29
+59C9 5F2D
+59CA 5F2F
+59CB 5F34
+59CC 5F38
+59CD 5F41
+59CE 5F48
+59CF 5F4C
+59D0 5F4E
+59D1 5F51
+59D2 5F56
+59D3 5F57
+59D4 5F59
+59D5 5F5C
+59D6 5F5D
+59D7 5F61
+59D8 5F67
+59D9 5F73
+59DA 5F77
+59DB 5F83
+59DC 5F82
+59DD 5F7F
+59DE 5F8A
+59DF 5F88
+59E0 5F87
+59E1 5F91
+59E2 5F99
+59E3 5F9E
+59E4 5F98
+59E5 5FA0
+59E6 5FA8
+59E7 5FAD
+59E8 5FB7
+59E9 5FBC
+59EA 5FD6
+59EB 5FFB
+59EC 5FE4
+59ED 5FF8
+59EE 5FF1
+59EF 5FF0
+59F0 5FDD
+59F1 5FDE
+59F2 5FFF
+59F3 6021
+59F4 6019
+59F5 6010
+59F6 6029
+59F7 600E
+59F8 6031
+59F9 601B
+59FA 6015
+59FB 602B
+59FC 6026
+59FD 600F
+59FE 603A
+5A41 605A
+5A42 6041
+5A43 6060
+5A44 605D
+5A45 606A
+5A46 6077
+5A47 605F
+5A48 604A
+5A49 6046
+5A4A 604D
+5A4B 6063
+5A4C 6043
+5A4D 6064
+5A4E 606C
+5A4F 606B
+5A50 6059
+5A51 6085
+5A52 6081
+5A53 6083
+5A54 609A
+5A55 6084
+5A56 609B
+5A57 608A
+5A58 6096
+5A59 6097
+5A5A 6092
+5A5B 60A7
+5A5C 608B
+5A5D 60E1
+5A5E 60B8
+5A5F 60DE
+5A60 60E0
+5A61 60D3
+5A62 60BD
+5A63 60C6
+5A64 60B5
+5A65 60D5
+5A66 60D8
+5A67 6120
+5A68 60F2
+5A69 6115
+5A6A 6106
+5A6B 60F6
+5A6C 60F7
+5A6D 6100
+5A6E 60F4
+5A6F 60FA
+5A70 6103
+5A71 6121
+5A72 60FB
+5A73 60F1
+5A74 610D
+5A75 610E
+5A76 6111
+5A77 6147
+5A78 614D
+5A79 6137
+5A7A 6128
+5A7B 6127
+5A7C 613E
+5A7D 614A
+5A7E 6130
+5A7F 613C
+5A80 612C
+5A81 6134
+5A82 6165
+5A83 615D
+5A84 613D
+5A85 6142
+5A86 6144
+5A87 6173
+5A88 6187
+5A89 6177
+5A8A 6158
+5A8B 6159
+5A8C 615A
+5A8D 616B
+5A8E 6174
+5A8F 616F
+5A90 6171
+5A91 615F
+5A92 6153
+5A93 6175
+5A94 6198
+5A95 6199
+5A96 6196
+5A97 61AC
+5A98 6194
+5A99 618A
+5A9A 6191
+5A9B 61AB
+5A9C 61AE
+5A9D 61CC
+5A9E 61CA
+5A9F 61C9
+5AA0 61C8
+5AA1 61C3
+5AA2 61C6
+5AA3 61BA
+5AA4 61CB
+5AA5 7F79
+5AA6 61CD
+5AA7 61E6
+5AA8 61E3
+5AA9 61F4
+5AAA 61F7
+5AAB 61F6
+5AAC 61FD
+5AAD 61FA
+5AAE 61FF
+5AAF 61FC
+5AB0 61FE
+5AB1 6200
+5AB2 6208
+5AB3 6209
+5AB4 620D
+5AB5 6213
+5AB6 6214
+5AB7 621B
+5AB8 621E
+5AB9 6221
+5ABA 622A
+5ABB 622E
+5ABC 6230
+5ABD 6232
+5ABE 6233
+5ABF 6241
+5AC0 624E
+5AC1 625E
+5AC2 6263
+5AC3 625B
+5AC4 6260
+5AC5 6268
+5AC6 627C
+5AC7 6282
+5AC8 6289
+5AC9 6292
+5ACA 627E
+5ACB 6293
+5ACC 6296
+5ACD 6283
+5ACE 6294
+5ACF 62D7
+5AD0 62D1
+5AD1 62BB
+5AD2 62CF
+5AD3 62AC
+5AD4 62C6
+5AD5 62C8
+5AD6 62DC
+5AD7 62D4
+5AD8 62CA
+5AD9 62C2
+5ADA 62A6
+5ADB 62C7
+5ADC 629B
+5ADD 62C9
+5ADE 630C
+5ADF 62EE
+5AE0 62F1
+5AE1 6327
+5AE2 6302
+5AE3 6308
+5AE4 62EF
+5AE5 62F5
+5AE6 62FF
+5AE7 6350
+5AE8 634D
+5AE9 633E
+5AEA 634F
+5AEB 6396
+5AEC 638E
+5AED 6380
+5AEE 63AB
+5AEF 6376
+5AF0 63A3
+5AF1 638F
+5AF2 6389
+5AF3 639F
+5AF4 636B
+5AF5 6369
+5AF6 63B5
+5AF7 63BE
+5AF8 63E9
+5AF9 63C0
+5AFA 63C6
+5AFB 63F5
+5AFC 63E3
+5AFD 63C9
+5AFE 63D2
+5B41 63F6
+5B42 63C4
+5B43 6434
+5B44 6406
+5B45 6413
+5B46 6426
+5B47 6436
+5B48 641C
+5B49 6417
+5B4A 6428
+5B4B 640F
+5B4C 6416
+5B4D 644E
+5B4E 6467
+5B4F 646F
+5B50 6460
+5B51 6476
+5B52 64B9
+5B53 649D
+5B54 64CE
+5B55 6495
+5B56 64BB
+5B57 6493
+5B58 64A5
+5B59 64A9
+5B5A 6488
+5B5B 64BC
+5B5C 64DA
+5B5D 64D2
+5B5E 64C5
+5B5F 64C7
+5B60 64D4
+5B61 64D8
+5B62 64C2
+5B63 64F1
+5B64 64E7
+5B65 64E0
+5B66 64E1
+5B67 64E3
+5B68 64EF
+5B69 64F4
+5B6A 64F6
+5B6B 64F2
+5B6C 64FA
+5B6D 6500
+5B6E 64FD
+5B6F 6518
+5B70 651C
+5B71 651D
+5B72 6505
+5B73 6524
+5B74 6523
+5B75 652B
+5B76 652C
+5B77 6534
+5B78 6535
+5B79 6537
+5B7A 6536
+5B7B 6538
+5B7C 754B
+5B7D 6548
+5B7E 654E
+5B7F 6556
+5B80 654D
+5B81 6558
+5B82 6555
+5B83 655D
+5B84 6572
+5B85 6578
+5B86 6582
+5B87 6583
+5B88 8B8A
+5B89 659B
+5B8A 659F
+5B8B 65AB
+5B8C 65B7
+5B8D 65C3
+5B8E 65C6
+5B8F 65C1
+5B90 65C4
+5B91 65CC
+5B92 65D2
+5B93 65D9
+5B94 65E1
+5B95 65E0
+5B96 65F1
+5B97 6600
+5B98 6615
+5B99 6602
+5B9A 6772
+5B9B 6603
+5B9C 65FB
+5B9D 6609
+5B9E 663F
+5B9F 6635
+5BA0 662E
+5BA1 661E
+5BA2 6634
+5BA3 661C
+5BA4 6624
+5BA5 6644
+5BA6 6649
+5BA7 6665
+5BA8 6657
+5BA9 665E
+5BAA 6664
+5BAB 6659
+5BAC 6662
+5BAD 665D
+5BAE FA12
+5BAF 6673
+5BB0 6670
+5BB1 6683
+5BB2 6688
+5BB3 6684
+5BB4 6699
+5BB5 6698
+5BB6 66A0
+5BB7 669D
+5BB8 66B2
+5BB9 66C4
+5BBA 66C1
+5BBB 66BF
+5BBC 66C9
+5BBD 66BE
+5BBE 66BC
+5BBF 66B8
+5BC0 66D6
+5BC1 66DA
+5BC2 66E6
+5BC3 66E9
+5BC4 66F0
+5BC5 66F5
+5BC6 66F7
+5BC7 66FA
+5BC8 670E
+5BC9 F929
+5BCA 6716
+5BCB 671E
+5BCC 7E22
+5BCD 6726
+5BCE 6727
+5BCF 9738
+5BD0 672E
+5BD1 673F
+5BD2 6736
+5BD3 6737
+5BD4 6738
+5BD5 6746
+5BD6 675E
+5BD7 6759
+5BD8 6766
+5BD9 6764
+5BDA 6789
+5BDB 6785
+5BDC 6770
+5BDD 67A9
+5BDE 676A
+5BDF 678B
+5BE0 6773
+5BE1 67A6
+5BE2 67A1
+5BE3 67BB
+5BE4 67B7
+5BE5 67EF
+5BE6 67B4
+5BE7 67EC
+5BE8 67E9
+5BE9 67B8
+5BEA 67E7
+5BEB 67E4
+5BEC 6852
+5BED 67DD
+5BEE 67E2
+5BEF 67EE
+5BF0 67C0
+5BF1 67CE
+5BF2 67B9
+5BF3 6801
+5BF4 67C6
+5BF5 681E
+5BF6 6846
+5BF7 684D
+5BF8 6840
+5BF9 6844
+5BFA 6832
+5BFB 684E
+5BFC 6863
+5BFD 6859
+5BFE 688D
+5C41 6877
+5C42 687F
+5C43 689F
+5C44 687E
+5C45 688F
+5C46 68AD
+5C47 6894
+5C48 6883
+5C49 68BC
+5C4A 68B9
+5C4B 6874
+5C4C 68B5
+5C4D 68BA
+5C4E 690F
+5C4F 6901
+5C50 68CA
+5C51 6908
+5C52 68D8
+5C53 6926
+5C54 68E1
+5C55 690C
+5C56 68CD
+5C57 68D4
+5C58 68E7
+5C59 68D5
+5C5A 6912
+5C5B 68EF
+5C5C 6904
+5C5D 68E3
+5C5E 68E0
+5C5F 68CF
+5C60 68C6
+5C61 6922
+5C62 692A
+5C63 6921
+5C64 6923
+5C65 6928
+5C66 FA13
+5C67 6979
+5C68 6977
+5C69 6936
+5C6A 6978
+5C6B 6954
+5C6C 696A
+5C6D 6974
+5C6E 6968
+5C6F 693D
+5C70 6959
+5C71 6930
+5C72 695E
+5C73 695D
+5C74 697E
+5C75 6981
+5C76 69B2
+5C77 69BF
+5C78 FA14
+5C79 6998
+5C7A 69C1
+5C7B 69D3
+5C7C 69BE
+5C7D 69CE
+5C7E 5BE8
+5C7F 69CA
+5C80 69B1
+5C81 69DD
+5C82 69BB
+5C83 69C3
+5C84 69A0
+5C85 699C
+5C86 6995
+5C87 69DE
+5C88 6A2E
+5C89 69E8
+5C8A 6A02
+5C8B 6A1B
+5C8C 69FF
+5C8D 69F9
+5C8E 69F2
+5C8F 69E7
+5C90 69E2
+5C91 6A1E
+5C92 69ED
+5C93 6A14
+5C94 69EB
+5C95 6A0A
+5C96 6A22
+5C97 6A12
+5C98 6A23
+5C99 6A13
+5C9A 6A30
+5C9B 6A6B
+5C9C 6A44
+5C9D 6A0C
+5C9E 6AA0
+5C9F 6A36
+5CA0 6A78
+5CA1 6A47
+5CA2 6A62
+5CA3 6A59
+5CA4 6A66
+5CA5 6A48
+5CA6 6A46
+5CA7 6A38
+5CA8 6A72
+5CA9 6A73
+5CAA 6A90
+5CAB 6A8D
+5CAC 6A84
+5CAD 6AA2
+5CAE 6AA3
+5CAF 6A7E
+5CB0 6A97
+5CB1 6AAC
+5CB2 6AAA
+5CB3 6ABB
+5CB4 6AC2
+5CB5 6AB8
+5CB6 6AB3
+5CB7 6AC1
+5CB8 6ADE
+5CB9 6AE2
+5CBA 6AD1
+5CBB 6ADA
+5CBC 6AE4
+5CBD 8616
+5CBE 8617
+5CBF 6AEA
+5CC0 6B05
+5CC1 6B0A
+5CC2 6AFA
+5CC3 6B12
+5CC4 6B16
+5CC5 6B1F
+5CC6 6B38
+5CC7 6B37
+5CC8 6B39
+5CC9 76DC
+5CCA 98EE
+5CCB 6B47
+5CCC 6B43
+5CCD 6B49
+5CCE 6B50
+5CCF 6B59
+5CD0 6B54
+5CD1 6B5B
+5CD2 6B5F
+5CD3 6B61
+5CD4 6B78
+5CD5 6B79
+5CD6 6B7F
+5CD7 6B80
+5CD8 6B84
+5CD9 6B83
+5CDA 6B8D
+5CDB 6B98
+5CDC 6B95
+5CDD 6B9E
+5CDE 6BA4
+5CDF 6BAA
+5CE0 6BAB
+5CE1 6BAF
+5CE2 6BB1
+5CE3 6BB2
+5CE4 6BB3
+5CE5 6BB7
+5CE6 6BBC
+5CE7 6BC6
+5CE8 6BCB
+5CE9 6BD3
+5CEA 6BD6
+5CEB 6BDF
+5CEC 6BEC
+5CED 6BEB
+5CEE 6BF3
+5CEF 6BEF
+5CF0 6C08
+5CF1 6C13
+5CF2 6C14
+5CF3 6C1B
+5CF4 6C24
+5CF5 6C23
+5CF6 6C3F
+5CF7 6C5E
+5CF8 6C55
+5CF9 6C5C
+5CFA 6C62
+5CFB 6C82
+5CFC 6C8D
+5CFD 6C86
+5CFE 6C6F
+5D41 6C9A
+5D42 6C81
+5D43 6C9B
+5D44 6C7E
+5D45 6C68
+5D46 6C73
+5D47 6C92
+5D48 6C90
+5D49 6CC4
+5D4A 6CF1
+5D4B 6CBD
+5D4C 6CC5
+5D4D 6CAE
+5D4E 6CDA
+5D4F 6CDD
+5D50 6CB1
+5D51 6CBE
+5D52 6CBA
+5D53 6CDB
+5D54 6CEF
+5D55 6CD9
+5D56 6CEA
+5D57 6D1F
+5D58 6D04
+5D59 6D36
+5D5A 6D2B
+5D5B 6D3D
+5D5C 6D33
+5D5D 6D12
+5D5E 6D0C
+5D5F 6D63
+5D60 6D87
+5D61 6D93
+5D62 6D6F
+5D63 6D64
+5D64 6D5A
+5D65 6D79
+5D66 6D59
+5D67 6D8E
+5D68 6D95
+5D69 6D9B
+5D6A 6D85
+5D6B 6D96
+5D6C 6DF9
+5D6D 6E0A
+5D6E 6E2E
+5D6F 6DB5
+5D70 6DE6
+5D71 6DC7
+5D72 6DAC
+5D73 6DB8
+5D74 6DCF
+5D75 6DC6
+5D76 6DEC
+5D77 6DDE
+5D78 6DCC
+5D79 6DE8
+5D7A 6DF8
+5D7B 6DD2
+5D7C 6DC5
+5D7D 6DFA
+5D7E 6DD9
+5D7F 6DF2
+5D80 6DFC
+5D81 6DE4
+5D82 6DD5
+5D83 6DEA
+5D84 6DEE
+5D85 6E2D
+5D86 6E6E
+5D87 6E19
+5D88 6E72
+5D89 6E5F
+5D8A 6E39
+5D8B 6E3E
+5D8C 6E23
+5D8D 6E6B
+5D8E 6E5C
+5D8F 6E2B
+5D90 6E76
+5D91 6E4D
+5D92 6E1F
+5D93 6E27
+5D94 6E43
+5D95 6E3C
+5D96 6E3A
+5D97 6E4E
+5D98 6E24
+5D99 6E1D
+5D9A 6E38
+5D9B 6E82
+5D9C 6EAA
+5D9D 6E98
+5D9E 6EB7
+5D9F 6EBD
+5DA0 6EAF
+5DA1 6EC4
+5DA2 6EB2
+5DA3 6ED4
+5DA4 6ED5
+5DA5 6E8F
+5DA6 6EBF
+5DA7 6EC2
+5DA8 6E9F
+5DA9 6F41
+5DAA 6F45
+5DAB 6EEC
+5DAC 6EF8
+5DAD 6EFE
+5DAE 6F3F
+5DAF 6EF2
+5DB0 6F31
+5DB1 6EEF
+5DB2 6F32
+5DB3 6ECC
+5DB4 6EFF
+5DB5 6F3E
+5DB6 6F13
+5DB7 6EF7
+5DB8 6F86
+5DB9 6F7A
+5DBA 6F78
+5DBB 6F80
+5DBC 6F6F
+5DBD 6F5B
+5DBE 6F6D
+5DBF 6F74
+5DC0 6F82
+5DC1 6F88
+5DC2 6F7C
+5DC3 6F58
+5DC4 6FC6
+5DC5 6F8E
+5DC6 6F91
+5DC7 6F66
+5DC8 6FB3
+5DC9 6FA3
+5DCA 6FB5
+5DCB 6FA1
+5DCC 6FB9
+5DCD 6FDB
+5DCE 6FAA
+5DCF 6FC2
+5DD0 6FDF
+5DD1 6FD5
+5DD2 6FEC
+5DD3 6FD8
+5DD4 6FD4
+5DD5 6FF5
+5DD6 6FEE
+5DD7 7005
+5DD8 7007
+5DD9 7009
+5DDA 700B
+5DDB 6FFA
+5DDC 7011
+5DDD 7001
+5DDE 700F
+5DDF 701B
+5DE0 701A
+5DE1 701F
+5DE2 6FF3
+5DE3 7028
+5DE4 7018
+5DE5 7030
+5DE6 703E
+5DE7 7032
+5DE8 7051
+5DE9 7063
+5DEA 7085
+5DEB 7099
+5DEC 70AF
+5DED 70AB
+5DEE 70AC
+5DEF 70B8
+5DF0 70AE
+5DF1 70DF
+5DF2 70CB
+5DF3 70D9
+5DF4 7109
+5DF5 710F
+5DF6 7104
+5DF7 70F1
+5DF8 70FD
+5DF9 711C
+5DFA 7119
+5DFB 715C
+5DFC 7146
+5DFD 7147
+5DFE 7166
+5E41 7162
+5E42 714C
+5E43 7156
+5E44 716C
+5E45 7188
+5E46 718F
+5E47 7184
+5E48 7195
+5E49 FA15
+5E4A 71AC
+5E4B 71C1
+5E4C 71B9
+5E4D 71BE
+5E4E 71D2
+5E4F 71E7
+5E50 71C9
+5E51 71D4
+5E52 71D7
+5E53 71CE
+5E54 71F5
+5E55 71E0
+5E56 71EC
+5E57 71FB
+5E58 71FC
+5E59 71F9
+5E5A 71FE
+5E5B 71FF
+5E5C 720D
+5E5D 7210
+5E5E 7228
+5E5F 722D
+5E60 722C
+5E61 7230
+5E62 7232
+5E63 723B
+5E64 723C
+5E65 723F
+5E66 7240
+5E67 7246
+5E68 724B
+5E69 7258
+5E6A 7274
+5E6B 727E
+5E6C 7281
+5E6D 7287
+5E6E 7282
+5E6F 7292
+5E70 7296
+5E71 72A2
+5E72 72A7
+5E73 72B1
+5E74 72B2
+5E75 72BE
+5E76 72C3
+5E77 72C6
+5E78 72C4
+5E79 72B9
+5E7A 72CE
+5E7B 72D2
+5E7C 72E2
+5E7D 72E0
+5E7E 72E1
+5E7F 72F9
+5E80 72F7
+5E81 7317
+5E82 730A
+5E83 731C
+5E84 7316
+5E85 731D
+5E86 7324
+5E87 7334
+5E88 7329
+5E89 732F
+5E8A FA16
+5E8B 7325
+5E8C 733E
+5E8D 734F
+5E8E 734E
+5E8F 7357
+5E90 9ED8
+5E91 736A
+5E92 7368
+5E93 7370
+5E94 7377
+5E95 7378
+5E96 7375
+5E97 737B
+5E98 73C8
+5E99 73BD
+5E9A 73B3
+5E9B 73CE
+5E9C 73BB
+5E9D 73C0
+5E9E 73C9
+5E9F 73D6
+5EA0 73E5
+5EA1 73E3
+5EA2 73D2
+5EA3 73EE
+5EA4 73F1
+5EA5 73DE
+5EA6 73F8
+5EA7 7407
+5EA8 73F5
+5EA9 7405
+5EAA 7426
+5EAB 742A
+5EAC 7425
+5EAD 7429
+5EAE 742E
+5EAF 7432
+5EB0 743A
+5EB1 7455
+5EB2 743F
+5EB3 745F
+5EB4 7459
+5EB5 7441
+5EB6 745C
+5EB7 7469
+5EB8 7470
+5EB9 7463
+5EBA 746A
+5EBB 7464
+5EBC 7462
+5EBD 7489
+5EBE 746F
+5EBF 747E
+5EC0 749F
+5EC1 749E
+5EC2 74A2
+5EC3 74A7
+5EC4 74CA
+5EC5 74CF
+5EC6 74D4
+5EC7 74E0
+5EC8 74E3
+5EC9 74E7
+5ECA 74E9
+5ECB 74EE
+5ECC 74F0
+5ECD 74F2
+5ECE 74F1
+5ECF 74F7
+5ED0 74F8
+5ED1 7501
+5ED2 7504
+5ED3 7503
+5ED4 7505
+5ED5 750D
+5ED6 750C
+5ED7 750E
+5ED8 7513
+5ED9 751E
+5EDA 7526
+5EDB 752C
+5EDC 753C
+5EDD 7544
+5EDE 754D
+5EDF 754A
+5EE0 7549
+5EE1 7546
+5EE2 755B
+5EE3 755A
+5EE4 7564
+5EE5 7567
+5EE6 756B
+5EE7 756F
+5EE8 7574
+5EE9 756D
+5EEA 7578
+5EEB 7576
+5EEC 7582
+5EED 7586
+5EEE 7587
+5EEF 758A
+5EF0 7589
+5EF1 7594
+5EF2 759A
+5EF3 759D
+5EF4 75A5
+5EF5 75A3
+5EF6 75C2
+5EF7 75B3
+5EF8 75C3
+5EF9 75B5
+5EFA 75BD
+5EFB 75B8
+5EFC 75BC
+5EFD 75B1
+5EFE 75CD
+5F41 75CA
+5F42 75D2
+5F43 75D9
+5F44 75E3
+5F45 75DE
+5F46 75FE
+5F47 75FF
+5F48 75FC
+5F49 7601
+5F4A 75F0
+5F4B 75FA
+5F4C 75F2
+5F4D 75F3
+5F4E 760B
+5F4F 7609
+5F50 761F
+5F51 7627
+5F52 7620
+5F53 7621
+5F54 7622
+5F55 7624
+5F56 7634
+5F57 7630
+5F58 763B
+5F59 7647
+5F5A 7648
+5F5B 7658
+5F5C 7646
+5F5D 765C
+5F5E 7661
+5F5F 7662
+5F60 7668
+5F61 7669
+5F62 7667
+5F63 766A
+5F64 766C
+5F65 7670
+5F66 7672
+5F67 7676
+5F68 767C
+5F69 7682
+5F6A 7680
+5F6B 7683
+5F6C 7688
+5F6D 768B
+5F6E 7699
+5F6F 769A
+5F70 769C
+5F71 769E
+5F72 769B
+5F73 76A6
+5F74 76B0
+5F75 76B4
+5F76 76B8
+5F77 76B9
+5F78 76BA
+5F79 76C2
+5F7A FA17
+5F7B 76CD
+5F7C 76D6
+5F7D 76D2
+5F7E 76DE
+5F7F 76E1
+5F80 76E5
+5F81 76EA
+5F82 862F
+5F83 76FB
+5F84 7708
+5F85 7707
+5F86 7704
+5F87 7724
+5F88 7729
+5F89 7725
+5F8A 7726
+5F8B 771B
+5F8C 7737
+5F8D 7738
+5F8E 7746
+5F8F 7747
+5F90 775A
+5F91 7768
+5F92 776B
+5F93 775B
+5F94 7765
+5F95 777F
+5F96 777E
+5F97 7779
+5F98 778E
+5F99 778B
+5F9A 7791
+5F9B 77A0
+5F9C 779E
+5F9D 77B0
+5F9E 77B6
+5F9F 77B9
+5FA0 77BF
+5FA1 77BC
+5FA2 77BD
+5FA3 77BB
+5FA4 77C7
+5FA5 77CD
+5FA6 77DA
+5FA7 77DC
+5FA8 77E3
+5FA9 77EE
+5FAA 52AF
+5FAB 77FC
+5FAC 780C
+5FAD 7812
+5FAE 7821
+5FAF 783F
+5FB0 7820
+5FB1 7845
+5FB2 784E
+5FB3 7864
+5FB4 7874
+5FB5 788E
+5FB6 787A
+5FB7 7886
+5FB8 789A
+5FB9 787C
+5FBA 788C
+5FBB 78A3
+5FBC 78B5
+5FBD 78AA
+5FBE 78AF
+5FBF 78D1
+5FC0 78C6
+5FC1 78CB
+5FC2 78D4
+5FC3 78BE
+5FC4 78BC
+5FC5 78C5
+5FC6 78CA
+5FC7 78EC
+5FC8 78E7
+5FC9 78DA
+5FCA 78FD
+5FCB 78F4
+5FCC 7907
+5FCD 7911
+5FCE 7919
+5FCF 792C
+5FD0 792B
+5FD1 7930
+5FD2 FA18
+5FD3 7940
+5FD4 7960
+5FD5 FA19
+5FD6 795F
+5FD7 795A
+5FD8 7955
+5FD9 FA1A
+5FDA 797F
+5FDB 798A
+5FDC 7994
+5FDD FA1B
+5FDE 799D
+5FDF 799B
+5FE0 79AA
+5FE1 79B3
+5FE2 79BA
+5FE3 79C9
+5FE4 79D5
+5FE5 79E7
+5FE6 79EC
+5FE7 79E3
+5FE8 7A08
+5FE9 7A0D
+5FEA 7A18
+5FEB 7A19
+5FEC 7A1F
+5FED 7A31
+5FEE 7A3E
+5FEF 7A37
+5FF0 7A3B
+5FF1 7A43
+5FF2 7A57
+5FF3 7A49
+5FF4 7A62
+5FF5 7A61
+5FF6 7A69
+5FF7 9F9D
+5FF8 7A70
+5FF9 7A79
+5FFA 7A7D
+5FFB 7A88
+5FFC 7A95
+5FFD 7A98
+5FFE 7A96
+6041 7A97
+6042 7AA9
+6043 7AB0
+6044 7AB6
+6045 9083
+6046 7AC3
+6047 7ABF
+6048 7AC5
+6049 7AC4
+604A 7AC7
+604B 7ACA
+604C 7ACD
+604D 7ACF
+604E 7AD2
+604F 7AD1
+6050 7AD5
+6051 7AD3
+6052 7AD9
+6053 7ADA
+6054 7ADD
+6055 7AE1
+6056 7AE2
+6057 7AE6
+6058 7AE7
+6059 FA1C
+605A 7AEB
+605B 7AED
+605C 7AF0
+605D 7AF8
+605E 7B02
+605F 7B0F
+6060 7B0B
+6061 7B0A
+6062 7B06
+6063 7B33
+6064 7B36
+6065 7B19
+6066 7B1E
+6067 7B35
+6068 7B28
+6069 7B50
+606A 7B4D
+606B 7B4C
+606C 7B45
+606D 7B5D
+606E 7B75
+606F 7B7A
+6070 7B74
+6071 7B70
+6072 7B71
+6073 7B6E
+6074 7B9D
+6075 7B98
+6076 7B9F
+6077 7B8D
+6078 7B9C
+6079 7B9A
+607A 7B92
+607B 7B8F
+607C 7B99
+607D 7BCF
+607E 7BCB
+607F 7BCC
+6080 7BB4
+6081 7BC6
+6082 7B9E
+6083 7BDD
+6084 7BE9
+6085 7BE6
+6086 7BF7
+6087 7BE5
+6088 7C14
+6089 7C00
+608A 7C13
+608B 7C07
+608C 7BF3
+608D 7C0D
+608E 7BF6
+608F 7C23
+6090 7C27
+6091 7C2A
+6092 7C1F
+6093 7C37
+6094 7C2B
+6095 7C3D
+6096 7C40
+6097 7C4C
+6098 7C43
+6099 7C56
+609A 7C50
+609B 7C58
+609C 7C5F
+609D 7C65
+609E 7C6C
+609F 7C75
+60A0 7C83
+60A1 7C90
+60A2 7CA4
+60A3 7CA2
+60A4 7CAB
+60A5 7CA1
+60A6 7CAD
+60A7 7CA8
+60A8 7CB3
+60A9 7CB2
+60AA 7CB1
+60AB 7CAE
+60AC 7CB9
+60AD FA1D
+60AE 7CBD
+60AF 7CC5
+60B0 7CC2
+60B1 7CD2
+60B2 7CE2
+60B3 7CD8
+60B4 7CDC
+60B5 7CEF
+60B6 7CF2
+60B7 7CF4
+60B8 7CF6
+60B9 7D06
+60BA 7D02
+60BB 7D1C
+60BC 7D15
+60BD 7D0A
+60BE 7D45
+60BF 7D4B
+60C0 7D2E
+60C1 7D32
+60C2 7D3F
+60C3 7D35
+60C4 7D48
+60C5 7D46
+60C6 7D5C
+60C7 7D73
+60C8 7D56
+60C9 7D4E
+60CA 7D68
+60CB 7D6E
+60CC 7D4F
+60CD 7D63
+60CE 7D93
+60CF 7D89
+60D0 7D5B
+60D1 7DAE
+60D2 7DA3
+60D3 7DB5
+60D4 7DB7
+60D5 7DC7
+60D6 7DBD
+60D7 7DAB
+60D8 7DA2
+60D9 7DAF
+60DA 7DA0
+60DB 7DB8
+60DC 7D9F
+60DD 7DB0
+60DE 7DD5
+60DF 7DD8
+60E0 7DDD
+60E1 7DD6
+60E2 7DE4
+60E3 7DDE
+60E4 7DFB
+60E5 7E0B
+60E6 7DF2
+60E7 7DE1
+60E8 7DDC
+60E9 7E05
+60EA 7E0A
+60EB 7E21
+60EC 7E12
+60ED 7E1F
+60EE 7E09
+60EF 7E3A
+60F0 7E46
+60F1 7E66
+60F2 7E31
+60F3 7E3D
+60F4 7E35
+60F5 7E3B
+60F6 7E39
+60F7 7E43
+60F8 7E37
+60F9 7E32
+60FA 7E5D
+60FB 7E56
+60FC 7E5E
+60FD 7E52
+60FE 7E59
+6141 7E5A
+6142 7E67
+6143 7E79
+6144 7E6A
+6145 7E69
+6146 7E7C
+6147 7E7B
+6148 7E7D
+6149 8FAE
+614A 7E7F
+614B 7E83
+614C 7E89
+614D 7E8E
+614E 7E8C
+614F 7E92
+6150 7E93
+6151 7E94
+6152 7E96
+6153 7E9B
+6154 7F38
+6155 7F3A
+6156 7F45
+6157 7F47
+6158 7F4C
+6159 7F4E
+615A 7F51
+615B 7F55
+615C 7F54
+615D 7F58
+615E 7F5F
+615F 7F60
+6160 7F68
+6161 7F67
+6162 7F69
+6163 7F78
+6164 7F82
+6165 7F86
+6166 7F83
+6167 7F87
+6168 7F88
+6169 7F8C
+616A 7F94
+616B 7F9E
+616C 7F9D
+616D 7F9A
+616E 7FA1
+616F 7FA3
+6170 7FAF
+6171 7FAE
+6172 7FB2
+6173 7FB9
+6174 7FB6
+6175 7FB8
+6176 8B71
+6177 FA1E
+6178 7FC5
+6179 7FC6
+617A 7FCA
+617B 7FD5
+617C 7FE1
+617D 7FE6
+617E 7FE9
+617F 7FF3
+6180 7FF9
+6181 8004
+6182 800B
+6183 8012
+6184 8019
+6185 801C
+6186 8021
+6187 8028
+6188 803F
+6189 803B
+618A 804A
+618B 8046
+618C 8052
+618D 8058
+618E 805F
+618F 8062
+6190 8068
+6191 8073
+6192 8072
+6193 8070
+6194 8076
+6195 8079
+6196 807D
+6197 807F
+6198 8084
+6199 8085
+619A 8093
+619B 809A
+619C 80AD
+619D 5190
+619E 80AC
+619F 80DB
+61A0 80E5
+61A1 80D9
+61A2 80DD
+61A3 80C4
+61A4 80DA
+61A5 8109
+61A6 80EF
+61A7 80F1
+61A8 811B
+61A9 8123
+61AA 812F
+61AB 814B
+61AC 8146
+61AD 813E
+61AE 8153
+61AF 8151
+61B0 80FC
+61B1 8171
+61B2 816E
+61B3 8165
+61B4 815F
+61B5 8166
+61B6 8174
+61B7 8183
+61B8 8188
+61B9 818A
+61BA 8180
+61BB 8182
+61BC 81A0
+61BD 8195
+61BE 81A3
+61BF 8193
+61C0 81B5
+61C1 81A4
+61C2 81A9
+61C3 81B8
+61C4 81B0
+61C5 81C8
+61C6 81BE
+61C7 81BD
+61C8 81C0
+61C9 81C2
+61CA 81BA
+61CB 81C9
+61CC 81CD
+61CD 81D1
+61CE 81D8
+61CF 81D9
+61D0 81DA
+61D1 81DF
+61D2 81E0
+61D3 81FA
+61D4 81FB
+61D5 81FE
+61D6 8201
+61D7 8202
+61D8 8205
+61D9 820D
+61DA 8210
+61DB 8212
+61DC 8216
+61DD 8229
+61DE 822B
+61DF 822E
+61E0 8238
+61E1 8233
+61E2 8240
+61E3 8259
+61E4 825A
+61E5 825D
+61E6 825F
+61E7 8264
+61E8 8262
+61E9 8268
+61EA 826A
+61EB 826B
+61EC 8271
+61ED 8277
+61EE 827E
+61EF 828D
+61F0 8292
+61F1 82AB
+61F2 829F
+61F3 82BB
+61F4 82AC
+61F5 82E1
+61F6 82E3
+61F7 82DF
+61F8 8301
+61F9 82D2
+61FA 82F4
+61FB 82F3
+61FC 8303
+61FD 82FB
+61FE 82F9
+6241 82DE
+6242 8306
+6243 82DC
+6244 82FA
+6245 8309
+6246 82D9
+6247 8335
+6248 8362
+6249 8334
+624A 8316
+624B 8331
+624C 8340
+624D 8339
+624E 8350
+624F 8345
+6250 832F
+6251 832B
+6252 8318
+6253 839A
+6254 83AA
+6255 839F
+6256 83A2
+6257 8396
+6258 8323
+6259 838E
+625A 8375
+625B 837F
+625C 838A
+625D 837C
+625E 83B5
+625F 8373
+6260 8393
+6261 83A0
+6262 8385
+6263 8389
+6264 83A8
+6265 83F4
+6266 8413
+6267 83C7
+6268 83CE
+6269 83F7
+626A 83FD
+626B 8403
+626C 83D8
+626D 840B
+626E 83C1
+626F 8407
+6270 83E0
+6271 83F2
+6272 840D
+6273 8420
+6274 83F6
+6275 83BD
+6276 83FB
+6277 842A
+6278 8462
+6279 843C
+627A 8484
+627B 8477
+627C 846B
+627D 8479
+627E 8448
+627F 846E
+6280 8482
+6281 8469
+6282 8446
+6283 846F
+6284 8438
+6285 8435
+6286 84CA
+6287 84B9
+6288 84BF
+6289 849F
+628A 84B4
+628B 84CD
+628C 84BB
+628D 84DA
+628E 84D0
+628F 84C1
+6290 84AD
+6291 84C6
+6292 84D6
+6293 84A1
+6294 84D9
+6295 84FF
+6296 84F4
+6297 8517
+6298 8518
+6299 852C
+629A 851F
+629B 8515
+629C 8514
+629D 8506
+629E 8553
+629F 855A
+62A0 8540
+62A1 8559
+62A2 8563
+62A3 8558
+62A4 8548
+62A5 8541
+62A6 854A
+62A7 854B
+62A8 856B
+62A9 8555
+62AA 8580
+62AB 85A4
+62AC 8588
+62AD 8591
+62AE 858A
+62AF 85A8
+62B0 856D
+62B1 8594
+62B2 859B
+62B3 85AE
+62B4 8587
+62B5 859C
+62B6 8577
+62B7 857E
+62B8 8590
+62B9 FA1F
+62BA 820A
+62BB 85B0
+62BC 85C9
+62BD 85BA
+62BE 85CF
+62BF 85B9
+62C0 85D0
+62C1 85D5
+62C2 85DD
+62C3 85E5
+62C4 85DC
+62C5 85F9
+62C6 860A
+62C7 8613
+62C8 860B
+62C9 85FE
+62CA 8622
+62CB 861A
+62CC 8630
+62CD 863F
+62CE FA20
+62CF 864D
+62D0 4E55
+62D1 8655
+62D2 865F
+62D3 8667
+62D4 8671
+62D5 8693
+62D6 86A3
+62D7 86A9
+62D8 868B
+62D9 86AA
+62DA 868C
+62DB 86B6
+62DC 86AF
+62DD 86C4
+62DE 86C6
+62DF 86B0
+62E0 86C9
+62E1 86CE
+62E2 FA21
+62E3 86AB
+62E4 86D4
+62E5 86DE
+62E6 86E9
+62E7 86EC
+62E8 86DF
+62E9 86DB
+62EA 8712
+62EB 8706
+62EC 8708
+62ED 8700
+62EE 8703
+62EF 86FB
+62F0 8711
+62F1 8709
+62F2 870D
+62F3 86F9
+62F4 870A
+62F5 8734
+62F6 873F
+62F7 873B
+62F8 8725
+62F9 8729
+62FA 871A
+62FB 875F
+62FC 8778
+62FD 874C
+62FE 874E
+6341 8774
+6342 8757
+6343 8768
+6344 8782
+6345 876A
+6346 8760
+6347 876E
+6348 8759
+6349 8753
+634A 8763
+634B 877F
+634C 87A2
+634D 87C6
+634E 879F
+634F 87AF
+6350 87CB
+6351 87BD
+6352 87C0
+6353 87D0
+6354 96D6
+6355 87AB
+6356 87C4
+6357 87B3
+6358 87D2
+6359 87BB
+635A 87EF
+635B 87F2
+635C 87E0
+635D 880E
+635E 8807
+635F 880F
+6360 8816
+6361 880D
+6362 87FE
+6363 87F6
+6364 87F7
+6365 8811
+6366 8815
+6367 8822
+6368 8821
+6369 8827
+636A 8831
+636B 8836
+636C 8839
+636D 883B
+636E 8842
+636F 8844
+6370 884D
+6371 8852
+6372 8859
+6373 885E
+6374 8862
+6375 886B
+6376 8881
+6377 887E
+6378 8875
+6379 887D
+637A 8872
+637B 8882
+637C 889E
+637D 8897
+637E 8892
+637F 88AE
+6380 8899
+6381 88A2
+6382 888D
+6383 88A4
+6384 88BF
+6385 88B5
+6386 88B1
+6387 88C3
+6388 88C4
+6389 88D4
+638A 88D8
+638B 88D9
+638C 88DD
+638D 88F9
+638E 8902
+638F 88FC
+6390 88F5
+6391 88E8
+6392 88F2
+6393 8904
+6394 890C
+6395 892A
+6396 891D
+6397 890A
+6398 8913
+6399 891E
+639A 8925
+639B 892B
+639C 8941
+639D 893B
+639E 8936
+639F 8943
+63A0 8938
+63A1 894D
+63A2 894C
+63A3 8960
+63A4 895E
+63A5 8966
+63A6 896A
+63A7 8964
+63A8 896D
+63A9 896F
+63AA 8974
+63AB 8977
+63AC 897E
+63AD 8983
+63AE 8988
+63AF 898A
+63B0 8993
+63B1 8998
+63B2 89A1
+63B3 89A9
+63B4 89A6
+63B5 89AC
+63B6 89AF
+63B7 89B2
+63B8 89BA
+63B9 89BF
+63BA 89BD
+63BB 89C0
+63BC 89DA
+63BD 89DD
+63BE 89E7
+63BF 89F4
+63C0 89F8
+63C1 8A03
+63C2 8A16
+63C3 8A10
+63C4 8A0C
+63C5 8A12
+63C6 8A1B
+63C7 8A1D
+63C8 8A25
+63C9 8A36
+63CA 8A41
+63CB 8A37
+63CC 8A5B
+63CD 8A52
+63CE 8A46
+63CF 8A48
+63D0 8A7C
+63D1 8A6D
+63D2 8A6C
+63D3 8A62
+63D4 8A79
+63D5 8A85
+63D6 8A82
+63D7 8A84
+63D8 8AA8
+63D9 8AA1
+63DA 8A91
+63DB 8AA5
+63DC 8AA6
+63DD 8A9A
+63DE 8AA3
+63DF 8AA7
+63E0 8ACC
+63E1 8ABE
+63E2 8ACD
+63E3 8AC2
+63E4 8ADA
+63E5 8AF3
+63E6 8AE7
+63E7 8AE4
+63E8 8AF1
+63E9 8B14
+63EA 8AE0
+63EB 8AE2
+63EC 8AE1
+63ED 8ADF
+63EE FA22
+63EF 8AF6
+63F0 8AF7
+63F1 8ADE
+63F2 8ADB
+63F3 8B0C
+63F4 8B07
+63F5 8B1A
+63F6 8B16
+63F7 8B10
+63F8 8B17
+63F9 8B20
+63FA 8B33
+63FB 8B41
+63FC 97AB
+63FD 8B26
+63FE 8B2B
+6441 8B3E
+6442 8B4C
+6443 8B4F
+6444 8B4E
+6445 8B53
+6446 8B49
+6447 8B56
+6448 8B5B
+6449 8B5A
+644A 8B74
+644B 8B6B
+644C 8B5F
+644D 8B6C
+644E 8B6F
+644F 8B7D
+6450 8B7F
+6451 8B80
+6452 8B8C
+6453 8B8E
+6454 8B99
+6455 8B92
+6456 8B93
+6457 8B96
+6458 8B9A
+6459 8C3A
+645A 8C41
+645B 8C3F
+645C 8C48
+645D 8C4C
+645E 8C4E
+645F 8C50
+6460 8C55
+6461 8C62
+6462 8C6C
+6463 8C78
+6464 8C7A
+6465 8C7C
+6466 8C82
+6467 8C89
+6468 8C85
+6469 8C8A
+646A 8C8D
+646B 8C8E
+646C 8C98
+646D 8C94
+646E 621D
+646F 8CAD
+6470 8CAA
+6471 8CAE
+6472 8CBD
+6473 8CB2
+6474 8CB3
+6475 8CC1
+6476 8CB6
+6477 8CC8
+6478 8CCE
+6479 8CCD
+647A 8CE3
+647B 8CDA
+647C 8CF0
+647D 8CF4
+647E 8CFD
+647F 8CFA
+6480 8CFB
+6481 8D07
+6482 8D0A
+6483 8D0F
+6484 8D0D
+6485 8D12
+6486 8D10
+6487 8D13
+6488 8D14
+6489 8D16
+648A 8D67
+648B 8D6D
+648C 8D71
+648D 8D76
+648E FA23
+648F 8D81
+6490 8DC2
+6491 8DBE
+6492 8DBA
+6493 8DCF
+6494 8DDA
+6495 8DD6
+6496 8DCC
+6497 8DDB
+6498 8DCB
+6499 8DEA
+649A 8DEB
+649B 8DDF
+649C 8DE3
+649D 8DFC
+649E 8E08
+649F 8DFF
+64A0 8E09
+64A1 8E1D
+64A2 8E1E
+64A3 8E10
+64A4 8E1F
+64A5 8E42
+64A6 8E35
+64A7 8E30
+64A8 8E34
+64A9 8E4A
+64AA 8E47
+64AB 8E49
+64AC 8E4C
+64AD 8E50
+64AE 8E48
+64AF 8E59
+64B0 8E64
+64B1 8E60
+64B2 8E55
+64B3 8E63
+64B4 8E76
+64B5 8E72
+64B6 8E87
+64B7 8E7C
+64B8 8E81
+64B9 8E85
+64BA 8E84
+64BB 8E8B
+64BC 8E8A
+64BD 8E93
+64BE 8E91
+64BF 8E94
+64C0 8E99
+64C1 8EA1
+64C2 8EAA
+64C3 8EB1
+64C4 8EBE
+64C5 8EC6
+64C6 8EC5
+64C7 8EC8
+64C8 8ECB
+64C9 8ECF
+64CA 8EDB
+64CB 8EE3
+64CC 8EFC
+64CD 8EFB
+64CE 8EEB
+64CF 8EFE
+64D0 8F0A
+64D1 8F0C
+64D2 8F05
+64D3 8F15
+64D4 8F12
+64D5 8F13
+64D6 8F1C
+64D7 8F19
+64D8 8F1F
+64D9 8F26
+64DA 8F33
+64DB 8F3B
+64DC 8F39
+64DD 8F45
+64DE 8F42
+64DF 8F3E
+64E0 8F49
+64E1 8F46
+64E2 8F4C
+64E3 8F4E
+64E4 8F57
+64E5 8F5C
+64E6 8F62
+64E7 8F63
+64E8 8F64
+64E9 8F9C
+64EA 8F9F
+64EB 8FA3
+64EC 8FA8
+64ED 8FA7
+64EE 8FAD
+64EF 8FAF
+64F0 8FB7
+64F1 FA24
+64F2 8FDA
+64F3 8FE5
+64F4 8FE2
+64F5 8FEF
+64F6 8FE9
+64F7 8FF4
+64F8 9005
+64F9 8FF9
+64FA 8FF8
+64FB 9011
+64FC 9015
+64FD 900E
+64FE 9021
+6541 900D
+6542 901E
+6543 9016
+6544 900B
+6545 9027
+6546 9036
+6547 9039
+6548 904F
+6549 FA25
+654A 9050
+654B 9051
+654C 9052
+654D 9049
+654E 903E
+654F 9056
+6550 9058
+6551 905E
+6552 9068
+6553 9067
+6554 906F
+6555 9076
+6556 96A8
+6557 9072
+6558 9082
+6559 907D
+655A 9089
+655B 9080
+655C 908F
+655D 6248
+655E 90AF
+655F 90B1
+6560 90B5
+6561 90E2
+6562 90E4
+6563 90DB
+6564 90DE
+6565 9102
+6566 FA26
+6567 9115
+6568 9112
+6569 9119
+656A 9132
+656B 9127
+656C 9130
+656D 914A
+656E 9156
+656F 9158
+6570 9163
+6571 9165
+6572 9169
+6573 9173
+6574 9172
+6575 918B
+6576 9189
+6577 9182
+6578 91A2
+6579 91AB
+657A 91AF
+657B 91AA
+657C 91B5
+657D 91B4
+657E 91BA
+657F 91C0
+6580 91C1
+6581 91CB
+6582 91D0
+6583 91DA
+6584 91DB
+6585 91D7
+6586 91DE
+6587 91D6
+6588 91DF
+6589 91E1
+658A 91ED
+658B 91F5
+658C 91EE
+658D 91E4
+658E 91F6
+658F 91E5
+6590 9206
+6591 921E
+6592 91FF
+6593 9210
+6594 9214
+6595 920A
+6596 922C
+6597 9215
+6598 9229
+6599 9257
+659A 9245
+659B 923A
+659C 9249
+659D 9264
+659E 9240
+659F 923C
+65A0 9248
+65A1 924E
+65A2 9250
+65A3 9259
+65A4 923F
+65A5 9251
+65A6 9239
+65A7 924B
+65A8 9267
+65A9 925A
+65AA 929C
+65AB 92A7
+65AC 9277
+65AD 9278
+65AE 9296
+65AF 9293
+65B0 929B
+65B1 9295
+65B2 92E9
+65B3 92CF
+65B4 92E7
+65B5 92D7
+65B6 92D9
+65B7 92D0
+65B8 FA27
+65B9 92D5
+65BA 92B9
+65BB 92B7
+65BC 92E0
+65BD 92D3
+65BE 933A
+65BF 9335
+65C0 930F
+65C1 9325
+65C2 92FA
+65C3 9321
+65C4 9344
+65C5 92FB
+65C6 FA28
+65C7 9319
+65C8 931E
+65C9 92FF
+65CA 9322
+65CB 931A
+65CC 931D
+65CD 9323
+65CE 9302
+65CF 933B
+65D0 9370
+65D1 9360
+65D2 937C
+65D3 936E
+65D4 9356
+65D5 9357
+65D6 93B9
+65D7 93B0
+65D8 93A4
+65D9 93AD
+65DA 9394
+65DB 93C8
+65DC 93D6
+65DD 93C6
+65DE 93D7
+65DF 93E8
+65E0 93E5
+65E1 93D8
+65E2 93C3
+65E3 93DD
+65E4 93DE
+65E5 93D0
+65E6 93E4
+65E7 941A
+65E8 93F8
+65E9 9414
+65EA 9413
+65EB 9421
+65EC 9403
+65ED 9407
+65EE 9436
+65EF 942B
+65F0 9431
+65F1 943A
+65F2 9441
+65F3 9452
+65F4 9445
+65F5 9444
+65F6 9448
+65F7 945B
+65F8 945A
+65F9 9460
+65FA 9462
+65FB 945E
+65FC 946A
+65FD 9475
+65FE 9470
+6641 9477
+6642 947F
+6643 947D
+6644 947C
+6645 947E
+6646 9481
+6647 9582
+6648 9587
+6649 958A
+664A 9592
+664B 9594
+664C 9596
+664D 9598
+664E 9599
+664F 95A0
+6650 95A8
+6651 95A7
+6652 95AD
+6653 95BC
+6654 95BB
+6655 95B9
+6656 95BE
+6657 95CA
+6658 6FF6
+6659 95C3
+665A 95CD
+665B 95CC
+665C 95D5
+665D 95D4
+665E 95D6
+665F 95DC
+6660 95E1
+6661 95E5
+6662 95E2
+6663 9621
+6664 9628
+6665 962E
+6666 962F
+6667 9642
+6668 964F
+6669 964C
+666A 964B
+666B 965C
+666C 965D
+666D 965F
+666E 9666
+666F 9677
+6670 9672
+6671 966C
+6672 968D
+6673 968B
+6674 F9DC
+6675 9698
+6676 9695
+6677 9697
+6678 FA29
+6679 969D
+667A 96A7
+667B 96AA
+667C 96B1
+667D 96B2
+667E 96B0
+667F 96AF
+6680 96B4
+6681 96B6
+6682 96B8
+6683 96B9
+6684 96CE
+6685 96CB
+6686 96D5
+6687 96DC
+6688 96D9
+6689 96F9
+668A 9704
+668B 9706
+668C 9708
+668D 9719
+668E 970D
+668F 9713
+6690 970E
+6691 9711
+6692 970F
+6693 9716
+6694 9724
+6695 972A
+6696 9730
+6697 9733
+6698 9739
+6699 973B
+669A 973D
+669B 973E
+669C 9746
+669D 9744
+669E 9743
+669F 9748
+66A0 9742
+66A1 9749
+66A2 974D
+66A3 974F
+66A4 9751
+66A5 9755
+66A6 975C
+66A7 9760
+66A8 9764
+66A9 9766
+66AA 9768
+66AB 976D
+66AC 9779
+66AD 9785
+66AE 977C
+66AF 9781
+66B0 977A
+66B1 978B
+66B2 978F
+66B3 9790
+66B4 979C
+66B5 97A8
+66B6 97A6
+66B7 97A3
+66B8 97B3
+66B9 97B4
+66BA 97C3
+66BB 97C6
+66BC 97C8
+66BD 97CB
+66BE 97DC
+66BF 97ED
+66C0 97F2
+66C1 7ADF
+66C2 97F5
+66C3 980F
+66C4 981A
+66C5 9824
+66C6 9821
+66C7 9837
+66C8 983D
+66C9 984F
+66CA 984B
+66CB 9857
+66CC 9865
+66CD 986B
+66CE 986F
+66CF 9870
+66D0 9871
+66D1 9874
+66D2 9873
+66D3 98AA
+66D4 98AF
+66D5 98B1
+66D6 98B6
+66D7 98C4
+66D8 98C3
+66D9 98C6
+66DA 98DC
+66DB 98ED
+66DC 98E9
+66DD FA2A
+66DE 98EB
+66DF FA2B
+66E0 9903
+66E1 991D
+66E2 9912
+66E3 9914
+66E4 9918
+66E5 9927
+66E6 FA2C
+66E7 9921
+66E8 991E
+66E9 9924
+66EA 9920
+66EB 992C
+66EC 992E
+66ED 993D
+66EE 993E
+66EF 9942
+66F0 9949
+66F1 9945
+66F2 9950
+66F3 994B
+66F4 9951
+66F5 994C
+66F6 9955
+66F7 9997
+66F8 9998
+66F9 999E
+66FA 99A5
+66FB 99AD
+66FC 99AE
+66FD 99BC
+66FE 99DF
+6741 99DB
+6742 99DD
+6743 99D8
+6744 99D1
+6745 99ED
+6746 99EE
+6747 99E2
+6748 99F1
+6749 99F2
+674A 99FB
+674B 99F8
+674C 9A01
+674D 9A0F
+674E 9A05
+674F 9A19
+6750 9A2B
+6751 9A37
+6752 9A40
+6753 9A45
+6754 9A42
+6755 9A43
+6756 9A3E
+6757 9A55
+6758 9A4D
+6759 9A4E
+675A 9A5B
+675B 9A57
+675C 9A5F
+675D 9A62
+675E 9A69
+675F 9A65
+6760 9A64
+6761 9A6A
+6762 9A6B
+6763 9AAD
+6764 9AB0
+6765 9ABC
+6766 9AC0
+6767 9ACF
+6768 9AD3
+6769 9AD4
+676A 9AD1
+676B 9AD9
+676C 9ADC
+676D 9ADE
+676E 9ADF
+676F 9AE2
+6770 9AE3
+6771 9AE6
+6772 9AEF
+6773 9AEB
+6774 9AEE
+6775 9AF4
+6776 9AF1
+6777 9AF7
+6778 9AFB
+6779 9B06
+677A 9B18
+677B 9B1A
+677C 9B1F
+677D 9B22
+677E 9B23
+677F 9B25
+6780 9B27
+6781 9B28
+6782 9B29
+6783 9B2A
+6784 9B2E
+6785 9B2F
+6786 9B31
+6787 9B32
+6788 9B3B
+6789 9B44
+678A 9B43
+678B 9B4D
+678C 9B4E
+678D 9B51
+678E 9B58
+678F 9B75
+6790 9B74
+6791 9B72
+6792 9B93
+6793 9B8F
+6794 9B83
+6795 9B91
+6796 9B96
+6797 9B97
+6798 9B9F
+6799 9BA0
+679A 9BA8
+679B 9BB1
+679C 9BB4
+679D 9BC0
+679E 9BCA
+679F 9BBB
+67A0 9BB9
+67A1 9BC6
+67A2 9BCF
+67A3 9BD1
+67A4 9BD2
+67A5 9BE3
+67A6 9BE2
+67A7 9BE4
+67A8 9BD4
+67A9 9BE1
+67AA 9BF5
+67AB 9BF1
+67AC 9BF2
+67AD 9C04
+67AE 9C1B
+67AF 9C15
+67B0 9C14
+67B1 9C00
+67B2 9C09
+67B3 9C13
+67B4 9C0C
+67B5 9C06
+67B6 9C08
+67B7 9C12
+67B8 9C0A
+67B9 9C2E
+67BA 9C25
+67BB 9C24
+67BC 9C21
+67BD 9C30
+67BE 9C47
+67BF 9C32
+67C0 9C46
+67C1 9C3E
+67C2 9C5A
+67C3 9C60
+67C4 9C67
+67C5 9C76
+67C6 9C78
+67C7 9CEB
+67C8 9CE7
+67C9 9CEC
+67CA 9CF0
+67CB 9D09
+67CC 9D03
+67CD 9D06
+67CE 9D2A
+67CF 9D26
+67D0 9D2C
+67D1 9D23
+67D2 9D1F
+67D3 9D15
+67D4 9D12
+67D5 9D41
+67D6 9D3F
+67D7 9D44
+67D8 9D3E
+67D9 9D46
+67DA 9D48
+67DB 9D5D
+67DC 9D5E
+67DD 9D59
+67DE 9D51
+67DF 9D50
+67E0 9D64
+67E1 9D72
+67E2 9D70
+67E3 9D87
+67E4 9D6B
+67E5 9D6F
+67E6 9D7A
+67E7 9D9A
+67E8 9DA4
+67E9 9DA9
+67EA 9DAB
+67EB 9DB2
+67EC 9DC4
+67ED 9DC1
+67EE 9DBB
+67EF 9DB8
+67F0 9DBA
+67F1 9DC6
+67F2 9DCF
+67F3 9DC2
+67F4 FA2D
+67F5 9DD9
+67F6 9DD3
+67F7 9DF8
+67F8 9DE6
+67F9 9DED
+67FA 9DEF
+67FB 9DFD
+67FC 9E1A
+67FD 9E1B
+67FE 9E19
+6841 9E1E
+6842 9E75
+6843 9E79
+6844 9E7D
+6845 9E81
+6846 9E88
+6847 9E8B
+6848 9E8C
+6849 9E95
+684A 9E91
+684B 9E9D
+684C 9EA5
+684D 9EB8
+684E 9EAA
+684F 9EAD
+6850 9EBC
+6851 9EBE
+6852 9761
+6853 9ECC
+6854 9ECF
+6855 9ED0
+6856 9ED1
+6857 9ED4
+6858 9EDC
+6859 9EDE
+685A 9EDD
+685B 9EE0
+685C 9EE5
+685D 9EE8
+685E 9EEF
+685F 9EF4
+6860 9EF6
+6861 9EF7
+6862 9EF9
+6863 9EFB
+6864 9EFC
+6865 9EFD
+6866 9F07
+6867 9F08
+6868 76B7
+6869 9F15
+686A 9F21
+686B 9F2C
+686C 9F3E
+686D 9F4A
+686E 9F4E
+686F 9F4F
+6870 9F52
+6871 9F54
+6872 9F63
+6873 9F5F
+6874 9F60
+6875 9F61
+6876 9F66
+6877 9F67
+6878 9F6C
+6879 9F6A
+687A 9F77
+687B 9F72
+687C 9F76
+687D 9F95
+687E 9F9C
+687F 9FA0
+6880 5C2D
+6881 69D9
+6882 9065
+6883 7476
+6884 51DC
+6885 7155
+6941 E000
+6942 E001
+6943 E002
+6944 E003
+6945 E004
+6946 E005
+6947 E006
+6948 E007
+6949 E008
+694A E009
+694B E00A
+694C E00B
+694D E00C
+694E E00D
+694F E00E
+6950 E00F
+6951 E010
+6952 E011
+6953 E012
+6954 E013
+6955 E014
+6956 E015
+6957 E016
+6958 E017
+6959 E018
+695A E019
+695B E01A
+695C E01B
+695D E01C
+695E E01D
+695F E01E
+6960 E01F
+6961 E020
+6962 E021
+6963 E022
+6964 E023
+6965 E024
+6966 E025
+6967 E026
+6968 E027
+6969 E028
+696A E029
+696B E02A
+696C E02B
+696D E02C
+696E E02D
+696F E02E
+6970 E02F
+6971 E030
+6972 E031
+6973 E032
+6974 E033
+6975 E034
+6976 E035
+6977 E036
+6978 E037
+6979 E038
+697A E039
+697B E03A
+697C E03B
+697D E03C
+697E E03D
+697F E03E
+6980 E03F
+6981 E040
+6982 E041
+6983 E042
+6984 E043
+6985 E044
+6986 E045
+6987 E046
+6988 E047
+6989 E048
+698A E049
+698B E04A
+698C E04B
+698D E04C
+698E E04D
+698F E04E
+6990 E04F
+6991 E050
+6992 E051
+6993 E052
+6994 E053
+6995 E054
+6996 E055
+6997 E056
+6998 E057
+6999 E058
+699A E059
+699B E05A
+699C E05B
+699D E05C
+699E E05D
+699F E05E
+69A0 E05F
+69A1 E060
+69A2 E061
+69A3 E062
+69A4 E063
+69A5 E064
+69A6 E065
+69A7 E066
+69A8 E067
+69A9 E068
+69AA E069
+69AB E06A
+69AC E06B
+69AD E06C
+69AE E06D
+69AF E06E
+69B0 E06F
+69B1 E070
+69B2 E071
+69B3 E072
+69B4 E073
+69B5 E074
+69B6 E075
+69B7 E076
+69B8 E077
+69B9 E078
+69BA E079
+69BB E07A
+69BC E07B
+69BD E07C
+69BE E07D
+69BF E07E
+69C0 E07F
+69C1 E080
+69C2 E081
+69C3 E082
+69C4 E083
+69C5 E084
+69C6 E085
+69C7 E086
+69C8 E087
+69C9 E088
+69CA E089
+69CB E08A
+69CC E08B
+69CD E08C
+69CE E08D
+69CF E08E
+69D0 E08F
+69D1 E090
+69D2 E091
+69D3 E092
+69D4 E093
+69D5 E094
+69D6 E095
+69D7 E096
+69D8 E097
+69D9 E098
+69DA E099
+69DB E09A
+69DC E09B
+69DD E09C
+69DE E09D
+69DF E09E
+69E0 E09F
+69E1 E0A0
+69E2 E0A1
+69E3 E0A2
+69E4 E0A3
+69E5 E0A4
+69E6 E0A5
+69E7 E0A6
+69E8 E0A7
+69E9 E0A8
+69EA E0A9
+69EB E0AA
+69EC E0AB
+69ED E0AC
+69EE E0AD
+69EF E0AE
+69F0 E0AF
+69F1 E0B0
+69F2 E0B1
+69F3 E0B2
+69F4 E0B3
+69F5 E0B4
+69F6 E0B5
+69F7 E0B6
+69F8 E0B7
+69F9 E0B8
+69FA E0B9
+69FB E0BA
+69FC E0BB
+69FD E0BC
+69FE E0BD
+6A41 E0BE
+6A42 E0BF
+6A43 E0C0
+6A44 E0C1
+6A45 E0C2
+6A46 E0C3
+6A47 E0C4
+6A48 E0C5
+6A49 E0C6
+6A4A E0C7
+6A4B E0C8
+6A4C E0C9
+6A4D E0CA
+6A4E E0CB
+6A4F E0CC
+6A50 E0CD
+6A51 E0CE
+6A52 E0CF
+6A53 E0D0
+6A54 E0D1
+6A55 E0D2
+6A56 E0D3
+6A57 E0D4
+6A58 E0D5
+6A59 E0D6
+6A5A E0D7
+6A5B E0D8
+6A5C E0D9
+6A5D E0DA
+6A5E E0DB
+6A5F E0DC
+6A60 E0DD
+6A61 E0DE
+6A62 E0DF
+6A63 E0E0
+6A64 E0E1
+6A65 E0E2
+6A66 E0E3
+6A67 E0E4
+6A68 E0E5
+6A69 E0E6
+6A6A E0E7
+6A6B E0E8
+6A6C E0E9
+6A6D E0EA
+6A6E E0EB
+6A6F E0EC
+6A70 E0ED
+6A71 E0EE
+6A72 E0EF
+6A73 E0F0
+6A74 E0F1
+6A75 E0F2
+6A76 E0F3
+6A77 E0F4
+6A78 E0F5
+6A79 E0F6
+6A7A E0F7
+6A7B E0F8
+6A7C E0F9
+6A7D E0FA
+6A7E E0FB
+6A7F E0FC
+6A80 E0FD
+6A81 E0FE
+6A82 E0FF
+6A83 E100
+6A84 E101
+6A85 E102
+6A86 E103
+6A87 E104
+6A88 E105
+6A89 E106
+6A8A E107
+6A8B E108
+6A8C E109
+6A8D E10A
+6A8E E10B
+6A8F E10C
+6A90 E10D
+6A91 E10E
+6A92 E10F
+6A93 E110
+6A94 E111
+6A95 E112
+6A96 E113
+6A97 E114
+6A98 E115
+6A99 E116
+6A9A E117
+6A9B E118
+6A9C E119
+6A9D E11A
+6A9E E11B
+6A9F E11C
+6AA0 E11D
+6AA1 E11E
+6AA2 E11F
+6AA3 E120
+6AA4 E121
+6AA5 E122
+6AA6 E123
+6AA7 E124
+6AA8 E125
+6AA9 E126
+6AAA E127
+6AAB E128
+6AAC E129
+6AAD E12A
+6AAE E12B
+6AAF E12C
+6AB0 E12D
+6AB1 E12E
+6AB2 E12F
+6AB3 E130
+6AB4 E131
+6AB5 E132
+6AB6 E133
+6AB7 E134
+6AB8 E135
+6AB9 E136
+6ABA E137
+6ABB E138
+6ABC E139
+6ABD E13A
+6ABE E13B
+6ABF E13C
+6AC0 E13D
+6AC1 E13E
+6AC2 E13F
+6AC3 E140
+6AC4 E141
+6AC5 E142
+6AC6 E143
+6AC7 E144
+6AC8 E145
+6AC9 E146
+6ACA E147
+6ACB E148
+6ACC E149
+6ACD E14A
+6ACE E14B
+6ACF E14C
+6AD0 E14D
+6AD1 E14E
+6AD2 E14F
+6AD3 E150
+6AD4 E151
+6AD5 E152
+6AD6 E153
+6AD7 E154
+6AD8 E155
+6AD9 E156
+6ADA E157
+6ADB E158
+6ADC E159
+6ADD E15A
+6ADE E15B
+6ADF E15C
+6AE0 E15D
+6AE1 E15E
+6AE2 E15F
+6AE3 E160
+6AE4 E161
+6AE5 E162
+6AE6 E163
+6AE7 E164
+6AE8 E165
+6AE9 E166
+6AEA E167
+6AEB E168
+6AEC E169
+6AED E16A
+6AEE E16B
+6AEF E16C
+6AF0 E16D
+6AF1 E16E
+6AF2 E16F
+6AF3 E170
+6AF4 E171
+6AF5 E172
+6AF6 E173
+6AF7 E174
+6AF8 E175
+6AF9 E176
+6AFA E177
+6AFB E178
+6AFC E179
+6AFD E17A
+6AFE E17B
+6B41 E17C
+6B42 E17D
+6B43 E17E
+6B44 E17F
+6B45 E180
+6B46 E181
+6B47 E182
+6B48 E183
+6B49 E184
+6B4A E185
+6B4B E186
+6B4C E187
+6B4D E188
+6B4E E189
+6B4F E18A
+6B50 E18B
+6B51 E18C
+6B52 E18D
+6B53 E18E
+6B54 E18F
+6B55 E190
+6B56 E191
+6B57 E192
+6B58 E193
+6B59 E194
+6B5A E195
+6B5B E196
+6B5C E197
+6B5D E198
+6B5E E199
+6B5F E19A
+6B60 E19B
+6B61 E19C
+6B62 E19D
+6B63 E19E
+6B64 E19F
+6B65 E1A0
+6B66 E1A1
+6B67 E1A2
+6B68 E1A3
+6B69 E1A4
+6B6A E1A5
+6B6B E1A6
+6B6C E1A7
+6B6D E1A8
+6B6E E1A9
+6B6F E1AA
+6B70 E1AB
+6B71 E1AC
+6B72 E1AD
+6B73 E1AE
+6B74 E1AF
+6B75 E1B0
+6B76 E1B1
+6B77 E1B2
+6B78 E1B3
+6B79 E1B4
+6B7A E1B5
+6B7B E1B6
+6B7C E1B7
+6B7D E1B8
+6B7E E1B9
+6B7F E1BA
+6B80 E1BB
+6B81 E1BC
+6B82 E1BD
+6B83 E1BE
+6B84 E1BF
+6B85 E1C0
+6B86 E1C1
+6B87 E1C2
+6B88 E1C3
+6B89 E1C4
+6B8A E1C5
+6B8B E1C6
+6B8C E1C7
+6B8D E1C8
+6B8E E1C9
+6B8F E1CA
+6B90 E1CB
+6B91 E1CC
+6B92 E1CD
+6B93 E1CE
+6B94 E1CF
+6B95 E1D0
+6B96 E1D1
+6B97 E1D2
+6B98 E1D3
+6B99 E1D4
+6B9A E1D5
+6B9B E1D6
+6B9C E1D7
+6B9D E1D8
+6B9E E1D9
+6B9F E1DA
+6BA0 E1DB
+6BA1 E1DC
+6BA2 E1DD
+6BA3 E1DE
+6BA4 E1DF
+6BA5 E1E0
+6BA6 E1E1
+6BA7 E1E2
+6BA8 E1E3
+6BA9 E1E4
+6BAA E1E5
+6BAB E1E6
+6BAC E1E7
+6BAD E1E8
+6BAE E1E9
+6BAF E1EA
+6BB0 E1EB
+6BB1 E1EC
+6BB2 E1ED
+6BB3 E1EE
+6BB4 E1EF
+6BB5 E1F0
+6BB6 E1F1
+6BB7 E1F2
+6BB8 E1F3
+6BB9 E1F4
+6BBA E1F5
+6BBB E1F6
+6BBC E1F7
+6BBD E1F8
+6BBE E1F9
+6BBF E1FA
+6BC0 E1FB
+6BC1 E1FC
+6BC2 E1FD
+6BC3 E1FE
+6BC4 E1FF
+6BC5 E200
+6BC6 E201
+6BC7 E202
+6BC8 E203
+6BC9 E204
+6BCA E205
+6BCB E206
+6BCC E207
+6BCD E208
+6BCE E209
+6BCF E20A
+6BD0 E20B
+6BD1 E20C
+6BD2 E20D
+6BD3 E20E
+6BD4 E20F
+6BD5 E210
+6BD6 E211
+6BD7 E212
+6BD8 E213
+6BD9 E214
+6BDA E215
+6BDB E216
+6BDC E217
+6BDD E218
+6BDE E219
+6BDF E21A
+6BE0 E21B
+6BE1 E21C
+6BE2 E21D
+6BE3 E21E
+6BE4 E21F
+6BE5 E220
+6BE6 E221
+6BE7 E222
+6BE8 E223
+6BE9 E224
+6BEA E225
+6BEB E226
+6BEC E227
+6BED E228
+6BEE E229
+6BEF E22A
+6BF0 E22B
+6BF1 E22C
+6BF2 E22D
+6BF3 E22E
+6BF4 E22F
+6BF5 E230
+6BF6 E231
+6BF7 E232
+6BF8 E233
+6BF9 E234
+6BFA E235
+6BFB E236
+6BFC E237
+6BFD E238
+6BFE E239
+6C41 E23A
+6C42 E23B
+6C43 E23C
+6C44 E23D
+6C45 E23E
+6C46 E23F
+6C47 E240
+6C48 E241
+6C49 E242
+6C4A E243
+6C4B E244
+6C4C E245
+6C4D E246
+6C4E E247
+6C4F E248
+6C50 E249
+6C51 E24A
+6C52 E24B
+6C53 E24C
+6C54 E24D
+6C55 E24E
+6C56 E24F
+6C57 E250
+6C58 E251
+6C59 E252
+6C5A E253
+6C5B E254
+6C5C E255
+6C5D E256
+6C5E E257
+6C5F E258
+6C60 E259
+6C61 E25A
+6C62 E25B
+6C63 E25C
+6C64 E25D
+6C65 E25E
+6C66 E25F
+6C67 E260
+6C68 E261
+6C69 E262
+6C6A E263
+6C6B E264
+6C6C E265
+6C6D E266
+6C6E E267
+6C6F E268
+6C70 E269
+6C71 E26A
+6C72 E26B
+6C73 E26C
+6C74 E26D
+6C75 E26E
+6C76 E26F
+6C77 E270
+6C78 E271
+6C79 E272
+6C7A E273
+6C7B E274
+6C7C E275
+6C7D E276
+6C7E E277
+6C7F E278
+6C80 E279
+6C81 E27A
+6C82 E27B
+6C83 E27C
+6C84 E27D
+6C85 E27E
+6C86 E27F
+6C87 E280
+6C88 E281
+6C89 E282
+6C8A E283
+6C8B E284
+6C8C E285
+6C8D E286
+6C8E E287
+6C8F E288
+6C90 E289
+6C91 E28A
+6C92 E28B
+6C93 E28C
+6C94 E28D
+6C95 E28E
+6C96 E28F
+6C97 E290
+6C98 E291
+6C99 E292
+6C9A E293
+6C9B E294
+6C9C E295
+6C9D E296
+6C9E E297
+6C9F E298
+6CA0 E299
+6CA1 E29A
+6CA2 E29B
+6CA3 E29C
+6CA4 E29D
+6CA5 E29E
+6CA6 E29F
+6CA7 E2A0
+6CA8 E2A1
+6CA9 E2A2
+6CAA E2A3
+6CAB E2A4
+6CAC E2A5
+6CAD E2A6
+6CAE E2A7
+6CAF E2A8
+6CB0 E2A9
+6CB1 E2AA
+6CB2 E2AB
+6CB3 E2AC
+6CB4 E2AD
+6CB5 E2AE
+6CB6 E2AF
+6CB7 E2B0
+6CB8 E2B1
+6CB9 E2B2
+6CBA E2B3
+6CBB E2B4
+6CBC E2B5
+6CBD E2B6
+6CBE E2B7
+6CBF E2B8
+6CC0 E2B9
+6CC1 E2BA
+6CC2 E2BB
+6CC3 E2BC
+6CC4 E2BD
+6CC5 E2BE
+6CC6 E2BF
+6CC7 E2C0
+6CC8 E2C1
+6CC9 E2C2
+6CCA E2C3
+6CCB E2C4
+6CCC E2C5
+6CCD E2C6
+6CCE E2C7
+6CCF E2C8
+6CD0 E2C9
+6CD1 E2CA
+6CD2 E2CB
+6CD3 E2CC
+6CD4 E2CD
+6CD5 E2CE
+6CD6 E2CF
+6CD7 E2D0
+6CD8 E2D1
+6CD9 E2D2
+6CDA E2D3
+6CDB E2D4
+6CDC E2D5
+6CDD E2D6
+6CDE E2D7
+6CDF E2D8
+6CE0 E2D9
+6CE1 E2DA
+6CE2 E2DB
+6CE3 E2DC
+6CE4 E2DD
+6CE5 E2DE
+6CE6 E2DF
+6CE7 E2E0
+6CE8 E2E1
+6CE9 E2E2
+6CEA E2E3
+6CEB E2E4
+6CEC E2E5
+6CED E2E6
+6CEE E2E7
+6CEF E2E8
+6CF0 E2E9
+6CF1 E2EA
+6CF2 E2EB
+6CF3 E2EC
+6CF4 E2ED
+6CF5 E2EE
+6CF6 E2EF
+6CF7 E2F0
+6CF8 E2F1
+6CF9 E2F2
+6CFA E2F3
+6CFB E2F4
+6CFC E2F5
+6CFD E2F6
+6CFE E2F7
+6D41 E2F8
+6D42 E2F9
+6D43 E2FA
+6D44 E2FB
+6D45 E2FC
+6D46 E2FD
+6D47 E2FE
+6D48 E2FF
+6D49 E300
+6D4A E301
+6D4B E302
+6D4C E303
+6D4D E304
+6D4E E305
+6D4F E306
+6D50 E307
+6D51 E308
+6D52 E309
+6D53 E30A
+6D54 E30B
+6D55 E30C
+6D56 E30D
+6D57 E30E
+6D58 E30F
+6D59 E310
+6D5A E311
+6D5B E312
+6D5C E313
+6D5D E314
+6D5E E315
+6D5F E316
+6D60 E317
+6D61 E318
+6D62 E319
+6D63 E31A
+6D64 E31B
+6D65 E31C
+6D66 E31D
+6D67 E31E
+6D68 E31F
+6D69 E320
+6D6A E321
+6D6B E322
+6D6C E323
+6D6D E324
+6D6E E325
+6D6F E326
+6D70 E327
+6D71 E328
+6D72 E329
+6D73 E32A
+6D74 E32B
+6D75 E32C
+6D76 E32D
+6D77 E32E
+6D78 E32F
+6D79 E330
+6D7A E331
+6D7B E332
+6D7C E333
+6D7D E334
+6D7E E335
+6D7F E336
+6D80 E337
+6D81 E338
+6D82 E339
+6D83 E33A
+6D84 E33B
+6D85 E33C
+6D86 E33D
+6D87 E33E
+6D88 E33F
+6D89 E340
+6D8A E341
+6D8B E342
+6D8C E343
+6D8D E344
+6D8E E345
+6D8F E346
+6D90 E347
+6D91 E348
+6D92 E349
+6D93 E34A
+6D94 E34B
+6D95 E34C
+6D96 E34D
+6D97 E34E
+6D98 E34F
+6D99 E350
+6D9A E351
+6D9B E352
+6D9C E353
+6D9D E354
+6D9E E355
+6D9F E356
+6DA0 E357
+6DA1 E358
+6DA2 E359
+6DA3 E35A
+6DA4 E35B
+6DA5 E35C
+6DA6 E35D
+6DA7 E35E
+6DA8 E35F
+6DA9 E360
+6DAA E361
+6DAB E362
+6DAC E363
+6DAD E364
+6DAE E365
+6DAF E366
+6DB0 E367
+6DB1 E368
+6DB2 E369
+6DB3 E36A
+6DB4 E36B
+6DB5 E36C
+6DB6 E36D
+6DB7 E36E
+6DB8 E36F
+6DB9 E370
+6DBA E371
+6DBB E372
+6DBC E373
+6DBD E374
+6DBE E375
+6DBF E376
+6DC0 E377
+6DC1 E378
+6DC2 E379
+6DC3 E37A
+6DC4 E37B
+6DC5 E37C
+6DC6 E37D
+6DC7 E37E
+6DC8 E37F
+6DC9 E380
+6DCA E381
+6DCB E382
+6DCC E383
+6DCD E384
+6DCE E385
+6DCF E386
+6DD0 E387
+6DD1 E388
+6DD2 E389
+6DD3 E38A
+6DD4 E38B
+6DD5 E38C
+6DD6 E38D
+6DD7 E38E
+6DD8 E38F
+6DD9 E390
+6DDA E391
+6DDB E392
+6DDC E393
+6DDD E394
+6DDE E395
+6DDF E396
+6DE0 E397
+6DE1 E398
+6DE2 E399
+6DE3 E39A
+6DE4 E39B
+6DE5 E39C
+6DE6 E39D
+6DE7 E39E
+6DE8 E39F
+6DE9 E3A0
+6DEA E3A1
+6DEB E3A2
+6DEC E3A3
+6DED E3A4
+6DEE E3A5
+6DEF E3A6
+6DF0 E3A7
+6DF1 E3A8
+6DF2 E3A9
+6DF3 E3AA
+6DF4 E3AB
+6DF5 E3AC
+6DF6 E3AD
+6DF7 E3AE
+6DF8 E3AF
+6DF9 E3B0
+6DFA E3B1
+6DFB E3B2
+6DFC E3B3
+6DFD E3B4
+6DFE E3B5
+6E41 E3B6
+6E42 E3B7
+6E43 E3B8
+6E44 E3B9
+6E45 E3BA
+6E46 E3BB
+6E47 E3BC
+6E48 E3BD
+6E49 E3BE
+6E4A E3BF
+6E4B E3C0
+6E4C E3C1
+6E4D E3C2
+6E4E E3C3
+6E4F E3C4
+6E50 E3C5
+6E51 E3C6
+6E52 E3C7
+6E53 E3C8
+6E54 E3C9
+6E55 E3CA
+6E56 E3CB
+6E57 E3CC
+6E58 E3CD
+6E59 E3CE
+6E5A E3CF
+6E5B E3D0
+6E5C E3D1
+6E5D E3D2
+6E5E E3D3
+6E5F E3D4
+6E60 E3D5
+6E61 E3D6
+6E62 E3D7
+6E63 E3D8
+6E64 E3D9
+6E65 E3DA
+6E66 E3DB
+6E67 E3DC
+6E68 E3DD
+6E69 E3DE
+6E6A E3DF
+6E6B E3E0
+6E6C E3E1
+6E6D E3E2
+6E6E E3E3
+6E6F E3E4
+6E70 E3E5
+6E71 E3E6
+6E72 E3E7
+6E73 E3E8
+6E74 E3E9
+6E75 E3EA
+6E76 E3EB
+6E77 E3EC
+6E78 E3ED
+6E79 E3EE
+6E7A E3EF
+6E7B E3F0
+6E7C E3F1
+6E7D E3F2
+6E7E E3F3
+6E7F E3F4
+6E80 E3F5
+6E81 E3F6
+6E82 E3F7
+6E83 E3F8
+6E84 E3F9
+6E85 E3FA
+6E86 E3FB
+6E87 E3FC
+6E88 E3FD
+6E89 E3FE
+6E8A E3FF
+6E8B E400
+6E8C E401
+6E8D E402
+6E8E E403
+6E8F E404
+6E90 E405
+6E91 E406
+6E92 E407
+6E93 E408
+6E94 E409
+6E95 E40A
+6E96 E40B
+6E97 E40C
+6E98 E40D
+6E99 E40E
+6E9A E40F
+6E9B E410
+6E9C E411
+6E9D E412
+6E9E E413
+6E9F E414
+6EA0 E415
+6EA1 E416
+6EA2 E417
+6EA3 E418
+6EA4 E419
+6EA5 E41A
+6EA6 E41B
+6EA7 E41C
+6EA8 E41D
+6EA9 E41E
+6EAA E41F
+6EAB E420
+6EAC E421
+6EAD E422
+6EAE E423
+6EAF E424
+6EB0 E425
+6EB1 E426
+6EB2 E427
+6EB3 E428
+6EB4 E429
+6EB5 E42A
+6EB6 E42B
+6EB7 E42C
+6EB8 E42D
+6EB9 E42E
+6EBA E42F
+6EBB E430
+6EBC E431
+6EBD E432
+6EBE E433
+6EBF E434
+6EC0 E435
+6EC1 E436
+6EC2 E437
+6EC3 E438
+6EC4 E439
+6EC5 E43A
+6EC6 E43B
+6EC7 E43C
+6EC8 E43D
+6EC9 E43E
+6ECA E43F
+6ECB E440
+6ECC E441
+6ECD E442
+6ECE E443
+6ECF E444
+6ED0 E445
+6ED1 E446
+6ED2 E447
+6ED3 E448
+6ED4 E449
+6ED5 E44A
+6ED6 E44B
+6ED7 E44C
+6ED8 E44D
+6ED9 E44E
+6EDA E44F
+6EDB E450
+6EDC E451
+6EDD E452
+6EDE E453
+6EDF E454
+6EE0 E455
+6EE1 E456
+6EE2 E457
+6EE3 E458
+6EE4 E459
+6EE5 E45A
+6EE6 E45B
+6EE7 E45C
+6EE8 E45D
+6EE9 E45E
+6EEA E45F
+6EEB E460
+6EEC E461
+6EED E462
+6EEE E463
+6EEF E464
+6EF0 E465
+6EF1 E466
+6EF2 E467
+6EF3 E468
+6EF4 E469
+6EF5 E46A
+6EF6 E46B
+6EF7 E46C
+6EF8 E46D
+6EF9 E46E
+6EFA E46F
+6EFB E470
+6EFC E471
+6EFD E472
+6EFE E473
+6F41 E474
+6F42 E475
+6F43 E476
+6F44 E477
+6F45 E478
+6F46 E479
+6F47 E47A
+6F48 E47B
+6F49 E47C
+6F4A E47D
+6F4B E47E
+6F4C E47F
+6F4D E480
+6F4E E481
+6F4F E482
+6F50 E483
+6F51 E484
+6F52 E485
+6F53 E486
+6F54 E487
+6F55 E488
+6F56 E489
+6F57 E48A
+6F58 E48B
+6F59 E48C
+6F5A E48D
+6F5B E48E
+6F5C E48F
+6F5D E490
+6F5E E491
+6F5F E492
+6F60 E493
+6F61 E494
+6F62 E495
+6F63 E496
+6F64 E497
+6F65 E498
+6F66 E499
+6F67 E49A
+6F68 E49B
+6F69 E49C
+6F6A E49D
+6F6B E49E
+6F6C E49F
+6F6D E4A0
+6F6E E4A1
+6F6F E4A2
+6F70 E4A3
+6F71 E4A4
+6F72 E4A5
+6F73 E4A6
+6F74 E4A7
+6F75 E4A8
+6F76 E4A9
+6F77 E4AA
+6F78 E4AB
+6F79 E4AC
+6F7A E4AD
+6F7B E4AE
+6F7C E4AF
+6F7D E4B0
+6F7E E4B1
+6F7F E4B2
+6F80 E4B3
+6F81 E4B4
+6F82 E4B5
+6F83 E4B6
+6F84 E4B7
+6F85 E4B8
+6F86 E4B9
+6F87 E4BA
+6F88 E4BB
+6F89 E4BC
+6F8A E4BD
+6F8B E4BE
+6F8C E4BF
+6F8D E4C0
+6F8E E4C1
+6F8F E4C2
+6F90 E4C3
+6F91 E4C4
+6F92 E4C5
+6F93 E4C6
+6F94 E4C7
+6F95 E4C8
+6F96 E4C9
+6F97 E4CA
+6F98 E4CB
+6F99 E4CC
+6F9A E4CD
+6F9B E4CE
+6F9C E4CF
+6F9D E4D0
+6F9E E4D1
+6F9F E4D2
+6FA0 E4D3
+6FA1 E4D4
+6FA2 E4D5
+6FA3 E4D6
+6FA4 E4D7
+6FA5 E4D8
+6FA6 E4D9
+6FA7 E4DA
+6FA8 E4DB
+6FA9 E4DC
+6FAA E4DD
+6FAB E4DE
+6FAC E4DF
+6FAD E4E0
+6FAE E4E1
+6FAF E4E2
+6FB0 E4E3
+6FB1 E4E4
+6FB2 E4E5
+6FB3 E4E6
+6FB4 E4E7
+6FB5 E4E8
+6FB6 E4E9
+6FB7 E4EA
+6FB8 E4EB
+6FB9 E4EC
+6FBA E4ED
+6FBB E4EE
+6FBC E4EF
+6FBD E4F0
+6FBE E4F1
+6FBF E4F2
+6FC0 E4F3
+6FC1 E4F4
+6FC2 E4F5
+6FC3 E4F6
+6FC4 E4F7
+6FC5 E4F8
+6FC6 E4F9
+6FC7 E4FA
+6FC8 E4FB
+6FC9 E4FC
+6FCA E4FD
+6FCB E4FE
+6FCC E4FF
+6FCD E500
+6FCE E501
+6FCF E502
+6FD0 E503
+6FD1 E504
+6FD2 E505
+6FD3 E506
+6FD4 E507
+6FD5 E508
+6FD6 E509
+6FD7 E50A
+6FD8 E50B
+6FD9 E50C
+6FDA E50D
+6FDB E50E
+6FDC E50F
+6FDD E510
+6FDE E511
+6FDF E512
+6FE0 E513
+6FE1 E514
+6FE2 E515
+6FE3 E516
+6FE4 E517
+6FE5 E518
+6FE6 E519
+6FE7 E51A
+6FE8 E51B
+6FE9 E51C
+6FEA E51D
+6FEB E51E
+6FEC E51F
+6FED E520
+6FEE E521
+6FEF E522
+6FF0 E523
+6FF1 E524
+6FF2 E525
+6FF3 E526
+6FF4 E527
+6FF5 E528
+6FF6 E529
+6FF7 E52A
+6FF8 E52B
+6FF9 E52C
+6FFA E52D
+6FFB E52E
+6FFC E52F
+6FFD E530
+6FFE E531
+7041 E532
+7042 E533
+7043 E534
+7044 E535
+7045 E536
+7046 E537
+7047 E538
+7048 E539
+7049 E53A
+704A E53B
+704B E53C
+704C E53D
+704D E53E
+704E E53F
+704F E540
+7050 E541
+7051 E542
+7052 E543
+7053 E544
+7054 E545
+7055 E546
+7056 E547
+7057 E548
+7058 E549
+7059 E54A
+705A E54B
+705B E54C
+705C E54D
+705D E54E
+705E E54F
+705F E550
+7060 E551
+7061 E552
+7062 E553
+7063 E554
+7064 E555
+7065 E556
+7066 E557
+7067 E558
+7068 E559
+7069 E55A
+706A E55B
+706B E55C
+706C E55D
+706D E55E
+706E E55F
+706F E560
+7070 E561
+7071 E562
+7072 E563
+7073 E564
+7074 E565
+7075 E566
+7076 E567
+7077 E568
+7078 E569
+7079 E56A
+707A E56B
+707B E56C
+707C E56D
+707D E56E
+707E E56F
+707F E570
+7080 E571
+7081 E572
+7082 E573
+7083 E574
+7084 E575
+7085 E576
+7086 E577
+7087 E578
+7088 E579
+7089 E57A
+708A E57B
+708B E57C
+708C E57D
+708D E57E
+708E E57F
+708F E580
+7090 E581
+7091 E582
+7092 E583
+7093 E584
+7094 E585
+7095 E586
+7096 E587
+7097 E588
+7098 E589
+7099 E58A
+709A E58B
+709B E58C
+709C E58D
+709D E58E
+709E E58F
+709F E590
+70A0 E591
+70A1 E592
+70A2 E593
+70A3 E594
+70A4 E595
+70A5 E596
+70A6 E597
+70A7 E598
+70A8 E599
+70A9 E59A
+70AA E59B
+70AB E59C
+70AC E59D
+70AD E59E
+70AE E59F
+70AF E5A0
+70B0 E5A1
+70B1 E5A2
+70B2 E5A3
+70B3 E5A4
+70B4 E5A5
+70B5 E5A6
+70B6 E5A7
+70B7 E5A8
+70B8 E5A9
+70B9 E5AA
+70BA E5AB
+70BB E5AC
+70BC E5AD
+70BD E5AE
+70BE E5AF
+70BF E5B0
+70C0 E5B1
+70C1 E5B2
+70C2 E5B3
+70C3 E5B4
+70C4 E5B5
+70C5 E5B6
+70C6 E5B7
+70C7 E5B8
+70C8 E5B9
+70C9 E5BA
+70CA E5BB
+70CB E5BC
+70CC E5BD
+70CD E5BE
+70CE E5BF
+70CF E5C0
+70D0 E5C1
+70D1 E5C2
+70D2 E5C3
+70D3 E5C4
+70D4 E5C5
+70D5 E5C6
+70D6 E5C7
+70D7 E5C8
+70D8 E5C9
+70D9 E5CA
+70DA E5CB
+70DB E5CC
+70DC E5CD
+70DD E5CE
+70DE E5CF
+70DF E5D0
+70E0 E5D1
+70E1 E5D2
+70E2 E5D3
+70E3 E5D4
+70E4 E5D5
+70E5 E5D6
+70E6 E5D7
+70E7 E5D8
+70E8 E5D9
+70E9 E5DA
+70EA E5DB
+70EB E5DC
+70EC E5DD
+70ED E5DE
+70EE E5DF
+70EF E5E0
+70F0 E5E1
+70F1 E5E2
+70F2 E5E3
+70F3 E5E4
+70F4 E5E5
+70F5 E5E6
+70F6 E5E7
+70F7 E5E8
+70F8 E5E9
+70F9 E5EA
+70FA E5EB
+70FB E5EC
+70FC E5ED
+70FD E5EE
+70FE E5EF
+7141 E5F0
+7142 E5F1
+7143 E5F2
+7144 E5F3
+7145 E5F4
+7146 E5F5
+7147 E5F6
+7148 E5F7
+7149 E5F8
+714A E5F9
+714B E5FA
+714C E5FB
+714D E5FC
+714E E5FD
+714F E5FE
+7150 E5FF
+7151 E600
+7152 E601
+7153 E602
+7154 E603
+7155 E604
+7156 E605
+7157 E606
+7158 E607
+7159 E608
+715A E609
+715B E60A
+715C E60B
+715D E60C
+715E E60D
+715F E60E
+7160 E60F
+7161 E610
+7162 E611
+7163 E612
+7164 E613
+7165 E614
+7166 E615
+7167 E616
+7168 E617
+7169 E618
+716A E619
+716B E61A
+716C E61B
+716D E61C
+716E E61D
+716F E61E
+7170 E61F
+7171 E620
+7172 E621
+7173 E622
+7174 E623
+7175 E624
+7176 E625
+7177 E626
+7178 E627
+7179 E628
+717A E629
+717B E62A
+717C E62B
+717D E62C
+717E E62D
+717F E62E
+7180 E62F
+7181 E630
+7182 E631
+7183 E632
+7184 E633
+7185 E634
+7186 E635
+7187 E636
+7188 E637
+7189 E638
+718A E639
+718B E63A
+718C E63B
+718D E63C
+718E E63D
+718F E63E
+7190 E63F
+7191 E640
+7192 E641
+7193 E642
+7194 E643
+7195 E644
+7196 E645
+7197 E646
+7198 E647
+7199 E648
+719A E649
+719B E64A
+719C E64B
+719D E64C
+719E E64D
+719F E64E
+71A0 E64F
+71A1 E650
+71A2 E651
+71A3 E652
+71A4 E653
+71A5 E654
+71A6 E655
+71A7 E656
+71A8 E657
+71A9 E658
+71AA E659
+71AB E65A
+71AC E65B
+71AD E65C
+71AE E65D
+71AF E65E
+71B0 E65F
+71B1 E660
+71B2 E661
+71B3 E662
+71B4 E663
+71B5 E664
+71B6 E665
+71B7 E666
+71B8 E667
+71B9 E668
+71BA E669
+71BB E66A
+71BC E66B
+71BD E66C
+71BE E66D
+71BF E66E
+71C0 E66F
+71C1 E670
+71C2 E671
+71C3 E672
+71C4 E673
+71C5 E674
+71C6 E675
+71C7 E676
+71C8 E677
+71C9 E678
+71CA E679
+71CB E67A
+71CC E67B
+71CD E67C
+71CE E67D
+71CF E67E
+71D0 E67F
+71D1 E680
+71D2 E681
+71D3 E682
+71D4 E683
+71D5 E684
+71D6 E685
+71D7 E686
+71D8 E687
+71D9 E688
+71DA E689
+71DB E68A
+71DC E68B
+71DD E68C
+71DE E68D
+71DF E68E
+71E0 E68F
+71E1 E690
+71E2 E691
+71E3 E692
+71E4 E693
+71E5 E694
+71E6 E695
+71E7 E696
+71E8 E697
+71E9 E698
+71EA E699
+71EB E69A
+71EC E69B
+71ED E69C
+71EE E69D
+71EF E69E
+71F0 E69F
+71F1 E6A0
+71F2 E6A1
+71F3 E6A2
+71F4 E6A3
+71F5 E6A4
+71F6 E6A5
+71F7 E6A6
+71F8 E6A7
+71F9 E6A8
+71FA E6A9
+71FB E6AA
+71FC E6AB
+71FD E6AC
+71FE E6AD
+7241 E6AE
+7242 E6AF
+7243 E6B0
+7244 E6B1
+7245 E6B2
+7246 E6B3
+7247 E6B4
+7248 E6B5
+7249 E6B6
+724A E6B7
+724B E6B8
+724C E6B9
+724D E6BA
+724E E6BB
+724F E6BC
+7250 E6BD
+7251 E6BE
+7252 E6BF
+7253 E6C0
+7254 E6C1
+7255 E6C2
+7256 E6C3
+7257 E6C4
+7258 E6C5
+7259 E6C6
+725A E6C7
+725B E6C8
+725C E6C9
+725D E6CA
+725E E6CB
+725F E6CC
+7260 E6CD
+7261 E6CE
+7262 E6CF
+7263 E6D0
+7264 E6D1
+7265 E6D2
+7266 E6D3
+7267 E6D4
+7268 E6D5
+7269 E6D6
+726A E6D7
+726B E6D8
+726C E6D9
+726D E6DA
+726E E6DB
+726F E6DC
+7270 E6DD
+7271 E6DE
+7272 E6DF
+7273 E6E0
+7274 E6E1
+7275 E6E2
+7276 E6E3
+7277 E6E4
+7278 E6E5
+7279 E6E6
+727A E6E7
+727B E6E8
+727C E6E9
+727D E6EA
+727E E6EB
+727F E6EC
+7280 E6ED
+7281 E6EE
+7282 E6EF
+7283 E6F0
+7284 E6F1
+7285 E6F2
+7286 E6F3
+7287 E6F4
+7288 E6F5
+7289 E6F6
+728A E6F7
+728B E6F8
+728C E6F9
+728D E6FA
+728E E6FB
+728F E6FC
+7290 E6FD
+7291 E6FE
+7292 E6FF
+7293 E700
+7294 E701
+7295 E702
+7296 E703
+7297 E704
+7298 E705
+7299 E706
+729A E707
+729B E708
+729C E709
+729D E70A
+729E E70B
+729F E70C
+72A0 E70D
+72A1 E70E
+72A2 E70F
+72A3 E710
+72A4 E711
+72A5 E712
+72A6 E713
+72A7 E714
+72A8 E715
+72A9 E716
+72AA E717
+72AB E718
+72AC E719
+72AD E71A
+72AE E71B
+72AF E71C
+72B0 E71D
+72B1 E71E
+72B2 E71F
+72B3 E720
+72B4 E721
+72B5 E722
+72B6 E723
+72B7 E724
+72B8 E725
+72B9 E726
+72BA E727
+72BB E728
+72BC E729
+72BD E72A
+72BE E72B
+72BF E72C
+72C0 E72D
+72C1 E72E
+72C2 E72F
+72C3 E730
+72C4 E731
+72C5 E732
+72C6 E733
+72C7 E734
+72C8 E735
+72C9 E736
+72CA E737
+72CB E738
+72CC E739
+72CD E73A
+72CE E73B
+72CF E73C
+72D0 E73D
+72D1 E73E
+72D2 E73F
+72D3 E740
+72D4 E741
+72D5 E742
+72D6 E743
+72D7 E744
+72D8 E745
+72D9 E746
+72DA E747
+72DB E748
+72DC E749
+72DD E74A
+72DE E74B
+72DF E74C
+72E0 E74D
+72E1 E74E
+72E2 E74F
+72E3 E750
+72E4 E751
+72E5 E752
+72E6 E753
+72E7 E754
+72E8 E755
+72E9 E756
+72EA E757
+72EB E758
+72EC E759
+72ED E75A
+72EE E75B
+72EF E75C
+72F0 E75D
+72F1 E75E
+72F2 E75F
+72F3 E760
+72F4 E761
+72F5 E762
+72F6 E763
+72F7 E764
+72F8 E765
+72F9 E766
+72FA E767
+72FB E768
+72FC E769
+72FD E76A
+72FE E76B
+7341 E76C
+7342 E76D
+7343 E76E
+7344 E76F
+7345 E770
+7346 E771
+7347 E772
+7348 E773
+7349 E774
+734A E775
+734B E776
+734C E777
+734D E778
+734E E779
+734F E77A
+7350 E77B
+7351 E77C
+7352 E77D
+7353 E77E
+7354 E77F
+7355 E780
+7356 E781
+7357 E782
+7358 E783
+7359 E784
+735A E785
+735B E786
+735C E787
+735D E788
+735E E789
+735F E78A
+7360 E78B
+7361 E78C
+7362 E78D
+7363 E78E
+7364 E78F
+7365 E790
+7366 E791
+7367 E792
+7368 E793
+7369 E794
+736A E795
+736B E796
+736C E797
+736D E798
+736E E799
+736F E79A
+7370 E79B
+7371 E79C
+7372 E79D
+7373 E79E
+7374 E79F
+7375 E7A0
+7376 E7A1
+7377 E7A2
+7378 E7A3
+7379 E7A4
+737A E7A5
+737B E7A6
+737C E7A7
+737D E7A8
+737E E7A9
+737F E7AA
+7380 E7AB
+7381 E7AC
+7382 E7AD
+7383 E7AE
+7384 E7AF
+7385 E7B0
+7386 E7B1
+7387 E7B2
+7388 E7B3
+7389 E7B4
+738A E7B5
+738B E7B6
+738C E7B7
+738D E7B8
+738E E7B9
+738F E7BA
+7390 E7BB
+7391 E7BC
+7392 E7BD
+7393 E7BE
+7394 E7BF
+7395 E7C0
+7396 E7C1
+7397 E7C2
+7398 E7C3
+7399 E7C4
+739A E7C5
+739B E7C6
+739C E7C7
+739D E7C8
+739E E7C9
+739F E7CA
+73A0 E7CB
+73A1 E7CC
+73A2 E7CD
+73A3 E7CE
+73A4 E7CF
+73A5 E7D0
+73A6 E7D1
+73A7 E7D2
+73A8 E7D3
+73A9 E7D4
+73AA E7D5
+73AB E7D6
+73AC E7D7
+73AD E7D8
+73AE E7D9
+73AF E7DA
+73B0 E7DB
+73B1 E7DC
+73B2 E7DD
+73B3 E7DE
+73B4 E7DF
+73B5 E7E0
+73B6 E7E1
+73B7 E7E2
+73B8 E7E3
+73B9 E7E4
+73BA E7E5
+73BB E7E6
+73BC E7E7
+73BD E7E8
+73BE E7E9
+73BF E7EA
+73C0 E7EB
+73C1 E7EC
+73C2 E7ED
+73C3 E7EE
+73C4 E7EF
+73C5 E7F0
+73C6 E7F1
+73C7 E7F2
+73C8 E7F3
+73C9 E7F4
+73CA E7F5
+73CB E7F6
+73CC E7F7
+73CD E7F8
+73CE E7F9
+73CF E7FA
+73D0 E7FB
+73D1 E7FC
+73D2 E7FD
+73D3 E7FE
+73D4 E7FF
+73D5 E800
+73D6 E801
+73D7 E802
+73D8 E803
+73D9 E804
+73DA E805
+73DB E806
+73DC E807
+73DD E808
+73DE E809
+73DF E80A
+73E0 E80B
+73E1 E80C
+73E2 E80D
+73E3 E80E
+73E4 E80F
+73E5 E810
+73E6 E811
+73E7 E812
+73E8 E813
+73E9 E814
+73EA E815
+73EB E816
+73EC E817
+73ED E818
+73EE E819
+73EF E81A
+73F0 E81B
+73F1 E81C
+73F2 E81D
+73F3 E81E
+73F4 E81F
+73F5 E820
+73F6 E821
+73F7 E822
+73F8 E823
+73F9 E824
+73FA E825
+73FB E826
+73FC E827
+73FD E828
+73FE E829
+7441 E82A
+7442 E82B
+7443 E82C
+7444 E82D
+7445 E82E
+7446 E82F
+7447 E830
+7448 E831
+7449 E832
+744A E833
+744B E834
+744C E835
+744D E836
+744E E837
+744F E838
+7450 E839
+7451 E83A
+7452 E83B
+7453 E83C
+7454 E83D
+7455 E83E
+7456 E83F
+7457 E840
+7458 E841
+7459 E842
+745A E843
+745B E844
+745C E845
+745D E846
+745E E847
+745F E848
+7460 E849
+7461 E84A
+7462 E84B
+7463 E84C
+7464 E84D
+7465 E84E
+7466 E84F
+7467 E850
+7468 E851
+7469 E852
+746A E853
+746B E854
+746C E855
+746D E856
+746E E857
+746F E858
+7470 E859
+7471 E85A
+7472 E85B
+7473 E85C
+7474 E85D
+7475 E85E
+7476 E85F
+7477 E860
+7478 E861
+7479 E862
+747A E863
+747B E864
+747C E865
+747D E866
+747E E867
+747F E868
+7480 E869
+7481 E86A
+7482 E86B
+7483 E86C
+7484 E86D
+7485 E86E
+7486 E86F
+7487 E870
+7488 E871
+7489 E872
+748A E873
+748B E874
+748C E875
+748D E876
+748E E877
+748F E878
+7490 E879
+7491 E87A
+7492 E87B
+7493 E87C
+7494 E87D
+7495 E87E
+7496 E87F
+7497 E880
+7498 E881
+7499 E882
+749A E883
+749B E884
+749C E885
+749D E886
+749E E887
+749F E888
+74A0 E889
+74A1 E88A
+74A2 E88B
+74A3 E88C
+74A4 E88D
+74A5 E88E
+74A6 E88F
+74A7 E890
+74A8 E891
+74A9 E892
+74AA E893
+74AB E894
+74AC E895
+74AD E896
+74AE E897
+74AF E898
+74B0 E899
+74B1 E89A
+74B2 E89B
+74B3 E89C
+74B4 E89D
+74B5 E89E
+74B6 E89F
+74B7 E8A0
+74B8 E8A1
+74B9 E8A2
+74BA E8A3
+74BB E8A4
+74BC E8A5
+74BD E8A6
+74BE E8A7
+74BF E8A8
+74C0 E8A9
+74C1 E8AA
+74C2 E8AB
+74C3 E8AC
+74C4 E8AD
+74C5 E8AE
+74C6 E8AF
+74C7 E8B0
+74C8 E8B1
+74C9 E8B2
+74CA E8B3
+74CB E8B4
+74CC E8B5
+74CD E8B6
+74CE E8B7
+74CF E8B8
+74D0 E8B9
+74D1 E8BA
+74D2 E8BB
+74D3 E8BC
+74D4 E8BD
+74D5 E8BE
+74D6 E8BF
+74D7 E8C0
+74D8 E8C1
+74D9 E8C2
+74DA E8C3
+74DB E8C4
+74DC E8C5
+74DD E8C6
+74DE E8C7
+74DF E8C8
+74E0 E8C9
+74E1 E8CA
+74E2 E8CB
+74E3 E8CC
+74E4 E8CD
+74E5 E8CE
+74E6 E8CF
+74E7 E8D0
+74E8 E8D1
+74E9 E8D2
+74EA E8D3
+74EB E8D4
+74EC E8D5
+74ED E8D6
+74EE E8D7
+74EF E8D8
+74F0 E8D9
+74F1 E8DA
+74F2 E8DB
+74F3 E8DC
+74F4 E8DD
+74F5 E8DE
+74F6 E8DF
+74F7 E8E0
+74F8 E8E1
+74F9 E8E2
+74FA E8E3
+74FB E8E4
+74FC E8E5
+74FD E8E6
+74FE E8E7
+7541 E8E8
+7542 E8E9
+7543 E8EA
+7544 E8EB
+7545 E8EC
+7546 E8ED
+7547 E8EE
+7548 E8EF
+7549 E8F0
+754A E8F1
+754B E8F2
+754C E8F3
+754D E8F4
+754E E8F5
+754F E8F6
+7550 E8F7
+7551 E8F8
+7552 E8F9
+7553 E8FA
+7554 E8FB
+7555 E8FC
+7556 E8FD
+7557 E8FE
+7558 E8FF
+7559 E900
+755A E901
+755B E902
+755C E903
+755D E904
+755E E905
+755F E906
+7560 E907
+7561 E908
+7562 E909
+7563 E90A
+7564 E90B
+7565 E90C
+7566 E90D
+7567 E90E
+7568 E90F
+7569 E910
+756A E911
+756B E912
+756C E913
+756D E914
+756E E915
+756F E916
+7570 E917
+7571 E918
+7572 E919
+7573 E91A
+7574 E91B
+7575 E91C
+7576 E91D
+7577 E91E
+7578 E91F
+7579 E920
+757A E921
+757B E922
+757C E923
+757D E924
+757E E925
+757F E926
+7580 E927
+7581 E928
+7582 E929
+7583 E92A
+7584 E92B
+7585 E92C
+7586 E92D
+7587 E92E
+7588 E92F
+7589 E930
+758A E931
+758B E932
+758C E933
+758D E934
+758E E935
+758F E936
+7590 E937
+7591 E938
+7592 E939
+7593 E93A
+7594 E93B
+7595 E93C
+7596 E93D
+7597 E93E
+7598 E93F
+7599 E940
+759A E941
+759B E942
+759C E943
+759D E944
+759E E945
+759F E946
+75A0 E947
+75A1 E948
+75A2 E949
+75A3 E94A
+75A4 E94B
+75A5 E94C
+75A6 E94D
+75A7 E94E
+75A8 E94F
+75A9 E950
+75AA E951
+75AB E952
+75AC E953
+75AD E954
+75AE E955
+75AF E956
+75B0 E957
+75B1 E958
+75B2 E959
+75B3 E95A
+75B4 E95B
+75B5 E95C
+75B6 E95D
+75B7 E95E
+75B8 E95F
+75B9 E960
+75BA E961
+75BB E962
+75BC E963
+75BD E964
+75BE E965
+75BF E966
+75C0 E967
+75C1 E968
+75C2 E969
+75C3 E96A
+75C4 E96B
+75C5 E96C
+75C6 E96D
+75C7 E96E
+75C8 E96F
+75C9 E970
+75CA E971
+75CB E972
+75CC E973
+75CD E974
+75CE E975
+75CF E976
+75D0 E977
+75D1 E978
+75D2 E979
+75D3 E97A
+75D4 E97B
+75D5 E97C
+75D6 E97D
+75D7 E97E
+75D8 E97F
+75D9 E980
+75DA E981
+75DB E982
+75DC E983
+75DD E984
+75DE E985
+75DF E986
+75E0 E987
+75E1 E988
+75E2 E989
+75E3 E98A
+75E4 E98B
+75E5 E98C
+75E6 E98D
+75E7 E98E
+75E8 E98F
+75E9 E990
+75EA E991
+75EB E992
+75EC E993
+75ED E994
+75EE E995
+75EF E996
+75F0 E997
+75F1 E998
+75F2 E999
+75F3 E99A
+75F4 E99B
+75F5 E99C
+75F6 E99D
+75F7 E99E
+75F8 E99F
+75F9 E9A0
+75FA E9A1
+75FB E9A2
+75FC E9A3
+75FD E9A4
+75FE E9A5
+7641 E9A6
+7642 E9A7
+7643 E9A8
+7644 E9A9
+7645 E9AA
+7646 E9AB
+7647 E9AC
+7648 E9AD
+7649 E9AE
+764A E9AF
+764B E9B0
+764C E9B1
+764D E9B2
+764E E9B3
+764F E9B4
+7650 E9B5
+7651 E9B6
+7652 E9B7
+7653 E9B8
+7654 E9B9
+7655 E9BA
+7656 E9BB
+7657 E9BC
+7658 E9BD
+7659 E9BE
+765A E9BF
+765B E9C0
+765C E9C1
+765D E9C2
+765E E9C3
+765F E9C4
+7660 E9C5
+7661 E9C6
+7662 E9C7
+7663 E9C8
+7664 E9C9
+7665 E9CA
+7666 E9CB
+7667 E9CC
+7668 E9CD
+7669 E9CE
+766A E9CF
+766B E9D0
+766C E9D1
+766D E9D2
+766E E9D3
+766F E9D4
+7670 E9D5
+7671 E9D6
+7672 E9D7
+7673 E9D8
+7674 E9D9
+7675 E9DA
+7676 E9DB
+7677 E9DC
+7678 E9DD
+7679 E9DE
+767A E9DF
+767B E9E0
+767C E9E1
+767D E9E2
+767E E9E3
+767F E9E4
+7680 E9E5
+7681 E9E6
+7682 E9E7
+7683 E9E8
+7684 E9E9
+7685 E9EA
+7686 E9EB
+7687 E9EC
+7688 E9ED
+7689 E9EE
+768A E9EF
+768B E9F0
+768C E9F1
+768D E9F2
+768E E9F3
+768F E9F4
+7690 E9F5
+7691 E9F6
+7692 E9F7
+7693 E9F8
+7694 E9F9
+7695 E9FA
+7696 E9FB
+7697 E9FC
+7698 E9FD
+7699 E9FE
+769A E9FF
+769B EA00
+769C EA01
+769D EA02
+769E EA03
+769F EA04
+76A0 EA05
+76A1 EA06
+76A2 EA07
+76A3 EA08
+76A4 EA09
+76A5 EA0A
+76A6 EA0B
+76A7 EA0C
+76A8 EA0D
+76A9 EA0E
+76AA EA0F
+76AB EA10
+76AC EA11
+76AD EA12
+76AE EA13
+76AF EA14
+76B0 EA15
+76B1 EA16
+76B2 EA17
+76B3 EA18
+76B4 EA19
+76B5 EA1A
+76B6 EA1B
+76B7 EA1C
+76B8 EA1D
+76B9 EA1E
+76BA EA1F
+76BB EA20
+76BC EA21
+76BD EA22
+76BE EA23
+76BF EA24
+76C0 EA25
+76C1 EA26
+76C2 EA27
+76C3 EA28
+76C4 EA29
+76C5 EA2A
+76C6 EA2B
+76C7 EA2C
+76C8 EA2D
+76C9 EA2E
+76CA EA2F
+76CB EA30
+76CC EA31
+76CD EA32
+76CE EA33
+76CF EA34
+76D0 EA35
+76D1 EA36
+76D2 EA37
+76D3 EA38
+76D4 EA39
+76D5 EA3A
+76D6 EA3B
+76D7 EA3C
+76D8 EA3D
+76D9 EA3E
+76DA EA3F
+76DB EA40
+76DC EA41
+76DD EA42
+76DE EA43
+76DF EA44
+76E0 EA45
+76E1 EA46
+76E2 EA47
+76E3 EA48
+76E4 EA49
+76E5 EA4A
+76E6 EA4B
+76E7 EA4C
+76E8 EA4D
+76E9 EA4E
+76EA EA4F
+76EB EA50
+76EC EA51
+76ED EA52
+76EE EA53
+76EF EA54
+76F0 EA55
+76F1 EA56
+76F2 EA57
+76F3 EA58
+76F4 EA59
+76F5 EA5A
+76F6 EA5B
+76F7 EA5C
+76F8 EA5D
+76F9 EA5E
+76FA EA5F
+76FB EA60
+76FC EA61
+76FD EA62
+76FE EA63
+7741 EA64
+7742 EA65
+7743 EA66
+7744 EA67
+7745 EA68
+7746 EA69
+7747 EA6A
+7748 EA6B
+7749 EA6C
+774A EA6D
+774B EA6E
+774C EA6F
+774D EA70
+774E EA71
+774F EA72
+7750 EA73
+7751 EA74
+7752 EA75
+7753 EA76
+7754 EA77
+7755 EA78
+7756 EA79
+7757 EA7A
+7758 EA7B
+7759 EA7C
+775A EA7D
+775B EA7E
+775C EA7F
+775D EA80
+775E EA81
+775F EA82
+7760 EA83
+7761 EA84
+7762 EA85
+7763 EA86
+7764 EA87
+7765 EA88
+7766 EA89
+7767 EA8A
+7768 EA8B
+7769 EA8C
+776A EA8D
+776B EA8E
+776C EA8F
+776D EA90
+776E EA91
+776F EA92
+7770 EA93
+7771 EA94
+7772 EA95
+7773 EA96
+7774 EA97
+7775 EA98
+7776 EA99
+7777 EA9A
+7778 EA9B
+7779 EA9C
+777A EA9D
+777B EA9E
+777C EA9F
+777D EAA0
+777E EAA1
+777F EAA2
+7780 EAA3
+7781 EAA4
+7782 EAA5
+7783 EAA6
+7784 EAA7
+7785 EAA8
+7786 EAA9
+7787 EAAA
+7788 EAAB
+7789 EAAC
+778A EAAD
+778B EAAE
+778C EAAF
+778D EAB0
+778E EAB1
+778F EAB2
+7790 EAB3
+7791 EAB4
+7792 EAB5
+7793 EAB6
+7794 EAB7
+7795 EAB8
+7796 EAB9
+7797 EABA
+7798 EABB
+7799 EABC
+779A EABD
+779B EABE
+779C EABF
+779D EAC0
+779E EAC1
+779F EAC2
+77A0 EAC3
+77A1 EAC4
+77A2 EAC5
+77A3 EAC6
+77A4 EAC7
+77A5 EAC8
+77A6 EAC9
+77A7 EACA
+77A8 EACB
+77A9 EACC
+77AA EACD
+77AB EACE
+77AC EACF
+77AD EAD0
+77AE EAD1
+77AF EAD2
+77B0 EAD3
+77B1 EAD4
+77B2 EAD5
+77B3 EAD6
+77B4 EAD7
+77B5 EAD8
+77B6 EAD9
+77B7 EADA
+77B8 EADB
+77B9 EADC
+77BA EADD
+77BB EADE
+77BC EADF
+77BD EAE0
+77BE EAE1
+77BF EAE2
+77C0 EAE3
+77C1 EAE4
+77C2 EAE5
+77C3 EAE6
+77C4 EAE7
+77C5 EAE8
+77C6 EAE9
+77C7 EAEA
+77C8 EAEB
+77C9 EAEC
+77CA EAED
+77CB EAEE
+77CC EAEF
+77CD EAF0
+77CE EAF1
+77CF EAF2
+77D0 EAF3
+77D1 EAF4
+77D2 EAF5
+77D3 EAF6
+77D4 EAF7
+77D5 EAF8
+77D6 EAF9
+77D7 EAFA
+77D8 EAFB
+77D9 EAFC
+77DA EAFD
+77DB EAFE
+77DC EAFF
+77DD EB00
+77DE EB01
+77DF EB02
+77E0 EB03
+77E1 EB04
+77E2 EB05
+77E3 EB06
+77E4 EB07
+77E5 EB08
+77E6 EB09
+77E7 EB0A
+77E8 EB0B
+77E9 EB0C
+77EA EB0D
+77EB EB0E
+77EC EB0F
+77ED EB10
+77EE EB11
+77EF EB12
+77F0 EB13
+77F1 EB14
+77F2 EB15
+77F3 EB16
+77F4 EB17
+77F5 EB18
+77F6 EB19
+77F7 EB1A
+77F8 EB1B
+77F9 EB1C
+77FA EB1D
+77FB EB1E
+77FC EB1F
+77FD EB20
+77FE EB21
+7841 EB22
+7842 EB23
+7843 EB24
+7844 EB25
+7845 EB26
+7846 EB27
+7847 EB28
+7848 EB29
+7849 EB2A
+784A EB2B
+784B EB2C
+784C EB2D
+784D EB2E
+784E EB2F
+784F EB30
+7850 EB31
+7851 EB32
+7852 EB33
+7853 EB34
+7854 EB35
+7855 EB36
+7856 EB37
+7857 EB38
+7858 EB39
+7859 EB3A
+785A EB3B
+785B EB3C
+785C EB3D
+785D EB3E
+785E EB3F
+785F EB40
+7860 EB41
+7861 EB42
+7862 EB43
+7863 EB44
+7864 EB45
+7865 EB46
+7866 EB47
+7867 EB48
+7868 EB49
+7869 EB4A
+786A EB4B
+786B EB4C
+786C EB4D
+786D EB4E
+786E EB4F
+786F EB50
+7870 EB51
+7871 EB52
+7872 EB53
+7873 EB54
+7874 EB55
+7875 EB56
+7876 EB57
+7877 EB58
+7878 EB59
+7879 EB5A
+787A EB5B
+787B EB5C
+787C EB5D
+787D EB5E
+787E EB5F
+787F EB60
+7880 EB61
+7881 EB62
+7882 EB63
+7883 EB64
+7884 EB65
+7885 EB66
+7886 EB67
+7887 EB68
+7888 EB69
+7889 EB6A
+788A EB6B
+788B EB6C
+788C EB6D
+788D EB6E
+788E EB6F
+788F EB70
+7890 EB71
+7891 EB72
+7892 EB73
+7893 EB74
+7894 EB75
+7895 EB76
+7896 EB77
+7897 EB78
+7898 EB79
+7899 EB7A
+789A EB7B
+789B EB7C
+789C EB7D
+789D EB7E
+789E EB7F
+789F EB80
+78A0 EB81
+78A1 EB82
+78A2 EB83
+78A3 EB84
+78A4 EB85
+78A5 EB86
+78A6 EB87
+78A7 EB88
+78A8 EB89
+78A9 EB8A
+78AA EB8B
+78AB EB8C
+78AC EB8D
+78AD EB8E
+78AE EB8F
+78AF EB90
+78B0 EB91
+78B1 EB92
+78B2 EB93
+78B3 EB94
+78B4 EB95
+78B5 EB96
+78B6 EB97
+78B7 EB98
+78B8 EB99
+78B9 EB9A
+78BA EB9B
+78BB EB9C
+78BC EB9D
+78BD EB9E
+78BE EB9F
+78BF EBA0
+78C0 EBA1
+78C1 EBA2
+78C2 EBA3
+78C3 EBA4
+78C4 EBA5
+78C5 EBA6
+78C6 EBA7
+78C7 EBA8
+78C8 EBA9
+78C9 EBAA
+78CA EBAB
+78CB EBAC
+78CC EBAD
+78CD EBAE
+78CE EBAF
+78CF EBB0
+78D0 EBB1
+78D1 EBB2
+78D2 EBB3
+78D3 EBB4
+78D4 EBB5
+78D5 EBB6
+78D6 EBB7
+78D7 EBB8
+78D8 EBB9
+78D9 EBBA
+78DA EBBB
+78DB EBBC
+78DC EBBD
+78DD EBBE
+78DE EBBF
+78DF EBC0
+78E0 EBC1
+78E1 EBC2
+78E2 EBC3
+78E3 EBC4
+78E4 EBC5
+78E5 EBC6
+78E6 EBC7
+78E7 EBC8
+78E8 EBC9
+78E9 EBCA
+78EA EBCB
+78EB EBCC
+78EC EBCD
+78ED EBCE
+78EE EBCF
+78EF EBD0
+78F0 EBD1
+78F1 EBD2
+78F2 EBD3
+78F3 EBD4
+78F4 EBD5
+78F5 EBD6
+78F6 EBD7
+78F7 EBD8
+78F8 EBD9
+78F9 EBDA
+78FA EBDB
+78FB EBDC
+78FC EBDD
+78FD EBDE
+78FE EBDF
+7941 EBE0
+7942 EBE1
+7943 EBE2
+7944 EBE3
+7945 EBE4
+7946 EBE5
+7947 EBE6
+7948 EBE7
+7949 EBE8
+794A EBE9
+794B EBEA
+794C EBEB
+794D EBEC
+794E EBED
+794F EBEE
+7950 EBEF
+7951 EBF0
+7952 EBF1
+7953 EBF2
+7954 EBF3
+7955 EBF4
+7956 EBF5
+7957 EBF6
+7958 EBF7
+7959 EBF8
+795A EBF9
+795B EBFA
+795C EBFB
+795D EBFC
+795E EBFD
+795F EBFE
+7960 EBFF
+7961 EC00
+7962 EC01
+7963 EC02
+7964 EC03
+7965 EC04
+7966 EC05
+7967 EC06
+7968 EC07
+7969 EC08
+796A EC09
+796B EC0A
+796C EC0B
+796D EC0C
+796E EC0D
+796F EC0E
+7970 EC0F
+7971 EC10
+7972 EC11
+7973 EC12
+7974 EC13
+7975 EC14
+7976 EC15
+7977 EC16
+7978 EC17
+7979 EC18
+797A EC19
+797B EC1A
+797C EC1B
+797D EC1C
+797E EC1D
+797F EC1E
+7980 EC1F
+7981 EC20
+7982 EC21
+7983 EC22
+7984 EC23
+7985 EC24
+7986 EC25
+7987 EC26
+7988 EC27
+7989 EC28
+798A EC29
+798B EC2A
+798C EC2B
+798D EC2C
+798E EC2D
+798F EC2E
+7990 EC2F
+7991 EC30
+7992 EC31
+7993 EC32
+7994 EC33
+7995 EC34
+7996 EC35
+7997 EC36
+7998 EC37
+7999 EC38
+799A EC39
+799B EC3A
+799C EC3B
+799D EC3C
+799E EC3D
+799F EC3E
+79A0 EC3F
+79A1 EC40
+79A2 EC41
+79A3 EC42
+79A4 EC43
+79A5 EC44
+79A6 EC45
+79A7 EC46
+79A8 EC47
+79A9 EC48
+79AA EC49
+79AB EC4A
+79AC EC4B
+79AD EC4C
+79AE EC4D
+79AF EC4E
+79B0 EC4F
+79B1 EC50
+79B2 EC51
+79B3 EC52
+79B4 EC53
+79B5 EC54
+79B6 EC55
+79B7 EC56
+79B8 EC57
+79B9 EC58
+79BA EC59
+79BB EC5A
+79BC EC5B
+79BD EC5C
+79BE EC5D
+79BF EC5E
+79C0 EC5F
+79C1 EC60
+79C2 EC61
+79C3 EC62
+79C4 EC63
+79C5 EC64
+79C6 EC65
+79C7 EC66
+79C8 EC67
+79C9 EC68
+79CA EC69
+79CB EC6A
+79CC EC6B
+79CD EC6C
+79CE EC6D
+79CF EC6E
+79D0 EC6F
+79D1 EC70
+79D2 EC71
+79D3 EC72
+79D4 EC73
+79D5 EC74
+79D6 EC75
+79D7 EC76
+79D8 EC77
+79D9 EC78
+79DA EC79
+79DB EC7A
+79DC EC7B
+79DD EC7C
+79DE EC7D
+79DF EC7E
+79E0 EC7F
+79E1 EC80
+79E2 EC81
+79E3 EC82
+79E4 EC83
+79E5 EC84
+79E6 EC85
+79E7 EC86
+79E8 EC87
+79E9 EC88
+79EA EC89
+79EB EC8A
+79EC EC8B
+79ED EC8C
+79EE EC8D
+79EF EC8E
+79F0 EC8F
+79F1 EC90
+79F2 EC91
+79F3 EC92
+79F4 EC93
+79F5 EC94
+79F6 EC95
+79F7 EC96
+79F8 EC97
+79F9 EC98
+79FA EC99
+79FB EC9A
+79FC EC9B
+79FD EC9C
+79FE EC9D
+7A41 EC9E
+7A42 EC9F
+7A43 ECA0
+7A44 ECA1
+7A45 ECA2
+7A46 ECA3
+7A47 ECA4
+7A48 ECA5
+7A49 ECA6
+7A4A ECA7
+7A4B ECA8
+7A4C ECA9
+7A4D ECAA
+7A4E ECAB
+7A4F ECAC
+7A50 ECAD
+7A51 ECAE
+7A52 ECAF
+7A53 ECB0
+7A54 ECB1
+7A55 ECB2
+7A56 ECB3
+7A57 ECB4
+7A58 ECB5
+7A59 ECB6
+7A5A ECB7
+7A5B ECB8
+7A5C ECB9
+7A5D ECBA
+7A5E ECBB
+7A5F ECBC
+7A60 ECBD
+7A61 ECBE
+7A62 ECBF
+7A63 ECC0
+7A64 ECC1
+7A65 ECC2
+7A66 ECC3
+7A67 ECC4
+7A68 ECC5
+7A69 ECC6
+7A6A ECC7
+7A6B ECC8
+7A6C ECC9
+7A6D ECCA
+7A6E ECCB
+7A6F ECCC
+7A70 ECCD
+7A71 ECCE
+7A72 ECCF
+7A73 ECD0
+7A74 ECD1
+7A75 ECD2
+7A76 ECD3
+7A77 ECD4
+7A78 ECD5
+7A79 ECD6
+7A7A ECD7
+7A7B ECD8
+7A7C ECD9
+7A7D ECDA
+7A7E ECDB
+7A7F ECDC
+7A80 ECDD
+7A81 ECDE
+7A82 ECDF
+7A83 ECE0
+7A84 ECE1
+7A85 ECE2
+7A86 ECE3
+7A87 ECE4
+7A88 ECE5
+7A89 ECE6
+7A8A ECE7
+7A8B ECE8
+7A8C ECE9
+7A8D ECEA
+7A8E ECEB
+7A8F ECEC
+7A90 ECED
+7A91 ECEE
+7A92 ECEF
+7A93 ECF0
+7A94 ECF1
+7A95 ECF2
+7A96 ECF3
+7A97 ECF4
+7A98 ECF5
+7A99 ECF6
+7A9A ECF7
+7A9B ECF8
+7A9C ECF9
+7A9D ECFA
+7A9E ECFB
+7A9F ECFC
+7AA0 ECFD
+7AA1 ECFE
+7AA2 ECFF
+7AA3 ED00
+7AA4 ED01
+7AA5 ED02
+7AA6 ED03
+7AA7 ED04
+7AA8 ED05
+7AA9 ED06
+7AAA ED07
+7AAB ED08
+7AAC ED09
+7AAD ED0A
+7AAE ED0B
+7AAF ED0C
+7AB0 ED0D
+7AB1 ED0E
+7AB2 ED0F
+7AB3 ED10
+7AB4 ED11
+7AB5 ED12
+7AB6 ED13
+7AB7 ED14
+7AB8 ED15
+7AB9 ED16
+7ABA ED17
+7ABB ED18
+7ABC ED19
+7ABD ED1A
+7ABE ED1B
+7ABF ED1C
+7AC0 ED1D
+7AC1 ED1E
+7AC2 ED1F
+7AC3 ED20
+7AC4 ED21
+7AC5 ED22
+7AC6 ED23
+7AC7 ED24
+7AC8 ED25
+7AC9 ED26
+7ACA ED27
+7ACB ED28
+7ACC ED29
+7ACD ED2A
+7ACE ED2B
+7ACF ED2C
+7AD0 ED2D
+7AD1 ED2E
+7AD2 ED2F
+7AD3 ED30
+7AD4 ED31
+7AD5 ED32
+7AD6 ED33
+7AD7 ED34
+7AD8 ED35
+7AD9 ED36
+7ADA ED37
+7ADB ED38
+7ADC ED39
+7ADD ED3A
+7ADE ED3B
+7ADF ED3C
+7AE0 ED3D
+7AE1 ED3E
+7AE2 ED3F
+7AE3 ED40
+7AE4 ED41
+7AE5 ED42
+7AE6 ED43
+7AE7 ED44
+7AE8 ED45
+7AE9 ED46
+7AEA ED47
+7AEB ED48
+7AEC ED49
+7AED ED4A
+7AEE ED4B
+7AEF ED4C
+7AF0 ED4D
+7AF1 ED4E
+7AF2 ED4F
+7AF3 ED50
+7AF4 ED51
+7AF5 ED52
+7AF6 ED53
+7AF7 ED54
+7AF8 ED55
+7AF9 ED56
+7AFA ED57
+7AFB ED58
+7AFC ED59
+7AFD ED5A
+7AFE ED5B
+7B41 ED5C
+7B42 ED5D
+7B43 ED5E
+7B44 ED5F
+7B45 ED60
+7B46 ED61
+7B47 ED62
+7B48 ED63
+7B49 ED64
+7B4A ED65
+7B4B ED66
+7B4C ED67
+7B4D ED68
+7B4E ED69
+7B4F ED6A
+7B50 ED6B
+7B51 ED6C
+7B52 ED6D
+7B53 ED6E
+7B54 ED6F
+7B55 ED70
+7B56 ED71
+7B57 ED72
+7B58 ED73
+7B59 ED74
+7B5A ED75
+7B5B ED76
+7B5C ED77
+7B5D ED78
+7B5E ED79
+7B5F ED7A
+7B60 ED7B
+7B61 ED7C
+7B62 ED7D
+7B63 ED7E
+7B64 ED7F
+7B65 ED80
+7B66 ED81
+7B67 ED82
+7B68 ED83
+7B69 ED84
+7B6A ED85
+7B6B ED86
+7B6C ED87
+7B6D ED88
+7B6E ED89
+7B6F ED8A
+7B70 ED8B
+7B71 ED8C
+7B72 ED8D
+7B73 ED8E
+7B74 ED8F
+7B75 ED90
+7B76 ED91
+7B77 ED92
+7B78 ED93
+7B79 ED94
+7B7A ED95
+7B7B ED96
+7B7C ED97
+7B7D ED98
+7B7E ED99
+7B7F ED9A
+7B80 ED9B
+7B81 ED9C
+7B82 ED9D
+7B83 ED9E
+7B84 ED9F
+7B85 EDA0
+7B86 EDA1
+7B87 EDA2
+7B88 EDA3
+7B89 EDA4
+7B8A EDA5
+7B8B EDA6
+7B8C EDA7
+7B8D EDA8
+7B8E EDA9
+7B8F EDAA
+7B90 EDAB
+7B91 EDAC
+7B92 EDAD
+7B93 EDAE
+7B94 EDAF
+7B95 EDB0
+7B96 EDB1
+7B97 EDB2
+7B98 EDB3
+7B99 EDB4
+7B9A EDB5
+7B9B EDB6
+7B9C EDB7
+7B9D EDB8
+7B9E EDB9
+7B9F EDBA
+7BA0 EDBB
+7BA1 EDBC
+7BA2 EDBD
+7BA3 EDBE
+7BA4 EDBF
+7BA5 EDC0
+7BA6 EDC1
+7BA7 EDC2
+7BA8 EDC3
+7BA9 EDC4
+7BAA EDC5
+7BAB EDC6
+7BAC EDC7
+7BAD EDC8
+7BAE EDC9
+7BAF EDCA
+7BB0 EDCB
+7BB1 EDCC
+7BB2 EDCD
+7BB3 EDCE
+7BB4 EDCF
+7BB5 EDD0
+7BB6 EDD1
+7BB7 EDD2
+7BB8 EDD3
+7BB9 EDD4
+7BBA EDD5
+7BBB EDD6
+7BBC EDD7
+7BBD EDD8
+7BBE EDD9
+7BBF EDDA
+7BC0 EDDB
+7BC1 EDDC
+7BC2 EDDD
+7BC3 EDDE
+7BC4 EDDF
+7BC5 EDE0
+7BC6 EDE1
+7BC7 EDE2
+7BC8 EDE3
+7BC9 EDE4
+7BCA EDE5
+7BCB EDE6
+7BCC EDE7
+7BCD EDE8
+7BCE EDE9
+7BCF EDEA
+7BD0 EDEB
+7BD1 EDEC
+7BD2 EDED
+7BD3 EDEE
+7BD4 EDEF
+7BD5 EDF0
+7BD6 EDF1
+7BD7 EDF2
+7BD8 EDF3
+7BD9 EDF4
+7BDA EDF5
+7BDB EDF6
+7BDC EDF7
+7BDD EDF8
+7BDE EDF9
+7BDF EDFA
+7BE0 EDFB
+7BE1 EDFC
+7BE2 EDFD
+7BE3 EDFE
+7BE4 EDFF
+7BE5 EE00
+7BE6 EE01
+7BE7 EE02
+7BE8 EE03
+7BE9 EE04
+7BEA EE05
+7BEB EE06
+7BEC EE07
+7BED EE08
+7BEE EE09
+7BEF EE0A
+7BF0 EE0B
+7BF1 EE0C
+7BF2 EE0D
+7BF3 EE0E
+7BF4 EE0F
+7BF5 EE10
+7BF6 EE11
+7BF7 EE12
+7BF8 EE13
+7BF9 EE14
+7BFA EE15
+7BFB EE16
+7BFC EE17
+7BFD EE18
+7BFE EE19
+7C41 EE1A
+7C42 EE1B
+7C43 EE1C
+7C44 EE1D
+7C45 EE1E
+7C46 EE1F
+7C47 EE20
+7C48 EE21
+7C49 EE22
+7C4A EE23
+7C4B EE24
+7C4C EE25
+7C4D EE26
+7C4E EE27
+7C4F EE28
+7C50 EE29
+7C51 EE2A
+7C52 EE2B
+7C53 EE2C
+7C54 EE2D
+7C55 EE2E
+7C56 EE2F
+7C57 EE30
+7C58 EE31
+7C59 EE32
+7C5A EE33
+7C5B EE34
+7C5C EE35
+7C5D EE36
+7C5E EE37
+7C5F EE38
+7C60 EE39
+7C61 EE3A
+7C62 EE3B
+7C63 EE3C
+7C64 EE3D
+7C65 EE3E
+7C66 EE3F
+7C67 EE40
+7C68 EE41
+7C69 EE42
+7C6A EE43
+7C6B EE44
+7C6C EE45
+7C6D EE46
+7C6E EE47
+7C6F EE48
+7C70 EE49
+7C71 EE4A
+7C72 EE4B
+7C73 EE4C
+7C74 EE4D
+7C75 EE4E
+7C76 EE4F
+7C77 EE50
+7C78 EE51
+7C79 EE52
+7C7A EE53
+7C7B EE54
+7C7C EE55
+7C7D EE56
+7C7E EE57
+7C7F EE58
+7C80 EE59
+7C81 EE5A
+7C82 EE5B
+7C83 EE5C
+7C84 EE5D
+7C85 EE5E
+7C86 EE5F
+7C87 EE60
+7C88 EE61
+7C89 EE62
+7C8A EE63
+7C8B EE64
+7C8C EE65
+7C8D EE66
+7C8E EE67
+7C8F EE68
+7C90 EE69
+7C91 EE6A
+7C92 EE6B
+7C93 EE6C
+7C94 EE6D
+7C95 EE6E
+7C96 EE6F
+7C97 EE70
+7C98 EE71
+7C99 EE72
+7C9A EE73
+7C9B EE74
+7C9C EE75
+7C9D EE76
+7C9E EE77
+7C9F EE78
+7CA0 EE79
+7CA1 EE7A
+7CA2 EE7B
+7CA3 EE7C
+7CA4 EE7D
+7CA5 EE7E
+7CA6 EE7F
+7CA7 EE80
+7CA8 EE81
+7CA9 EE82
+7CAA EE83
+7CAB EE84
+7CAC EE85
+7CAD EE86
+7CAE EE87
+7CAF EE88
+7CB0 EE89
+7CB1 EE8A
+7CB2 EE8B
+7CB3 EE8C
+7CB4 EE8D
+7CB5 EE8E
+7CB6 EE8F
+7CB7 EE90
+7CB8 EE91
+7CB9 EE92
+7CBA EE93
+7CBB EE94
+7CBC EE95
+7CBD EE96
+7CBE EE97
+7CBF EE98
+7CC0 EE99
+7CC1 EE9A
+7CC2 EE9B
+7CC3 EE9C
+7CC4 EE9D
+7CC5 EE9E
+7CC6 EE9F
+7CC7 EEA0
+7CC8 EEA1
+7CC9 EEA2
+7CCA EEA3
+7CCB EEA4
+7CCC EEA5
+7CCD EEA6
+7CCE EEA7
+7CCF EEA8
+7CD0 EEA9
+7CD1 EEAA
+7CD2 EEAB
+7CD3 EEAC
+7CD4 EEAD
+7CD5 EEAE
+7CD6 EEAF
+7CD7 EEB0
+7CD8 EEB1
+7CD9 EEB2
+7CDA EEB3
+7CDB EEB4
+7CDC EEB5
+7CDD EEB6
+7CDE EEB7
+7CDF EEB8
+7CE0 EEB9
+7CE1 EEBA
+7CE2 EEBB
+7CE3 EEBC
+7CE4 EEBD
+7CE5 EEBE
+7CE6 EEBF
+7CE7 EEC0
+7CE8 EEC1
+7CE9 EEC2
+7CEA EEC3
+7CEB EEC4
+7CEC EEC5
+7CED EEC6
+7CEE EEC7
+7CEF EEC8
+7CF0 EEC9
+7CF1 EECA
+7CF2 EECB
+7CF3 EECC
+7CF4 EECD
+7CF5 EECE
+7CF6 EECF
+7CF7 EED0
+7CF8 EED1
+7CF9 EED2
+7CFA EED3
+7CFB EED4
+7CFC EED5
+7CFD EED6
+7CFE EED7
+7D41 EED8
+7D42 EED9
+7D43 EEDA
+7D44 EEDB
+7D45 EEDC
+7D46 EEDD
+7D47 EEDE
+7D48 EEDF
+7D49 EEE0
+7D4A EEE1
+7D4B EEE2
+7D4C EEE3
+7D4D EEE4
+7D4E EEE5
+7D4F EEE6
+7D50 EEE7
+7D51 EEE8
+7D52 EEE9
+7D53 EEEA
+7D54 EEEB
+7D55 EEEC
+7D56 EEED
+7D57 EEEE
+7D58 EEEF
+7D59 EEF0
+7D5A EEF1
+7D5B EEF2
+7D5C EEF3
+7D5D EEF4
+7D5E EEF5
+7D5F EEF6
+7D60 EEF7
+7D61 EEF8
+7D62 EEF9
+7D63 EEFA
+7D64 EEFB
+7D65 EEFC
+7D66 EEFD
+7D67 EEFE
+7D68 EEFF
+7D69 EF00
+7D6A EF01
+7D6B EF02
+7D6C EF03
+7D6D EF04
+7D6E EF05
+7D6F EF06
+7D70 EF07
+7D71 EF08
+7D72 EF09
+7D73 EF0A
+7D74 EF0B
+7D75 EF0C
+7D76 EF0D
+7D77 EF0E
+7D78 EF0F
+7D79 EF10
+7D7A EF11
+7D7B EF12
+7D7C EF13
+7D7D EF14
+7D7E EF15
+7D7F EF16
+7D80 EF17
+7D81 EF18
+7D82 EF19
+7D83 EF1A
+7D84 EF1B
+7D85 EF1C
+7D86 EF1D
+7D87 EF1E
+7D88 EF1F
+7D89 EF20
+7D8A EF21
+7D8B EF22
+7D8C EF23
+7D8D EF24
+7D8E EF25
+7D8F EF26
+7D90 EF27
+7D91 EF28
+7D92 EF29
+7D93 EF2A
+7D94 EF2B
+7D95 EF2C
+7D96 EF2D
+7D97 EF2E
+7D98 EF2F
+7D99 EF30
+7D9A EF31
+7D9B EF32
+7D9C EF33
+7D9D EF34
+7D9E EF35
+7D9F EF36
+7DA0 EF37
+7DA1 EF38
+7DA2 EF39
+7DA3 EF3A
+7DA4 EF3B
+7DA5 EF3C
+7DA6 EF3D
+7DA7 EF3E
+7DA8 EF3F
+7DA9 EF40
+7DAA EF41
+7DAB EF42
+7DAC EF43
+7DAD EF44
+7DAE EF45
+7DAF EF46
+7DB0 EF47
+7DB1 EF48
+7DB2 EF49
+7DB3 EF4A
+7DB4 EF4B
+7DB5 EF4C
+7DB6 EF4D
+7DB7 EF4E
+7DB8 EF4F
+7DB9 EF50
+7DBA EF51
+7DBB EF52
+7DBC EF53
+7DBD EF54
+7DBE EF55
+7DBF EF56
+7DC0 EF57
+7DC1 EF58
+7DC2 EF59
+7DC3 EF5A
+7DC4 EF5B
+7DC5 EF5C
+7DC6 EF5D
+7DC7 EF5E
+7DC8 EF5F
+7DC9 EF60
+7DCA EF61
+7DCB EF62
+7DCC EF63
+7DCD EF64
+7DCE EF65
+7DCF EF66
+7DD0 EF67
+7DD1 EF68
+7DD2 EF69
+7DD3 EF6A
+7DD4 EF6B
+7DD5 EF6C
+7DD6 EF6D
+7DD7 EF6E
+7DD8 EF6F
+7DD9 EF70
+7DDA EF71
+7DDB EF72
+7DDC EF73
+7DDD EF74
+7DDE EF75
+7DDF EF76
+7DE0 EF77
+7DE1 EF78
+7DE2 EF79
+7DE3 EF7A
+7DE4 EF7B
+7DE5 EF7C
+7DE6 EF7D
+7DE7 EF7E
+7DE8 EF7F
+7DE9 EF80
+7DEA EF81
+7DEB EF82
+7DEC EF83
+7DED EF84
+7DEE EF85
+7DEF EF86
+7DF0 EF87
+7DF1 EF88
+7DF2 EF89
+7DF3 EF8A
+7DF4 EF8B
+7DF5 EF8C
+7DF6 EF8D
+7DF7 EF8E
+7DF8 EF8F
+7DF9 EF90
+7DFA EF91
+7DFB EF92
+7DFC EF93
+7DFD EF94
+7DFE EF95
+7E41 EF96
+7E42 EF97
+7E43 EF98
+7E44 EF99
+7E45 EF9A
+7E46 EF9B
+7E47 EF9C
+7E48 EF9D
+7E49 EF9E
+7E4A EF9F
+7E4B EFA0
+7E4C EFA1
+7E4D EFA2
+7E4E EFA3
+7E4F EFA4
+7E50 EFA5
+7E51 EFA6
+7E52 EFA7
+7E53 EFA8
+7E54 EFA9
+7E55 EFAA
+7E56 EFAB
+7E57 EFAC
+7E58 EFAD
+7E59 EFAE
+7E5A EFAF
+7E5B EFB0
+7E5C EFB1
+7E5D EFB2
+7E5E EFB3
+7E5F EFB4
+7E60 EFB5
+7E61 EFB6
+7E62 EFB7
+7E63 EFB8
+7E64 EFB9
+7E65 EFBA
+7E66 EFBB
+7E67 EFBC
+7E68 EFBD
+7E69 EFBE
+7E6A EFBF
+7E6B EFC0
+7E6C EFC1
+7E6D EFC2
+7E6E EFC3
+7E6F EFC4
+7E70 EFC5
+7E71 EFC6
+7E72 EFC7
+7E73 EFC8
+7E74 EFC9
+7E75 EFCA
+7E76 EFCB
+7E77 EFCC
+7E78 EFCD
+7E79 EFCE
+7E7A EFCF
+7E7B EFD0
+7E7C EFD1
+7E7D EFD2
+7E7E EFD3
+7E7F EFD4
+7E80 EFD5
+7E81 EFD6
+7E82 EFD7
+7E83 EFD8
+7E84 EFD9
+7E85 EFDA
+7E86 EFDB
+7E87 EFDC
+7E88 EFDD
+7E89 EFDE
+7E8A EFDF
+7E8B EFE0
+7E8C EFE1
+7E8D EFE2
+7E8E EFE3
+7E8F EFE4
+7E90 EFE5
+7E91 EFE6
+7E92 EFE7
+7E93 EFE8
+7E94 EFE9
+7E95 EFEA
+7E96 EFEB
+7E97 EFEC
+7E98 EFED
+7E99 EFEE
+7E9A EFEF
+7E9B EFF0
+7E9C EFF1
+7E9D EFF2
+7E9E EFF3
+7E9F EFF4
+7EA0 EFF5
+7EA1 EFF6
+7EA2 EFF7
+7EA3 EFF8
+7EA4 EFF9
+7EA5 EFFA
+7EA6 EFFB
+7EA7 EFFC
+7EA8 EFFD
+7EA9 EFFE
+7EAA EFFF
+7EAB F000
+7EAC F001
+7EAD F002
+7EAE F003
+7EAF F004
+7EB0 F005
+7EB1 F006
+7EB2 F007
+7EB3 F008
+7EB4 F009
+7EB5 F00A
+7EB6 F00B
+7EB7 F00C
+7EB8 F00D
+7EB9 F00E
+7EBA F00F
+7EBB F010
+7EBC F011
+7EBD F012
+7EBE F013
+7EBF F014
+7EC0 F015
+7EC1 F016
+7EC2 F017
+7EC3 F018
+7EC4 F019
+7EC5 F01A
+7EC6 F01B
+7EC7 F01C
+7EC8 F01D
+7EC9 F01E
+7ECA F01F
+7ECB F020
+7ECC F021
+7ECD F022
+7ECE F023
+7ECF F024
+7ED0 F025
+7ED1 F026
+7ED2 F027
+7ED3 F028
+7ED4 F029
+7ED5 F02A
+7ED6 F02B
+7ED7 F02C
+7ED8 F02D
+7ED9 F02E
+7EDA F02F
+7EDB F030
+7EDC F031
+7EDD F032
+7EDE F033
+7EDF F034
+7EE0 F035
+7EE1 F036
+7EE2 F037
+7EE3 F038
+7EE4 F039
+7EE5 F03A
+7EE6 F03B
+7EE7 F03C
+7EE8 F03D
+7EE9 F03E
+7EEA F03F
+7EEB F040
+7EEC F041
+7EED F042
+7EEE F043
+7EEF F044
+7EF0 F045
+7EF1 F046
+7EF2 F047
+7EF3 F048
+7EF4 F049
+7EF5 F04A
+7EF6 F04B
+7EF7 F04C
+7EF8 F04D
+7EF9 F04E
+7EFA F04F
+7EFB F050
+7EFC F051
+7EFD F052
+7EFE F053
+7F41 F054
+7F42 F055
+7F43 F056
+7F44 F057
+7F45 F058
+7F46 F059
+7F47 F05A
+7F48 F05B
+7F49 F05C
+7F4A F05D
+7F4B F05E
+7F4C F05F
+7F4D F060
+7F4E F061
+7F4F F062
+7F50 F063
+7F51 F064
+7F52 F065
+7F53 F066
+7F54 F067
+7F55 F068
+7F56 F069
+7F57 F06A
+7F58 F06B
+7F59 F06C
+7F5A F06D
+7F5B F06E
+7F5C F06F
+7F5D F070
+7F5E F071
+7F5F F072
+7F60 F073
+7F61 F074
+7F62 F075
+7F63 F076
+7F64 F077
+7F65 F078
+7F66 F079
+7F67 F07A
+7F68 F07B
+7F69 F07C
+7F6A F07D
+7F6B F07E
+7F6C F07F
+7F6D F080
+7F6E F081
+7F6F F082
+7F70 F083
+7F71 F084
+7F72 F085
+7F73 F086
+7F74 F087
+7F75 F088
+7F76 F089
+7F77 F08A
+7F78 F08B
+7F79 F08C
+7F7A F08D
+7F7B F08E
+7F7C F08F
+7F7D F090
+7F7E F091
+7F7F F092
+7F80 F093
+7F81 F094
+7F82 F095
+7F83 F096
+7F84 F097
+7F85 F098
+7F86 F099
+7F87 F09A
+7F88 F09B
+7F89 F09C
+7F8A F09D
+7F8B F09E
+7F8C F09F
+7F8D F0A0
+7F8E F0A1
+7F8F F0A2
+7F90 F0A3
+7F91 F0A4
+7F92 F0A5
+7F93 F0A6
+7F94 F0A7
+7F95 F0A8
+7F96 F0A9
+7F97 F0AA
+7F98 F0AB
+7F99 F0AC
+7F9A F0AD
+7F9B F0AE
+7F9C F0AF
+7F9D F0B0
+7F9E F0B1
+7F9F F0B2
+7FA0 F0B3
+7FA1 F0B4
+7FA2 F0B5
+7FA3 F0B6
+7FA4 F0B7
+7FA5 F0B8
+7FA6 F0B9
+7FA7 F0BA
+7FA8 F0BB
+7FA9 F0BC
+7FAA F0BD
+7FAB F0BE
+7FAC F0BF
+7FAD F0C0
+7FAE F0C1
+7FAF F0C2
+7FB0 F0C3
+7FB1 F0C4
+7FB2 F0C5
+7FB3 F0C6
+7FB4 F0C7
+7FB5 F0C8
+7FB6 F0C9
+7FB7 F0CA
+7FB8 F0CB
+7FB9 F0CC
+7FBA F0CD
+7FBB F0CE
+7FBC F0CF
+7FBD F0D0
+7FBE F0D1
+7FBF F0D2
+7FC0 F0D3
+7FC1 F0D4
+7FC2 F0D5
+7FC3 F0D6
+7FC4 F0D7
+7FC5 F0D8
+7FC6 F0D9
+7FC7 F0DA
+7FC8 F0DB
+7FC9 F0DC
+7FCA F0DD
+7FCB F0DE
+7FCC F0DF
+7FCD F0E0
+7FCE F0E1
+7FCF F0E2
+7FD0 F0E3
+7FD1 F0E4
+7FD2 F0E5
+7FD3 F0E6
+7FD4 F0E7
+7FD5 F0E8
+7FD6 F0E9
+7FD7 F0EA
+7FD8 F0EB
+7FD9 F0EC
+7FDA F0ED
+7FDB F0EE
+7FDC F0EF
+7FDD F0F0
+7FDE F0F1
+7FDF F0F2
+7FE0 F0F3
+7FE1 F0F4
+7FE2 F0F5
+7FE3 F0F6
+7FE4 F0F7
+7FE5 F0F8
+7FE6 F0F9
+7FE7 F0FA
+7FE8 F0FB
+7FE9 F0FC
+7FEA F0FD
+7FEB F0FE
+7FEC F0FF
+7FED F100
+7FEE F101
+7FEF F102
+7FF0 F103
+7FF1 F104
+7FF2 F105
+7FF3 F106
+7FF4 F107
+7FF5 F108
+7FF6 F109
+7FF7 F10A
+7FF8 F10B
+7FF9 F10C
+7FFA F10D
+7FFB F10E
+7FFC F10F
+7FFD F110
+7FFE F111
--- a/jdk/make/tools/CharsetMapping/dbcs Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/tools/CharsetMapping/dbcs Mon Aug 12 09:29:06 2013 -0400
@@ -15,6 +15,7 @@
IBM1364 x-IBM1364 Cp1364 ebcdic sun.nio.cs.ext false 0x40 0xde 0x40 0xfe
IBM1381 x-IBM1381 Cp1381 basic sun.nio.cs.ext true 0x8c 0xf7 0xa1 0xfe
IBM1383 x-IBM1383 Cp1383 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
+IBM300 x-IBM300 Cp300 dbcsonly sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM930 x-IBM930 Cp930 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
IBM933 x-IBM933 Cp933 ebcdic sun.nio.cs.ext false 0x40 0xdd 0x40 0xfe
IBM935 x-IBM935 Cp935 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
--- a/jdk/make/tools/CharsetMapping/extsbcs Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/tools/CharsetMapping/extsbcs Mon Aug 12 09:29:06 2013 -0400
@@ -28,6 +28,7 @@
IBM280 IBM280 Cp280 false sun.nio.cs.ext
IBM284 IBM284 Cp284 false sun.nio.cs.ext
IBM285 IBM285 Cp285 false sun.nio.cs.ext
+IBM290 IBM290 Cp290 false sun.nio.cs.ext
IBM297 IBM297 Cp297 false sun.nio.cs.ext
IBM420 IBM420 Cp420 false sun.nio.cs.ext
IBM424 IBM424 Cp424 false sun.nio.cs.ext
--- a/jdk/make/tools/src/build/tools/charsetmapping/DBCS.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/tools/src/build/tools/charsetmapping/DBCS.java Mon Aug 12 09:29:06 2013 -0400
@@ -196,11 +196,14 @@
// (5) c2b replacement, only used for JIs0208/0212, which
// are two pure db charsets so default '3f' does not work
+ // TBD: move this into configuration file
String c2bRepl = "";
if (clzName.startsWith("JIS_X_0208")) {
c2bRepl = "new byte[]{ (byte)0x21, (byte)0x29 },";
} else if (clzName.startsWith("JIS_X_0212")) {
c2bRepl = "new byte[]{ (byte)0x22, (byte)0x44 },";
+ } else if (clzName.startsWith("IBM300")) {
+ c2bRepl = "new byte[]{ (byte)0x42, (byte)0x6f },";
}
while (s.hasNextLine()) {
--- a/jdk/make/tools/src/build/tools/cldrconverter/CLDRConverter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/tools/src/build/tools/cldrconverter/CLDRConverter.java Mon Aug 12 09:29:06 2013 -0400
@@ -605,7 +605,23 @@
copyIfPresent(map, key, formatData);
}
}
-
+ // Workaround for islamic-umalqura name support (JDK-8015986)
+ switch (id) {
+ case "ar":
+ map.put(CLDRConverter.CALENDAR_NAME_PREFIX
+ + CalendarType.ISLAMIC_UMALQURA.lname(),
+ // derived from CLDR 24 draft
+ "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 "
+ +"\u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a "
+ +"[\u0623\u0645 \u0627\u0644\u0642\u0631\u0649]");
+ break;
+ case "en":
+ map.put(CLDRConverter.CALENDAR_NAME_PREFIX
+ + CalendarType.ISLAMIC_UMALQURA.lname(),
+ // derived from CLDR 24 draft
+ "Islamic Calendar [Umm al-Qura]");
+ break;
+ }
// Copy available calendar names
for (String key : map.keySet()) {
if (key.startsWith(CLDRConverter.CALENDAR_NAME_PREFIX)) {
--- a/jdk/make/tools/src/build/tools/cldrconverter/CalendarType.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/make/tools/src/build/tools/cldrconverter/CalendarType.java Mon Aug 12 09:29:06 2013 -0400
@@ -31,7 +31,8 @@
* Constants for the Calendars supported by JRE.
*/
enum CalendarType {
- GREGORIAN("gregory"), BUDDHIST, JAPANESE, ROC, ISLAMIC, ISLAMIC_CIVIL("islamicc");
+ GREGORIAN("gregory"), BUDDHIST, JAPANESE, ROC,
+ ISLAMIC, ISLAMIC_CIVIL("islamicc"), ISLAMIC_UMALQURA("islamic-umalqura");
private static final int[][] ERA_DATA = {
// start index, array length
@@ -41,6 +42,7 @@
{0, 2}, // roc (Minguo)
{0, 1}, // islamic (Hijrah)
{0, 1}, // islamicc (same as islamic)
+ {0, 1}, // islamic-umalqura
};
private final String lname; // lowercase name
@@ -52,8 +54,8 @@
private CalendarType(String uname) {
String lname = name().toLowerCase(Locale.ROOT);
- if (lname.equals("islamic_civil")) {
- lname = "islamic-civil";
+ if (lname.startsWith("islamic_")) {
+ lname = lname.replace('_', '-');
}
this.lname = lname;
this.uname = (uname != null) ? uname : lname;
--- a/jdk/src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/classes/com/apple/eawt/_AppMenuBarHandler.java Mon Aug 12 09:29:06 2013 -0400
@@ -31,6 +31,7 @@
import javax.swing.*;
import javax.swing.plaf.MenuBarUI;
+import com.apple.laf.ScreenMenuBar;
import sun.lwawt.macosx.CMenuBar;
import com.apple.laf.AquaMenuBarUI;
@@ -72,12 +73,15 @@
// scan the current frames, and see if any are foreground
final Frame[] frames = Frame.getFrames();
for (final Frame frame : frames) {
- if (frame.isVisible() && !isFrameMinimized(frame)) return;
+ if (frame.isVisible() && !isFrameMinimized(frame)) {
+ return;
+ }
}
// if we have no foreground frames, then we have to "kick" the menubar
final JFrame pingFrame = new JFrame();
pingFrame.getRootPane().putClientProperty("Window.alpha", new Float(0.0f));
+ pingFrame.setUndecorated(true);
pingFrame.setVisible(true);
pingFrame.toFront();
pingFrame.setVisible(false);
@@ -101,7 +105,6 @@
// Aqua was not installed
throw new IllegalStateException("Application.setDefaultMenuBar() only works with the Aqua Look and Feel");
}
-/* TODO: disabled until ScreenMenuBar is working
final AquaMenuBarUI aquaUI = (AquaMenuBarUI)ui;
final ScreenMenuBar screenMenuBar = aquaUI.getScreenMenuBar();
@@ -118,8 +121,7 @@
}
// grab the pointer to the CMenuBar, and retain it in native
- nativeSetDefaultMenuBar(((CMenuBar)peer).getNativeMenuBarPeer());
-*/
+ nativeSetDefaultMenuBar(((CMenuBar)peer).getModel());
}
void setAboutMenuItemVisible(final boolean present) {
--- a/jdk/src/macosx/classes/sun/font/CStrike.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/classes/sun/font/CStrike.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -31,7 +31,7 @@
import sun.awt.SunHints;
-public class CStrike extends FontStrike {
+public final class CStrike extends FontStrike {
// Creates the native strike
private static native long createNativeStrikePtr(long nativeFontPtr,
@@ -68,10 +68,10 @@
Rectangle2D.Float result,
double x, double y);
- private CFont nativeFont;
+ private final CFont nativeFont;
private AffineTransform invDevTx;
- private GlyphInfoCache glyphInfoCache;
- private GlyphAdvanceCache glyphAdvanceCache;
+ private final GlyphInfoCache glyphInfoCache;
+ private final GlyphAdvanceCache glyphAdvanceCache;
private long nativeStrikePtr;
CStrike(final CFont font, final FontStrikeDesc inDesc) {
@@ -84,11 +84,11 @@
// Normally the device transform should be the identity transform
// for screen operations. The device transform only becomes
// interesting when we are outputting between different dpi surfaces,
- // like when we are printing to postscript.
+ // like when we are printing to postscript or use retina.
if (inDesc.devTx != null && !inDesc.devTx.isIdentity()) {
try {
invDevTx = inDesc.devTx.createInverse();
- } catch (NoninvertibleTransformException e) {
+ } catch (NoninvertibleTransformException ignored) {
// ignored, since device transforms should not be that
// complicated, and if they are - there is nothing we can do,
// so we won't worry about it.
@@ -134,15 +134,13 @@
nativeStrikePtr = 0;
}
- // the fractional metrics default on our platform is OFF
- private boolean useFractionalMetrics() {
- return desc.fmHint == SunHints.INTVAL_FRACTIONALMETRICS_ON;
- }
+ @Override
public int getNumGlyphs() {
return nativeFont.getNumGlyphs();
}
+ @Override
StrikeMetrics getFontMetrics() {
if (strikeMetrics == null) {
StrikeMetrics metrics = getFontMetrics(getNativeStrikePtr());
@@ -155,74 +153,24 @@
return strikeMetrics;
}
- float getGlyphAdvance(int glyphCode) {
- return getScaledAdvanceForAdvance(getCachedNativeGlyphAdvance(glyphCode));
- }
-
- float getCodePointAdvance(int cp) {
- float advance = getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
-
- double glyphScaleX = desc.glyphTx.getScaleX();
- double devScaleX = desc.devTx.getScaleX();
-
- if (devScaleX == 0) {
- glyphScaleX = Math.sqrt(desc.glyphTx.getDeterminant());
- devScaleX = Math.sqrt(desc.devTx.getDeterminant());
- }
-
- if (devScaleX == 0) {
- devScaleX = Double.NaN; // this an undefined graphics state
- }
- advance = (float) (advance * glyphScaleX / devScaleX);
- return useFractionalMetrics() ? advance : Math.round(advance);
- }
-
- // calculate an advance, and round if not using fractional metrics
- private float getScaledAdvanceForAdvance(float advance) {
- if (invDevTx != null) {
- advance *= invDevTx.getScaleX();
- }
- advance *= desc.glyphTx.getScaleX();
- return useFractionalMetrics() ? advance : Math.round(advance);
+ @Override
+ float getGlyphAdvance(final int glyphCode) {
+ return getCachedNativeGlyphAdvance(glyphCode);
}
- Point2D.Float getCharMetrics(char ch) {
- return getScaledPointForAdvance(getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(ch)));
- }
-
- Point2D.Float getGlyphMetrics(int glyphCode) {
- return getScaledPointForAdvance(getCachedNativeGlyphAdvance(glyphCode));
+ @Override
+ float getCodePointAdvance(final int cp) {
+ return getGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
}
- // calculate an advance point, and round if not using fractional metrics
- private Point2D.Float getScaledPointForAdvance(float advance) {
- Point2D.Float pt = new Point2D.Float(advance, 0);
-
- if (!desc.glyphTx.isIdentity()) {
- return scalePoint(pt);
- }
-
- if (!useFractionalMetrics()) {
- pt.x = Math.round(pt.x);
- }
- return pt;
+ @Override
+ Point2D.Float getCharMetrics(final char ch) {
+ return getGlyphMetrics(nativeFont.getMapper().charToGlyph(ch));
}
- private Point2D.Float scalePoint(Point2D.Float pt) {
- if (invDevTx != null) {
- // transform the point out of the device space first
- invDevTx.transform(pt, pt);
- }
- desc.glyphTx.transform(pt, pt);
- pt.x -= desc.glyphTx.getTranslateX();
- pt.y -= desc.glyphTx.getTranslateY();
-
- if (!useFractionalMetrics()) {
- pt.x = Math.round(pt.x);
- pt.y = Math.round(pt.y);
- }
-
- return pt;
+ @Override
+ Point2D.Float getGlyphMetrics(final int glyphCode) {
+ return new Point2D.Float(getGlyphAdvance(glyphCode), 0.0f);
}
Rectangle2D.Float getGlyphOutlineBounds(int glyphCode) {
@@ -414,9 +362,7 @@
private SparseBitShiftingTwoLayerArray secondLayerCache;
private HashMap<Integer, Long> generalCache;
- public GlyphInfoCache(final Font2D nativeFont,
- final FontStrikeDesc desc)
- {
+ GlyphInfoCache(final Font2D nativeFont, final FontStrikeDesc desc) {
super(nativeFont, desc);
firstLayerCache = new long[FIRST_LAYER_SIZE];
}
@@ -527,7 +473,7 @@
final int shift;
final int secondLayerLength;
- public SparseBitShiftingTwoLayerArray(final int size, final int shift) {
+ SparseBitShiftingTwoLayerArray(final int size, final int shift) {
this.shift = shift;
this.cache = new long[1 << shift][];
this.secondLayerLength = size >> shift;
@@ -559,6 +505,12 @@
private SparseBitShiftingTwoLayerArray secondLayerCache;
private HashMap<Integer, Float> generalCache;
+ // Empty non private constructor was added because access to this
+ // class shouldn't be emulated by a synthetic accessor method.
+ GlyphAdvanceCache() {
+ super();
+ }
+
public synchronized float get(final int index) {
if (index < 0) {
if (-index < SECOND_LAYER_SIZE) {
@@ -609,9 +561,7 @@
final int shift;
final int secondLayerLength;
- public SparseBitShiftingTwoLayerArray(final int size,
- final int shift)
- {
+ SparseBitShiftingTwoLayerArray(final int size, final int shift) {
this.shift = shift;
this.cache = new float[1 << shift][];
this.secondLayerLength = size >> shift;
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java Mon Aug 12 09:29:06 2013 -0400
@@ -182,7 +182,11 @@
Long format = predefinedClipboardNameMap.get(str);
if (format == null) {
- format = new Long(registerFormatWithPasteboard(str));
+ if (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance()) {
+ // Do not try to access native system for the unknown format
+ return -1L;
+ }
+ format = registerFormatWithPasteboard(str);
predefinedClipboardNameMap.put(str, format);
predefinedClipboardFormatMap.put(format, str);
}
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CMenuComponent.java Mon Aug 12 09:29:06 2013 -0400
@@ -43,7 +43,7 @@
return target;
}
- long getModel() {
+ public long getModel() {
return modelPtr;
}
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Mon Aug 12 09:29:06 2013 -0400
@@ -47,7 +47,7 @@
import com.sun.awt.AWTUtilities;
public class CPlatformWindow extends CFRetainedResource implements PlatformWindow {
- private native long nativeCreateNSWindow(long nsViewPtr, long styleBits, double x, double y, double w, double h);
+ private native long nativeCreateNSWindow(long nsViewPtr,long ownerPtr, long styleBits, double x, double y, double w, double h);
private static native void nativeSetNSWindowStyleBits(long nsWindowPtr, int mask, int data);
private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
@@ -230,7 +230,8 @@
contentView = createContentView();
contentView.initialize(peer, responder);
- final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), styleBits, 0, 0, 0, 0);
+ final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L;
+ final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0);
setPtr(nativeWindowPtr);
if (target instanceof javax.swing.RootPaneContainer) {
--- a/jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/java/util/SCDynamicStoreConfig.m Mon Aug 12 09:29:06 2013 -0400
@@ -103,7 +103,6 @@
CFTypeRef realmInfo = SCDynamicStoreCopyValue(store, (CFStringRef) [NSString stringWithFormat:@"Kerberos:%@", realm]);
if (CFGetTypeID(realmInfo) != CFDictionaryGetTypeID()) {
- NSLog(@"Unexpected CFType for realm Info: %lu", CFGetTypeID(realmInfo));
return nil;
}
@@ -140,7 +139,6 @@
SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
if (store == NULL) {
- NSLog(@"Unable to load SCDynamicStore to install NotificationCallback");
return;
}
@@ -171,19 +169,11 @@
SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java-kerberos"), NULL, NULL);
if (store == NULL) {
- NSLog(@"Unable to load SCDynamicStore");
- return NULL;
- }
-
- // Create the store if it is NULL and set it.
- if (store == NULL) {
- NSLog(@"Invalid value for SCDynamicStore");
return NULL;
}
CFTypeRef realms = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALMS);
if (realms == NULL || CFGetTypeID(realms) != CFArrayGetTypeID()) {
- NSLog(@"Unable to load realm info from SCDynamicStore");
if (realms) CFRelease(realms);
CFRelease(store);
return NULL;
@@ -192,7 +182,6 @@
CFTypeRef realmMappings = SCDynamicStoreCopyValue(store, (CFStringRef) KERBEROS_DEFAULT_REALM_MAPPINGS);
if (realmMappings == NULL || CFGetTypeID(realmMappings) != CFArrayGetTypeID()) {
- NSLog(@"Unable to load realm mapping info from SCDynamicStore");
if (realmMappings) CFRelease(realmMappings);
CFRelease(realms);
CFRelease(store);
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.h Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.h Mon Aug 12 09:29:06 2013 -0400
@@ -44,6 +44,7 @@
jint styleBits;
BOOL isEnabled;
NSWindow *nsWindow;
+ AWTWindow *ownerWindow;
}
// An instance of either AWTWindow_Normal or AWTWindow_Panel
@@ -51,12 +52,15 @@
@property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow;
@property (nonatomic, retain) CMenuBar *javaMenuBar;
+@property (nonatomic, retain) AWTWindow *ownerWindow;
@property (nonatomic) NSSize javaMinSize;
@property (nonatomic) NSSize javaMaxSize;
@property (nonatomic) jint styleBits;
@property (nonatomic) BOOL isEnabled;
+
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
+ ownerWindow:owner
styleBits:(jint)styleBits
frameRect:(NSRect)frameRect
contentView:(NSView *)contentView;
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m Mon Aug 12 09:29:06 2013 -0400
@@ -30,6 +30,7 @@
#import "sun_lwawt_macosx_CPlatformWindow.h"
#import "com_apple_eawt_event_GestureHandler.h"
#import "com_apple_eawt_FullScreenHandler.h"
+#import "ApplicationDelegate.h"
#import "AWTWindow.h"
#import "AWTView.h"
@@ -55,7 +56,7 @@
// doesn't provide information about "opposite" window, so we
// have to do a bit of tracking. This variable points to a window
// which had been the key window just before a new key window
-// was set. It would be nil if the new key window isn't an AWT
+// was set. It would be nil if the new key window isn't an AWT
// window or the app currently has no key window.
static AWTWindow* lastKeyWindow = nil;
@@ -120,6 +121,7 @@
@synthesize javaMaxSize;
@synthesize styleBits;
@synthesize isEnabled;
+@synthesize ownerWindow;
- (void) updateMinMaxSize:(BOOL)resizable {
if (resizable) {
@@ -201,6 +203,7 @@
}
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow
+ ownerWindow:owner
styleBits:(jint)bits
frameRect:(NSRect)rect
contentView:(NSView *)view
@@ -245,6 +248,7 @@
self.isEnabled = YES;
self.javaPlatformWindow = platformWindow;
self.styleBits = bits;
+ self.ownerWindow = owner;
[self setPropertiesForStyleBits:styleBits mask:MASK(_METHOD_PROP_BITMASK)];
return self;
@@ -350,7 +354,7 @@
[self.javaPlatformWindow setJObject:nil withEnv:env];
self.nsWindow = nil;
-
+ self.ownerWindow = nil;
[super dealloc];
}
@@ -539,11 +543,27 @@
AWT_ASSERT_APPKIT_THREAD;
[AWTToolkit eventCountPlusPlus];
AWTWindow *opposite = [AWTWindow lastKeyWindow];
- if (!IS(self.styleBits, IS_DIALOG)) {
- [CMenuBar activate:self.javaMenuBar modallyDisabled:NO];
- } else if ((opposite != NULL) && IS(self.styleBits, IS_MODAL)) {
- [CMenuBar activate:opposite->javaMenuBar modallyDisabled:YES];
+
+ // Finds appropriate menubar in our hierarchy,
+ AWTWindow *awtWindow = self;
+ while (awtWindow.ownerWindow != nil) {
+ awtWindow = awtWindow.ownerWindow;
}
+
+ CMenuBar *menuBar = nil;
+ BOOL isDisabled = NO;
+ if ([awtWindow.nsWindow isVisible]){
+ menuBar = awtWindow.javaMenuBar;
+ isDisabled = !awtWindow.isEnabled;
+ }
+
+ if (menuBar == nil) {
+ menuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
+ isDisabled = NO;
+ }
+
+ [CMenuBar activate:menuBar modallyDisabled:isDisabled];
+
[AWTWindow setLastKeyWindow:nil];
[self _deliverWindowFocusEvent:YES oppositeWindow: opposite];
@@ -555,6 +575,14 @@
[AWTToolkit eventCountPlusPlus];
[self.javaMenuBar deactivate];
+ // In theory, this might cause flickering if the window gaining focus
+ // has its own menu. However, I couldn't reproduce it on practice, so
+ // perhaps this is a non issue.
+ CMenuBar* defaultMenu = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
+ if (defaultMenu != nil) {
+ [CMenuBar activate:defaultMenu modallyDisabled:NO];
+ }
+
// the new key window
NSWindow *keyWindow = [NSApp keyWindow];
AWTWindow *opposite = nil;
@@ -741,7 +769,7 @@
* Signature: (JJIIII)J
*/
JNIEXPORT jlong JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeCreateNSWindow
-(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
+(JNIEnv *env, jobject obj, jlong contentViewPtr, jlong ownerPtr, jlong styleBits, jdouble x, jdouble y, jdouble w, jdouble h)
{
__block AWTWindow *window = nil;
@@ -750,13 +778,14 @@
JNFWeakJObjectWrapper *platformWindow = [JNFWeakJObjectWrapper wrapperWithJObject:obj withEnv:env];
NSView *contentView = OBJC(contentViewPtr);
NSRect frameRect = NSMakeRect(x, y, w, h);
-
+ AWTWindow *owner = [OBJC(ownerPtr) delegate];
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
window = [[AWTWindow alloc] initWithPlatformWindow:platformWindow
- styleBits:styleBits
- frameRect:frameRect
- contentView:contentView];
+ ownerWindow:owner
+ styleBits:styleBits
+ frameRect:frameRect
+ contentView:contentView];
// the window is released is CPlatformWindow.nativeDispose()
if (window) CFRetain(window.nsWindow);
@@ -818,11 +847,19 @@
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
- if ([nsWindow isKeyWindow]) [window.javaMenuBar deactivate];
+ if ([nsWindow isKeyWindow]) {
+ [window.javaMenuBar deactivate];
+ }
+
window.javaMenuBar = menuBar;
+ CMenuBar* actualMenuBar = menuBar;
+ if (actualMenuBar == nil) {
+ actualMenuBar = [[ApplicationDelegate sharedDelegate] defaultMenuBar];
+ }
+
if ([nsWindow isKeyWindow]) {
- [CMenuBar activate:window.javaMenuBar modallyDisabled:NO];
+ [CMenuBar activate:actualMenuBar modallyDisabled:NO];
}
}];
--- a/jdk/src/macosx/native/sun/awt/CMenuBar.m Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/awt/CMenuBar.m Mon Aug 12 09:29:06 2013 -0400
@@ -63,7 +63,7 @@
if (excludingAppleMenu && ![currMenu isJavaMenu]) {
continue;
}
-
+ [currItem setSubmenu:nil];
[theMainMenu removeItemAtIndex:index];
}
@@ -154,7 +154,10 @@
// Clean up extra items
NSUInteger removedIndex, removedCount = [removedMenuArray count];
for (removedIndex=removedCount; removedIndex > 0; removedIndex--) {
- [theMainMenu removeItemAtIndex:[[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue]];
+ NSUInteger index = [[removedMenuArray objectAtIndex:(removedIndex-1)] integerValue];
+ NSMenuItem *currItem = [theMainMenu itemAtIndex:index];
+ [currItem setSubmenu:nil];
+ [theMainMenu removeItemAtIndex:index];
}
i = cmenuIndex;
--- a/jdk/src/macosx/native/sun/awt/CMenuItem.m Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/awt/CMenuItem.m Mon Aug 12 09:29:06 2013 -0400
@@ -70,9 +70,15 @@
JNIEnv *env = [ThreadUtilities getJNIEnv];
JNF_COCOA_ENTER(env);
- // If we are called as a result of user pressing a shorcut, do nothing,
+ // If we are called as a result of user pressing a shortcut, do nothing,
// because AVTView has already sent corresponding key event to the Java
- // layer from performKeyEquivalent
+ // layer from performKeyEquivalent.
+ // There is an exception from the rule above, though: if a window with
+ // a menu gets minimized by user and there are no other windows to take
+ // focus, the window's menu won't be removed from the global menu bar.
+ // However, the Java layer won't handle invocation by a shortcut coming
+ // from this "frameless" menu, because there are no active windows. This
+ // means we have to handle it here.
NSEvent *currEvent = [[NSApplication sharedApplication] currentEvent];
if ([currEvent type] == NSKeyDown) {
NSString *menuKey = [sender keyEquivalent];
@@ -91,7 +97,8 @@
eventKey = [NSString stringWithCharacters: &newChar length: 1];
}
- if ([menuKey isEqualToString:eventKey]) {
+ NSWindow *keyWindow = [NSApp keyWindow];
+ if ([menuKey isEqualToString:eventKey] && keyWindow != nil) {
return;
}
}
--- a/jdk/src/macosx/native/sun/font/AWTStrike.h Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/font/AWTStrike.h Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -31,11 +31,12 @@
@interface AWTStrike : NSObject {
@public
AWTFont * fAWTFont;
- CGFloat fSize;
+ CGFloat fSize;
JRSFontRenderingStyle fStyle;
- jint fAAStyle;
+ jint fAAStyle;
CGAffineTransform fTx;
+ CGAffineTransform fDevTx;
CGAffineTransform fAltTx; // alternate strike tx used for Sun2D
CGAffineTransform fFontTx;
}
--- a/jdk/src/macosx/native/sun/font/AWTStrike.m Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/font/AWTStrike.m Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -65,6 +65,7 @@
invDevTx.b *= -1;
invDevTx.c *= -1;
fFontTx = CGAffineTransformConcat(CGAffineTransformConcat(tx, invDevTx), sInverseTX);
+ fDevTx = CGAffineTransformInvert(invDevTx);
// the "font size" is the square root of the determinant of the matrix
fSize = sqrt(abs(fFontTx.a * fFontTx.d - fFontTx.b * fFontTx.c));
@@ -148,7 +149,8 @@
{
CGSize advance;
JNF_COCOA_ENTER(env);
- AWTFont *awtFont = ((AWTStrike *)jlong_to_ptr(awtStrikePtr))->fAWTFont;
+ AWTStrike *awtStrike = (AWTStrike *)jlong_to_ptr(awtStrikePtr);
+ AWTFont *awtFont = awtStrike->fAWTFont;
// negative glyph codes are really unicodes, which were placed there by the mapper
// to indicate we should use CoreText to substitute the character
@@ -156,6 +158,10 @@
const CTFontRef fallback = CTS_CopyCTFallbackFontAndGlyphForJavaGlyphCode(awtFont, glyphCode, &glyph);
CTFontGetAdvancesForGlyphs(fallback, kCTFontDefaultOrientation, &glyph, &advance, 1);
CFRelease(fallback);
+ advance = CGSizeApplyAffineTransform(advance, awtStrike->fFontTx);
+ if (!JRSFontStyleUsesFractionalMetrics(awtStrike->fStyle)) {
+ advance.width = round(advance.width);
+ }
JNF_COCOA_EXIT(env);
return advance.width;
--- a/jdk/src/macosx/native/sun/font/CGGlyphImages.m Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/macosx/native/sun/font/CGGlyphImages.m Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -455,6 +455,7 @@
#define CGGI_GLYPH_BBOX_PADDING 2.0f
static inline GlyphInfo *
CGGI_CreateNewGlyphInfoFrom(CGSize advance, CGRect bbox,
+ const AWTStrike *strike,
const CGGI_RenderingMode *mode)
{
size_t pixelSize = mode->glyphDescriptor->pixelSize;
@@ -477,6 +478,12 @@
width = 1;
height = 1;
}
+ advance = CGSizeApplyAffineTransform(advance, strike->fFontTx);
+ if (!JRSFontStyleUsesFractionalMetrics(strike->fStyle)) {
+ advance.width = round(advance.width);
+ advance.height = round(advance.height);
+ }
+ advance = CGSizeApplyAffineTransform(advance, strike->fDevTx);
#ifdef USE_IMAGE_ALIGNED_MEMORY
// create separate memory
@@ -564,10 +571,10 @@
JRSFontGetBoundingBoxesForGlyphsAndStyle(fallback, &tx, style, &glyph, 1, &bbox);
CGSize advance;
- JRSFontGetAdvancesForGlyphsAndStyle(fallback, &tx, strike->fStyle, &glyph, 1, &advance);
+ CTFontGetAdvancesForGlyphs(fallback, kCTFontDefaultOrientation, &glyph, &advance, 1);
// create the Sun2D GlyphInfo we are going to strike into
- GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, mode);
+ GlyphInfo *info = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
// fix the context size, just in case the substituted character is unexpectedly large
CGGI_SizeCanvas(canvas, info->width, info->height, mode->cgFontMode);
@@ -715,7 +722,7 @@
JRSFontRenderingStyle bboxCGMode = JRSFontAlignStyleForFractionalMeasurement(strike->fStyle);
JRSFontGetBoundingBoxesForGlyphsAndStyle((CTFontRef)font->fFont, &tx, bboxCGMode, glyphs, len, bboxes);
- JRSFontGetAdvancesForGlyphsAndStyle((CTFontRef)font->fFont, &tx, strike->fStyle, glyphs, len, advances);
+ CTFontGetAdvancesForGlyphs((CTFontRef)font->fFont, kCTFontDefaultOrientation, glyphs, advances, len);
size_t maxWidth = 1;
size_t maxHeight = 1;
@@ -732,7 +739,7 @@
CGSize advance = advances[i];
CGRect bbox = bboxes[i];
- GlyphInfo *glyphInfo = CGGI_CreateNewGlyphInfoFrom(advance, bbox, mode);
+ GlyphInfo *glyphInfo = CGGI_CreateNewGlyphInfoFrom(advance, bbox, strike, mode);
if (maxWidth < glyphInfo->width) maxWidth = glyphInfo->width;
if (maxHeight < glyphInfo->height) maxHeight = glyphInfo->height;
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk.properties Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk.properties Mon Aug 12 09:29:06 2013 -0400
@@ -1,54 +1,54 @@
-# Refer to the note in basic.properties for a description as to what
-# the mnemonics correspond to and how to calculate them.
-
-
-
-# GTK specific properties
-
-# GTK color chooser properties:
-GTKColorChooserPanel.textAndMnemonic=>K Color Chooser
-# mnemonic as a VK_ constant
-
-GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
-
-GTKColorChooserPanel.red.textAndMnemonic=R&ed:
-
-GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
-
-GTKColorChooserPanel.green.textAndMnemonic=&Green:
-
-GTKColorChooserPanel.value.textAndMnemonic=&Value:
-
-GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
-
-GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
-
-
-
-############ FILE CHOOSER STRINGS #############
-
-FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
-FileChooser.newFolderButton.textAndMnemonic=&New Folder
-FileChooser.newFolderDialog.textAndMnemonic=Folder name:
-FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
-FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
-FileChooser.deleteFileButton.textAndMnemonic=De&lete File
-FileChooser.renameFileButton.textAndMnemonic=&Rename File
-FileChooser.cancelButton.textAndMnemonic=&Cancel
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
-FileChooser.saveDialogTitle.textAndMnemonic=Save
-FileChooser.openDialogTitle.textAndMnemonic=Open
-FileChooser.pathLabel.textAndMnemonic=&Selection:
-FileChooser.filterLabel.textAndMnemonic=Filter:
-FileChooser.foldersLabel.textAndMnemonic=Fol&ders
-FileChooser.filesLabel.textAndMnemonic=&Files
-
-FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
-FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
-FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
-
-FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
-FileChooser.renameFileError.titleAndMnemonic=Error
-FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
-
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+
+
+
+# GTK specific properties
+
+# GTK color chooser properties:
+GTKColorChooserPanel.textAndMnemonic=>K Color Chooser
+# mnemonic as a VK_ constant
+
+GTKColorChooserPanel.hue.textAndMnemonic=&Hue:
+
+GTKColorChooserPanel.red.textAndMnemonic=R&ed:
+
+GTKColorChooserPanel.saturation.textAndMnemonic=&Saturation:
+
+GTKColorChooserPanel.green.textAndMnemonic=&Green:
+
+GTKColorChooserPanel.value.textAndMnemonic=&Value:
+
+GTKColorChooserPanel.blue.textAndMnemonic=&Blue:
+
+GTKColorChooserPanel.color.textAndMnemonic=Color &Name:
+
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
+FileChooser.newFolderButton.textAndMnemonic=&New Folder
+FileChooser.newFolderDialog.textAndMnemonic=Folder name:
+FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
+FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
+FileChooser.deleteFileButton.textAndMnemonic=De&lete File
+FileChooser.renameFileButton.textAndMnemonic=&Rename File
+FileChooser.cancelButton.textAndMnemonic=&Cancel
+FileChooser.saveButton.textAndMnemonic=&OK
+FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.saveDialogTitle.textAndMnemonic=Save
+FileChooser.openDialogTitle.textAndMnemonic=Open
+FileChooser.pathLabel.textAndMnemonic=&Selection:
+FileChooser.filterLabel.textAndMnemonic=Filter:
+FileChooser.foldersLabel.textAndMnemonic=Fol&ders
+FileChooser.filesLabel.textAndMnemonic=&Files
+
+FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
+FileChooser.saveButtonToolTip.textAndMnemonic=Save selected file.
+FileChooser.openButtonToolTip.textAndMnemonic=Open selected file.
+
+FileChooser.renameFileDialog.textAndMnemonic=Rename file "{0}" to
+FileChooser.renameFileError.titleAndMnemonic=Error
+FileChooser.renameFileError.textAndMnemonic=Error renaming file "{0}" to "{1}"
+
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java Mon Aug 12 09:29:06 2013 -0400
@@ -499,7 +499,8 @@
public void setItem(Object item) {
super.setItem(item);
- if (editor.hasFocus()) {
+ Object focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
+ if ((focus == editor) || (focus == editor.getParent())) {
editor.selectAll();
}
}
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/DEREncodedKeyValue.java Mon Aug 12 09:29:06 2013 -0400
@@ -42,7 +42,7 @@
public class DEREncodedKeyValue extends Signature11ElementProxy implements KeyInfoContent {
/** JCA algorithm key types supported by this implementation. */
- public static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
+ private static final String supportedKeyTypes[] = { "RSA", "DSA", "EC"};
/**
* Constructor DEREncodedKeyValue
--- a/jdk/src/share/classes/com/sun/security/auth/PolicyFile.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/security/auth/PolicyFile.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -47,6 +47,10 @@
import sun.security.util.PropertyExpander;
+import sun.security.provider.PolicyParser.PrincipalEntry;
+import sun.security.provider.PolicyParser.GrantEntry;
+import sun.security.provider.PolicyParser.PermissionEntry;
+
/**
* This class represents a default implementation for
* <code>javax.security.auth.Policy</code>.
@@ -469,7 +473,8 @@
* @param policyFile the policy Reader object.
*/
private void init(URL policy) {
- PolicyParser pp = new PolicyParser(expandProperties);
+ sun.security.provider.PolicyParser pp =
+ new sun.security.provider.PolicyParser(expandProperties);
try {
InputStreamReader isr
= new InputStreamReader(getInputStream(policy));
@@ -477,12 +482,12 @@
isr.close();
KeyStore keyStore = initKeyStore(policy, pp.getKeyStoreUrl(),
pp.getKeyStoreType());
- Enumeration<PolicyParser.GrantEntry> enum_ = pp.grantElements();
+ Enumeration<GrantEntry> enum_ = pp.grantElements();
while (enum_.hasMoreElements()) {
- PolicyParser.GrantEntry ge = enum_.nextElement();
+ GrantEntry ge = enum_.nextElement();
addGrantEntry(ge, keyStore);
}
- } catch (PolicyParser.ParsingException pe) {
+ } catch (sun.security.provider.PolicyParser.ParsingException pe) {
System.err.println(AUTH_POLICY +
rb.getString(".error.parsing.") + policy);
System.err.println(AUTH_POLICY +
@@ -521,8 +526,8 @@
*
* @return null if signedBy alias is not recognized
*/
- CodeSource getCodeSource(PolicyParser.GrantEntry ge, KeyStore keyStore)
- throws java.net.MalformedURLException
+ CodeSource getCodeSource(GrantEntry ge, KeyStore keyStore)
+ throws java.net.MalformedURLException
{
Certificate[] certs = null;
if (ge.signedBy != null) {
@@ -559,20 +564,18 @@
/**
* Add one policy entry to the vector.
*/
- private void addGrantEntry(PolicyParser.GrantEntry ge,
- KeyStore keyStore) {
+ private void addGrantEntry(GrantEntry ge, KeyStore keyStore) {
if (debug != null) {
debug.println("Adding policy entry: ");
debug.println(" signedBy " + ge.signedBy);
debug.println(" codeBase " + ge.codeBase);
if (ge.principals != null && ge.principals.size() > 0) {
- ListIterator<PolicyParser.PrincipalEntry> li =
- ge.principals.listIterator();
+ ListIterator<PrincipalEntry> li = ge.principals.listIterator();
while (li.hasNext()) {
- PolicyParser.PrincipalEntry pppe = li.next();
- debug.println(" " + pppe.principalClass +
- " " + pppe.principalName);
+ PrincipalEntry pppe = li.next();
+ debug.println(" " + pppe.getPrincipalClass() +
+ " " + pppe.getPrincipalName());
}
}
debug.println();
@@ -584,10 +587,9 @@
if (codesource == null) return;
PolicyEntry entry = new PolicyEntry(codesource);
- Enumeration<PolicyParser.PermissionEntry> enum_ =
- ge.permissionElements();
+ Enumeration<PermissionEntry> enum_ = ge.permissionElements();
while (enum_.hasMoreElements()) {
- PolicyParser.PermissionEntry pe = enum_.nextElement();
+ PermissionEntry pe = enum_.nextElement();
try {
// XXX special case PrivateCredentialPermission-SELF
Permission perm;
@@ -998,11 +1000,11 @@
return true;
}
- ListIterator<PolicyParser.PrincipalEntry> pli =
- scs.getPrincipals().listIterator();
+ ListIterator<PrincipalEntry> pli =
+ scs.getPrincipals().listIterator();
while (pli.hasNext()) {
- PolicyParser.PrincipalEntry principal = pli.next();
+ PrincipalEntry principal = pli.next();
// XXX
// if the Policy entry's Principal does not contain a
@@ -1050,30 +1052,29 @@
* if (y == 1), it's the principal name.
*/
private String[][] getPrincipalInfo
- (PolicyParser.PrincipalEntry principal,
- final CodeSource accCs) {
+ (PrincipalEntry principal, final CodeSource accCs) {
// there are 3 possibilities:
// 1) the entry's Principal class and name are not wildcarded
// 2) the entry's Principal name is wildcarded only
// 3) the entry's Principal class and name are wildcarded
- if (!principal.principalClass.equals
- (PolicyParser.PrincipalEntry.WILDCARD_CLASS) &&
- !principal.principalName.equals
- (PolicyParser.PrincipalEntry.WILDCARD_NAME)) {
+ if (!principal.getPrincipalClass().equals
+ (PrincipalEntry.WILDCARD_CLASS) &&
+ !principal.getPrincipalName().equals
+ (PrincipalEntry.WILDCARD_NAME)) {
// build a PrivateCredentialPermission for the principal
// from the Policy entry
String[][] info = new String[1][2];
- info[0][0] = principal.principalClass;
- info[0][1] = principal.principalName;
+ info[0][0] = principal.getPrincipalClass();
+ info[0][1] = principal.getPrincipalName();
return info;
- } else if (!principal.principalClass.equals
- (PolicyParser.PrincipalEntry.WILDCARD_CLASS) &&
- principal.principalName.equals
- (PolicyParser.PrincipalEntry.WILDCARD_NAME)) {
+ } else if (!principal.getPrincipalClass().equals
+ (PrincipalEntry.WILDCARD_CLASS) &&
+ principal.getPrincipalName().equals
+ (PrincipalEntry.WILDCARD_NAME)) {
// build a PrivateCredentialPermission for all
// the Subject's principals that are instances of principalClass
@@ -1088,7 +1089,7 @@
// If it doesn't, we should stop here with a ClassCastException.
@SuppressWarnings("unchecked")
Class<? extends Principal> pClass = (Class<? extends Principal>)
- Class.forName(principal.principalClass, false,
+ Class.forName(principal.getPrincipalClass(), false,
ClassLoader.getSystemClassLoader());
principalSet = scs.getSubject().getPrincipals(pClass);
} catch (Exception e) {
@@ -1387,6 +1388,7 @@
}
}
+@SuppressWarnings("deprecation")
class PolicyPermissions extends PermissionCollection {
private static final long serialVersionUID = -1954188373270545523L;
--- a/jdk/src/share/classes/com/sun/security/auth/SubjectCodeSource.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/security/auth/SubjectCodeSource.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -33,6 +33,7 @@
import java.lang.reflect.Constructor;
import javax.security.auth.Subject;
+import sun.security.provider.PolicyParser.PrincipalEntry;
/**
* <p> This <code>SubjectCodeSource</code> class contains
@@ -57,7 +58,7 @@
});
private Subject subject;
- private LinkedList<PolicyParser.PrincipalEntry> principals;
+ private LinkedList<PrincipalEntry> principals;
private static final Class[] PARAMS = { String.class };
private static final sun.security.util.Debug debug =
sun.security.util.Debug.getInstance("auth", "\t[Auth Access]");
@@ -87,14 +88,14 @@
* <code>SubjectCodeSource</code> <p>
*/
SubjectCodeSource(Subject subject,
- LinkedList<PolicyParser.PrincipalEntry> principals,
+ LinkedList<PrincipalEntry> principals,
URL url, Certificate[] certs) {
super(url, certs);
this.subject = subject;
this.principals = (principals == null ?
- new LinkedList<PolicyParser.PrincipalEntry>() :
- new LinkedList<PolicyParser.PrincipalEntry>(principals));
+ new LinkedList<PrincipalEntry>() :
+ new LinkedList<PrincipalEntry>(principals));
sysClassLoader = java.security.AccessController.doPrivileged
(new java.security.PrivilegedAction<ClassLoader>() {
public ClassLoader run() {
@@ -114,7 +115,7 @@
* <code>SubjectCodeSource</code> as a <code>LinkedList</code>
* of <code>PolicyParser.PrincipalEntry</code> objects.
*/
- LinkedList<PolicyParser.PrincipalEntry> getPrincipals() {
+ LinkedList<PrincipalEntry> getPrincipals() {
return principals;
}
@@ -167,7 +168,7 @@
*/
public boolean implies(CodeSource codesource) {
- LinkedList<PolicyParser.PrincipalEntry> subjectList = null;
+ LinkedList<PrincipalEntry> subjectList = null;
if (codesource == null ||
!(codesource instanceof SubjectCodeSource) ||
@@ -197,20 +198,19 @@
return false;
}
- ListIterator<PolicyParser.PrincipalEntry> li =
- this.principals.listIterator(0);
+ ListIterator<PrincipalEntry> li = this.principals.listIterator(0);
while (li.hasNext()) {
- PolicyParser.PrincipalEntry pppe = li.next();
+ PrincipalEntry pppe = li.next();
try {
// handle PrincipalComparators
Class<?> principalComparator = Class.forName(
- pppe.principalClass, true, sysClassLoader);
+ pppe.getPrincipalClass(), true, sysClassLoader);
Constructor<?> c = principalComparator.getConstructor(PARAMS);
PrincipalComparator pc =
(PrincipalComparator)c.newInstance
- (new Object[] { pppe.principalName });
+ (new Object[] { pppe.getPrincipalName() });
if (!pc.implies(that.getSubject())) {
if (debug != null)
@@ -236,11 +236,10 @@
Iterator<Principal> i =
that.getSubject().getPrincipals().iterator();
- subjectList = new LinkedList<PolicyParser.PrincipalEntry>();
+ subjectList = new LinkedList<PrincipalEntry>();
while (i.hasNext()) {
Principal p = i.next();
- PolicyParser.PrincipalEntry spppe =
- new PolicyParser.PrincipalEntry
+ PrincipalEntry spppe = new PrincipalEntry
(p.getClass().getName(), p.getName());
subjectList.add(spppe);
}
@@ -281,23 +280,19 @@
* <i>pppe</i> argument.
*/
private boolean subjectListImpliesPrincipalEntry(
- LinkedList<PolicyParser.PrincipalEntry> subjectList,
- PolicyParser.PrincipalEntry pppe) {
+ LinkedList<PrincipalEntry> subjectList, PrincipalEntry pppe) {
- ListIterator<PolicyParser.PrincipalEntry> li =
- subjectList.listIterator(0);
+ ListIterator<PrincipalEntry> li = subjectList.listIterator(0);
while (li.hasNext()) {
- PolicyParser.PrincipalEntry listPppe = li.next();
+ PrincipalEntry listPppe = li.next();
- if (pppe.principalClass.equals
- (PolicyParser.PrincipalEntry.WILDCARD_CLASS) ||
- pppe.principalClass.equals
- (listPppe.principalClass)) {
-
- if (pppe.principalName.equals
- (PolicyParser.PrincipalEntry.WILDCARD_NAME) ||
- pppe.principalName.equals
- (listPppe.principalName))
+ if (pppe.getPrincipalClass().equals
+ (PrincipalEntry.WILDCARD_CLASS) ||
+ pppe.getPrincipalClass().equals(listPppe.getPrincipalClass()))
+ {
+ if (pppe.getPrincipalName().equals
+ (PrincipalEntry.WILDCARD_NAME) ||
+ pppe.getPrincipalName().equals(listPppe.getPrincipalName()))
return true;
}
}
@@ -390,13 +385,12 @@
}
}
if (principals != null) {
- ListIterator<PolicyParser.PrincipalEntry> li =
- principals.listIterator();
+ ListIterator<PrincipalEntry> li = principals.listIterator();
while (li.hasNext()) {
- PolicyParser.PrincipalEntry pppe = li.next();
+ PrincipalEntry pppe = li.next();
returnMe = returnMe + rb.getString("NEWLINE") +
- pppe.principalClass + " " +
- pppe.principalName;
+ pppe.getPrincipalClass() + " " +
+ pppe.getPrincipalName();
}
}
return returnMe;
--- a/jdk/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth.properties Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth.properties Mon Aug 12 09:29:06 2013 -0400
@@ -1,45 +1,45 @@
-# This properties file is used to create a PropertyResourceBundle
-# It contains Locale specific strings used be the Synth Look and Feel.
-# Currently, the following components need this for support:
-#
-# FileChooser
-#
-# When this file is read in, the strings are put into the
-# defaults table. This is an implementation detail of the current
-# workings of Swing. DO NOT DEPEND ON THIS.
-# This may change in future versions of Swing as we improve localization
-# support.
-#
-# Refer to the note in basic.properties for a description as to what
-# the mnemonics correspond to and how to calculate them.
-#
-# @author Steve Wilson
-
-
-############ FILE CHOOSER STRINGS #############
-
-FileChooser.lookInLabel.textAndMnemonic=Look &In:
-FileChooser.saveInLabel.textAndMnemonic=Save In:
-FileChooser.fileNameLabel.textAndMnemonic=File &Name:
-FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
-FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
-FileChooser.upFolderAccessibleName=Up
-FileChooser.homeFolderToolTip.textAndMnemonic=Home
-FileChooser.homeFolderAccessibleName=Home
-FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
-FileChooser.newFolderAccessibleName=New Folder
-FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
-FileChooser.listViewButtonToolTip.textAndMnemonic=List
-FileChooser.listViewButtonAccessibleName=List
-FileChooser.listViewActionLabel.textAndMnemonic=List
-FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
-FileChooser.detailsViewButtonAccessibleName=Details
-FileChooser.detailsViewActionLabel.textAndMnemonic=Details
-FileChooser.refreshActionLabel.textAndMnemonic=Refresh
-FileChooser.viewMenuLabel.textAndMnemonic=View
-FileChooser.fileNameHeader.textAndMnemonic=Name
-FileChooser.fileSizeHeader.textAndMnemonic=Size
-FileChooser.fileTypeHeader.textAndMnemonic=Type
-FileChooser.fileDateHeader.textAndMnemonic=Modified
-FileChooser.fileAttrHeader.textAndMnemonic=Attributes
+# This properties file is used to create a PropertyResourceBundle
+# It contains Locale specific strings used be the Synth Look and Feel.
+# Currently, the following components need this for support:
+#
+# FileChooser
+#
+# When this file is read in, the strings are put into the
+# defaults table. This is an implementation detail of the current
+# workings of Swing. DO NOT DEPEND ON THIS.
+# This may change in future versions of Swing as we improve localization
+# support.
+#
+# Refer to the note in basic.properties for a description as to what
+# the mnemonics correspond to and how to calculate them.
+#
+# @author Steve Wilson
+
+
+############ FILE CHOOSER STRINGS #############
+
+FileChooser.lookInLabel.textAndMnemonic=Look &In:
+FileChooser.saveInLabel.textAndMnemonic=Save In:
+FileChooser.fileNameLabel.textAndMnemonic=File &Name:
+FileChooser.folderNameLabel.textAndMnemonic=Folder &Name:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
+FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
+FileChooser.upFolderAccessibleName=Up
+FileChooser.homeFolderToolTip.textAndMnemonic=Home
+FileChooser.homeFolderAccessibleName=Home
+FileChooser.newFolderToolTip.textAndMnemonic=Create New Folder
+FileChooser.newFolderAccessibleName=New Folder
+FileChooser.newFolderActionLabel.textAndMnemonic=New Folder
+FileChooser.listViewButtonToolTip.textAndMnemonic=List
+FileChooser.listViewButtonAccessibleName=List
+FileChooser.listViewActionLabel.textAndMnemonic=List
+FileChooser.detailsViewButtonToolTip.textAndMnemonic=Details
+FileChooser.detailsViewButtonAccessibleName=Details
+FileChooser.detailsViewActionLabel.textAndMnemonic=Details
+FileChooser.refreshActionLabel.textAndMnemonic=Refresh
+FileChooser.viewMenuLabel.textAndMnemonic=View
+FileChooser.fileNameHeader.textAndMnemonic=Name
+FileChooser.fileSizeHeader.textAndMnemonic=Size
+FileChooser.fileTypeHeader.textAndMnemonic=Type
+FileChooser.fileDateHeader.textAndMnemonic=Modified
+FileChooser.fileAttrHeader.textAndMnemonic=Attributes
--- a/jdk/src/share/classes/com/sun/tools/hat/resources/hat.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/resources/hat.js Mon Aug 12 09:29:06 2013 -0400
@@ -151,7 +151,7 @@
while (tmp != null) {
res[res.length] = tmp;
tmp = tmp.superclass;
- }
+ }
return res;
}
@@ -263,16 +263,19 @@
if (name == 'class') {
return wrapJavaValue(instance.clazz);
- } else if (name == 'toString') {
- return function() {
- return instance.toString();
- }
} else if (name == 'wrapped-object') {
return instance;
}
return undefined;
- }
+ },
+ __call__: function(name) {
+ if (name == 'toString') {
+ return instance.toString();
+ } else {
+ return undefined;
+ }
+ }
}
}
@@ -297,7 +300,7 @@
return true;
}
}
- return theJavaClassProto[name] != undefined;
+ return false;
},
__get__ : function(name) {
for (var i in fields) {
@@ -305,7 +308,7 @@
return wrapJavaValue(fields[i].value);
}
}
- return theJavaClassProto[name];
+ return undefined;
}
}
@@ -322,7 +325,12 @@
this.name = jclass.name;
this.fields = jclass.fields;
this['wrapped-object'] = jclass;
- this.__proto__ = this.statics;
+ }
+
+ for (var i in theJavaClassProto) {
+ if (typeof theJavaClassProto[i] == 'function') {
+ JavaClassWrapper.prototype[i] = theJavaClassProto[i];
+ }
}
// returns wrapper for Java object arrays
@@ -334,32 +342,35 @@
__getIds__ : function() {
var res = new Array(elements.length);
for (var i = 0; i < elements.length; i++) {
- res[i] = i;
+ res[i] = String(i);
}
return res;
},
__has__: function(name) {
- return (typeof(name) == 'number' &&
- name >= 0 && name < elements.length) ||
+ return (name >= 0 && name < elements.length) ||
name == 'length' || name == 'class' ||
name == 'toString' || name == 'wrapped-object';
},
__get__ : function(name) {
- if (typeof(name) == 'number' &&
- name >= 0 && name < elements.length) {
+ if (name >= 0 && name < elements.length) {
return wrapJavaValue(elements[name]);
} else if (name == 'length') {
return elements.length;
} else if (name == 'class') {
return wrapJavaValue(array.clazz);
- } else if (name == 'toString') {
- return function() { return array.toString(); }
} else if (name == 'wrapped-object') {
return array;
} else {
return undefined;
}
- }
+ },
+ __call__: function(name) {
+ if (name == 'toString') {
+ return array.toString();
+ } else {
+ return undefined;
+ }
+ }
}
}
@@ -373,26 +384,22 @@
__getIds__ : function() {
var r = new Array(array.length);
for (var i = 0; i < array.length; i++) {
- r[i] = i;
+ r[i] = String(i);
}
return r;
},
__has__: function(name) {
- return (typeof(name) == 'number' &&
- name >= 0 && name < array.length) ||
+ return (name >= 0 && name < array.length) ||
name == 'length' || name == 'class' ||
name == 'toString' || name == 'wrapped-object';
},
__get__: function(name) {
- if (typeof(name) == 'number' &&
- name >= 0 && name < array.length) {
+ if (name >= 0 && name < array.length) {
return elements[name];
}
if (name == 'length') {
return array.length;
- } else if (name == 'toString') {
- return function() { return array.valueString(true); }
} else if (name == 'wrapped-object') {
return array;
} else if (name == 'class') {
@@ -400,7 +407,14 @@
} else {
return undefined;
}
- }
+ },
+ __call__: function(name) {
+ if (name == 'toString') {
+ return array.valueString(true);
+ } else {
+ return undefined;
+ }
+ }
}
}
return javaObject(thing);
@@ -673,34 +687,33 @@
__getIds__ : function() {
var res = new Array(path.length);
for (var i = 0; i < path.length; i++) {
- res[i] = i;
+ res[i] = String(i);
}
return res;
},
__has__ : function (name) {
- return (typeof(name) == 'number' &&
- name >= 0 && name < path.length) ||
+ return (name >= 0 && name < path.length) ||
name == 'length' || name == 'toHtml' ||
name == 'toString';
},
__get__ : function(name) {
- if (typeof(name) == 'number' &&
- name >= 0 && name < path.length) {
+ if (name >= 0 && name < path.length) {
return path[name];
} else if (name == 'length') {
return path.length;
- } else if (name == 'toHtml') {
- return function() {
- return computeDescription(true);
- }
- } else if (name == 'toString') {
- return function() {
- return computeDescription(false);
- }
} else {
return undefined;
}
},
+ __call__: function(name) {
+ if (name == 'toHtml') {
+ return computeDescription(true);
+ } else if (name == 'toString') {
+ return computeDescription(false);
+ } else {
+ return undefined;
+ }
+ }
};
}
@@ -1005,22 +1018,8 @@
return "<a href='/object/" + id + "'>" +
name + "@" + id + "</a>";
}
- } else if ((typeof(obj) == 'object') || (obj instanceof JSAdapter)) {
- if (obj instanceof java.lang.Object) {
- // script wrapped Java object
- obj = wrapIterator(obj);
- // special case for enumeration
- if (obj instanceof java.util.Enumeration) {
- var res = "[ ";
- while (obj.hasMoreElements()) {
- res += toHtml(obj.nextElement()) + ", ";
- }
- res += "]";
- return res;
- } else {
- return obj;
- }
- } else if (obj instanceof Array) {
+ } else if (obj instanceof Object) {
+ if (Array.isArray(obj)) {
// script array
var res = "[ ";
for (var i in obj) {
@@ -1047,8 +1046,19 @@
}
}
} else {
- // JavaScript primitive value
- return obj;
+ // a Java object
+ obj = wrapIterator(obj);
+ // special case for enumeration
+ if (obj instanceof java.util.Enumeration) {
+ var res = "[ ";
+ while (obj.hasMoreElements()) {
+ res += toHtml(obj.nextElement()) + ", ";
+ }
+ res += "]";
+ return res;
+ } else {
+ return obj;
+ }
}
}
--- a/jdk/src/share/classes/com/sun/tools/hat/resources/oqlhelp.html Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/resources/oqlhelp.html Mon Aug 12 09:29:06 2013 -0400
@@ -79,7 +79,7 @@
<li>select all Strings of length 100 or more
<pre>
<code>
- select s from java.lang.String s where s.count >= 100
+ select s from java.lang.String s where s.value.length >= 100
</code>
</pre>
<li>select all int arrays of length 256 or more
@@ -92,7 +92,7 @@
<pre>
<code>
select s.value.toString() from java.lang.String s
- where /java/(s.value.toString())
+ where /java/.test(s.value.toString())
</code>
</pre>
<li>show path value of all File objects
@@ -219,7 +219,6 @@
<pre>
<code>
select heap.findClass("java.lang.System").statics.props
- select heap.findClass("java.lang.System").props
</code>
</pre>
<li>get number of fields of java.lang.String class
@@ -237,7 +236,7 @@
<li>select all classes that have name pattern java.net.*
<pre>
<code>
- select <a href="#filter">filter</a>(heap.classes(), "/java.net./(it.name)")
+ select <a href="#filter">filter</a>(heap.classes(), "/java.net./.test(it.name)")
</code>
</pre>
</ul>
@@ -536,7 +535,7 @@
Example: print number of classes that have specific name pattern
<pre>
<code>
- select count(<a href="#classes">heap.classes()</a>, "/java.io./(it.name)")
+ select count(<a href="#classes">heap.classes()</a>, "/java.io./.test(it.name)")
</code>
</pre>
@@ -559,14 +558,14 @@
<li>show all classes that have java.io.* name pattern
<pre>
<code>
- select filter(<a href="#classes">heap.classes</a>(), "/java.io./(it.name)")
+ select filter(<a href="#classes">heap.classes</a>(), "/java.io./.test(it.name)")
</code>
</pre>
<li> show all referrers of URL object where the referrer is not from
java.net package
<pre>
<code>
- select filter(<a href="#referrers">referrers</a>(u), "! /java.net./(<a href="#classof">classof</a>(it).name)")
+ select filter(<a href="#referrers">referrers</a>(u), "! /java.net./.test(<a href="#classof">classof</a>(it).name)")
from java.net.URL u
</code>
</pre>
@@ -619,13 +618,13 @@
<li>find the maximum length of any String instance
<pre>
<code>
- select max(map(heap.objects('java.lang.String', false), 'it.count'))
+ select max(map(heap.objects('java.lang.String', false), 'it.value.length'))
</code>
</pre>
<li>find string instance that has the maximum length
<pre>
<code>
- select max(heap.objects('java.lang.String'), 'lhs.count > rhs.count')
+ select max(heap.objects('java.lang.String'), 'lhs.value.length > rhs.value.length')
</code>
</pre>
</ul>
@@ -775,7 +774,7 @@
<pre>
<code>
- select <a href="#map">map</a>(<a href="#filter">filter(<a href="#findClass">heap.findClass</a>('java.lang.System').props.table, 'it != null'),
+ select <a href="#map">map</a>(<a href="#filter">filter(<a href="#findClass">heap.findClass</a>('java.lang.System').statics.props.table, 'it != null'),
function (it) {
var res = "";
while (it != null) {
--- a/jdk/src/share/classes/java/applet/AppletContext.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/applet/AppletContext.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -56,7 +56,7 @@
/**
* Returns an <code>Image</code> object that can then be painted on
- * the screen. The <code>url</code> argument<code> </code>that is
+ * the screen. The <code>url</code> argument that is
* passed as an argument must specify an absolute URL.
* <p>
* This method always returns immediately, whether or not the image
@@ -157,7 +157,7 @@
* @param stream stream to be associated with the specified key. If this
* parameter is <code>null</code>, the specified key is removed
* in this applet context.
- * @throws <code>IOException</code> if the stream size exceeds a certain
+ * @throws IOException if the stream size exceeds a certain
* size limit. Size limit is decided by the implementor of this
* interface.
* @since 1.4
--- a/jdk/src/share/classes/java/awt/AWTException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/awt/AWTException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -26,7 +26,7 @@
/**
- * Signals that an Absract Window Toolkit exception has occurred.
+ * Signals that an Abstract Window Toolkit exception has occurred.
*
* @author Arthur van Hoff
*/
--- a/jdk/src/share/classes/java/beans/AppletInitializer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/AppletInitializer.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -68,7 +68,6 @@
* the Applet with its Container during the subsequent invocation of its
* addChildren() method.
* </ol>
- * </p>
*
* @param newAppletBean The newly instantiated JavaBean
* @param bCtxt The BeanContext intended for this Applet, or
--- a/jdk/src/share/classes/java/beans/Beans.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/Beans.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -62,7 +62,7 @@
* <p>
* Instantiate a JavaBean.
* </p>
- *
+ * @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
@@ -82,6 +82,7 @@
* <p>
* Instantiate a JavaBean.
* </p>
+ * @return a JavaBean
*
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
@@ -137,6 +138,7 @@
* the JDK appletviewer (for a reference browser environment) and the
* BDK BeanBox (for a reference bean container).
*
+ * @return a JavaBean
* @param cls the class-loader from which we should create
* the bean. If this is null, then the system
* class-loader is used.
@@ -361,6 +363,8 @@
* This method is provided in Beans 1.0 as a hook to allow the
* addition of more flexible bean behaviour in the future.
*
+ * @return an object representing a specified type view of the
+ * source object
* @param bean Object from which we want to obtain a view.
* @param targetType The type of view we'd like to get.
*
@@ -384,7 +388,6 @@
return Introspector.isSubclass(bean.getClass(), targetType);
}
-
/**
* Test if we are in design-mode.
*
--- a/jdk/src/share/classes/java/beans/ConstructorProperties.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/ConstructorProperties.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -61,7 +61,7 @@
the {@code getY()} method. Since parameter names are not in
general available at runtime, without the annotation there would be
no way to know whether the parameters correspond to {@code getX()}
- and {@code getY()} or the other way around.</p>
+ and {@code getY()} or the other way around.
@since 1.6
*/
--- a/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -382,6 +382,7 @@
* a class such that no property value depends on the value of
* a subsequent property.
*
+ * @param type the type of the instances
* @param oldInstance The instance to be copied.
* @param newInstance The instance that is to be modified.
* @param out The stream to which any initialization statements should be written.
--- a/jdk/src/share/classes/java/beans/EventHandler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/EventHandler.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -515,6 +515,7 @@
*</pre>
*</blockquote>
*
+ * @param <T> the type to create
* @param listenerInterface the listener interface to create a proxy for
* @param target the object that will perform the action
* @param action the name of a (possibly qualified) property or method on
@@ -570,6 +571,7 @@
*</pre>
*</blockquote>
*
+ * @param <T> the type to create
* @param listenerInterface the listener interface to create a proxy for
* @param target the object that will perform the action
* @param action the name of a (possibly qualified) property or method on
@@ -659,6 +661,7 @@
* </pre>
*</blockquote>
*
+ * @param <T> the type to create
* @param listenerInterface the listener interface to create a proxy for
* @param target the object that will perform the action
* @param action the name of a (possibly qualified) property or method on
--- a/jdk/src/share/classes/java/beans/Expression.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/Expression.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -139,7 +139,7 @@
* replaces this default value in the same way that any other value
* would, ensuring that expressions are never evaluated more than once.
* <p>
- * See the <code>excecute</code> method for details on how
+ * See the <code>execute</code> method for details on how
* methods are chosen using the dynamic types of the target
* and arguments.
*
@@ -147,6 +147,8 @@
* @see #setValue
*
* @return The result of applying this method to these arguments.
+ * @throws Exception if the method with the specified methodName
+ * throws an exception
*/
public Object getValue() throws Exception {
if (value == unbound) {
--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Mon Aug 12 09:29:06 2013 -0400
@@ -207,6 +207,8 @@
* Sets the method that should be used to read an indexed property value.
*
* @param readMethod The new indexed read method.
+ * @throws IntrospectionException if an exception occurs during
+ * introspection.
*/
public synchronized void setIndexedReadMethod(Method readMethod)
throws IntrospectionException {
@@ -285,6 +287,8 @@
* Sets the method that should be used to write an indexed property value.
*
* @param writeMethod The new indexed write method.
+ * @throws IntrospectionException if an exception occurs during
+ * introspection.
*/
public synchronized void setIndexedWriteMethod(Method writeMethod)
throws IntrospectionException {
--- a/jdk/src/share/classes/java/beans/Introspector.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/Introspector.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -93,8 +93,17 @@
public class Introspector {
// Flags that can be used to control getBeanInfo:
+ /**
+ * Flag to indicate to use of all beaninfo.
+ */
public final static int USE_ALL_BEANINFO = 1;
+ /**
+ * Flag to indicate to ignore immediate beaninfo.
+ */
public final static int IGNORE_IMMEDIATE_BEANINFO = 2;
+ /**
+ * Flag to indicate to ignore all beaninfo.
+ */
public final static int IGNORE_ALL_BEANINFO = 3;
// Static Caches to speed up introspection.
@@ -202,7 +211,7 @@
* If the BeanInfo class for a Java Bean has been previously Introspected
* based on the same arguments, then the BeanInfo class is retrieved
* from the BeanInfo cache.
- *
+ * @return the BeanInfo for the bean
* @param beanClass The bean class to be analyzed.
* @param stopClass The baseclass at which to stop the analysis. Any
* methods/properties/events in the stopClass or in its baseclasses
--- a/jdk/src/share/classes/java/beans/PersistenceDelegate.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/PersistenceDelegate.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -197,6 +197,7 @@
* The default implementation, calls the <code>initialize</code>
* method of the type's superclass.
*
+ * @param type the type of the instances
* @param oldInstance The instance to be copied.
* @param newInstance The instance that is to be modified.
* @param out The stream to which any initialization statements should be written.
--- a/jdk/src/share/classes/java/beans/PropertyChangeSupport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/PropertyChangeSupport.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -156,7 +156,7 @@
* <code>PropertyChangeListenerProxy</code>, perform the cast, and examine
* the parameter.
*
- * <pre>
+ * <pre>{@code
* PropertyChangeListener[] listeners = bean.getPropertyChangeListeners();
* for (int i = 0; i < listeners.length; i++) {
* if (listeners[i] instanceof PropertyChangeListenerProxy) {
@@ -168,7 +168,7 @@
* }
* }
* }
- *</pre>
+ * }</pre>
*
* @see PropertyChangeListenerProxy
* @return all of the <code>PropertyChangeListeners</code> added or an
--- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java Mon Aug 12 09:29:06 2013 -0400
@@ -243,6 +243,7 @@
* Sets the method that should be used to read the property value.
*
* @param readMethod The new read method.
+ * @throws IntrospectionException if the read method is invalid
*/
public synchronized void setReadMethod(Method readMethod)
throws IntrospectionException {
@@ -313,6 +314,7 @@
* Sets the method that should be used to write the property value.
*
* @param writeMethod The new write method.
+ * @throws IntrospectionException if the write method is invalid
*/
public synchronized void setWriteMethod(Method writeMethod)
throws IntrospectionException {
--- a/jdk/src/share/classes/java/beans/Transient.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/Transient.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -40,7 +40,7 @@
* A {@code true} value for the "transient" attribute
* indicates to encoders derived from {@link Encoder}
* that this feature should be ignored.
- * <p/>
+ * <p>
* The {@code Transient} annotation may be be used
* in any of the methods that are involved
* in a {@link FeatureDescriptor} subclass
@@ -49,7 +49,7 @@
* to put the annotation and it is this declaration
* that takes precedence in the case of multiple annotations
* being defined for the same feature.
- * <p/>
+ * <p>
* To declare a feature non-transient in a class
* whose superclass declares it transient,
* use {@code @Transient(false)}.
@@ -64,5 +64,11 @@
@Target({METHOD})
@Retention(RUNTIME)
public @interface Transient {
+ /**
+ * Returns whether or not the {@code Introspector} should
+ * construct artifacts for the annotated method.
+ * @return whether or not the {@code Introspector} should
+ * construct artifacts for the annotated method
+ */
boolean value() default true;
}
--- a/jdk/src/share/classes/java/beans/VetoableChangeSupport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/VetoableChangeSupport.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -42,7 +42,7 @@
* <p>
* Here is an example of {@code VetoableChangeSupport} usage that follows
* the rules and recommendations laid out in the JavaBeans™ specification:
- * <pre>
+ * <pre>{@code
* public class MyBean {
* private final VetoableChangeSupport vcs = new VetoableChangeSupport(this);
*
@@ -68,7 +68,7 @@
*
* [...]
* }
- * </pre>
+ * }</pre>
* <p>
* A {@code VetoableChangeSupport} instance is thread-safe.
* <p>
@@ -156,7 +156,7 @@
* <code>VetoableChangeListenerProxy</code>, perform the cast, and examine
* the parameter.
*
- * <pre>
+ * <pre>{@code
* VetoableChangeListener[] listeners = bean.getVetoableChangeListeners();
* for (int i = 0; i < listeners.length; i++) {
* if (listeners[i] instanceof VetoableChangeListenerProxy) {
@@ -168,7 +168,7 @@
* }
* }
* }
- *</pre>
+ * }</pre>
*
* @see VetoableChangeListenerProxy
* @return all of the <code>VetoableChangeListeners</code> added or an
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContext.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContext.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -64,10 +64,12 @@
* and is defined by the
* <code>java.beans.Beans.instantiate()</code> method.
*
+ * @return a javaBean named as a child of this
+ * <code>BeanContext</code>
* @param beanName The name of the JavaBean to instantiate
* as a child of this <code>BeanContext</code>
- * @throws <code>IOException</code>
- * @throws <code>ClassNotFoundException</code> if the class identified
+ * @throws IOException if an IO problem occurs
+ * @throws ClassNotFoundException if the class identified
* by the beanName parameter is not found
*/
Object instantiateChild(String beanName) throws IOException, ClassNotFoundException;
@@ -83,7 +85,7 @@
* @return an <code>InputStream</code> for reading the resource,
* or <code>null</code> if the resource could not
* be found.
- * @throws <code>IllegalArgumentException</code> if
+ * @throws IllegalArgumentException if
* the resource is not valid
*/
InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException;
@@ -98,7 +100,7 @@
* @param bcc the specified child
* @return a <code>URL</code> for the named
* resource for the specified child
- * @throws <code>IllegalArgumentException</code>
+ * @throws IllegalArgumentException
* if the resource is not valid
*/
URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException;
@@ -109,7 +111,7 @@
* this <code>BeanContext</code> whenever it adds
* or removes a child <code>Component</code>(s).
*
- * @param bcml the <code>BeanContextMembershipListener</code> to be added
+ * @param bcml the BeanContextMembershipListener to be added
*/
void addBeanContextMembershipListener(BeanContextMembershipListener bcml);
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextChild.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextChild.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -82,7 +82,7 @@
* </p>
* @param bc The <code>BeanContext</code> with which
* to associate this <code>BeanContextChild</code>.
- * @throws <code>PropertyVetoException</code> if the
+ * @throws PropertyVetoException if the
* addition of the specified <code>BeanContext</code> is refused.
*/
void setBeanContext(BeanContext bc) throws PropertyVetoException;
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextChildSupport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextChildSupport.java Mon Aug 12 09:29:06 2013 -0400
@@ -78,6 +78,7 @@
* construct a BeanContextChildSupport where the JavaBean component
* itself implements BeanContextChild, and encapsulates this, delegating
* that interface to this implementation
+ * @param bcc the underlying bean context child
*/
public BeanContextChildSupport(BeanContextChild bcc) {
@@ -94,7 +95,7 @@
* this <code>BeanContextChildSupport</code>.
* @param bc the new value to be assigned to the <code>BeanContext</code>
* property
- * @throws <code>PropertyVetoException</code> if the change is rejected
+ * @throws PropertyVetoException if the change is rejected
*/
public synchronized void setBeanContext(BeanContext bc) throws PropertyVetoException {
if (bc == beanContext) return;
@@ -361,6 +362,9 @@
*/
protected VetoableChangeSupport vcSupport;
+ /**
+ * The bean context.
+ */
protected transient BeanContext beanContext;
/**
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -103,6 +103,7 @@
* Is the child specified affected by the event?
* @return <code>true</code> if affected, <code>false</code>
* if not
+ * @param child the object to check for being affected
*/
public boolean contains(Object child) {
return children.contains(child);
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextServices.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextServices.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -60,6 +60,7 @@
* @param serviceClass the service to add
* @param serviceProvider the <code>BeanContextServiceProvider</code>
* associated with the service
+ * @return true if the service was successful added, false otherwise
*/
boolean addService(Class serviceClass, BeanContextServiceProvider serviceProvider);
@@ -108,7 +109,7 @@
* @param bcsrl the
* <code>BeanContextServiceRevokedListener</code> to notify
* if the service should later become revoked
- * @throws TooManyListenersException
+ * @throws TooManyListenersException if there are too many listeners
* @return a reference to this context's named
* Service as requested or <code>null</code>
*/
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextServicesSupport.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -603,12 +603,16 @@
serviceProvider = bcsp;
}
+ /**
+ * Returns the service provider.
+ * @return the service provider
+ */
protected BeanContextServiceProvider getServiceProvider() {
return serviceProvider;
}
- /*
- * fields
+ /**
+ * The service provider.
*/
protected BeanContextServiceProvider serviceProvider;
@@ -618,6 +622,9 @@
* subclasses can override this method to create new subclasses of
* BCSSServiceProvider without having to overrride addService() in
* order to instantiate.
+ * @param sc the class
+ * @param bcsp the service provider
+ * @return a service provider without overriding addService()
*/
protected BCSSServiceProvider createBCSSServiceProvider(Class sc, BeanContextServiceProvider bcsp) {
@@ -629,7 +636,7 @@
/**
* add a BeanContextServicesListener
*
- * @throws NullPointerException
+ * @throws NullPointerException if the argument is null
*/
public void addBeanContextServicesListener(BeanContextServicesListener bcsl) {
@@ -660,6 +667,8 @@
/**
* add a service
+ * @param serviceClass the service class
+ * @param bcsp the service provider
*/
public boolean addService(Class serviceClass, BeanContextServiceProvider bcsp) {
@@ -668,6 +677,10 @@
/**
* add a service
+ * @param serviceClass the service class
+ * @param bcsp the service provider
+ * @param fireEvent whether or not an event should be fired
+ * @return true if the service was successfully added
*/
protected boolean addService(Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) {
@@ -709,6 +722,9 @@
/**
* remove a service
+ * @param serviceClass the service class
+ * @param bcsp the service provider
+ * @param revokeCurrentServicesNow whether or not to revoke the service
*/
public void revokeService(Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) {
@@ -1067,6 +1083,7 @@
/**
* Fires a <tt>BeanContextServiceEvent</tt> notifying of a new service.
+ * @param serviceClass the service class
*/
protected final void fireServiceAdded(Class serviceClass) {
BeanContextServiceAvailableEvent bcssae = new BeanContextServiceAvailableEvent(getBeanContextServicesPeer(), serviceClass);
@@ -1109,6 +1126,8 @@
* Fires a <tt>BeanContextServiceRevokedEvent</tt>
* indicating that a particular service is
* no longer available.
+ * @param serviceClass the service class
+ * @param revokeNow whether or not the event should be revoked now
*/
protected final void fireServiceRevoked(Class serviceClass, boolean revokeNow) {
Object[] copy;
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -62,7 +62,6 @@
/**
* This helper class provides a utility implementation of the
* java.beans.beancontext.BeanContext interface.
- * </p>
* <p>
* Since this class directly implements the BeanContext interface, the class
* can, and is intended to be used either by subclassing this implementation,
@@ -351,9 +350,8 @@
* of Child without having to override add() or the other Collection
* methods that add children to the set.
* </p>
- *
* @param targetChild the child to create the Child on behalf of
- * @param peer the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy
+ * @param peer the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy * @return Subtype-specific subclass of Child without overriding collection methods
*/
protected BCSChild createBCSChild(Object targetChild, Object peer) {
@@ -492,6 +490,7 @@
* @param callChildSetBC used to indicate that
* the child should be notified that it is no
* longer nested in this <tt>BeanContext</tt>.
+ * @return whether or not was present before being removed
*/
protected boolean remove(Object targetChild, boolean callChildSetBC) {
@@ -580,7 +579,8 @@
/**
* add Collection to set of Children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException thrown unconditionally by this implementation
+ * @return this implementation unconditionally throws {@code UnsupportedOperationException}
*/
public boolean addAll(Collection c) {
throw new UnsupportedOperationException();
@@ -589,7 +589,9 @@
/**
* remove all specified children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException thrown unconditionally by this implementation
+ * @return this implementation unconditionally throws {@code UnsupportedOperationException}
+
*/
public boolean removeAll(Collection c) {
throw new UnsupportedOperationException();
@@ -599,7 +601,8 @@
/**
* retain only specified children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException thrown unconditionally by this implementation
+ * @return this implementation unconditionally throws {@code UnsupportedOperationException}
*/
public boolean retainAll(Collection c) {
throw new UnsupportedOperationException();
@@ -608,7 +611,7 @@
/**
* clear the children (Unsupported)
* implementations must synchronized on the hierarchy lock and "children" protected field
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException thrown unconditionally by this implementation
*/
public void clear() {
throw new UnsupportedOperationException();
@@ -618,7 +621,7 @@
* Adds a BeanContextMembershipListener
*
* @param bcml the BeanContextMembershipListener to add
- * @throws NullPointerException
+ * @throws NullPointerException if the argument is null
*/
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml) {
@@ -636,7 +639,7 @@
* Removes a BeanContextMembershipListener
*
* @param bcml the BeanContextMembershipListener to remove
- * @throws NullPointerException
+ * @throws NullPointerException if the argument is null
*/
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml) {
@@ -655,7 +658,7 @@
* @param bcc the child object making the request.
*
* @return the requested resource as an InputStream
- * @throws NullPointerException
+ * @throws NullPointerException if the argument is null
*/
public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
@@ -849,6 +852,8 @@
*
* This method should not however be used by subclasses to replace their
* own implementation (if any) of writeObject().
+ * @param oos the {@code ObjectOutputStream} to use during serialization
+ * @throws IOException if serialization failed
*/
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException {
@@ -864,6 +869,9 @@
*
* This method should not however be used by subclasses to replace their
* own implementation (if any) of readObject().
+ * @param ois the {@code ObjectInputStream} to use during deserialization
+ * @throws IOException if deserialization failed
+ * @throws ClassNotFoundException if needed classes are not found
*/
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException {
@@ -914,6 +922,8 @@
* used by readObject to deserialize a collection.
* @param ois the ObjectInputStream to use
* @param coll the Collection
+ * @throws IOException if deserialization failed
+ * @throws ClassNotFoundException if needed classes are not found
*/
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException {
int count = 0;
@@ -1005,6 +1015,9 @@
* When an instance of this class is used as a delegate for the
* implementation of the BeanContext protocols (and its subprotocols)
* there exists a 'chicken and egg' problem during deserialization
+ * @param ois the ObjectInputStream to use
+ * @throws IOException if deserialization failed
+ * @throws ClassNotFoundException if needed classes are not found
*/
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException {
@@ -1122,6 +1135,7 @@
* immediately prior to their being added to the BeanContext.
* </p>
*
+ * @param targetChild the child to create the Child on behalf of
* @return true iff the child may be added to this BeanContext, otherwise false.
*/
@@ -1136,6 +1150,7 @@
* immediately prior to their being removed from the BeanContext.
* </p>
*
+ * @param targetChild the child to create the Child on behalf of
* @return true iff the child may be removed from this BeanContext, otherwise false.
*/
@@ -1147,6 +1162,8 @@
* subclasses may override this method to simply extend add() semantics
* after the child has been added and before the event notification has
* occurred. The method is called with the child synchronized.
+ * @param child the child
+ * @param bcsc the BCSChild
*/
protected void childJustAddedHook(Object child, BCSChild bcsc) {
@@ -1156,6 +1173,8 @@
* subclasses may override this method to simply extend remove() semantics
* after the child has been removed and before the event notification has
* occurred. The method is called with the child synchronized.
+ * @param child the child
+ * @param bcsc the BCSChild
*/
protected void childJustRemovedHook(Object child, BCSChild bcsc) {
@@ -1254,6 +1273,7 @@
/**
* Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
+ * @param bcme the event to fire
*/
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme) {
@@ -1267,6 +1287,7 @@
/**
* Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
+ * @param bcme the event to fire
*/
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme) {
--- a/jdk/src/share/classes/java/net/Authenticator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/Authenticator.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -103,17 +103,17 @@
* Sets the authenticator that will be used by the networking code
* when a proxy or an HTTP server asks for authentication.
* <p>
- * First, if there is a security manager, its <code>checkPermission</code>
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * <code>NetPermission("setDefaultAuthenticator")</code> permission.
+ * {@code NetPermission("setDefaultAuthenticator")} permission.
* This may result in a java.lang.SecurityException.
*
- * @param a The authenticator to be set. If a is <code>null</code> then
+ * @param a The authenticator to be set. If a is {@code null} then
* any previously set authenticator is removed.
*
* @throws SecurityException
* if a security manager exists and its
- * <code>checkPermission</code> method doesn't allow
+ * {@code checkPermission} method doesn't allow
* setting the default authenticator.
*
* @see SecurityManager#checkPermission
@@ -134,9 +134,9 @@
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
- * First, if there is a security manager, its <code>checkPermission</code>
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * <code>NetPermission("requestPasswordAuthentication")</code> permission.
+ * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param addr The InetAddress of the site requesting authorization,
@@ -151,7 +151,7 @@
*
* @throws SecurityException
* if a security manager exists and its
- * <code>checkPermission</code> method doesn't allow
+ * {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
@@ -193,9 +193,9 @@
* because the hostname can be provided in cases where the InetAddress
* is not available.
* <p>
- * First, if there is a security manager, its <code>checkPermission</code>
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * <code>NetPermission("requestPasswordAuthentication")</code> permission.
+ * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
@@ -211,7 +211,7 @@
*
* @throws SecurityException
* if a security manager exists and its
- * <code>checkPermission</code> method doesn't allow
+ * {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
@@ -254,9 +254,9 @@
* Ask the authenticator that has been registered with the system
* for a password.
* <p>
- * First, if there is a security manager, its <code>checkPermission</code>
+ * First, if there is a security manager, its {@code checkPermission}
* method is called with a
- * <code>NetPermission("requestPasswordAuthentication")</code> permission.
+ * {@code NetPermission("requestPasswordAuthentication")} permission.
* This may result in a java.lang.SecurityException.
*
* @param host The hostname of the site requesting authentication.
@@ -275,7 +275,7 @@
*
* @throws SecurityException
* if a security manager exists and its
- * <code>checkPermission</code> method doesn't allow
+ * {@code checkPermission} method doesn't allow
* the password authentication request.
*
* @see SecurityManager#checkPermission
@@ -320,8 +320,8 @@
}
/**
- * Gets the <code>hostname</code> of the
- * site or proxy requesting authentication, or <code>null</code>
+ * Gets the {@code hostname} of the
+ * site or proxy requesting authentication, or {@code null}
* if not available.
*
* @return the hostname of the connection requiring authentication, or null
@@ -333,8 +333,8 @@
}
/**
- * Gets the <code>InetAddress</code> of the
- * site requesting authorization, or <code>null</code>
+ * Gets the {@code InetAddress} of the
+ * site requesting authorization, or {@code null}
* if not available.
*
* @return the InetAddress of the site requesting authorization, or null
@@ -346,7 +346,7 @@
/**
* Gets the port number for the requested connection.
- * @return an <code>int</code> indicating the
+ * @return an {@code int} indicating the
* port for the requested connection.
*/
protected final int getRequestingPort() {
--- a/jdk/src/share/classes/java/net/ContentHandler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/ContentHandler.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -28,21 +28,21 @@
import java.io.IOException;
/**
- * The abstract class <code>ContentHandler</code> is the superclass
- * of all classes that read an <code>Object</code> from a
- * <code>URLConnection</code>.
+ * The abstract class {@code ContentHandler} is the superclass
+ * of all classes that read an {@code Object} from a
+ * {@code URLConnection}.
* <p>
* An application does not generally call the
- * <code>getContent</code> method in this class directly. Instead, an
- * application calls the <code>getContent</code> method in class
- * <code>URL</code> or in <code>URLConnection</code>.
+ * {@code getContent} method in this class directly. Instead, an
+ * application calls the {@code getContent} method in class
+ * {@code URL} or in {@code URLConnection}.
* The application's content handler factory (an instance of a class that
- * implements the interface <code>ContentHandlerFactory</code> set
- * up by a call to <code>setContentHandler</code>) is
- * called with a <code>String</code> giving the MIME type of the
+ * implements the interface {@code ContentHandlerFactory} set
+ * up by a call to {@code setContentHandler}) is
+ * called with a {@code String} giving the MIME type of the
* object being received on the socket. The factory returns an
- * instance of a subclass of <code>ContentHandler</code>, and its
- * <code>getContent</code> method is called to create the object.
+ * instance of a subclass of {@code ContentHandler}, and its
+ * {@code getContent} method is called to create the object.
* <p>
* If no content handler could be found, URLConnection will
* look for a content handler in a user-defineable set of places.
@@ -75,7 +75,7 @@
* creates an object from it.
*
* @param urlc a URL connection.
- * @return the object read by the <code>ContentHandler</code>.
+ * @return the object read by the {@code ContentHandler}.
* @exception IOException if an I/O error occurs while reading the object.
*/
abstract public Object getContent(URLConnection urlc) throws IOException;
@@ -90,7 +90,7 @@
*
* @param urlc a URL connection.
* @param classes an array of types requested
- * @return the object read by the <code>ContentHandler</code> that is
+ * @return the object read by the {@code ContentHandler} that is
* the first match of the suggested types.
* null if none of the requested are supported.
* @exception IOException if an I/O error occurs while reading the object.
--- a/jdk/src/share/classes/java/net/ContentHandlerFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/ContentHandlerFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -28,10 +28,10 @@
/**
* This interface defines a factory for content handlers. An
* implementation of this interface should map a MIME type into an
- * instance of <code>ContentHandler</code>.
+ * instance of {@code ContentHandler}.
* <p>
- * This interface is used by the <code>URLStreamHandler</code> class
- * to create a <code>ContentHandler</code> for a MIME type.
+ * This interface is used by the {@code URLStreamHandler} class
+ * to create a {@code ContentHandler} for a MIME type.
*
* @author James Gosling
* @see java.net.ContentHandler
@@ -40,13 +40,13 @@
*/
public interface ContentHandlerFactory {
/**
- * Creates a new <code>ContentHandler</code> to read an object from
- * a <code>URLStreamHandler</code>.
+ * Creates a new {@code ContentHandler} to read an object from
+ * a {@code URLStreamHandler}.
*
* @param mimetype the MIME type for which a content handler is desired.
- * @return a new <code>ContentHandler</code> to read an object from a
- * <code>URLStreamHandler</code>.
+ * @return a new {@code ContentHandler} to read an object from a
+ * {@code URLStreamHandler}.
* @see java.net.ContentHandler
* @see java.net.URLStreamHandler
*/
--- a/jdk/src/share/classes/java/net/CookieHandler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/CookieHandler.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -66,7 +66,7 @@
* there is no system-wide cookie handler currently set.
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}<tt>("getCookieHandler")</tt>
+ * {@link NetPermission}{@code ("getCookieHandler")}
* @see #setDefault(CookieHandler)
*/
public synchronized static CookieHandler getDefault() {
@@ -83,10 +83,10 @@
* Note: non-standard http protocol handlers may ignore this setting.
*
* @param cHandler The HTTP cookie handler, or
- * <code>null</code> to unset.
+ * {@code null} to unset.
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}<tt>("setCookieHandler")</tt>
+ * {@link NetPermission}{@code ("setCookieHandler")}
* @see #getDefault()
*/
public synchronized static void setDefault(CookieHandler cHandler) {
@@ -114,7 +114,7 @@
* called after all request headers related to choosing cookies
* are added, and before the request is sent.</P>
*
- * @param uri a <code>URI</code> representing the intended use for the
+ * @param uri a {@code URI} representing the intended use for the
* cookies
* @param requestHeaders - a Map from request header
* field names to lists of field values representing
@@ -136,7 +136,7 @@
* fields that are named Set-Cookie2, present in the response
* headers into a cookie cache.
*
- * @param uri a <code>URI</code> where the cookies come from
+ * @param uri a {@code URI} where the cookies come from
* @param responseHeaders an immutable map from field names to
* lists of field values representing the response
* header fields returned
--- a/jdk/src/share/classes/java/net/CookieManager.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/CookieManager.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -131,7 +131,7 @@
*
* <p>This constructor will create new cookie manager with default
* cookie store and accept policy. The effect is same as
- * <tt>CookieManager(null, null)</tt>.
+ * {@code CookieManager(null, null)}.
*/
public CookieManager() {
this(null, null);
@@ -141,12 +141,12 @@
/**
* Create a new cookie manager with specified cookie store and cookie policy.
*
- * @param store a <tt>CookieStore</tt> to be used by cookie manager.
- * if <tt>null</tt>, cookie manager will use a default one,
+ * @param store a {@code CookieStore} to be used by cookie manager.
+ * if {@code null}, cookie manager will use a default one,
* which is an in-memory CookieStore implmentation.
- * @param cookiePolicy a <tt>CookiePolicy</tt> instance
+ * @param cookiePolicy a {@code CookiePolicy} instance
* to be used by cookie manager as policy callback.
- * if <tt>null</tt>, ACCEPT_ORIGINAL_SERVER will
+ * if {@code null}, ACCEPT_ORIGINAL_SERVER will
* be used.
*/
public CookieManager(CookieStore store,
@@ -170,11 +170,11 @@
/**
* To set the cookie policy of this cookie manager.
*
- * <p> A instance of <tt>CookieManager</tt> will have
+ * <p> A instance of {@code CookieManager} will have
* cookie policy ACCEPT_ORIGINAL_SERVER by default. Users always
* can call this method to set another cookie policy.
*
- * @param cookiePolicy the cookie policy. Can be <tt>null</tt>, which
+ * @param cookiePolicy the cookie policy. Can be {@code null}, which
* has no effects on current cookie policy.
*/
public void setCookiePolicy(CookiePolicy cookiePolicy) {
--- a/jdk/src/share/classes/java/net/CookiePolicy.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/CookiePolicy.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -71,8 +71,8 @@
*
* @param uri the URI to consult accept policy with
* @param cookie the HttpCookie object in question
- * @return <tt>true</tt> if this cookie should be accepted;
- * otherwise, <tt>false</tt>
+ * @return {@code true} if this cookie should be accepted;
+ * otherwise, {@code false}
*/
public boolean shouldAccept(URI uri, HttpCookie cookie);
}
--- a/jdk/src/share/classes/java/net/CookieStore.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/CookieStore.java Mon Aug 12 09:29:06 2013 -0400
@@ -32,8 +32,8 @@
* A CookieStore object represents a storage for cookie. Can store and retrieve
* cookies.
*
- * <p>{@link CookieManager} will call <tt>CookieStore.add</tt> to save cookies
- * for every incoming HTTP response, and call <tt>CookieStore.get</tt> to
+ * <p>{@link CookieManager} will call {@code CookieStore.add} to save cookies
+ * for every incoming HTTP response, and call {@code CookieStore.get} to
* retrieve cookie for every outgoing HTTP request. A CookieStore
* is responsible for removing HttpCookie instances which have expired.
*
@@ -55,11 +55,11 @@
* then it is replaced with the new one.
*
* @param uri the uri this cookie associated with.
- * if <tt>null</tt>, this cookie will not be associated
+ * if {@code null}, this cookie will not be associated
* with an URI
* @param cookie the cookie to store
*
- * @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
+ * @throws NullPointerException if {@code cookie} is {@code null}
*
* @see #get
*
@@ -77,7 +77,7 @@
*
* @param uri the uri associated with the cookies to be returned
*
- * @throws NullPointerException if <tt>uri</tt> is <tt>null</tt>
+ * @throws NullPointerException if {@code uri} is {@code null}
*
* @see #add
*
@@ -108,14 +108,14 @@
* Remove a cookie from store.
*
* @param uri the uri this cookie associated with.
- * if <tt>null</tt>, the cookie to be removed is not associated
- * with an URI when added; if not <tt>null</tt>, the cookie
+ * if {@code null}, the cookie to be removed is not associated
+ * with an URI when added; if not {@code null}, the cookie
* to be removed is associated with the given URI when added.
* @param cookie the cookie to remove
*
- * @return <tt>true</tt> if this store contained the specified cookie
+ * @return {@code true} if this store contained the specified cookie
*
- * @throws NullPointerException if <tt>cookie</tt> is <tt>null</tt>
+ * @throws NullPointerException if {@code cookie} is {@code null}
*/
public boolean remove(URI uri, HttpCookie cookie);
@@ -123,7 +123,7 @@
/**
* Remove all cookies in this cookie store.
*
- * @return <tt>true</tt> if this store changed as a result of the call
+ * @return {@code true} if this store changed as a result of the call
*/
public boolean removeAll();
}
--- a/jdk/src/share/classes/java/net/DatagramPacket.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/DatagramPacket.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -68,11 +68,11 @@
int port;
/**
- * Constructs a <code>DatagramPacket</code> for receiving packets of
- * length <code>length</code>, specifying an offset into the buffer.
+ * Constructs a {@code DatagramPacket} for receiving packets of
+ * length {@code length}, specifying an offset into the buffer.
* <p>
- * The <code>length</code> argument must be less than or equal to
- * <code>buf.length</code>.
+ * The {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param offset the offset for the buffer
@@ -87,11 +87,11 @@
}
/**
- * Constructs a <code>DatagramPacket</code> for receiving packets of
- * length <code>length</code>.
+ * Constructs a {@code DatagramPacket} for receiving packets of
+ * length {@code length}.
* <p>
- * The <code>length</code> argument must be less than or equal to
- * <code>buf.length</code>.
+ * The {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf buffer for holding the incoming datagram.
* @param length the number of bytes to read.
@@ -102,10 +102,10 @@
/**
* Constructs a datagram packet for sending packets of length
- * <code>length</code> with offset <code>ioffset</code>to the
+ * {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
- * <code>length</code> argument must be less than or equal to
- * <code>buf.length</code>.
+ * {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
@@ -125,10 +125,10 @@
/**
* Constructs a datagram packet for sending packets of length
- * <code>length</code> with offset <code>ioffset</code>to the
+ * {@code length} with offset {@code ioffset}to the
* specified port number on the specified host. The
- * <code>length</code> argument must be less than or equal to
- * <code>buf.length</code>.
+ * {@code length} argument must be less than or equal to
+ * {@code buf.length}.
*
* @param buf the packet data.
* @param offset the packet data offset.
@@ -147,9 +147,9 @@
/**
* Constructs a datagram packet for sending packets of length
- * <code>length</code> to the specified port number on the specified
- * host. The <code>length</code> argument must be less than or equal
- * to <code>buf.length</code>.
+ * {@code length} to the specified port number on the specified
+ * host. The {@code length} argument must be less than or equal
+ * to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
@@ -164,9 +164,9 @@
/**
* Constructs a datagram packet for sending packets of length
- * <code>length</code> to the specified port number on the specified
- * host. The <code>length</code> argument must be less than or equal
- * to <code>buf.length</code>.
+ * {@code length} to the specified port number on the specified
+ * host. The {@code length} argument must be less than or equal
+ * to {@code buf.length}.
*
* @param buf the packet data.
* @param length the packet length.
@@ -207,8 +207,8 @@
/**
* Returns the data buffer. The data received or the data to be sent
- * starts from the <code>offset</code> in the buffer,
- * and runs for <code>length</code> long.
+ * starts from the {@code offset} in the buffer,
+ * and runs for {@code length} long.
*
* @return the buffer used to receive or send data
* @see #setData(byte[], int, int)
@@ -277,7 +277,7 @@
/**
* Sets the IP address of the machine to which this datagram
* is being sent.
- * @param iaddr the <code>InetAddress</code>
+ * @param iaddr the {@code InetAddress}
* @since JDK1.1
* @see #getAddress()
*/
@@ -303,7 +303,7 @@
* Sets the SocketAddress (usually IP address + port number) of the remote
* host to which this datagram is being sent.
*
- * @param address the <code>SocketAddress</code>
+ * @param address the {@code SocketAddress}
* @throws IllegalArgumentException if address is null or is a
* SocketAddress subclass not supported by this socket
*
@@ -324,7 +324,7 @@
* Gets the SocketAddress (usually IP address + port number) of the remote
* host that this packet is being sent to or is coming from.
*
- * @return the <code>SocketAddress</code>
+ * @return the {@code SocketAddress}
* @since 1.4
* @see #setSocketAddress
*/
@@ -335,7 +335,7 @@
/**
* Set the data buffer for this packet. With the offset of
* this DatagramPacket set to 0, and the length set to
- * the length of <code>buf</code>.
+ * the length of {@code buf}.
*
* @param buf the buffer to set for this packet.
*
--- a/jdk/src/share/classes/java/net/DatagramSocket.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/DatagramSocket.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -47,14 +47,14 @@
* a DatagramSocket is bound to a more specific address.
* <p>
* Example:
- * <code>
+ * {@code
* DatagramSocket s = new DatagramSocket(null);
* s.bind(new InetSocketAddress(8888));
- * </code>
+ * }
* Which is equivalent to:
- * <code>
+ * {@code
* DatagramSocket s = new DatagramSocket(8888);
- * </code>
+ * }
* Both cases will create a DatagramSocket able to receive broadcasts on
* UDP port 8888.
*
@@ -161,14 +161,14 @@
* an IP address chosen by the kernel.
*
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
+ * its {@code checkListen} method is first called
* with 0 as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
*/
@@ -195,21 +195,21 @@
* Creates a datagram socket, bound to the specified local
* socket address.
* <p>
- * If, if the address is <code>null</code>, creates an unbound socket.
+ * If, if the address is {@code null}, creates an unbound socket.
* <p>
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
+ * its {@code checkListen} method is first called
* with the port from the socket address
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * @param bindaddr local socket address to bind, or <code>null</code>
+ * @param bindaddr local socket address to bind, or {@code null}
* for an unbound socket.
*
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
* @since 1.4
@@ -234,8 +234,8 @@
* an IP address chosen by the kernel.
*
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
- * with the <code>port</code> argument
+ * its {@code checkListen} method is first called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -243,7 +243,7 @@
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
*/
@@ -259,8 +259,8 @@
* an IP address chosen by the kernel.
*
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
- * with the <code>port</code> argument
+ * its {@code checkListen} method is first called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -270,7 +270,7 @@
* @exception SocketException if the socket could not be opened,
* or the socket could not bind to the specified local port.
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
*
* @see SecurityManager#checkListen
* @since JDK1.1
@@ -319,10 +319,10 @@
}
/**
- * Get the <code>DatagramSocketImpl</code> attached to this socket,
+ * Get the {@code DatagramSocketImpl} attached to this socket,
* creating it if necessary.
*
- * @return the <code>DatagramSocketImpl</code> attached to that
+ * @return the {@code DatagramSocketImpl} attached to that
* DatagramSocket
* @throws SocketException if creation fails.
* @since 1.4
@@ -336,14 +336,14 @@
/**
* Binds this DatagramSocket to a specific address and port.
* <p>
- * If the address is <code>null</code>, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*<p>
* @param addr The address and port to bind to.
* @throws SocketException if any error happens during the bind, or if the
* socket is already bound.
* @throws SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if addr is a SocketAddress subclass
* not supported by this socket.
* @since 1.4
@@ -496,7 +496,7 @@
* Returns the binding state of the socket.
* <p>
* If the socket was bound prior to being {@link #close closed},
- * then this method will continue to return <code>true</code>
+ * then this method will continue to return {@code true}
* after the socket is closed.
*
* @return true if the socket successfully bound to an address
@@ -510,7 +510,7 @@
* Returns the connection state of the socket.
* <p>
* If the socket was connected prior to being {@link #close closed},
- * then this method will continue to return <code>true</code>
+ * then this method will continue to return {@code true}
* after the socket is closed.
*
* @return true if the socket successfully connected to a server
@@ -522,7 +522,7 @@
/**
* Returns the address to which this socket is connected. Returns
- * <code>null</code> if the socket is not connected.
+ * {@code null} if the socket is not connected.
* <p>
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected address
@@ -536,7 +536,7 @@
/**
* Returns the port number to which this socket is connected.
- * Returns <code>-1</code> if the socket is not connected.
+ * Returns {@code -1} if the socket is not connected.
* <p>
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected port number
@@ -550,14 +550,14 @@
/**
* Returns the address of the endpoint this socket is connected to, or
- * <code>null</code> if it is unconnected.
+ * {@code null} if it is unconnected.
* <p>
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected address
* after the socket is closed.
*
- * @return a <code>SocketAddress</code> representing the remote
- * endpoint of this socket, or <code>null</code> if it is
+ * @return a {@code SocketAddress} representing the remote
+ * endpoint of this socket, or {@code null} if it is
* not connected yet.
* @see #getInetAddress()
* @see #getPort()
@@ -573,8 +573,8 @@
/**
* Returns the address of the endpoint this socket is bound to.
*
- * @return a <code>SocketAddress</code> representing the local endpoint of this
- * socket, or <code>null</code> if it is closed or not bound yet.
+ * @return a {@code SocketAddress} representing the local endpoint of this
+ * socket, or {@code null} if it is closed or not bound yet.
* @see #getLocalAddress()
* @see #getLocalPort()
* @see #bind(SocketAddress)
@@ -591,28 +591,28 @@
/**
* Sends a datagram packet from this socket. The
- * <code>DatagramPacket</code> includes information indicating the
+ * {@code DatagramPacket} includes information indicating the
* data to be sent, its length, the IP address of the remote host,
* and the port number on the remote host.
*
* <p>If there is a security manager, and the socket is not currently
* connected to a remote address, this method first performs some
- * security checks. First, if <code>p.getAddress().isMulticastAddress()</code>
+ * security checks. First, if {@code p.getAddress().isMulticastAddress()}
* is true, this method calls the
- * security manager's <code>checkMulticast</code> method
- * with <code>p.getAddress()</code> as its argument.
+ * security manager's {@code checkMulticast} method
+ * with {@code p.getAddress()} as its argument.
* If the evaluation of that expression is false,
* this method instead calls the security manager's
- * <code>checkConnect</code> method with arguments
- * <code>p.getAddress().getHostAddress()</code> and
- * <code>p.getPort()</code>. Each call to a security manager method
+ * {@code checkConnect} method with arguments
+ * {@code p.getAddress().getHostAddress()} and
+ * {@code p.getPort()}. Each call to a security manager method
* could result in a SecurityException if the operation is not allowed.
*
- * @param p the <code>DatagramPacket</code> to be sent.
+ * @param p the {@code DatagramPacket} to be sent.
*
* @exception IOException if an I/O error occurs.
* @exception SecurityException if a security manager exists and its
- * <code>checkMulticast</code> or <code>checkConnect</code>
+ * {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
* @exception PortUnreachableException may be thrown if the socket is connected
* to a currently unreachable destination. Note, there is no
@@ -674,20 +674,20 @@
/**
* Receives a datagram packet from this socket. When this method
- * returns, the <code>DatagramPacket</code>'s buffer is filled with
+ * returns, the {@code DatagramPacket}'s buffer is filled with
* the data received. The datagram packet also contains the sender's
* IP address, and the port number on the sender's machine.
* <p>
* This method blocks until a datagram is received. The
- * <code>length</code> field of the datagram packet object contains
+ * {@code length} field of the datagram packet object contains
* the length of the received message. If the message is longer than
* the packet's length, the message is truncated.
* <p>
* If there is a security manager, a packet cannot be received if the
- * security manager's <code>checkAccept</code> method
+ * security manager's {@code checkAccept} method
* does not allow it.
*
- * @param p the <code>DatagramPacket</code> into which to place
+ * @param p the {@code DatagramPacket} into which to place
* the incoming data.
* @exception IOException if an I/O error occurs.
* @exception SocketTimeoutException if setSoTimeout was previously called
@@ -786,17 +786,17 @@
* Gets the local address to which the socket is bound.
*
* <p>If there is a security manager, its
- * <code>checkConnect</code> method is first called
- * with the host address and <code>-1</code>
+ * {@code checkConnect} method is first called
+ * with the host address and {@code -1}
* as its arguments to see if the operation is allowed.
*
* @see SecurityManager#checkConnect
* @return the local address to which the socket is bound,
- * <code>null</code> if the socket is closed, or
- * an <code>InetAddress</code> representing
+ * {@code null} if the socket is closed, or
+ * an {@code InetAddress} representing
* {@link InetAddress#isAnyLocalAddress wildcard}
* address if either the socket is not bound, or
- * the security manager <code>checkConnect</code>
+ * the security manager {@code checkConnect}
* method does not allow the operation
* @since 1.1
*/
@@ -824,8 +824,8 @@
* is bound.
*
* @return the port number on the local host to which this socket is bound,
- <code>-1</code> if the socket is closed, or
- <code>0</code> if it is not bound yet.
+ {@code -1} if the socket is closed, or
+ {@code 0} if it is not bound yet.
*/
public int getLocalPort() {
if (isClosed())
@@ -883,7 +883,7 @@
/**
* Sets the SO_SNDBUF option to the specified value for this
- * <tt>DatagramSocket</tt>. The SO_SNDBUF option is used by the
+ * {@code DatagramSocket}. The SO_SNDBUF option is used by the
* network implementation as a hint to size the underlying
* network I/O buffers. The SO_SNDBUF setting may also be used
* by the network implementation to determine the maximum size
@@ -897,7 +897,7 @@
* is high.
* <p>
* Note: If {@link #send(DatagramPacket)} is used to send a
- * <code>DatagramPacket</code> that is larger than the setting
+ * {@code DatagramPacket} that is larger than the setting
* of SO_SNDBUF then it is implementation specific if the
* packet is sent or discarded.
*
@@ -921,10 +921,10 @@
}
/**
- * Get value of the SO_SNDBUF option for this <tt>DatagramSocket</tt>, that is the
- * buffer size used by the platform for output on this <tt>DatagramSocket</tt>.
+ * Get value of the SO_SNDBUF option for this {@code DatagramSocket}, that is the
+ * buffer size used by the platform for output on this {@code DatagramSocket}.
*
- * @return the value of the SO_SNDBUF option for this <tt>DatagramSocket</tt>
+ * @return the value of the SO_SNDBUF option for this {@code DatagramSocket}
* @exception SocketException if there is an error in
* the underlying protocol, such as an UDP error.
* @see #setSendBufferSize
@@ -942,7 +942,7 @@
/**
* Sets the SO_RCVBUF option to the specified value for this
- * <tt>DatagramSocket</tt>. The SO_RCVBUF option is used by the
+ * {@code DatagramSocket}. The SO_RCVBUF option is used by the
* the network implementation as a hint to size the underlying
* network I/O buffers. The SO_RCVBUF setting may also be used
* by the network implementation to determine the maximum size
@@ -979,10 +979,10 @@
}
/**
- * Get value of the SO_RCVBUF option for this <tt>DatagramSocket</tt>, that is the
- * buffer size used by the platform for input on this <tt>DatagramSocket</tt>.
+ * Get value of the SO_RCVBUF option for this {@code DatagramSocket}, that is the
+ * buffer size used by the platform for input on this {@code DatagramSocket}.
*
- * @return the value of the SO_RCVBUF option for this <tt>DatagramSocket</tt>
+ * @return the value of the SO_RCVBUF option for this {@code DatagramSocket}
* @exception SocketException if there is an error in the underlying protocol, such as an UDP error.
* @see #setReceiveBufferSize(int)
*/
@@ -1005,26 +1005,26 @@
* socket to the same socket address. This is typically for the
* purpose of receiving multicast packets
* (See {@link java.net.MulticastSocket}). The
- * <tt>SO_REUSEADDR</tt> socket option allows multiple
+ * {@code SO_REUSEADDR} socket option allows multiple
* sockets to be bound to the same socket address if the
- * <tt>SO_REUSEADDR</tt> socket option is enabled prior
+ * {@code SO_REUSEADDR} socket option is enabled prior
* to binding the socket using {@link #bind(SocketAddress)}.
* <p>
* Note: This functionality is not supported by all existing platforms,
* so it is implementation specific whether this option will be ignored
* or not. However, if it is not supported then
- * {@link #getReuseAddress()} will always return <code>false</code>.
+ * {@link #getReuseAddress()} will always return {@code false}.
* <p>
- * When a <tt>DatagramSocket</tt> is created the initial setting
- * of <tt>SO_REUSEADDR</tt> is disabled.
+ * When a {@code DatagramSocket} is created the initial setting
+ * of {@code SO_REUSEADDR} is disabled.
* <p>
- * The behaviour when <tt>SO_REUSEADDR</tt> is enabled or
+ * The behaviour when {@code SO_REUSEADDR} is enabled or
* disabled after a socket is bound (See {@link #isBound()})
* is not defined.
*
* @param on whether to enable or disable the
* @exception SocketException if an error occurs enabling or
- * disabling the <tt>SO_RESUEADDR</tt> socket option,
+ * disabling the {@code SO_RESUEADDR} socket option,
* or the socket is closed.
* @since 1.4
* @see #getReuseAddress()
@@ -1045,7 +1045,7 @@
/**
* Tests if SO_REUSEADDR is enabled.
*
- * @return a <code>boolean</code> indicating whether or not SO_REUSEADDR is enabled.
+ * @return a {@code boolean} indicating whether or not SO_REUSEADDR is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
@@ -1083,7 +1083,7 @@
/**
* Tests if SO_BROADCAST is enabled.
- * @return a <code>boolean</code> indicating whether or not SO_BROADCAST is enabled.
+ * @return a {@code boolean} indicating whether or not SO_BROADCAST is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as an UDP error.
* @since 1.4
@@ -1105,7 +1105,7 @@
* 255} or an IllegalArgumentException will be thrown.
* <p>Notes:
* <p>For Internet Protocol v4 the value consists of an
- * <code>integer</code>, the least significant 8 bits of which
+ * {@code integer}, the least significant 8 bits of which
* represent the value of the TOS octet in IP packets sent by
* the socket.
* RFC 1349 defines the TOS values as follows:
@@ -1123,10 +1123,10 @@
* SocketException indicating that the operation is not
* permitted.
* <p>
- * for Internet Protocol v6 <code>tc</code> is the value that
+ * for Internet Protocol v6 {@code tc} is the value that
* would be placed into the sin6_flowinfo field of the IP header.
*
- * @param tc an <code>int</code> value for the bitset.
+ * @param tc an {@code int} value for the bitset.
* @throws SocketException if there is an error setting the
* traffic class or type-of-service
* @since 1.4
@@ -1205,7 +1205,7 @@
* DatagramChannel.open} method.
*
* @return the datagram channel associated with this datagram socket,
- * or <tt>null</tt> if this socket was not created for a channel
+ * or {@code null} if this socket was not created for a channel
*
* @since 1.4
* @spec JSR-51
@@ -1224,14 +1224,14 @@
* application. The factory can be specified only once.
* <p>
* When an application creates a new datagram socket, the socket
- * implementation factory's <code>createDatagramSocketImpl</code> method is
+ * implementation factory's {@code createDatagramSocketImpl} method is
* called to create the actual datagram socket implementation.
* <p>
- * Passing <code>null</code> to the method is a no-op unless the factory
+ * Passing {@code null} to the method is a no-op unless the factory
* was already set.
*
* <p>If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -1240,7 +1240,7 @@
* datagram socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't allow the
+ * {@code checkSetFactory} method doesn't allow the
operation.
* @see
java.net.DatagramSocketImplFactory#createDatagramSocketImpl()
--- a/jdk/src/share/classes/java/net/DatagramSocketImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/DatagramSocketImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -101,7 +101,7 @@
protected void disconnect() {}
/**
- * Peek at the packet to see who it is from. Updates the specified <code>InetAddress</code>
+ * Peek at the packet to see who it is from. Updates the specified {@code InetAddress}
* to the address which the packet came from.
* @param i an InetAddress object
* @return the port number which the packet came from.
@@ -114,7 +114,7 @@
/**
* Peek at the packet to see who it is from. The data is copied into the specified
- * <code>DatagramPacket</code>. The data is returned,
+ * {@code DatagramPacket}. The data is returned,
* but not consumed, so that a subsequent peekData/receive operation
* will see the same data.
* @param p the Packet Received.
@@ -163,7 +163,7 @@
/**
* Set the TTL (time-to-live) option.
- * @param ttl an <tt>int</tt> specifying the time-to-live value
+ * @param ttl an {@code int} specifying the time-to-live value
* @exception IOException if an I/O exception occurs
* while setting the time-to-live option.
* @see #getTimeToLive()
@@ -174,7 +174,7 @@
* Retrieve the TTL (time-to-live) option.
* @exception IOException if an I/O exception occurs
* while retrieving the time-to-live option
- * @return an <tt>int</tt> representing the time-to-live value
+ * @return an {@code int} representing the time-to-live value
* @see #setTimeToLive(int)
*/
protected abstract int getTimeToLive() throws IOException;
@@ -227,7 +227,7 @@
/**
* Gets the local port.
- * @return an <tt>int</tt> representing the local port value
+ * @return an {@code int} representing the local port value
*/
protected int getLocalPort() {
return localPort;
@@ -235,7 +235,7 @@
/**
* Gets the datagram socket file descriptor.
- * @return a <tt>FileDescriptor</tt> object representing the datagram socket
+ * @return a {@code FileDescriptor} object representing the datagram socket
* file descriptor
*/
protected FileDescriptor getFileDescriptor() {
--- a/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/DatagramSocketImplFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -27,7 +27,7 @@
/**
* This interface defines a factory for datagram socket implementations. It
- * is used by the classes <code>DatagramSocket</code> to create actual socket
+ * is used by the classes {@code DatagramSocket} to create actual socket
* implementations.
*
* @author Yingxian Wang
@@ -37,9 +37,9 @@
public
interface DatagramSocketImplFactory {
/**
- * Creates a new <code>DatagramSocketImpl</code> instance.
+ * Creates a new {@code DatagramSocketImpl} instance.
*
- * @return a new instance of <code>DatagramSocketImpl</code>.
+ * @return a new instance of {@code DatagramSocketImpl}.
* @see java.net.DatagramSocketImpl
*/
DatagramSocketImpl createDatagramSocketImpl();
--- a/jdk/src/share/classes/java/net/FileNameMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/FileNameMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -37,7 +37,7 @@
/**
* Gets the MIME type for the specified file name.
* @param fileName the specified file name
- * @return a <code>String</code> indicating the MIME
+ * @return a {@code String} indicating the MIME
* type for the specified file name.
*/
public String getContentTypeFor(String fileName);
--- a/jdk/src/share/classes/java/net/HttpCookie.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/HttpCookie.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -470,7 +470,7 @@
* protocol.
*
* @return {@code false} if the cookie can be sent over any standard
- * protocol; otherwise, <code>true</code>
+ * protocol; otherwise, {@code true}
*
* @see #setSecure
*/
--- a/jdk/src/share/classes/java/net/HttpRetryException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/HttpRetryException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -43,7 +43,7 @@
private String location;
/**
- * Constructs a new <code>HttpRetryException</code> from the
+ * Constructs a new {@code HttpRetryException} from the
* specified response code and exception detail message
*
* @param detail the detail message.
@@ -55,7 +55,7 @@
}
/**
- * Constructs a new <code>HttpRetryException</code> with detail message
+ * Constructs a new {@code HttpRetryException} with detail message
* responseCode and the contents of the Location response header field.
*
* @param detail the detail message.
--- a/jdk/src/share/classes/java/net/HttpURLConnection.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/HttpURLConnection.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -76,14 +76,14 @@
/**
* The chunk-length when using chunked encoding streaming mode for output.
- * A value of <code>-1</code> means chunked encoding is disabled for output.
+ * A value of {@code -1} means chunked encoding is disabled for output.
* @since 1.5
*/
protected int chunkLength = -1;
/**
* The fixed content-length when using fixed-length streaming mode.
- * A value of <code>-1</code> means fixed-length streaming mode is disabled
+ * A value of {@code -1} means fixed-length streaming mode is disabled
* for output.
*
* <P> <B>NOTE:</B> {@link #fixedContentLengthLong} is recommended instead
@@ -103,15 +103,15 @@
protected long fixedContentLengthLong = -1;
/**
- * Returns the key for the <code>n</code><sup>th</sup> header field.
- * Some implementations may treat the <code>0</code><sup>th</sup>
+ * Returns the key for the {@code n}<sup>th</sup> header field.
+ * Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
- * line, but <code>getHeaderFieldKey(0)</code> returns null.
+ * line, but {@code getHeaderFieldKey(0)} returns null.
*
* @param n an index, where {@code n >=0}.
- * @return the key for the <code>n</code><sup>th</sup> header field,
- * or <code>null</code> if the key does not exist.
+ * @return the key for the {@code n}<sup>th</sup> header field,
+ * or {@code null} if the key does not exist.
*/
public String getHeaderFieldKey (int n) {
return null;
@@ -251,8 +251,8 @@
}
/**
- * Returns the value for the <code>n</code><sup>th</sup> header field.
- * Some implementations may treat the <code>0</code><sup>th</sup>
+ * Returns the value for the {@code n}<sup>th</sup> header field.
+ * Some implementations may treat the {@code 0}<sup>th</sup>
* header field as special, i.e. as the status line returned by the HTTP
* server.
* <p>
@@ -261,8 +261,8 @@
* the headers in the message.
*
* @param n an index, where {@code n>=0}.
- * @return the value of the <code>n</code><sup>th</sup> header field,
- * or <code>null</code> if the value does not exist.
+ * @return the value of the {@code n}<sup>th</sup> header field,
+ * or {@code null} if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
@@ -270,7 +270,7 @@
}
/**
- * An <code>int</code> representing the three digit HTTP Status-Code.
+ * An {@code int} representing the three digit HTTP Status-Code.
* <ul>
* <li> 1xx: Informational
* <li> 2xx: Success
@@ -292,12 +292,12 @@
private static boolean followRedirects = true;
/**
- * If <code>true</code>, the protocol will automatically follow redirects.
- * If <code>false</code>, the protocol will not automatically follow
+ * If {@code true}, the protocol will automatically follow redirects.
+ * If {@code false}, the protocol will not automatically follow
* redirects.
* <p>
- * This field is set by the <code>setInstanceFollowRedirects</code>
- * method. Its value is returned by the <code>getInstanceFollowRedirects</code>
+ * This field is set by the {@code setInstanceFollowRedirects}
+ * method. Its value is returned by the {@code getInstanceFollowRedirects}
* method.
* <p>
* Its default value is based on the value of the static followRedirects
@@ -328,14 +328,14 @@
* cannot change this variable.
* <p>
* If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * @param set a <code>boolean</code> indicating whether or not
+ * @param set a {@code boolean} indicating whether or not
* to follow HTTP redirects.
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't
+ * {@code checkSetFactory} method doesn't
* allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFollowRedirects()
@@ -350,12 +350,12 @@
}
/**
- * Returns a <code>boolean</code> indicating
+ * Returns a {@code boolean} indicating
* whether or not HTTP redirects (3xx) should
* be automatically followed.
*
- * @return <code>true</code> if HTTP redirects should
- * be automatically followed, <tt>false</tt> if not.
+ * @return {@code true} if HTTP redirects should
+ * be automatically followed, {@code false} if not.
* @see #setFollowRedirects(boolean)
*/
public static boolean getFollowRedirects() {
@@ -364,13 +364,13 @@
/**
* Sets whether HTTP redirects (requests with response code 3xx) should
- * be automatically followed by this <code>HttpURLConnection</code>
+ * be automatically followed by this {@code HttpURLConnection}
* instance.
* <p>
* The default value comes from followRedirects, which defaults to
* true.
*
- * @param followRedirects a <code>boolean</code> indicating
+ * @param followRedirects a {@code boolean} indicating
* whether or not to follow HTTP redirects.
*
* @see java.net.HttpURLConnection#instanceFollowRedirects
@@ -382,11 +382,11 @@
}
/**
- * Returns the value of this <code>HttpURLConnection</code>'s
- * <code>instanceFollowRedirects</code> field.
+ * Returns the value of this {@code HttpURLConnection}'s
+ * {@code instanceFollowRedirects} field.
*
- * @return the value of this <code>HttpURLConnection</code>'s
- * <code>instanceFollowRedirects</code> field.
+ * @return the value of this {@code HttpURLConnection}'s
+ * {@code instanceFollowRedirects} field.
* @see java.net.HttpURLConnection#instanceFollowRedirects
* @see #setInstanceFollowRedirects(boolean)
* @since 1.3
@@ -540,7 +540,7 @@
* Returns null if none could be discerned from the responses
* (the result was not valid HTTP).
* @throws IOException if an error occurred connecting to the server.
- * @return the HTTP response message, or <code>null</code>
+ * @return the HTTP response message, or {@code null}
*/
public String getResponseMessage() throws IOException {
getResponseCode();
@@ -583,7 +583,7 @@
* @exception IOException if an error occurs while computing
* the permission.
*
- * @return a <code>SocketPermission</code> object representing the
+ * @return a {@code SocketPermission} object representing the
* permission necessary to connect to the destination
* host and port.
*/
--- a/jdk/src/share/classes/java/net/IDN.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/IDN.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -104,7 +104,7 @@
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
- * @return the translated <tt>String</tt>
+ * @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
@@ -130,13 +130,13 @@
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
- * <blockquote><tt>
+ * <blockquote>
* {@link #toASCII(String, int) toASCII}(input, 0);
- * </tt></blockquote>
+ * </blockquote>
*
* @param input the string to be processed
*
- * @return the translated <tt>String</tt>
+ * @return the translated {@code String}
*
* @throws IllegalArgumentException if the input string doesn't conform to RFC 3490 specification
*/
@@ -161,7 +161,7 @@
* @param input the string to be processed
* @param flag process flag; can be 0 or any logical OR of possible flags
*
- * @return the translated <tt>String</tt>
+ * @return the translated {@code String}
*/
public static String toUnicode(String input, int flag) {
int p = 0, q = 0;
@@ -184,13 +184,13 @@
*
* <p> This convenience method works as if by invoking the
* two-argument counterpart as follows:
- * <blockquote><tt>
+ * <blockquote>
* {@link #toUnicode(String, int) toUnicode}(input, 0);
- * </tt></blockquote>
+ * </blockquote>
*
* @param input the string to be processed
*
- * @return the translated <tt>String</tt>
+ * @return the translated {@code String}
*/
public static String toUnicode(String input) {
return toUnicode(input, 0);
--- a/jdk/src/share/classes/java/net/Inet4Address.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/Inet4Address.java Mon Aug 12 09:29:06 2013 -0400
@@ -42,10 +42,10 @@
* takes one of the following forms:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>d.d.d.d</tt></td></tr>
- * <tr><td><tt>d.d.d</tt></td></tr>
- * <tr><td><tt>d.d</tt></td></tr>
- * <tr><td><tt>d</tt></td></tr>
+ * <tr><td>{@code d.d.d.d}</td></tr>
+ * <tr><td>{@code d.d.d}</td></tr>
+ * <tr><td>{@code d.d}</td></tr>
+ * <tr><td>{@code d}</td></tr>
* </table></blockquote>
*
* <p> When four parts are specified, each is interpreted as a byte of
@@ -153,7 +153,7 @@
* Utility routine to check if the InetAddress is an
* IP multicast address. IP multicast address is a Class D
* address i.e first four bits of the address are 1110.
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
@@ -163,7 +163,7 @@
/**
* Utility routine to check if the InetAddress in a wildcard address.
- * @return a <code>boolean</code> indicating if the Inetaddress is
+ * @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
@@ -174,7 +174,7 @@
/**
* Utility routine to check if the InetAddress is a loopback address.
*
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
@@ -187,7 +187,7 @@
/**
* Utility routine to check if the InetAddress is an link local address.
*
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
@@ -204,7 +204,7 @@
/**
* Utility routine to check if the InetAddress is a site local address.
*
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
@@ -224,7 +224,7 @@
/**
* Utility routine to check if the multicast address has global scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
@@ -240,7 +240,7 @@
/**
* Utility routine to check if the multicast address has node scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
@@ -253,7 +253,7 @@
/**
* Utility routine to check if the multicast address has link scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
@@ -269,7 +269,7 @@
/**
* Utility routine to check if the multicast address has site scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
@@ -284,7 +284,7 @@
/**
* Utility routine to check if the multicast address has organization scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
@@ -299,9 +299,9 @@
}
/**
- * Returns the raw IP address of this <code>InetAddress</code>
+ * Returns the raw IP address of this {@code InetAddress}
* object. The result is in network byte order: the highest order
- * byte of the address is in <code>getAddress()[0]</code>.
+ * byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
@@ -337,18 +337,18 @@
/**
* Compares this object against the specified object.
- * The result is <code>true</code> if and only if the argument is
- * not <code>null</code> and it represents the same IP address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same IP address as
* this object.
* <p>
- * Two instances of <code>InetAddress</code> represent the same IP
+ * Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
- * <code>getAddress</code> is the same for both, and each of the
+ * {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
--- a/jdk/src/share/classes/java/net/Inet6Address.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/Inet6Address.java Mon Aug 12 09:29:06 2013 -0400
@@ -47,7 +47,7 @@
* address. This is the full form. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>1080:0:0:0:8:800:200C:417A</tt><td></tr>
+ * <tr><td>{@code 1080:0:0:0:8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <p> Note that it is not necessary to write the leading zeros in
@@ -64,7 +64,7 @@
* zeros in an address. For example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>1080::8:800:200C:417A</tt><td></tr>
+ * <tr><td>{@code 1080::8:800:200C:417A}<td></tr>
* </table></blockquote>
*
* <li><p> An alternative form that is sometimes more convenient
@@ -75,8 +75,8 @@
* standard IPv4 representation address, for example,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>::FFFF:129.144.52.38</tt><td></tr>
- * <tr><td><tt>::129.144.52.38</tt><td></tr>
+ * <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
+ * <tr><td>{@code ::129.144.52.38}<td></tr>
* </table></blockquote>
*
* <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
@@ -85,23 +85,23 @@
* in the "d.d.d.d" form. The following forms are invalid:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>::FFFF:d.d.d</tt><td></tr>
- * <tr><td><tt>::FFFF:d.d</tt><td></tr>
- * <tr><td><tt>::d.d.d</tt><td></tr>
- * <tr><td><tt>::d.d</tt><td></tr>
+ * <tr><td>{@code ::FFFF:d.d.d}<td></tr>
+ * <tr><td>{@code ::FFFF:d.d}<td></tr>
+ * <tr><td>{@code ::d.d.d}<td></tr>
+ * <tr><td>{@code ::d.d}<td></tr>
* </table></blockquote>
*
* <p> The following form:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>::FFFF:d</tt><td></tr>
+ * <tr><td>{@code ::FFFF:d}<td></tr>
* </table></blockquote>
*
* <p> is valid, however it is an unconventional representation of
* the IPv4-compatible IPv6 address,
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>::255.255.0.d</tt><td></tr>
+ * <tr><td>{@code ::255.255.0.d}<td></tr>
* </table></blockquote>
*
* <p> while "::d" corresponds to the general IPv6 address
@@ -258,7 +258,7 @@
* Create an Inet6Address in the exact manner of {@link
* InetAddress#getByAddress(String,byte[])} except that the IPv6 scope_id is
* set to the value corresponding to the given interface for the address
- * type specified in <code>addr</code>. The call will fail with an
+ * type specified in {@code addr}. The call will fail with an
* UnknownHostException if the given interface does not have a numeric
* scope_id assigned for the given address type (eg. link-local or site-local).
* See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
--- a/jdk/src/share/classes/java/net/InetAddress.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/InetAddress.java Mon Aug 12 09:29:06 2013 -0400
@@ -296,7 +296,7 @@
/**
* Utility routine to check if the InetAddress is an
* IP multicast address.
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* an IP multicast address
* @since JDK1.1
*/
@@ -306,7 +306,7 @@
/**
* Utility routine to check if the InetAddress in a wildcard address.
- * @return a <code>boolean</code> indicating if the Inetaddress is
+ * @return a {@code boolean} indicating if the Inetaddress is
* a wildcard address.
* @since 1.4
*/
@@ -317,7 +317,7 @@
/**
* Utility routine to check if the InetAddress is a loopback address.
*
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a loopback address; or false otherwise.
* @since 1.4
*/
@@ -328,7 +328,7 @@
/**
* Utility routine to check if the InetAddress is an link local address.
*
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a link local address; or false if address is not a link local unicast address.
* @since 1.4
*/
@@ -339,7 +339,7 @@
/**
* Utility routine to check if the InetAddress is a site local address.
*
- * @return a <code>boolean</code> indicating if the InetAddress is
+ * @return a {@code boolean} indicating if the InetAddress is
* a site local address; or false if address is not a site local unicast address.
* @since 1.4
*/
@@ -350,7 +350,7 @@
/**
* Utility routine to check if the multicast address has global scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of global scope, false if it is not
* of global scope or it is not a multicast address
* @since 1.4
@@ -362,7 +362,7 @@
/**
* Utility routine to check if the multicast address has node scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of node-local scope, false if it is not
* of node-local scope or it is not a multicast address
* @since 1.4
@@ -374,7 +374,7 @@
/**
* Utility routine to check if the multicast address has link scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of link-local scope, false if it is not
* of link-local scope or it is not a multicast address
* @since 1.4
@@ -386,7 +386,7 @@
/**
* Utility routine to check if the multicast address has site scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of site-local scope, false if it is not
* of site-local scope or it is not a multicast address
* @since 1.4
@@ -398,7 +398,7 @@
/**
* Utility routine to check if the multicast address has organization scope.
*
- * @return a <code>boolean</code> indicating if the address has
+ * @return a {@code boolean} indicating if the address has
* is a multicast address of organization-local scope,
* false if it is not of organization-local scope
* or it is not a multicast address
@@ -424,9 +424,9 @@
* in an IllegalArgumentException being thrown.
*
* @param timeout the time, in milliseconds, before the call aborts
- * @return a <code>boolean</code> indicating if the address is reachable.
+ * @return a {@code boolean} indicating if the address is reachable.
* @throws IOException if a network error occurs
- * @throws IllegalArgumentException if <code>timeout</code> is negative.
+ * @throws IllegalArgumentException if {@code timeout} is negative.
* @since 1.5
*/
public boolean isReachable(int timeout) throws IOException {
@@ -442,10 +442,10 @@
* privilege can be obtained, otherwise it will try to establish
* a TCP connection on port 7 (Echo) of the destination host.
* <p>
- * The <code>network interface</code> and <code>ttl</code> parameters
+ * The {@code network interface} and {@code ttl} parameters
* let the caller specify which network interface the test will go through
* and the maximum number of hops the packets should go through.
- * A negative value for the <code>ttl</code> will result in an
+ * A negative value for the {@code ttl} will result in an
* IllegalArgumentException being thrown.
* <p>
* The timeout value, in milliseconds, indicates the maximum amount of time
@@ -458,9 +458,9 @@
* @param ttl the maximum numbers of hops to try or 0 for the
* default
* @param timeout the time, in milliseconds, before the call aborts
- * @throws IllegalArgumentException if either <code>timeout</code>
- * or <code>ttl</code> are negative.
- * @return a <code>boolean</code>indicating if the address is reachable.
+ * @throws IllegalArgumentException if either {@code timeout}
+ * or {@code ttl} are negative.
+ * @return a {@code boolean}indicating if the address is reachable.
* @throws IOException if a network error occurs
* @since 1.5
*/
@@ -486,8 +486,8 @@
* {@link #getCanonicalHostName() getCanonicalHostName}.
*
* <p>If there is a security manager, its
- * <code>checkConnect</code> method is first called
- * with the hostname and <code>-1</code>
+ * {@code checkConnect} method is first called
+ * with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, it will return
* the textual representation of the IP address.
@@ -511,8 +511,8 @@
* here without a security check.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkConnect</code> method
- * with the hostname and <code>-1</code>
+ * calls its {@code checkConnect} method
+ * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
@@ -539,8 +539,8 @@
* the FQDN depending on the underlying system configuration.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkConnect</code> method
- * with the hostname and <code>-1</code>
+ * calls its {@code checkConnect} method
+ * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
@@ -566,8 +566,8 @@
* Returns the hostname for this address.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkConnect</code> method
- * with the hostname and <code>-1</code>
+ * calls its {@code checkConnect} method
+ * with the hostname and {@code -1}
* as its arguments to see if the calling code is allowed to know
* the hostname for this IP address, i.e., to connect to the host.
* If the operation is not allowed, it will return
@@ -633,9 +633,9 @@
}
/**
- * Returns the raw IP address of this <code>InetAddress</code>
+ * Returns the raw IP address of this {@code InetAddress}
* object. The result is in network byte order: the highest order
- * byte of the address is in <code>getAddress()[0]</code>.
+ * byte of the address is in {@code getAddress()[0]}.
*
* @return the raw IP address of this object.
*/
@@ -664,18 +664,18 @@
/**
* Compares this object against the specified object.
- * The result is <code>true</code> if and only if the argument is
- * not <code>null</code> and it represents the same IP address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same IP address as
* this object.
* <p>
- * Two instances of <code>InetAddress</code> represent the same IP
+ * Two instances of {@code InetAddress} represent the same IP
* address if the length of the byte arrays returned by
- * <code>getAddress</code> is the same for both, and each of the
+ * {@code getAddress} is the same for both, and each of the
* array components is the same for the byte arrays.
*
* @param obj the object to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
@@ -683,7 +683,7 @@
}
/**
- * Converts this IP address to a <code>String</code>. The
+ * Converts this IP address to a {@code String}. The
* string returned is of the form: hostname / literal IP
* address.
*
@@ -974,7 +974,7 @@
* No name service is checked for the validity of the address.
*
* <p> The host name can either be a machine name, such as
- * "<code>java.sun.com</code>", or a textual representation of its IP
+ * "{@code java.sun.com}", or a textual representation of its IP
* address.
* <p> No validity checking is done on the host name either.
*
@@ -1019,26 +1019,26 @@
* Determines the IP address of a host, given the host's name.
*
* <p> The host name can either be a machine name, such as
- * "<code>java.sun.com</code>", or a textual representation of its
+ * "{@code java.sun.com}", or a textual representation of its
* IP address. If a literal IP address is supplied, only the
* validity of the address format is checked.
*
- * <p> For <code>host</code> specified in literal IPv6 address,
+ * <p> For {@code host} specified in literal IPv6 address,
* either the form defined in RFC 2732 or the literal IPv6 address
* format defined in RFC 2373 is accepted. IPv6 scoped addresses are also
* supported. See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
* scoped addresses.
*
- * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
+ * <p> If the host is {@code null} then an {@code InetAddress}
* representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC 3330</a>
* section 2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC 2373</a>
* section 2.5.3. </p>
*
- * @param host the specified host, or <code>null</code>.
+ * @param host the specified host, or {@code null}.
* @return an IP address for the given host name.
* @exception UnknownHostException if no IP address for the
- * <code>host</code> could be found, or if a scope_id was specified
+ * {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists
* and its checkConnect method doesn't allow the operation
@@ -1059,37 +1059,37 @@
* based on the configured name service on the system.
*
* <p> The host name can either be a machine name, such as
- * "<code>java.sun.com</code>", or a textual representation of its IP
+ * "{@code java.sun.com}", or a textual representation of its IP
* address. If a literal IP address is supplied, only the
* validity of the address format is checked.
*
- * <p> For <code>host</code> specified in <i>literal IPv6 address</i>,
+ * <p> For {@code host} specified in <i>literal IPv6 address</i>,
* either the form defined in RFC 2732 or the literal IPv6 address
* format defined in RFC 2373 is accepted. A literal IPv6 address may
* also be qualified by appending a scoped zone identifier or scope_id.
* The syntax and usage of scope_ids is described
* <a href="Inet6Address.html#scoped">here</a>.
- * <p> If the host is <tt>null</tt> then an <tt>InetAddress</tt>
+ * <p> If the host is {@code null} then an {@code InetAddress}
* representing an address of the loopback interface is returned.
* See <a href="http://www.ietf.org/rfc/rfc3330.txt">RFC 3330</a>
* section 2 and <a href="http://www.ietf.org/rfc/rfc2373.txt">RFC 2373</a>
* section 2.5.3. </p>
*
- * <p> If there is a security manager and <code>host</code> is not
- * null and <code>host.length() </code> is not equal to zero, the
+ * <p> If there is a security manager and {@code host} is not
+ * null and {@code host.length() } is not equal to zero, the
* security manager's
- * <code>checkConnect</code> method is called
- * with the hostname and <code>-1</code>
+ * {@code checkConnect} method is called
+ * with the hostname and {@code -1}
* as its arguments to see if the operation is allowed.
*
- * @param host the name of the host, or <code>null</code>.
+ * @param host the name of the host, or {@code null}.
* @return an array of all the IP addresses for a given host name.
*
* @exception UnknownHostException if no IP address for the
- * <code>host</code> could be found, or if a scope_id was specified
+ * {@code host} could be found, or if a scope_id was specified
* for a global IPv6 address.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
*
* @see SecurityManager#checkConnect
*/
@@ -1389,9 +1389,9 @@
}
/**
- * Returns an <code>InetAddress</code> object given the raw IP address .
+ * Returns an {@code InetAddress} object given the raw IP address .
* The argument is in network byte order: the highest order
- * byte of the address is in <code>getAddress()[0]</code>.
+ * byte of the address is in {@code getAddress()[0]}.
*
* <p> This method doesn't block, i.e. no reverse name service lookup
* is performed.
@@ -1417,14 +1417,14 @@
/**
* Returns the address of the local host. This is achieved by retrieving
* the name of the host from the system, then resolving that name into
- * an <code>InetAddress</code>.
+ * an {@code InetAddress}.
*
* <P>Note: The resolved address may be cached for a short period of time.
* </P>
*
* <p>If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with the local host name and <code>-1</code>
+ * {@code checkConnect} method is called
+ * with the local host name and {@code -1}
* as its arguments to see if the operation is allowed.
* If the operation is not allowed, an InetAddress representing
* the loopback address is returned.
@@ -1601,7 +1601,6 @@
pf.put("address", holder().getAddress());
pf.put("family", holder().getFamily());
s.writeFields();
- s.flush();
}
}
--- a/jdk/src/share/classes/java/net/InetSocketAddress.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/InetSocketAddress.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
* as returned values.
* <p>
* The <i>wildcard</i> is a special local IP address. It usually means "any"
- * and can only be used for <code>bind</code> operations.
+ * and can only be used for {@code bind} operations.
*
* @see java.net.Socket
* @see java.net.ServerSocket
@@ -155,8 +155,8 @@
* and the port number a specified value.
* <p>
* A valid port value is between 0 and 65535.
- * A port number of <code>zero</code> will let the system pick up an
- * ephemeral port in a <code>bind</code> operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
* <p>
* @param port The port number
* @throws IllegalArgumentException if the port parameter is outside the specified
@@ -171,10 +171,10 @@
* Creates a socket address from an IP address and a port number.
* <p>
* A valid port value is between 0 and 65535.
- * A port number of <code>zero</code> will let the system pick up an
- * ephemeral port in a <code>bind</code> operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
* <P>
- * A <code>null</code> address will assign the <i>wildcard</i> address.
+ * A {@code null} address will assign the <i>wildcard</i> address.
* <p>
* @param addr The IP address
* @param port The port number
@@ -195,13 +195,13 @@
* An attempt will be made to resolve the hostname into an InetAddress.
* If that attempt fails, the address will be flagged as <I>unresolved</I>.
* <p>
- * If there is a security manager, its <code>checkConnect</code> method
+ * If there is a security manager, its {@code checkConnect} method
* is called with the host name as its argument to check the permissiom
* to resolve it. This could result in a SecurityException.
* <P>
* A valid port value is between 0 and 65535.
- * A port number of <code>zero</code> will let the system pick up an
- * ephemeral port in a <code>bind</code> operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
* <P>
* @param hostname the Host name
* @param port The port number
@@ -237,8 +237,8 @@
* The address will be flagged as <I>unresolved</I>.
* <p>
* A valid port value is between 0 and 65535.
- * A port number of <code>zero</code> will let the system pick up an
- * ephemeral port in a <code>bind</code> operation.
+ * A port number of {@code zero} will let the system pick up an
+ * ephemeral port in a {@code bind} operation.
* <P>
* @param host the Host name
* @param port The port number
@@ -246,7 +246,7 @@
* the range of valid port values, or if the hostname
* parameter is <TT>null</TT>.
* @see #isUnresolved()
- * @return a <code>InetSocketAddress</code> representing the unresolved
+ * @return a {@code InetSocketAddress} representing the unresolved
* socket address
* @since 1.5
*/
@@ -326,16 +326,16 @@
/**
*
- * Gets the <code>InetAddress</code>.
+ * Gets the {@code InetAddress}.
*
- * @return the InetAdress or <code>null</code> if it is unresolved.
+ * @return the InetAdress or {@code null} if it is unresolved.
*/
public final InetAddress getAddress() {
return holder.getAddress();
}
/**
- * Gets the <code>hostname</code>.
+ * Gets the {@code hostname}.
* Note: This method may trigger a name service reverse lookup if the
* address was created with a literal IP address.
*
@@ -360,8 +360,8 @@
/**
* Checks whether the address has been resolved or not.
*
- * @return <code>true</code> if the hostname couldn't be resolved into
- * an <code>InetAddress</code>.
+ * @return {@code true} if the hostname couldn't be resolved into
+ * an {@code InetAddress}.
*/
public final boolean isUnresolved() {
return holder.isUnresolved();
@@ -382,11 +382,11 @@
/**
* Compares this object against the specified object.
- * The result is <code>true</code> if and only if the argument is
- * not <code>null</code> and it represents the same address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same address as
* this object.
* <p>
- * Two instances of <code>InetSocketAddress</code> represent the same
+ * Two instances of {@code InetSocketAddress} represent the same
* address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal.
* If both addresses are unresolved, then the hostname and the port number
@@ -396,8 +396,8 @@
* considered equal.
*
* @param obj the object to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#equals(java.lang.Object)
*/
@Override
--- a/jdk/src/share/classes/java/net/InterfaceAddress.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/InterfaceAddress.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -47,23 +47,23 @@
}
/**
- * Returns an <code>InetAddress</code> for this address.
+ * Returns an {@code InetAddress} for this address.
*
- * @return the <code>InetAddress</code> for this address.
+ * @return the {@code InetAddress} for this address.
*/
public InetAddress getAddress() {
return address;
}
/**
- * Returns an <code>InetAddress</code> for the brodcast address
+ * Returns an {@code InetAddress} for the brodcast address
* for this InterfaceAddress.
* <p>
* Only IPv4 networks have broadcast address therefore, in the case
- * of an IPv6 network, <code>null</code> will be returned.
+ * of an IPv6 network, {@code null} will be returned.
*
- * @return the <code>InetAddress</code> representing the broadcast
- * address or <code>null</code> if there is no broadcast address.
+ * @return the {@code InetAddress} representing the broadcast
+ * address or {@code null} if there is no broadcast address.
*/
public InetAddress getBroadcast() {
return broadcast;
@@ -76,7 +76,7 @@
* or 24 (255.255.255.0). <p>
* Typical IPv6 values would be 128 (::1/128) or 10 (fe80::203:baff:fe27:1243/10)
*
- * @return a <code>short</code> representing the prefix length for the
+ * @return a {@code short} representing the prefix length for the
* subnet of that address.
*/
public short getNetworkPrefixLength() {
@@ -85,17 +85,17 @@
/**
* Compares this object against the specified object.
- * The result is <code>true</code> if and only if the argument is
- * not <code>null</code> and it represents the same interface address as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same interface address as
* this object.
* <p>
- * Two instances of <code>InterfaceAddress</code> represent the same
+ * Two instances of {@code InterfaceAddress} represent the same
* address if the InetAddress, the prefix length and the broadcast are
* the same for both.
*
* @param obj the object to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InterfaceAddress#hashCode()
*/
public boolean equals(Object obj) {
@@ -122,7 +122,7 @@
}
/**
- * Converts this Interface address to a <code>String</code>. The
+ * Converts this Interface address to a {@code String}. The
* string returned is of the form: InetAddress / prefix length [ broadcast address ].
*
* @return a string representation of this Interface address.
--- a/jdk/src/share/classes/java/net/JarURLConnection.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/JarURLConnection.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -45,18 +45,14 @@
*
* <p>for example:
*
- * <p><code>
- * jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class<br>
- * </code>
+ * <p>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <p>Jar URLs should be used to refer to a JAR file or entries in
* a JAR file. The example above is a JAR URL which refers to a JAR
* entry. If the entry name is omitted, the URL refers to the whole
* JAR file:
*
- * <code>
- * jar:http://www.foo.com/bar/baz.jar!/
- * </code>
+ * {@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <p>Users should cast the generic URLConnection to a
* JarURLConnection when they know that the URL they created is a JAR
@@ -76,19 +72,19 @@
* <dl>
*
* <dt>A Jar entry
- * <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class</code>
+ * <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/Quux.class}
*
* <dt>A Jar file
- * <dd><code>jar:http://www.foo.com/bar/baz.jar!/</code>
+ * <dd>{@code jar:http://www.foo.com/bar/baz.jar!/}
*
* <dt>A Jar directory
- * <dd><code>jar:http://www.foo.com/bar/baz.jar!/COM/foo/</code>
+ * <dd>{@code jar:http://www.foo.com/bar/baz.jar!/COM/foo/}
*
* </dl>
*
- * <p><code>!/</code> is refered to as the <em>separator</em>.
+ * <p>{@code !/} is refered to as the <em>separator</em>.
*
- * <p>When constructing a JAR url via <code>new URL(context, spec)</code>,
+ * <p>When constructing a JAR url via {@code new URL(context, spec)},
* the following rules apply:
*
* <ul>
@@ -294,7 +290,7 @@
* can only be called once
* the connection has been completely verified by reading
* from the input stream until the end of the stream has been
- * reached. Otherwise, this method will return <code>null</code>
+ * reached. Otherwise, this method will return {@code null}
*
* @return the Certificate object for this connection if the URL
* for it points to a JAR file entry, null otherwise.
--- a/jdk/src/share/classes/java/net/MalformedURLException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/MalformedURLException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -39,13 +39,13 @@
private static final long serialVersionUID = -182787522200415866L;
/**
- * Constructs a <code>MalformedURLException</code> with no detail message.
+ * Constructs a {@code MalformedURLException} with no detail message.
*/
public MalformedURLException() {
}
/**
- * Constructs a <code>MalformedURLException</code> with the
+ * Constructs a {@code MalformedURLException} with the
* specified detail message.
*
* @param msg the detail message.
--- a/jdk/src/share/classes/java/net/MulticastSocket.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/MulticastSocket.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -92,7 +92,7 @@
* Create a multicast socket.
*
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
+ * its {@code checkListen} method is first called
* with 0 as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
* <p>
@@ -103,7 +103,7 @@
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*/
@@ -115,8 +115,8 @@
* Create a multicast socket and bind it to a specific port.
*
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
- * with the <code>port</code> argument
+ * its {@code checkListen} method is first called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
* <p>
@@ -128,7 +128,7 @@
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*/
@@ -139,10 +139,10 @@
/**
* Create a MulticastSocket bound to the specified socket address.
* <p>
- * Or, if the address is <code>null</code>, create an unbound socket.
+ * Or, if the address is {@code null}, create an unbound socket.
* <p>
* <p>If there is a security manager,
- * its <code>checkListen</code> method is first called
+ * its {@code checkListen} method is first called
* with the SocketAddress port as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
* <p>
@@ -150,12 +150,12 @@
* {@link DatagramSocket#setReuseAddress(boolean)} method is
* called to enable the SO_REUSEADDR socket option.
*
- * @param bindaddr Socket address to bind to, or <code>null</code> for
+ * @param bindaddr Socket address to bind to, or {@code null} for
* an unbound socket.
* @exception IOException if an I/O exception occurs
* while creating the MulticastSocket
* @exception SecurityException if a security manager exists and its
- * <code>checkListen</code> method doesn't allow the operation.
+ * {@code checkListen} method doesn't allow the operation.
* @see SecurityManager#checkListen
* @see java.net.DatagramSocket#setReuseAddress(boolean)
*
@@ -197,7 +197,7 @@
/**
* Set the default time-to-live for multicast packets sent out
- * on this <code>MulticastSocket</code> in order to control the
+ * on this {@code MulticastSocket} in order to control the
* scope of the multicasts.
*
* <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
@@ -279,11 +279,11 @@
/**
* Joins a multicast group. Its behavior may be affected by
- * <code>setInterface</code> or <code>setNetworkInterface</code>.
+ * {@code setInterface} or {@code setNetworkInterface}.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkMulticast</code> method
- * with the <code>mcastaddr</code> argument
+ * calls its {@code checkMulticast} method
+ * with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to join
@@ -291,7 +291,7 @@
* @exception IOException if there is an error joining
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
- * <code>checkMulticast</code> method doesn't allow the join.
+ * {@code checkMulticast} method doesn't allow the join.
*
* @see SecurityManager#checkMulticast(InetAddress)
*/
@@ -325,18 +325,18 @@
/**
* Leave a multicast group. Its behavior may be affected by
- * <code>setInterface</code> or <code>setNetworkInterface</code>.
+ * {@code setInterface} or {@code setNetworkInterface}.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkMulticast</code> method
- * with the <code>mcastaddr</code> argument
+ * calls its {@code checkMulticast} method
+ * with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to leave
* @exception IOException if there is an error leaving
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
- * <code>checkMulticast</code> method doesn't allow the operation.
+ * {@code checkMulticast} method doesn't allow the operation.
*
* @see SecurityManager#checkMulticast(InetAddress)
*/
@@ -362,8 +362,8 @@
* Joins the specified multicast group at the specified interface.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkMulticast</code> method
- * with the <code>mcastaddr</code> argument
+ * calls its {@code checkMulticast} method
+ * with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to join
@@ -375,7 +375,7 @@
* @exception IOException if there is an error joining
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
- * <code>checkMulticast</code> method doesn't allow the join.
+ * {@code checkMulticast} method doesn't allow the join.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
*
@@ -410,8 +410,8 @@
* Leave a multicast group on a specified local interface.
*
* <p>If there is a security manager, this method first
- * calls its <code>checkMulticast</code> method
- * with the <code>mcastaddr</code> argument
+ * calls its {@code checkMulticast} method
+ * with the {@code mcastaddr} argument
* as its argument.
*
* @param mcastaddr is the multicast address to leave
@@ -422,7 +422,7 @@
* @exception IOException if there is an error leaving
* or when the address is not a multicast address.
* @exception SecurityException if a security manager exists and its
- * <code>checkMulticast</code> method doesn't allow the operation.
+ * {@code checkMulticast} method doesn't allow the operation.
* @throws IllegalArgumentException if mcastaddr is null or is a
* SocketAddress subclass not supported by this socket
*
@@ -478,7 +478,7 @@
* Retrieve the address of the network interface used for
* multicast packets.
*
- * @return An <code>InetAddress</code> representing
+ * @return An {@code InetAddress} representing
* the address of the network interface used for
* multicast packets.
*
@@ -562,7 +562,7 @@
*
* @exception SocketException if there is an error in
* the underlying protocol, such as a TCP error.
- * @return the multicast <code>NetworkInterface</code> currently set
+ * @return the multicast {@code NetworkInterface} currently set
* @see #setNetworkInterface(NetworkInterface)
* @since 1.4
*/
@@ -587,7 +587,7 @@
* <p>Because this option is a hint, applications that want to
* verify what loopback mode is set to should call
* {@link #getLoopbackMode()}
- * @param disable <code>true</code> to disable the LoopbackMode
+ * @param disable {@code true} to disable the LoopbackMode
* @throws SocketException if an error occurs while setting the value
* @since 1.4
* @see #getLoopbackMode
@@ -615,18 +615,18 @@
* otherwise it is preferable to set a TTL once on the socket, and
* use that default TTL for all packets. This method does <B>not
* </B> alter the default TTL for the socket. Its behavior may be
- * affected by <code>setInterface</code>.
+ * affected by {@code setInterface}.
*
* <p>If there is a security manager, this method first performs some
- * security checks. First, if <code>p.getAddress().isMulticastAddress()</code>
+ * security checks. First, if {@code p.getAddress().isMulticastAddress()}
* is true, this method calls the
- * security manager's <code>checkMulticast</code> method
- * with <code>p.getAddress()</code> and <code>ttl</code> as its arguments.
+ * security manager's {@code checkMulticast} method
+ * with {@code p.getAddress()} and {@code ttl} as its arguments.
* If the evaluation of that expression is false,
* this method instead calls the security manager's
- * <code>checkConnect</code> method with arguments
- * <code>p.getAddress().getHostAddress()</code> and
- * <code>p.getPort()</code>. Each call to a security manager method
+ * {@code checkConnect} method with arguments
+ * {@code p.getAddress().getHostAddress()} and
+ * {@code p.getPort()}. Each call to a security manager method
* could result in a SecurityException if the operation is not allowed.
*
* @param p is the packet to be sent. The packet should contain
@@ -639,7 +639,7 @@
* @exception IOException is raised if an error occurs i.e
* error while setting ttl.
* @exception SecurityException if a security manager exists and its
- * <code>checkMulticast</code> or <code>checkConnect</code>
+ * {@code checkMulticast} or {@code checkConnect}
* method doesn't allow the send.
*
* @deprecated Use the following code or its equivalent instead:
--- a/jdk/src/share/classes/java/net/NetPermission.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/NetPermission.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -177,8 +177,8 @@
*
* @param name the name of the NetPermission.
*
- * @throws NullPointerException if <code>name</code> is <code>null</code>.
- * @throws IllegalArgumentException if <code>name</code> is empty.
+ * @throws NullPointerException if {@code name} is {@code null}.
+ * @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name)
@@ -194,8 +194,8 @@
* @param name the name of the NetPermission.
* @param actions should be null.
*
- * @throws NullPointerException if <code>name</code> is <code>null</code>.
- * @throws IllegalArgumentException if <code>name</code> is empty.
+ * @throws NullPointerException if {@code name} is {@code null}.
+ * @throws IllegalArgumentException if {@code name} is empty.
*/
public NetPermission(String name, String actions)
--- a/jdk/src/share/classes/java/net/NetworkInterface.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/NetworkInterface.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -98,9 +98,9 @@
* Convenience method to return an Enumeration with all or a
* subset of the InetAddresses bound to this network interface.
* <p>
- * If there is a security manager, its <code>checkConnect</code>
+ * If there is a security manager, its {@code checkConnect}
* method is called for each InetAddress. Only InetAddresses where
- * the <code>checkConnect</code> doesn't throw a SecurityException
+ * the {@code checkConnect} doesn't throw a SecurityException
* will be returned in the Enumeration. However, if the caller has the
* {@link NetPermission}("getNetworkInformation") permission, then all
* InetAddresses are returned.
@@ -154,15 +154,15 @@
}
/**
- * Get a List of all or a subset of the <code>InterfaceAddresses</code>
+ * Get a List of all or a subset of the {@code InterfaceAddresses}
* of this network interface.
* <p>
- * If there is a security manager, its <code>checkConnect</code>
+ * If there is a security manager, its {@code checkConnect}
* method is called with the InetAddress for each InterfaceAddress.
- * Only InterfaceAddresses where the <code>checkConnect</code> doesn't throw
+ * Only InterfaceAddresses where the {@code checkConnect} doesn't throw
* a SecurityException will be returned in the List.
*
- * @return a <code>List</code> object with all or a subset of the
+ * @return a {@code List} object with all or a subset of the
* InterfaceAddresss of this network interface
* @since 1.6
*/
@@ -216,10 +216,10 @@
/**
* Returns the parent NetworkInterface of this interface if this is
- * a subinterface, or <code>null</code> if it is a physical
+ * a subinterface, or {@code null} if it is a physical
* (non virtual) interface or has no parent.
*
- * @return The <code>NetworkInterface</code> this interface is attached to.
+ * @return The {@code NetworkInterface} this interface is attached to.
* @since 1.6
*/
public NetworkInterface getParent() {
@@ -260,15 +260,15 @@
* @param name
* The name of the network interface.
*
- * @return A <tt>NetworkInterface</tt> with the specified name,
- * or <tt>null</tt> if there is no network interface
+ * @return A {@code NetworkInterface} with the specified name,
+ * or {@code null} if there is no network interface
* with the specified name.
*
* @throws SocketException
* If an I/O error occurs.
*
* @throws NullPointerException
- * If the specified name is <tt>null</tt>.
+ * If the specified name is {@code null}.
*/
public static NetworkInterface getByName(String name) throws SocketException {
if (name == null)
@@ -303,17 +303,17 @@
* returned.
*
* @param addr
- * The <tt>InetAddress</tt> to search with.
+ * The {@code InetAddress} to search with.
*
- * @return A <tt>NetworkInterface</tt>
- * or <tt>null</tt> if there is no network interface
+ * @return A {@code NetworkInterface}
+ * or {@code null} if there is no network interface
* with the specified IP address.
*
* @throws SocketException
* If an I/O error occurs.
*
* @throws NullPointerException
- * If the specified address is <tt>null</tt>.
+ * If the specified address is {@code null}.
*/
public static NetworkInterface getByInetAddress(InetAddress addr) throws SocketException {
if (addr == null) {
@@ -378,7 +378,7 @@
/**
* Returns whether a network interface is up and running.
*
- * @return <code>true</code> if the interface is up and running.
+ * @return {@code true} if the interface is up and running.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -390,7 +390,7 @@
/**
* Returns whether a network interface is a loopback interface.
*
- * @return <code>true</code> if the interface is a loopback interface.
+ * @return {@code true} if the interface is a loopback interface.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -404,7 +404,7 @@
* A typical point to point interface would be a PPP connection through
* a modem.
*
- * @return <code>true</code> if the interface is a point to point
+ * @return {@code true} if the interface is a point to point
* interface.
* @exception SocketException if an I/O error occurs.
* @since 1.6
@@ -417,7 +417,7 @@
/**
* Returns whether a network interface supports multicasting or not.
*
- * @return <code>true</code> if the interface supports Multicasting.
+ * @return {@code true} if the interface supports Multicasting.
* @exception SocketException if an I/O error occurs.
* @since 1.6
*/
@@ -432,7 +432,7 @@
* If a security manager is set, then the caller must have
* the permission {@link NetPermission}("getNetworkInformation").
*
- * @return a byte array containing the address, or <code>null</code> if
+ * @return a byte array containing the address, or {@code null} if
* the address doesn't exist, is not accessible or a security
* manager is set and the caller does not have the permission
* NetPermission("getNetworkInformation")
@@ -481,7 +481,7 @@
* can be several virtual interfaces attached to a single physical
* interface.
*
- * @return <code>true</code> if this interface is a virtual interface.
+ * @return {@code true} if this interface is a virtual interface.
* @since 1.6
*/
public boolean isVirtual() {
@@ -497,16 +497,16 @@
/**
* Compares this object against the specified object.
- * The result is <code>true</code> if and only if the argument is
- * not <code>null</code> and it represents the same NetworkInterface
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same NetworkInterface
* as this object.
* <p>
- * Two instances of <code>NetworkInterface</code> represent the same
+ * Two instances of {@code NetworkInterface} represent the same
* NetworkInterface if both name and addrs are the same for both.
*
* @param obj the object to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetAddress#getAddress()
*/
public boolean equals(Object obj) {
--- a/jdk/src/share/classes/java/net/PasswordAuthentication.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/PasswordAuthentication.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -43,11 +43,11 @@
private char[] password;
/**
- * Creates a new <code>PasswordAuthentication</code> object from the given
+ * Creates a new {@code PasswordAuthentication} object from the given
* user name and password.
*
* <p> Note that the given user password is cloned before it is stored in
- * the new <code>PasswordAuthentication</code> object.
+ * the new {@code PasswordAuthentication} object.
*
* @param userName the user name
* @param password the user's password
--- a/jdk/src/share/classes/java/net/PortUnreachableException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/PortUnreachableException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -36,7 +36,7 @@
private static final long serialVersionUID = 8462541992376507323L;
/**
- * Constructs a new <code>PortUnreachableException</code> with a
+ * Constructs a new {@code PortUnreachableException} with a
* detail message.
* @param msg the detail message
*/
@@ -45,7 +45,7 @@
}
/**
- * Construct a new <code>PortUnreachableException</code> with no
+ * Construct a new {@code PortUnreachableException} with no
* detailed message.
*/
public PortUnreachableException() {}
--- a/jdk/src/share/classes/java/net/ProtocolException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/ProtocolException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -39,7 +39,7 @@
private static final long serialVersionUID = -6098449442062388080L;
/**
- * Constructs a new <code>ProtocolException</code> with the
+ * Constructs a new {@code ProtocolException} with the
* specified detail message.
*
* @param host the detail message.
@@ -49,7 +49,7 @@
}
/**
- * Constructs a new <code>ProtocolException</code> with no detail message.
+ * Constructs a new {@code ProtocolException} with no detail message.
*/
public ProtocolException() {
}
--- a/jdk/src/share/classes/java/net/Proxy.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/Proxy.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -28,7 +28,7 @@
/**
* This class represents a proxy setting, typically a type (http, socks) and
* a socket address.
- * A <code>Proxy</code> is an immutable object.
+ * A {@code Proxy} is an immutable object.
*
* @see java.net.ProxySelector
* @author Yingxian Wang
@@ -61,17 +61,17 @@
private SocketAddress sa;
/**
- * A proxy setting that represents a <code>DIRECT</code> connection,
+ * A proxy setting that represents a {@code DIRECT} connection,
* basically telling the protocol handler not to use any proxying.
* Used, for instance, to create sockets bypassing any other global
* proxy settings (like SOCKS):
* <P>
- * <code>Socket s = new Socket(Proxy.NO_PROXY);</code><br>
+ * {@code Socket s = new Socket(Proxy.NO_PROXY);}<br>
* <P>
*/
public final static Proxy NO_PROXY = new Proxy();
- // Creates the proxy that represents a <code>DIRECT</code> connection.
+ // Creates the proxy that represents a {@code DIRECT} connection.
private Proxy() {
type = Type.DIRECT;
sa = null;
@@ -82,11 +82,11 @@
* Certain combinations are illegal. For instance, for types Http, and
* Socks, a SocketAddress <b>must</b> be provided.
* <P>
- * Use the <code>Proxy.NO_PROXY</code> constant
+ * Use the {@code Proxy.NO_PROXY} constant
* for representing a direct connection.
*
- * @param type the <code>Type</code> of the proxy
- * @param sa the <code>SocketAddress</code> for that proxy
+ * @param type the {@code Type} of the proxy
+ * @param sa the {@code SocketAddress} for that proxy
* @throws IllegalArgumentException when the type and the address are
* incompatible
*/
@@ -108,9 +108,9 @@
/**
* Returns the socket address of the proxy, or
- * <code>null</code> if its a direct connection.
+ * {@code null} if its a direct connection.
*
- * @return a <code>SocketAddress</code> representing the socket end
+ * @return a {@code SocketAddress} representing the socket end
* point of the proxy
*/
public SocketAddress address() {
@@ -121,7 +121,7 @@
* Constructs a string representation of this Proxy.
* This String is constructed by calling toString() on its type
* and concatenating " @ " and the toString() result from its address
- * if its type is not <code>DIRECT</code>.
+ * if its type is not {@code DIRECT}.
*
* @return a string representation of this object.
*/
@@ -133,16 +133,16 @@
/**
* Compares this object against the specified object.
- * The result is <code>true</code> if and only if the argument is
- * not <code>null</code> and it represents the same proxy as
+ * The result is {@code true} if and only if the argument is
+ * not {@code null} and it represents the same proxy as
* this object.
* <p>
- * Two instances of <code>Proxy</code> represent the same
+ * Two instances of {@code Proxy} represent the same
* address if both the SocketAddresses and type are equal.
*
* @param obj the object to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
* @see java.net.InetSocketAddress#equals(java.lang.Object)
*/
public final boolean equals(Object obj) {
--- a/jdk/src/share/classes/java/net/ProxySelector.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/ProxySelector.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -83,9 +83,9 @@
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}<tt>("getProxySelector")</tt>
+ * {@link NetPermission}{@code ("getProxySelector")}
* @see #setDefault(ProxySelector)
- * @return the system-wide <code>ProxySelector</code>
+ * @return the system-wide {@code ProxySelector}
* @since 1.5
*/
public static ProxySelector getDefault() {
@@ -102,11 +102,11 @@
* Note: non-standard protocol handlers may ignore this setting.
*
* @param ps The HTTP proxy selector, or
- * <code>null</code> to unset the proxy selector.
+ * {@code null} to unset the proxy selector.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}<tt>("setProxySelector")</tt>
+ * {@link NetPermission}{@code ("setProxySelector")}
*
* @see #getDefault()
* @since 1.5
@@ -127,7 +127,7 @@
* <UL>
* <LI>http URI for http connections</LI>
* <LI>https URI for https connections
- * <LI><code>socket://host:port</code><br>
+ * <LI>{@code socket://host:port}<br>
* for tcp client sockets connections</LI>
* </UL>
*
--- a/jdk/src/share/classes/java/net/ResponseCache.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/ResponseCache.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -74,10 +74,10 @@
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}<tt>("getResponseCache")</tt>
+ * {@link NetPermission}{@code ("getResponseCache")}
*
* @see #setDefault(ResponseCache)
- * @return the system-wide <code>ResponseCache</code>
+ * @return the system-wide {@code ResponseCache}
* @since 1.5
*/
public synchronized static ResponseCache getDefault() {
@@ -94,11 +94,11 @@
* Note: non-standard procotol handlers may ignore this setting.
*
* @param responseCache The response cache, or
- * <code>null</code> to unset the cache.
+ * {@code null} to unset the cache.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link NetPermission}<tt>("setResponseCache")</tt>
+ * {@link NetPermission}{@code ("setResponseCache")}
*
* @see #getDefault()
* @since 1.5
@@ -118,14 +118,14 @@
* to get the network resource. If a cached response is returned,
* that resource is used instead.
*
- * @param uri a <code>URI</code> used to reference the requested
+ * @param uri a {@code URI} used to reference the requested
* network resource
- * @param rqstMethod a <code>String</code> representing the request
+ * @param rqstMethod a {@code String} representing the request
* method
* @param rqstHeaders - a Map from request header
* field names to lists of field values representing
* the current request headers
- * @return a <code>CacheResponse</code> instance if available
+ * @return a {@code CacheResponse} instance if available
* from cache, or null otherwise
* @throws IOException if an I/O error occurs
* @throws IllegalArgumentException if any one of the arguments is null
@@ -148,11 +148,11 @@
* use to write the resource into the cache. If the resource is
* not to be cached, then put must return null.
*
- * @param uri a <code>URI</code> used to reference the requested
+ * @param uri a {@code URI} used to reference the requested
* network resource
* @param conn - a URLConnection instance that is used to fetch
* the response to be cached
- * @return a <code>CacheRequest</code> for recording the
+ * @return a {@code CacheRequest} for recording the
* response to be cached. Null return indicates that
* the caller does not intend to cache the response.
* @throws IOException if an I/O error occurs
--- a/jdk/src/share/classes/java/net/ServerSocket.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/ServerSocket.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -37,7 +37,7 @@
* based on that request, and then possibly returns a result to the requester.
* <p>
* The actual work of the server socket is performed by an instance
- * of the <code>SocketImpl</code> class. An application can
+ * of the {@code SocketImpl} class. An application can
* change the socket factory that creates the socket
* implementation to configure itself to create sockets
* appropriate to the local firewall.
@@ -89,31 +89,31 @@
/**
* Creates a server socket, bound to the specified port. A port number
- * of <code>0</code> means that the port number is automatically
+ * of {@code 0} means that the port number is automatically
* allocated, typically from an ephemeral port range. This port
* number can then be retrieved by calling {@link #getLocalPort getLocalPort}.
* <p>
* The maximum queue length for incoming connection indications (a
- * request to connect) is set to <code>50</code>. If a connection
+ * request to connect) is set to {@code 50}. If a connection
* indication arrives when the queue is full, the connection is refused.
* <p>
* If the application has specified a server socket factory, that
- * factory's <code>createSocketImpl</code> method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager,
- * its <code>checkListen</code> method is called
- * with the <code>port</code> argument
+ * its {@code checkListen} method is called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
*
- * @param port the port number, or <code>0</code> to use a port
+ * @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
*
* @exception IOException if an I/O error occurs when opening the socket.
* @exception SecurityException
- * if a security manager exists and its <code>checkListen</code>
+ * if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
@@ -131,42 +131,42 @@
/**
* Creates a server socket and binds it to the specified local port
* number, with the specified backlog.
- * A port number of <code>0</code> means that the port number is
+ * A port number of {@code 0} means that the port number is
* automatically allocated, typically from an ephemeral port range.
* This port number can then be retrieved by calling
* {@link #getLocalPort getLocalPort}.
* <p>
* The maximum queue length for incoming connection indications (a
- * request to connect) is set to the <code>backlog</code> parameter. If
+ * request to connect) is set to the {@code backlog} parameter. If
* a connection indication arrives when the queue is full, the
* connection is refused.
* <p>
* If the application has specified a server socket factory, that
- * factory's <code>createSocketImpl</code> method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager,
- * its <code>checkListen</code> method is called
- * with the <code>port</code> argument
+ * its {@code checkListen} method is called
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * The <code>backlog</code> argument is the requested maximum number of
+ * The {@code backlog} argument is the requested maximum number of
* pending connections on the socket. Its exact semantics are implementation
* specific. In particular, an implementation may impose a maximum length
* or may choose to ignore the parameter altogther. The value provided
- * should be greater than <code>0</code>. If it is less than or equal to
- * <code>0</code>, then an implementation specific default will be used.
+ * should be greater than {@code 0}. If it is less than or equal to
+ * {@code 0}, then an implementation specific default will be used.
* <P>
*
- * @param port the port number, or <code>0</code> to use a port
+ * @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
* @param backlog requested maximum length of the queue of incoming
* connections.
*
* @exception IOException if an I/O error occurs when opening the socket.
* @exception SecurityException
- * if a security manager exists and its <code>checkListen</code>
+ * if a security manager exists and its {@code checkListen}
* method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
@@ -189,32 +189,32 @@
* If <i>bindAddr</i> is null, it will default accepting
* connections on any/all local addresses.
* The port must be between 0 and 65535, inclusive.
- * A port number of <code>0</code> means that the port number is
+ * A port number of {@code 0} means that the port number is
* automatically allocated, typically from an ephemeral port range.
* This port number can then be retrieved by calling
* {@link #getLocalPort getLocalPort}.
*
* <P>If there is a security manager, this method
- * calls its <code>checkListen</code> method
- * with the <code>port</code> argument
+ * calls its {@code checkListen} method
+ * with the {@code port} argument
* as its argument to ensure the operation is allowed.
* This could result in a SecurityException.
*
- * The <code>backlog</code> argument is the requested maximum number of
+ * The {@code backlog} argument is the requested maximum number of
* pending connections on the socket. Its exact semantics are implementation
* specific. In particular, an implementation may impose a maximum length
* or may choose to ignore the parameter altogther. The value provided
- * should be greater than <code>0</code>. If it is less than or equal to
- * <code>0</code>, then an implementation specific default will be used.
+ * should be greater than {@code 0}. If it is less than or equal to
+ * {@code 0}, then an implementation specific default will be used.
* <P>
- * @param port the port number, or <code>0</code> to use a port
+ * @param port the port number, or {@code 0} to use a port
* number that is automatically allocated.
* @param backlog requested maximum length of the queue of incoming
* connections.
* @param bindAddr the local InetAddress the server will bind to
*
* @throws SecurityException if a security manager exists and
- * its <code>checkListen</code> method doesn't allow the operation.
+ * its {@code checkListen} method doesn't allow the operation.
*
* @throws IOException if an I/O error occurs when opening the socket.
* @exception IllegalArgumentException if the port parameter is outside
@@ -245,10 +245,10 @@
}
/**
- * Get the <code>SocketImpl</code> attached to this socket, creating
+ * Get the {@code SocketImpl} attached to this socket, creating
* it if necessary.
*
- * @return the <code>SocketImpl</code> attached to that ServerSocket.
+ * @return the {@code SocketImpl} attached to that ServerSocket.
* @throws SocketException if creation fails.
* @since 1.4
*/
@@ -310,17 +310,17 @@
/**
*
- * Binds the <code>ServerSocket</code> to a specific address
+ * Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* <p>
- * If the address is <code>null</code>, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
* <p>
* @param endpoint The IP address and port number to bind to.
* @throws IOException if the bind operation fails, or if the socket
* is already bound.
- * @throws SecurityException if a <code>SecurityManager</code> is present and
- * its <code>checkListen</code> method doesn't allow the operation.
+ * @throws SecurityException if a {@code SecurityManager} is present and
+ * its {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if endpoint is a
* SocketAddress subclass not supported by this socket
* @since 1.4
@@ -331,25 +331,25 @@
/**
*
- * Binds the <code>ServerSocket</code> to a specific address
+ * Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* <p>
- * If the address is <code>null</code>, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
* <P>
- * The <code>backlog</code> argument is the requested maximum number of
+ * The {@code backlog} argument is the requested maximum number of
* pending connections on the socket. Its exact semantics are implementation
* specific. In particular, an implementation may impose a maximum length
* or may choose to ignore the parameter altogther. The value provided
- * should be greater than <code>0</code>. If it is less than or equal to
- * <code>0</code>, then an implementation specific default will be used.
+ * should be greater than {@code 0}. If it is less than or equal to
+ * {@code 0}, then an implementation specific default will be used.
* @param endpoint The IP address and port number to bind to.
* @param backlog requested maximum length of the queue of
* incoming connections.
* @throws IOException if the bind operation fails, or if the socket
* is already bound.
- * @throws SecurityException if a <code>SecurityManager</code> is present and
- * its <code>checkListen</code> method doesn't allow the operation.
+ * @throws SecurityException if a {@code SecurityManager} is present and
+ * its {@code checkListen} method doesn't allow the operation.
* @throws IllegalArgumentException if endpoint is a
* SocketAddress subclass not supported by this socket
* @since 1.4
@@ -480,18 +480,18 @@
* Listens for a connection to be made to this socket and accepts
* it. The method blocks until a connection is made.
*
- * <p>A new Socket <code>s</code> is created and, if there
+ * <p>A new Socket {@code s} is created and, if there
* is a security manager,
- * the security manager's <code>checkAccept</code> method is called
- * with <code>s.getInetAddress().getHostAddress()</code> and
- * <code>s.getPort()</code>
+ * the security manager's {@code checkAccept} method is called
+ * with {@code s.getInetAddress().getHostAddress()} and
+ * {@code s.getPort()}
* as its arguments to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @exception IOException if an I/O error occurs when waiting for a
* connection.
* @exception SecurityException if a security manager exists and its
- * <code>checkAccept</code> method doesn't allow the operation.
+ * {@code checkAccept} method doesn't allow the operation.
* @exception SocketTimeoutException if a timeout was previously set with setSoTimeout and
* the timeout has been reached.
* @exception java.nio.channels.IllegalBlockingModeException
@@ -597,7 +597,7 @@
* method.
*
* @return the server-socket channel associated with this socket,
- * or <tt>null</tt> if this socket was not created
+ * or {@code null} if this socket was not created
* for a channel
*
* @since 1.4
@@ -678,18 +678,18 @@
* <p>
* When a TCP connection is closed the connection may remain
* in a timeout state for a period of time after the connection
- * is closed (typically known as the <tt>TIME_WAIT</tt> state
- * or <tt>2MSL</tt> wait state).
+ * is closed (typically known as the {@code TIME_WAIT} state
+ * or {@code 2MSL} wait state).
* For applications using a well known socket address or port
* it may not be possible to bind a socket to the required
- * <tt>SocketAddress</tt> if there is a connection in the
+ * {@code SocketAddress} if there is a connection in the
* timeout state involving the socket address or port.
* <p>
* Enabling {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} prior to
* binding the socket using {@link #bind(SocketAddress)} allows the socket
* to be bound even though a previous connection is in a timeout state.
* <p>
- * When a <tt>ServerSocket</tt> is created the initial setting
+ * When a {@code ServerSocket} is created the initial setting
* of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is not defined.
* Applications can use {@link #getReuseAddress()} to determine the initial
* setting of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}.
@@ -717,7 +717,7 @@
/**
* Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
*
- * @return a <code>boolean</code> indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -732,7 +732,7 @@
/**
* Returns the implementation address and implementation port of
- * this socket as a <code>String</code>.
+ * this socket as a {@code String}.
* <p>
* If there is a security manager set, its {@code checkConnect} method is
* called with the local address and {@code -1} as its arguments to see
@@ -773,14 +773,14 @@
* application. The factory can be specified only once.
* <p>
* When an application creates a new server socket, the socket
- * implementation factory's <code>createSocketImpl</code> method is
+ * implementation factory's {@code createSocketImpl} method is
* called to create the actual socket implementation.
* <p>
- * Passing <code>null</code> to the method is a no-op unless the factory
+ * Passing {@code null} to the method is a no-op unless the factory
* was already set.
* <p>
* If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -789,7 +789,7 @@
* socket factory.
* @exception SocketException if the factory has already been defined.
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't allow the operation.
+ * {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
*/
@@ -807,7 +807,7 @@
/**
* Sets a default proposed value for the
* {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option for sockets
- * accepted from this <tt>ServerSocket</tt>. The value actually set
+ * accepted from this {@code ServerSocket}. The value actually set
* in the accepted socket must be determined by calling
* {@link Socket#getReceiveBufferSize()} after the socket
* is returned by {@link #accept()}.
@@ -851,13 +851,13 @@
/**
* Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
- * for this <tt>ServerSocket</tt>, that is the proposed buffer size that
- * will be used for Sockets accepted from this <tt>ServerSocket</tt>.
+ * for this {@code ServerSocket}, that is the proposed buffer size that
+ * will be used for Sockets accepted from this {@code ServerSocket}.
*
* <p>Note, the value actually set in the accepted socket is determined by
* calling {@link Socket#getReceiveBufferSize()}.
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
- * option for this <tt>Socket</tt>.
+ * option for this {@code Socket}.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
@@ -891,24 +891,24 @@
* compared, with larger values indicating stronger preferences. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
- * <tt>(1, 0, 0)</tt>. If the application prefers high bandwidth above low
+ * {@code (1, 0, 0)}. If the application prefers high bandwidth above low
* latency, and low latency above short connection time, then it could
- * invoke this method with the values <tt>(0, 1, 2)</tt>.
+ * invoke this method with the values {@code (0, 1, 2)}.
*
* <p> Invoking this method after this socket has been bound
* will have no effect. This implies that in order to use this capability
* requires the socket to be created with the no-argument constructor.
*
* @param connectionTime
- * An <tt>int</tt> expressing the relative importance of a short
+ * An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
- * An <tt>int</tt> expressing the relative importance of low
+ * An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
- * An <tt>int</tt> expressing the relative importance of high
+ * An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
--- a/jdk/src/share/classes/java/net/Socket.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/Socket.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -39,7 +39,7 @@
* between two machines.
* <p>
* The actual work of the socket is performed by an instance of the
- * <code>SocketImpl</code> class. An application, by changing
+ * {@code SocketImpl} class. An application, by changing
* the socket factory that creates the socket implementation,
* can configure itself to create sockets appropriate to the local
* firewall.
@@ -88,14 +88,14 @@
* Creates an unconnected socket, specifying the type of proxy, if any,
* that should be used regardless of any other settings.
* <P>
- * If there is a security manager, its <code>checkConnect</code> method
+ * If there is a security manager, its {@code checkConnect} method
* is called with the proxy host address and port number
* as its arguments. This could result in a SecurityException.
* <P>
* Examples:
- * <UL> <LI><code>Socket s = new Socket(Proxy.NO_PROXY);</code> will create
+ * <UL> <LI>{@code Socket s = new Socket(Proxy.NO_PROXY);} will create
* a plain socket ignoring any other proxy configuration.</LI>
- * <LI><code>Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));</code>
+ * <LI>{@code Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));}
* will create a socket connecting through the specified SOCKS proxy
* server.</LI>
* </UL>
@@ -103,7 +103,7 @@
* @param proxy a {@link java.net.Proxy Proxy} object specifying what kind
* of proxying should be used.
* @throws IllegalArgumentException if the proxy is of an invalid type
- * or <code>null</code>.
+ * or {@code null}.
* @throws SecurityException if a security manager is present and
* permission to connect to the proxy is
* denied.
@@ -173,21 +173,22 @@
* Creates a stream socket and connects it to the specified port
* number on the named host.
* <p>
- * If the specified host is <tt>null</tt> it is the equivalent of
- * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>.
+ * If the specified host is {@code null} it is the equivalent of
+ * specifying the address as
+ * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}.
* In other words, it is equivalent to specifying an address of the
* loopback interface. </p>
* <p>
* If the application has specified a server socket factory, that
- * factory's <code>createSocketImpl</code> method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with the host address and <code>port</code>
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
- * @param host the host name, or <code>null</code> for the loopback address.
+ * @param host the host name, or {@code null} for the loopback address.
* @param port the port number.
*
* @exception UnknownHostException if the IP address of
@@ -195,7 +196,7 @@
*
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
@@ -217,23 +218,23 @@
* number at the specified IP address.
* <p>
* If the application has specified a socket factory, that factory's
- * <code>createSocketImpl</code> method is called to create the
+ * {@code createSocketImpl} method is called to create the
* actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with the host address and <code>port</code>
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
* @param address the IP address.
* @param port the port number.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
- * @exception NullPointerException if <code>address</code> is null.
+ * @exception NullPointerException if {@code address} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@@ -249,28 +250,29 @@
* the specified remote port. The Socket will also bind() to the local
* address and port supplied.
* <p>
- * If the specified host is <tt>null</tt> it is the equivalent of
- * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>.
+ * If the specified host is {@code null} it is the equivalent of
+ * specifying the address as
+ * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}.
* In other words, it is equivalent to specifying an address of the
* loopback interface. </p>
* <p>
- * A local port number of <code>zero</code> will let the system pick up a
- * free port in the <code>bind</code> operation.</p>
+ * A local port number of {@code zero} will let the system pick up a
+ * free port in the {@code bind} operation.</p>
* <p>
* If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with the host address and <code>port</code>
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
- * @param host the name of the remote host, or <code>null</code> for the loopback address.
+ * @param host the name of the remote host, or {@code null} for the loopback address.
* @param port the remote port
* @param localAddr the local address the socket is bound to, or
- * <code>null</code> for the <code>anyLocal</code> address.
+ * {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to, or
- * <code>zero</code> for a system selected free port.
+ * {@code zero} for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
@@ -289,30 +291,31 @@
* the specified remote port. The Socket will also bind() to the local
* address and port supplied.
* <p>
- * If the specified local address is <tt>null</tt> it is the equivalent of
- * specifying the address as the AnyLocal address (see <tt>{@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}()</tt>).
+ * If the specified local address is {@code null} it is the equivalent of
+ * specifying the address as the AnyLocal address
+ * (see {@link java.net.InetAddress#isAnyLocalAddress InetAddress.isAnyLocalAddress}{@code ()}).
* <p>
- * A local port number of <code>zero</code> will let the system pick up a
- * free port in the <code>bind</code> operation.</p>
+ * A local port number of {@code zero} will let the system pick up a
+ * free port in the {@code bind} operation.</p>
* <p>
* If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with the host address and <code>port</code>
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
*
* @param address the remote address
* @param port the remote port
* @param localAddr the local address the socket is bound to, or
- * <code>null</code> for the <code>anyLocal</code> address.
+ * {@code null} for the {@code anyLocal} address.
* @param localPort the local port the socket is bound to or
- * <code>zero</code> for a system selected free port.
+ * {@code zero} for a system selected free port.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter or localPort
* parameter is outside the specified range of valid port values,
* which is between 0 and 65535, inclusive.
- * @exception NullPointerException if <code>address</code> is null.
+ * @exception NullPointerException if {@code address} is null.
* @see SecurityManager#checkConnect
* @since JDK1.1
*/
@@ -326,33 +329,34 @@
* Creates a stream socket and connects it to the specified port
* number on the named host.
* <p>
- * If the specified host is <tt>null</tt> it is the equivalent of
- * specifying the address as <tt>{@link java.net.InetAddress#getByName InetAddress.getByName}(null)</tt>.
+ * If the specified host is {@code null} it is the equivalent of
+ * specifying the address as
+ * {@link java.net.InetAddress#getByName InetAddress.getByName}{@code (null)}.
* In other words, it is equivalent to specifying an address of the
* loopback interface. </p>
* <p>
- * If the stream argument is <code>true</code>, this creates a
- * stream socket. If the stream argument is <code>false</code>, it
+ * If the stream argument is {@code true}, this creates a
+ * stream socket. If the stream argument is {@code false}, it
* creates a datagram socket.
* <p>
* If the application has specified a server socket factory, that
- * factory's <code>createSocketImpl</code> method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
* <p>
* If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with the host address and <code>port</code>
+ * {@code checkConnect} method is called
+ * with the host address and {@code port}
* as its arguments. This could result in a SecurityException.
* <p>
* If a UDP socket is used, TCP/IP related socket options will not apply.
*
- * @param host the host name, or <code>null</code> for the loopback address.
+ * @param host the host name, or {@code null} for the loopback address.
* @param port the port number.
- * @param stream a <code>boolean</code> indicating whether this is
+ * @param stream a {@code boolean} indicating whether this is
* a stream socket or a datagram socket.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
@@ -373,32 +377,32 @@
* Creates a socket and connects it to the specified port number at
* the specified IP address.
* <p>
- * If the stream argument is <code>true</code>, this creates a
- * stream socket. If the stream argument is <code>false</code>, it
+ * If the stream argument is {@code true}, this creates a
+ * stream socket. If the stream argument is {@code false}, it
* creates a datagram socket.
* <p>
* If the application has specified a server socket factory, that
- * factory's <code>createSocketImpl</code> method is called to create
+ * factory's {@code createSocketImpl} method is called to create
* the actual socket implementation. Otherwise a "plain" socket is created.
*
* <p>If there is a security manager, its
- * <code>checkConnect</code> method is called
- * with <code>host.getHostAddress()</code> and <code>port</code>
+ * {@code checkConnect} method is called
+ * with {@code host.getHostAddress()} and {@code port}
* as its arguments. This could result in a SecurityException.
* <p>
* If UDP socket is used, TCP/IP related socket options will not apply.
*
* @param host the IP address.
* @param port the port number.
- * @param stream if <code>true</code>, create a stream socket;
+ * @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs when creating the socket.
* @exception SecurityException if a security manager exists and its
- * <code>checkConnect</code> method doesn't allow the operation.
+ * {@code checkConnect} method doesn't allow the operation.
* @exception IllegalArgumentException if the port parameter is outside
* the specified range of valid port values, which is between
* 0 and 65535, inclusive.
- * @exception NullPointerException if <code>host</code> is null.
+ * @exception NullPointerException if {@code host} is null.
* @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory)
* @see java.net.SocketImpl
* @see java.net.SocketImplFactory#createSocketImpl()
@@ -437,8 +441,8 @@
/**
* Creates the socket implementation.
*
- * @param stream a <code>boolean</code> value : <code>true</code> for a TCP socket,
- * <code>false</code> for UDP.
+ * @param stream a {@code boolean} value : {@code true} for a TCP socket,
+ * {@code false} for UDP.
* @throws IOException if creation fails
* @since 1.4
*/
@@ -500,10 +504,10 @@
/**
- * Get the <code>SocketImpl</code> attached to this socket, creating
+ * Get the {@code SocketImpl} attached to this socket, creating
* it if necessary.
*
- * @return the <code>SocketImpl</code> attached to that ServerSocket.
+ * @return the {@code SocketImpl} attached to that ServerSocket.
* @throws SocketException if creation fails
* @since 1.4
*/
@@ -516,7 +520,7 @@
/**
* Connects this socket to the server.
*
- * @param endpoint the <code>SocketAddress</code>
+ * @param endpoint the {@code SocketAddress}
* @throws IOException if an error occurs during the connection
* @throws java.nio.channels.IllegalBlockingModeException
* if this socket has an associated channel,
@@ -535,7 +539,7 @@
* A timeout of zero is interpreted as an infinite timeout. The connection
* will then block until established or an error occurs.
*
- * @param endpoint the <code>SocketAddress</code>
+ * @param endpoint the {@code SocketAddress}
* @param timeout the timeout value to be used in milliseconds.
* @throws IOException if an error occurs during the connection
* @throws SocketTimeoutException if timeout expires before connecting
@@ -597,10 +601,10 @@
/**
* Binds the socket to a local address.
* <P>
- * If the address is <code>null</code>, then the system will pick up
+ * If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*
- * @param bindpoint the <code>SocketAddress</code> to bind to
+ * @param bindpoint the {@code SocketAddress} to bind to
* @throws IOException if the bind operation fails, or if the socket
* is already bound.
* @throws IllegalArgumentException if bindpoint is a
@@ -668,7 +672,7 @@
* after the socket is closed.
*
* @return the remote IP address to which this socket is connected,
- * or <code>null</code> if the socket is not connected.
+ * or {@code null} if the socket is not connected.
*/
public InetAddress getInetAddress() {
if (!isConnected())
@@ -760,15 +764,15 @@
/**
* Returns the address of the endpoint this socket is connected to, or
- * <code>null</code> if it is unconnected.
+ * {@code null} if it is unconnected.
* <p>
* If the socket was connected prior to being {@link #close closed},
* then this method will continue to return the connected address
* after the socket is closed.
*
- * @return a <code>SocketAddress</code> representing the remote endpoint of this
- * socket, or <code>null</code> if it is not connected yet.
+ * @return a {@code SocketAddress} representing the remote endpoint of this
+ * socket, or {@code null} if it is not connected yet.
* @see #getInetAddress()
* @see #getPort()
* @see #connect(SocketAddress, int)
@@ -785,10 +789,10 @@
* Returns the address of the endpoint this socket is bound to.
* <p>
* If a socket bound to an endpoint represented by an
- * <code>InetSocketAddress </code> is {@link #close closed},
- * then this method will continue to return an <code>InetSocketAddress</code>
+ * {@code InetSocketAddress } is {@link #close closed},
+ * then this method will continue to return an {@code InetSocketAddress}
* after the socket is closed. In that case the returned
- * <code>InetSocketAddress</code>'s address is the
+ * {@code InetSocketAddress}'s address is the
* {@link InetAddress#isAnyLocalAddress wildcard} address
* and its port is the local port that it was bound to.
* <p>
@@ -828,7 +832,7 @@
* methods.
*
* @return the socket channel associated with this socket,
- * or <tt>null</tt> if this socket was not created
+ * or {@code null} if this socket was not created
* for a channel
*
* @since 1.4
@@ -843,7 +847,7 @@
*
* <p> If this socket has an associated channel then the resulting input
* stream delegates all of its operations to the channel. If the channel
- * is in non-blocking mode then the input stream's <tt>read</tt> operations
+ * is in non-blocking mode then the input stream's {@code read} operations
* will throw an {@link java.nio.channels.IllegalBlockingModeException}.
*
* <p>Under abnormal conditions the underlying connection may be
@@ -867,7 +871,7 @@
* <li><p>If there are no bytes buffered on the socket, and the
* socket has not been closed using {@link #close close}, then
* {@link java.io.InputStream#available available} will
- * return <code>0</code>.
+ * return {@code 0}.
*
* </ul>
*
@@ -910,7 +914,7 @@
*
* <p> If this socket has an associated channel then the resulting output
* stream delegates all of its operations to the channel. If the channel
- * is in non-blocking mode then the output stream's <tt>write</tt>
+ * is in non-blocking mode then the output stream's {@code write}
* operations will throw an {@link
* java.nio.channels.IllegalBlockingModeException}.
*
@@ -949,8 +953,8 @@
* Enable/disable {@link SocketOptions#TCP_NODELAY TCP_NODELAY}
* (disable/enable Nagle's algorithm).
*
- * @param on <code>true</code> to enable TCP_NODELAY,
- * <code>false</code> to disable.
+ * @param on {@code true} to enable TCP_NODELAY,
+ * {@code false} to disable.
*
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -968,7 +972,7 @@
/**
* Tests if {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
*
- * @return a <code>boolean</code> indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#TCP_NODELAY TCP_NODELAY} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1066,9 +1070,9 @@
* and there is no capability to distinguish between normal data and urgent
* data unless provided by a higher level protocol.
*
- * @param on <code>true</code> to enable
+ * @param on {@code true} to enable
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE},
- * <code>false</code> to disable.
+ * {@code false} to disable.
*
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1086,7 +1090,7 @@
/**
* Tests if {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE} is enabled.
*
- * @return a <code>boolean</code> indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_OOBINLINE SO_OOBINLINE}is enabled.
*
* @exception SocketException if there is an error
@@ -1151,7 +1155,7 @@
/**
* Sets the {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option to the
- * specified value for this <tt>Socket</tt>.
+ * specified value for this {@code Socket}.
* The {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option is used by the
* platform's networking code as a hint for the size to set the underlying
* network I/O buffers.
@@ -1184,10 +1188,10 @@
/**
* Get value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF} option
- * for this <tt>Socket</tt>, that is the buffer size used by the platform
- * for output on this <tt>Socket</tt>.
+ * for this {@code Socket}, that is the buffer size used by the platform
+ * for output on this {@code Socket}.
* @return the value of the {@link SocketOptions#SO_SNDBUF SO_SNDBUF}
- * option for this <tt>Socket</tt>.
+ * option for this {@code Socket}.
*
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1208,7 +1212,7 @@
/**
* Sets the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option to the
- * specified value for this <tt>Socket</tt>. The
+ * specified value for this {@code Socket}. The
* {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option is
* used by the platform's networking code as a hint for the size to set
* the underlying network I/O buffers.
@@ -1258,11 +1262,11 @@
/**
* Gets the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF} option
- * for this <tt>Socket</tt>, that is the buffer size used by the platform
- * for input on this <tt>Socket</tt>.
+ * for this {@code Socket}, that is the buffer size used by the platform
+ * for input on this {@code Socket}.
*
* @return the value of the {@link SocketOptions#SO_RCVBUF SO_RCVBUF}
- * option for this <tt>Socket</tt>.
+ * option for this {@code Socket}.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
* @see #setReceiveBufferSize(int)
@@ -1298,7 +1302,7 @@
/**
* Tests if {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
*
- * @return a <code>boolean</code> indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_KEEPALIVE SO_KEEPALIVE} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1321,7 +1325,7 @@
* 255} or an IllegalArgumentException will be thrown.
* <p>Notes:
* <p>For Internet Protocol v4 the value consists of an
- * <code>integer</code>, the least significant 8 bits of which
+ * {@code integer}, the least significant 8 bits of which
* represent the value of the TOS octet in IP packets sent by
* the socket.
* RFC 1349 defines the TOS values as follows:
@@ -1347,10 +1351,10 @@
* in the underlying platform. Applications should not assume that
* they can change the TOS field after the connection.
* <p>
- * For Internet Protocol v6 <code>tc</code> is the value that
+ * For Internet Protocol v6 {@code tc} is the value that
* would be placed into the sin6_flowinfo field of the IP header.
*
- * @param tc an <code>int</code> value for the bitset.
+ * @param tc an {@code int} value for the bitset.
* @throws SocketException if there is an error setting the
* traffic class or type-of-service
* @since 1.4
@@ -1392,11 +1396,11 @@
* <p>
* When a TCP connection is closed the connection may remain
* in a timeout state for a period of time after the connection
- * is closed (typically known as the <tt>TIME_WAIT</tt> state
- * or <tt>2MSL</tt> wait state).
+ * is closed (typically known as the {@code TIME_WAIT} state
+ * or {@code 2MSL} wait state).
* For applications using a well known socket address or port
* it may not be possible to bind a socket to the required
- * <tt>SocketAddress</tt> if there is a connection in the
+ * {@code SocketAddress} if there is a connection in the
* timeout state involving the socket address or port.
* <p>
* Enabling {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR}
@@ -1404,7 +1408,7 @@
* the socket to be bound even though a previous connection is in a timeout
* state.
* <p>
- * When a <tt>Socket</tt> is created the initial setting
+ * When a {@code Socket} is created the initial setting
* of {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is disabled.
* <p>
* The behaviour when {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is
@@ -1430,7 +1434,7 @@
/**
* Tests if {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
*
- * @return a <code>boolean</code> indicating whether or not
+ * @return a {@code boolean} indicating whether or not
* {@link SocketOptions#SO_REUSEADDR SO_REUSEADDR} is enabled.
* @exception SocketException if there is an error
* in the underlying protocol, such as a TCP error.
@@ -1536,7 +1540,7 @@
}
/**
- * Converts this socket to a <code>String</code>.
+ * Converts this socket to a {@code String}.
*
* @return a string representation of this socket.
*/
@@ -1555,7 +1559,7 @@
* Returns the connection state of the socket.
* <p>
* Note: Closing a socket doesn't clear its connection state, which means
- * this method will return <code>true</code> for a closed socket
+ * this method will return {@code true} for a closed socket
* (see {@link #isClosed()}) if it was successfuly connected prior
* to being closed.
*
@@ -1571,7 +1575,7 @@
* Returns the binding state of the socket.
* <p>
* Note: Closing a socket doesn't clear its binding state, which means
- * this method will return <code>true</code> for a closed socket
+ * this method will return {@code true} for a closed socket
* (see {@link #isClosed()}) if it was successfuly bound prior
* to being closed.
*
@@ -1629,13 +1633,13 @@
* application. The factory can be specified only once.
* <p>
* When an application creates a new client socket, the socket
- * implementation factory's <code>createSocketImpl</code> method is
+ * implementation factory's {@code createSocketImpl} method is
* called to create the actual socket implementation.
* <p>
- * Passing <code>null</code> to the method is a no-op unless the factory
+ * Passing {@code null} to the method is a no-op unless the factory
* was already set.
* <p>If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
@@ -1644,7 +1648,7 @@
* socket factory.
* @exception SocketException if the factory is already defined.
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't allow the operation.
+ * {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.SocketImplFactory#createSocketImpl()
* @see SecurityManager#checkSetFactory
*/
@@ -1678,23 +1682,23 @@
* values represent a lower priority than positive values. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
- * <tt>(1, 0, 0)</tt>. If the application prefers high bandwidth above low
+ * {@code (1, 0, 0)}. If the application prefers high bandwidth above low
* latency, and low latency above short connection time, then it could
- * invoke this method with the values <tt>(0, 1, 2)</tt>.
+ * invoke this method with the values {@code (0, 1, 2)}.
*
* <p> Invoking this method after this socket has been connected
* will have no effect.
*
* @param connectionTime
- * An <tt>int</tt> expressing the relative importance of a short
+ * An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
- * An <tt>int</tt> expressing the relative importance of low
+ * An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
- * An <tt>int</tt> expressing the relative importance of high
+ * An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
--- a/jdk/src/share/classes/java/net/SocketAddress.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketAddress.java Mon Aug 12 09:29:06 2013 -0400
@@ -39,4 +39,7 @@
* @since 1.4
*/
public abstract class SocketAddress implements java.io.Serializable {
+
+ static final long serialVersionUID = 5215720748342549866L;
+
}
--- a/jdk/src/share/classes/java/net/SocketException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -38,7 +38,7 @@
private static final long serialVersionUID = -5935874303556886934L;
/**
- * Constructs a new <code>SocketException</code> with the
+ * Constructs a new {@code SocketException} with the
* specified detail message.
*
* @param msg the detail message.
@@ -48,7 +48,7 @@
}
/**
- * Constructs a new <code>SocketException</code> with no detail message.
+ * Constructs a new {@code SocketException} with no detail message.
*/
public SocketException() {
}
--- a/jdk/src/share/classes/java/net/SocketImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -31,7 +31,7 @@
import java.io.FileDescriptor;
/**
- * The abstract class <code>SocketImpl</code> is a common superclass
+ * The abstract class {@code SocketImpl} is a common superclass
* of all classes that actually implement sockets. It is used to
* create both client and server sockets.
* <p>
@@ -71,7 +71,7 @@
/**
* Creates either a stream or a datagram socket.
*
- * @param stream if <code>true</code>, create a stream socket;
+ * @param stream if {@code true}, create a stream socket;
* otherwise, create a datagram socket.
* @exception IOException if an I/O error occurs while creating the
* socket.
@@ -122,7 +122,7 @@
/**
* Sets the maximum queue length for incoming connection indications
- * (a request to connect) to the <code>count</code> argument. If a
+ * (a request to connect) to the {@code count} argument. If a
* connection indication arrives when the queue is full, the
* connection is refused.
*
@@ -217,9 +217,9 @@
}
/**
- * Returns the value of this socket's <code>fd</code> field.
+ * Returns the value of this socket's {@code fd} field.
*
- * @return the value of this socket's <code>fd</code> field.
+ * @return the value of this socket's {@code fd} field.
* @see java.net.SocketImpl#fd
*/
protected FileDescriptor getFileDescriptor() {
@@ -227,9 +227,9 @@
}
/**
- * Returns the value of this socket's <code>address</code> field.
+ * Returns the value of this socket's {@code address} field.
*
- * @return the value of this socket's <code>address</code> field.
+ * @return the value of this socket's {@code address} field.
* @see java.net.SocketImpl#address
*/
protected InetAddress getInetAddress() {
@@ -237,9 +237,9 @@
}
/**
- * Returns the value of this socket's <code>port</code> field.
+ * Returns the value of this socket's {@code port} field.
*
- * @return the value of this socket's <code>port</code> field.
+ * @return the value of this socket's {@code port} field.
* @see java.net.SocketImpl#port
*/
protected int getPort() {
@@ -270,9 +270,9 @@
protected abstract void sendUrgentData (int data) throws IOException;
/**
- * Returns the value of this socket's <code>localport</code> field.
+ * Returns the value of this socket's {@code localport} field.
*
- * @return the value of this socket's <code>localport</code> field.
+ * @return the value of this socket's {@code localport} field.
* @see java.net.SocketImpl#localport
*/
protected int getLocalPort() {
@@ -296,7 +296,7 @@
}
/**
- * Returns the address and port of this socket as a <code>String</code>.
+ * Returns the address and port of this socket as a {@code String}.
*
* @return a string representation of this socket.
*/
@@ -328,23 +328,23 @@
* values represent a lower priority than positive values. If the
* application prefers short connection time over both low latency and high
* bandwidth, for example, then it could invoke this method with the values
- * <tt>(1, 0, 0)</tt>. If the application prefers high bandwidth above low
+ * {@code (1, 0, 0)}. If the application prefers high bandwidth above low
* latency, and low latency above short connection time, then it could
- * invoke this method with the values <tt>(0, 1, 2)</tt>.
+ * invoke this method with the values {@code (0, 1, 2)}.
*
* By default, this method does nothing, unless it is overridden in a
* a sub-class.
*
* @param connectionTime
- * An <tt>int</tt> expressing the relative importance of a short
+ * An {@code int} expressing the relative importance of a short
* connection time
*
* @param latency
- * An <tt>int</tt> expressing the relative importance of low
+ * An {@code int} expressing the relative importance of low
* latency
*
* @param bandwidth
- * An <tt>int</tt> expressing the relative importance of high
+ * An {@code int} expressing the relative importance of high
* bandwidth
*
* @since 1.5
--- a/jdk/src/share/classes/java/net/SocketImplFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketImplFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -27,8 +27,8 @@
/**
* This interface defines a factory for socket implementations. It
- * is used by the classes <code>Socket</code> and
- * <code>ServerSocket</code> to create actual socket
+ * is used by the classes {@code Socket} and
+ * {@code ServerSocket} to create actual socket
* implementations.
*
* @author Arthur van Hoff
@@ -39,9 +39,9 @@
public
interface SocketImplFactory {
/**
- * Creates a new <code>SocketImpl</code> instance.
+ * Creates a new {@code SocketImpl} instance.
*
- * @return a new instance of <code>SocketImpl</code>.
+ * @return a new instance of {@code SocketImpl}.
* @see java.net.SocketImpl
*/
SocketImpl createSocketImpl();
--- a/jdk/src/share/classes/java/net/SocketInputStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketInputStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -67,8 +67,8 @@
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file input stream.</p>
*
- * The <code>getChannel</code> method of <code>SocketInputStream</code>
- * returns <code>null</code> since it is a socket based stream.</p>
+ * The {@code getChannel} method of {@code SocketInputStream}
+ * returns {@code null} since it is a socket based stream.</p>
*
* @return the file channel associated with this file input stream
*
--- a/jdk/src/share/classes/java/net/SocketOptions.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketOptions.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -115,7 +115,7 @@
* }
* </PRE>
*
- * @param optID an <code>int</code> identifying the option to fetch
+ * @param optID an {@code int} identifying the option to fetch
* @return the value of the option
* @throws SocketException if the socket is closed
* @throws SocketException if <I>optID</I> is unknown along the
--- a/jdk/src/share/classes/java/net/SocketOutputStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketOutputStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -64,8 +64,8 @@
* Returns the unique {@link java.nio.channels.FileChannel FileChannel}
* object associated with this file output stream. </p>
*
- * The <code>getChannel</code> method of <code>SocketOutputStream</code>
- * returns <code>null</code> since it is a socket based stream.</p>
+ * The {@code getChannel} method of {@code SocketOutputStream}
+ * returns {@code null} since it is a socket based stream.</p>
*
* @return the file channel associated with this file output stream
*
--- a/jdk/src/share/classes/java/net/SocketPermission.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocketPermission.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -110,7 +110,7 @@
* </pre>
*
* is granted to some code, it allows that code to connect to port 7777 on
- * <code>puffin.eng.sun.com</code>, and to accept connections on that port.
+ * {@code puffin.eng.sun.com}, and to accept connections on that port.
*
* <p>Similarly, if the following permission:
*
@@ -788,7 +788,7 @@
* port range is ignored when p only contains the action, 'resolve'.<p>
* </ul>
*
- * Then <code>implies</code> checks each of the following, in order,
+ * Then {@code implies} checks each of the following, in order,
* and for each returns true if the stated condition is true:<p>
* <ul>
* <li> If this object was initialized with a single IP address and one of <i>p</i>'s
@@ -802,7 +802,7 @@
* <li>If this canonical name equals <i>p</i>'s canonical name.<p>
* </ul>
*
- * If none of the above are true, <code>implies</code> returns false.
+ * If none of the above are true, {@code implies} returns false.
* @param p the permission to check against.
*
* @return true if the specified permission is implied by this object,
@@ -1131,7 +1131,7 @@
* <p>
* SocketPermission objects must be stored in a manner that allows them
* to be inserted into the collection in any order, but that also enables the
- * PermissionCollection <code>implies</code>
+ * PermissionCollection {@code implies}
* method to be implemented in an efficient (and consistent) manner.
*
* @return a new PermissionCollection object suitable for storing SocketPermissions.
--- a/jdk/src/share/classes/java/net/SocksSocketImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
* grants the connections, then the connect is successful and all
* further traffic will go to the "real" endpoint.
*
- * @param endpoint the <code>SocketAddress</code> to connect to.
+ * @param endpoint the {@code SocketAddress} to connect to.
* @param timeout the timeout value in milliseconds
* @throws IOException if the connection can't be established.
* @throws SecurityException if there is a security manager and it
@@ -1032,9 +1032,9 @@
/**
- * Returns the value of this socket's <code>address</code> field.
+ * Returns the value of this socket's {@code address} field.
*
- * @return the value of this socket's <code>address</code> field.
+ * @return the value of this socket's {@code address} field.
* @see java.net.SocketImpl#address
*/
@Override
@@ -1046,9 +1046,9 @@
}
/**
- * Returns the value of this socket's <code>port</code> field.
+ * Returns the value of this socket's {@code port} field.
*
- * @return the value of this socket's <code>port</code> field.
+ * @return the value of this socket's {@code port} field.
* @see java.net.SocketImpl#port
*/
@Override
--- a/jdk/src/share/classes/java/net/URI.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URI.java Mon Aug 12 09:29:06 2013 -0400
@@ -67,24 +67,24 @@
* form has the syntax
*
* <blockquote>
- * [<i>scheme</i><tt><b>:</b></tt>]<i>scheme-specific-part</i>[<tt><b>#</b></tt><i>fragment</i>]
+ * [<i>scheme</i><b>{@code :}</b>]<i>scheme-specific-part</i>[<b>{@code #}</b><i>fragment</i>]
* </blockquote>
*
* where square brackets [...] delineate optional components and the characters
- * <tt><b>:</b></tt> and <tt><b>#</b></tt> stand for themselves.
+ * <b>{@code :}</b> and <b>{@code #}</b> stand for themselves.
*
* <p> An <i>absolute</i> URI specifies a scheme; a URI that is not absolute is
* said to be <i>relative</i>. URIs are also classified according to whether
* they are <i>opaque</i> or <i>hierarchical</i>.
*
* <p> An <i>opaque</i> URI is an absolute URI whose scheme-specific part does
- * not begin with a slash character (<tt>'/'</tt>). Opaque URIs are not
+ * not begin with a slash character ({@code '/'}). Opaque URIs are not
* subject to further parsing. Some examples of opaque URIs are:
*
* <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td><tt>mailto:java-net@java.sun.com</tt><td></tr>
- * <tr><td><tt>news:comp.lang.java</tt><td></tr>
- * <tr><td><tt>urn:isbn:096139210x</tt></td></tr>
+ * <tr><td>{@code mailto:java-net@java.sun.com}<td></tr>
+ * <tr><td>{@code news:comp.lang.java}<td></tr>
+ * <tr><td>{@code urn:isbn:096139210x}</td></tr>
* </table></blockquote>
*
* <p> A <i>hierarchical</i> URI is either an absolute URI whose
@@ -93,20 +93,20 @@
* URIs are:
*
* <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/</tt><br>
- * <tt>docs/guide/collections/designfaq.html#28</tt><br>
- * <tt>../../../demo/jfc/SwingSet2/src/SwingSet2.java</tt><br>
- * <tt>file:///~/calendar</tt>
+ * {@code http://java.sun.com/j2se/1.3/}<br>
+ * {@code docs/guide/collections/designfaq.html#28}<br>
+ * {@code ../../../demo/jfc/SwingSet2/src/SwingSet2.java}<br>
+ * {@code file:///~/calendar}
* </blockquote>
*
* <p> A hierarchical URI is subject to further parsing according to the syntax
*
* <blockquote>
- * [<i>scheme</i><tt><b>:</b></tt>][<tt><b>//</b></tt><i>authority</i>][<i>path</i>][<tt><b>?</b></tt><i>query</i>][<tt><b>#</b></tt><i>fragment</i>]
+ * [<i>scheme</i><b>{@code :}</b>][<b>{@code //}</b><i>authority</i>][<i>path</i>][<b>{@code ?}</b><i>query</i>][<b>{@code #}</b><i>fragment</i>]
* </blockquote>
*
- * where the characters <tt><b>:</b></tt>, <tt><b>/</b></tt>,
- * <tt><b>?</b></tt>, and <tt><b>#</b></tt> stand for themselves. The
+ * where the characters <b>{@code :}</b>, <b>{@code /}</b>,
+ * <b>{@code ?}</b>, and <b>{@code #}</b> stand for themselves. The
* scheme-specific part of a hierarchical URI consists of the characters
* between the scheme and fragment components.
*
@@ -115,16 +115,16 @@
* parses according to the familiar syntax
*
* <blockquote>
- * [<i>user-info</i><tt><b>@</b></tt>]<i>host</i>[<tt><b>:</b></tt><i>port</i>]
+ * [<i>user-info</i><b>{@code @}</b>]<i>host</i>[<b>{@code :}</b><i>port</i>]
* </blockquote>
*
- * where the characters <tt><b>@</b></tt> and <tt><b>:</b></tt> stand for
+ * where the characters <b>{@code @}</b> and <b>{@code :}</b> stand for
* themselves. Nearly all URI schemes currently in use are server-based. An
* authority component that does not parse in this way is considered to be
* registry-based.
*
* <p> The path component of a hierarchical URI is itself said to be absolute
- * if it begins with a slash character (<tt>'/'</tt>); otherwise it is
+ * if it begins with a slash character ({@code '/'}); otherwise it is
* relative. The path of a hierarchical URI that is either absolute or
* specifies an authority is always absolute.
*
@@ -132,21 +132,21 @@
*
* <blockquote><table summary="Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment">
* <tr><th><i>Component</i></th><th><i>Type</i></th></tr>
- * <tr><td>scheme</td><td><tt>String</tt></td></tr>
- * <tr><td>scheme-specific-part </td><td><tt>String</tt></td></tr>
- * <tr><td>authority</td><td><tt>String</tt></td></tr>
- * <tr><td>user-info</td><td><tt>String</tt></td></tr>
- * <tr><td>host</td><td><tt>String</tt></td></tr>
- * <tr><td>port</td><td><tt>int</tt></td></tr>
- * <tr><td>path</td><td><tt>String</tt></td></tr>
- * <tr><td>query</td><td><tt>String</tt></td></tr>
- * <tr><td>fragment</td><td><tt>String</tt></td></tr>
+ * <tr><td>scheme</td><td>{@code String}</td></tr>
+ * <tr><td>scheme-specific-part </td><td>{@code String}</td></tr>
+ * <tr><td>authority</td><td>{@code String}</td></tr>
+ * <tr><td>user-info</td><td>{@code String}</td></tr>
+ * <tr><td>host</td><td>{@code String}</td></tr>
+ * <tr><td>port</td><td>{@code int}</td></tr>
+ * <tr><td>path</td><td>{@code String}</td></tr>
+ * <tr><td>query</td><td>{@code String}</td></tr>
+ * <tr><td>fragment</td><td>{@code String}</td></tr>
* </table></blockquote>
*
* In a given instance any particular component is either <i>undefined</i> or
* <i>defined</i> with a distinct value. Undefined string components are
- * represented by <tt>null</tt>, while undefined integer components are
- * represented by <tt>-1</tt>. A string component may be defined to have the
+ * represented by {@code null}, while undefined integer components are
+ * represented by {@code -1}. A string component may be defined to have the
* empty string as its value; this is not equivalent to that component being
* undefined.
*
@@ -165,10 +165,10 @@
* The key operations supported by this class are those of
* <i>normalization</i>, <i>resolution</i>, and <i>relativization</i>.
*
- * <p> <i>Normalization</i> is the process of removing unnecessary <tt>"."</tt>
- * and <tt>".."</tt> segments from the path component of a hierarchical URI.
- * Each <tt>"."</tt> segment is simply removed. A <tt>".."</tt> segment is
- * removed only if it is preceded by a non-<tt>".."</tt> segment.
+ * <p> <i>Normalization</i> is the process of removing unnecessary {@code "."}
+ * and {@code ".."} segments from the path component of a hierarchical URI.
+ * Each {@code "."} segment is simply removed. A {@code ".."} segment is
+ * removed only if it is preceded by a non-{@code ".."} segment.
* Normalization has no effect upon opaque URIs.
*
* <p> <i>Resolution</i> is the process of resolving one URI against another,
@@ -179,45 +179,47 @@
* normalized. The result, for example, of resolving
*
* <blockquote>
- * <tt>docs/guide/collections/designfaq.html#28 </tt>(1)
+ * {@code docs/guide/collections/designfaq.html#28}
+ *
+ * (1)
* </blockquote>
*
- * against the base URI <tt>http://java.sun.com/j2se/1.3/</tt> is the result
+ * against the base URI {@code http://java.sun.com/j2se/1.3/} is the result
* URI
*
* <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28</tt>
+ * {@code http://java.sun.com/j2se/1.3/docs/guide/collections/designfaq.html#28}
* </blockquote>
*
* Resolving the relative URI
*
* <blockquote>
- * <tt>../../../demo/jfc/SwingSet2/src/SwingSet2.java </tt>(2)
+ * {@code ../../../demo/jfc/SwingSet2/src/SwingSet2.java} (2)
* </blockquote>
*
* against this result yields, in turn,
*
* <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/demo/jfc/SwingSet2/src/SwingSet2.java</tt>
+ * {@code http://java.sun.com/j2se/1.3/demo/jfc/SwingSet2/src/SwingSet2.java}
* </blockquote>
*
* Resolution of both absolute and relative URIs, and of both absolute and
* relative paths in the case of hierarchical URIs, is supported. Resolving
- * the URI <tt>file:///~calendar</tt> against any other URI simply yields the
+ * the URI {@code file:///~calendar} against any other URI simply yields the
* original URI, since it is absolute. Resolving the relative URI (2) above
* against the relative base URI (1) yields the normalized, but still relative,
* URI
*
* <blockquote>
- * <tt>demo/jfc/SwingSet2/src/SwingSet2.java</tt>
+ * {@code demo/jfc/SwingSet2/src/SwingSet2.java}
* </blockquote>
*
* <p> <i>Relativization</i>, finally, is the inverse of resolution: For any
* two normalized URIs <i>u</i> and <i>v</i>,
*
* <blockquote>
- * <i>u</i><tt>.relativize(</tt><i>u</i><tt>.resolve(</tt><i>v</i><tt>)).equals(</tt><i>v</i><tt>)</tt> and<br>
- * <i>u</i><tt>.resolve(</tt><i>u</i><tt>.relativize(</tt><i>v</i><tt>)).equals(</tt><i>v</i><tt>)</tt> .<br>
+ * <i>u</i>{@code .relativize(}<i>u</i>{@code .resolve(}<i>v</i>{@code )).equals(}<i>v</i>{@code )} and<br>
+ * <i>u</i>{@code .resolve(}<i>u</i>{@code .relativize(}<i>v</i>{@code )).equals(}<i>v</i>{@code )} .<br>
* </blockquote>
*
* This operation is often useful when constructing a document containing URIs
@@ -225,16 +227,16 @@
* possible. For example, relativizing the URI
*
* <blockquote>
- * <tt>http://java.sun.com/j2se/1.3/docs/guide/index.html</tt>
+ * {@code http://java.sun.com/j2se/1.3/docs/guide/index.html}
* </blockquote>
*
* against the base URI
*
* <blockquote>
- * <tt>http://java.sun.com/j2se/1.3</tt>
+ * {@code http://java.sun.com/j2se/1.3}
* </blockquote>
*
- * yields the relative URI <tt>docs/guide/index.html</tt>.
+ * yields the relative URI {@code docs/guide/index.html}.
*
*
* <h4> Character categories </h4>
@@ -247,26 +249,26 @@
* <blockquote><table cellspacing=2 summary="Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other">
* <tr><th valign=top><i>alpha</i></th>
* <td>The US-ASCII alphabetic characters,
- * <tt>'A'</tt> through <tt>'Z'</tt>
- * and <tt>'a'</tt> through <tt>'z'</tt></td></tr>
+ * {@code 'A'} through {@code 'Z'}
+ * and {@code 'a'} through {@code 'z'}</td></tr>
* <tr><th valign=top><i>digit</i></th>
* <td>The US-ASCII decimal digit characters,
- * <tt>'0'</tt> through <tt>'9'</tt></td></tr>
+ * {@code '0'} through {@code '9'}</td></tr>
* <tr><th valign=top><i>alphanum</i></th>
* <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
* <tr><th valign=top><i>unreserved</i> </th>
* <td>All <i>alphanum</i> characters together with those in the string
- * <tt>"_-!.~'()*"</tt></td></tr>
+ * {@code "_-!.~'()*"}</td></tr>
* <tr><th valign=top><i>punct</i></th>
- * <td>The characters in the string <tt>",;:$&+="</tt></td></tr>
+ * <td>The characters in the string {@code ",;:$&+="}</td></tr>
* <tr><th valign=top><i>reserved</i></th>
* <td>All <i>punct</i> characters together with those in the string
- * <tt>"?/[]@"</tt></td></tr>
+ * {@code "?/[]@"}</td></tr>
* <tr><th valign=top><i>escaped</i></th>
* <td>Escaped octets, that is, triplets consisting of the percent
- * character (<tt>'%'</tt>) followed by two hexadecimal digits
- * (<tt>'0'</tt>-<tt>'9'</tt>, <tt>'A'</tt>-<tt>'F'</tt>, and
- * <tt>'a'</tt>-<tt>'f'</tt>)</td></tr>
+ * character ({@code '%'}) followed by two hexadecimal digits
+ * ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
+ * {@code 'a'}-{@code 'f'})</td></tr>
* <tr><th valign=top><i>other</i></th>
* <td>The Unicode characters that are not in the US-ASCII character set,
* are not control characters (according to the {@link
@@ -306,14 +308,14 @@
*
* <li><p><a name="encode"></a> A character is <i>encoded</i> by replacing it
* with the sequence of escaped octets that represent that character in the
- * UTF-8 character set. The Euro currency symbol (<tt>'\u20AC'</tt>),
- * for example, is encoded as <tt>"%E2%82%AC"</tt>. <i>(<b>Deviation from
+ * UTF-8 character set. The Euro currency symbol ({@code '\u005Cu20AC'}),
+ * for example, is encoded as {@code "%E2%82%AC"}. <i>(<b>Deviation from
* RFC 2396</b>, which does not specify any particular character
* set.)</i> </p></li>
*
* <li><p><a name="quote"></a> An illegal character is <i>quoted</i> simply by
* encoding it. The space character, for example, is quoted by replacing it
- * with <tt>"%20"</tt>. UTF-8 contains US-ASCII, hence for US-ASCII
+ * with {@code "%20"}. UTF-8 contains US-ASCII, hence for US-ASCII
* characters this transformation has exactly the effect required by
* RFC 2396. </p></li>
*
@@ -325,7 +327,7 @@
* decoding any encoded non-US-ASCII characters. If a <a
* href="../nio/charset/CharsetDecoder.html#ce">decoding error</a> occurs
* when decoding the escaped octets then the erroneous octets are replaced by
- * <tt>'\uFFFD'</tt>, the Unicode replacement character. </p></li>
+ * {@code '\u005CuFFFD'}, the Unicode replacement character. </p></li>
*
* </ul>
*
@@ -343,7 +345,7 @@
* #URI(java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,java.lang.String,java.lang.String)
* multi-argument constructors} quote illegal characters as
* required by the components in which they appear. The percent character
- * (<tt>'%'</tt>) is always quoted by these constructors. Any <i>other</i>
+ * ({@code '%'}) is always quoted by these constructors. Any <i>other</i>
* characters are preserved. </p></li>
*
* <li><p> The {@link #getRawUserInfo() getRawUserInfo}, {@link #getRawPath()
@@ -379,42 +381,33 @@
* For any URI <i>u</i>, it is always the case that
*
* <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.toString()).equals(</tt><i>u</i><tt>)</tt> .
+ * {@code new URI(}<i>u</i>{@code .toString()).equals(}<i>u</i>{@code )} .
* </blockquote>
*
* For any URI <i>u</i> that does not contain redundant syntax such as two
- * slashes before an empty authority (as in <tt>file:///tmp/</tt> ) or a
+ * slashes before an empty authority (as in {@code file:///tmp/} ) or a
* colon following a host name but no port (as in
- * <tt>http://java.sun.com:</tt> ), and that does not encode characters
+ * {@code http://java.sun.com:} ), and that does not encode characters
* except those that must be quoted, the following identities also hold:
- *
- * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.getScheme(),<br>
- * </tt><i>u</i><tt>.getSchemeSpecificPart(),<br>
- * </tt><i>u</i><tt>.getFragment())<br>
- * .equals(</tt><i>u</i><tt>)</tt>
- * </blockquote>
- *
+ * <p><pre>
+ * new URI(<i>u</i>.getScheme(),
+ * <i>u</i>.getSchemeSpecificPart(),
+ * <i>u</i>.getFragment())
+ * .equals(<i>u</i>)</pre>
* in all cases,
- *
- * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.getScheme(),<br>
- * </tt><i>u</i><tt>.getUserInfo(), </tt><i>u</i><tt>.getAuthority(),<br>
- * </tt><i>u</i><tt>.getPath(), </tt><i>u</i><tt>.getQuery(),<br>
- * </tt><i>u</i><tt>.getFragment())<br>
- * .equals(</tt><i>u</i><tt>)</tt>
- * </blockquote>
- *
+ * <p><pre>
+ * new URI(<i>u</i>.getScheme(),
+ * <i>u</i>.getUserInfo(), <i>u</i>.getAuthority(),
+ * <i>u</i>.getPath(), <i>u</i>.getQuery(),
+ * <i>u</i>.getFragment())
+ * .equals(<i>u</i>)</pre>
* if <i>u</i> is hierarchical, and
- *
- * <blockquote>
- * <tt>new URI(</tt><i>u</i><tt>.getScheme(),<br>
- * </tt><i>u</i><tt>.getUserInfo(), </tt><i>u</i><tt>.getHost(), </tt><i>u</i><tt>.getPort(),<br>
- * </tt><i>u</i><tt>.getPath(), </tt><i>u</i><tt>.getQuery(),<br>
- * </tt><i>u</i><tt>.getFragment())<br>
- * .equals(</tt><i>u</i><tt>)</tt>
- * </blockquote>
- *
+ * <p><pre>
+ * new URI(<i>u</i>.getScheme(),
+ * <i>u</i>.getUserInfo(), <i>u</i>.getHost(), <i>u</i>.getPort(),
+ * <i>u</i>.getPath(), <i>u</i>.getQuery(),
+ * <i>u</i>.getFragment())
+ * .equals(<i>u</i>)</pre>
* if <i>u</i> is hierarchical and has either no authority or a server-based
* authority.
*
@@ -425,8 +418,8 @@
* resource <i>locator</i>. Hence every URL is a URI, abstractly speaking, but
* not every URI is a URL. This is because there is another subcategory of
* URIs, uniform resource <i>names</i> (URNs), which name resources but do not
- * specify how to locate them. The <tt>mailto</tt>, <tt>news</tt>, and
- * <tt>isbn</tt> URIs shown above are examples of URNs.
+ * specify how to locate them. The {@code mailto}, {@code news}, and
+ * {@code isbn} URIs shown above are examples of URNs.
*
* <p> The conceptual distinction between URIs and URLs is reflected in the
* differences between this class and the {@link URL} class.
@@ -535,7 +528,7 @@
* <li><p> An empty authority component is permitted as long as it is
* followed by a non-empty path, a query component, or a fragment
* component. This allows the parsing of URIs such as
- * <tt>"file:///foo/bar"</tt>, which seems to be the intent of
+ * {@code "file:///foo/bar"}, which seems to be the intent of
* RFC 2396 although the grammar does not permit it. If the
* authority component is empty then the user-information, host, and port
* components are undefined. </p></li>
@@ -543,7 +536,7 @@
* <li><p> Empty relative paths are permitted; this seems to be the
* intent of RFC 2396 although the grammar does not permit it. The
* primary consequence of this deviation is that a standalone fragment
- * such as <tt>"#foo"</tt> parses as a relative URI with an empty path
+ * such as {@code "#foo"} parses as a relative URI with an empty path
* and the given fragment, and can be usefully <a
* href="#resolve-frag">resolved</a> against a base URI.
*
@@ -560,12 +553,12 @@
* href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>
* section 3.2.2 although the grammar does not permit it. The
* consequence of this deviation is that the authority component of a
- * hierarchical URI such as <tt>s://123</tt>, will parse as a server-based
+ * hierarchical URI such as {@code s://123}, will parse as a server-based
* authority. </p></li>
*
* <li><p> IPv6 addresses are permitted for the host component. An IPv6
- * address must be enclosed in square brackets (<tt>'['</tt> and
- * <tt>']'</tt>) as specified by <a
+ * address must be enclosed in square brackets ({@code '['} and
+ * {@code ']'}) as specified by <a
* href="http://www.ietf.org/rfc/rfc2732.txt">RFC 2732</a>. The
* IPv6 address itself must parse according to <a
* href="http://www.ietf.org/rfc/rfc2373.txt">RFC 2373</a>. IPv6
@@ -585,7 +578,7 @@
* @param str The string to be parsed into a URI
*
* @throws NullPointerException
- * If <tt>str</tt> is <tt>null</tt>
+ * If {@code str} is {@code null}
*
* @throws URISyntaxException
* If the given string violates RFC 2396, as augmented
@@ -599,10 +592,10 @@
* Constructs a hierarchical URI from the given components.
*
* <p> If a scheme is given then the path, if also given, must either be
- * empty or begin with a slash character (<tt>'/'</tt>). Otherwise a
- * component of the new URI may be left undefined by passing <tt>null</tt>
- * for the corresponding parameter or, in the case of the <tt>port</tt>
- * parameter, by passing <tt>-1</tt>.
+ * empty or begin with a slash character ({@code '/'}). Otherwise a
+ * component of the new URI may be left undefined by passing {@code null}
+ * for the corresponding parameter or, in the case of the {@code port}
+ * parameter, by passing {@code -1}.
*
* <p> This constructor first builds a URI string from the given components
* according to the rules specified in <a
@@ -614,37 +607,37 @@
* <li><p> Initially, the result string is empty. </p></li>
*
* <li><p> If a scheme is given then it is appended to the result,
- * followed by a colon character (<tt>':'</tt>). </p></li>
+ * followed by a colon character ({@code ':'}). </p></li>
*
* <li><p> If user information, a host, or a port are given then the
- * string <tt>"//"</tt> is appended. </p></li>
+ * string {@code "//"} is appended. </p></li>
*
* <li><p> If user information is given then it is appended, followed by
- * a commercial-at character (<tt>'@'</tt>). Any character not in the
+ * a commercial-at character ({@code '@'}). Any character not in the
* <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
* categories is <a href="#quote">quoted</a>. </p></li>
*
* <li><p> If a host is given then it is appended. If the host is a
* literal IPv6 address but is not enclosed in square brackets
- * (<tt>'['</tt> and <tt>']'</tt>) then the square brackets are added.
+ * ({@code '['} and {@code ']'}) then the square brackets are added.
* </p></li>
*
* <li><p> If a port number is given then a colon character
- * (<tt>':'</tt>) is appended, followed by the port number in decimal.
+ * ({@code ':'}) is appended, followed by the port number in decimal.
* </p></li>
*
* <li><p> If a path is given then it is appended. Any character not in
* the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
- * categories, and not equal to the slash character (<tt>'/'</tt>) or the
- * commercial-at character (<tt>'@'</tt>), is quoted. </p></li>
+ * categories, and not equal to the slash character ({@code '/'}) or the
+ * commercial-at character ({@code '@'}), is quoted. </p></li>
*
* <li><p> If a query is given then a question-mark character
- * (<tt>'?'</tt>) is appended, followed by the query. Any character that
+ * ({@code '?'}) is appended, followed by the query. Any character that
* is not a <a href="#legal-chars">legal URI character</a> is quoted.
* </p></li>
*
* <li><p> Finally, if a fragment is given then a hash character
- * (<tt>'#'</tt>) is appended, followed by the fragment. Any character
+ * ({@code '#'}) is appended, followed by the fragment. Any character
* that is not a legal URI character is quoted. </p></li>
*
* </ol>
@@ -684,8 +677,8 @@
* Constructs a hierarchical URI from the given components.
*
* <p> If a scheme is given then the path, if also given, must either be
- * empty or begin with a slash character (<tt>'/'</tt>). Otherwise a
- * component of the new URI may be left undefined by passing <tt>null</tt>
+ * empty or begin with a slash character ({@code '/'}). Otherwise a
+ * component of the new URI may be left undefined by passing {@code null}
* for the corresponding parameter.
*
* <p> This constructor first builds a URI string from the given components
@@ -698,28 +691,28 @@
* <li><p> Initially, the result string is empty. </p></li>
*
* <li><p> If a scheme is given then it is appended to the result,
- * followed by a colon character (<tt>':'</tt>). </p></li>
+ * followed by a colon character ({@code ':'}). </p></li>
*
- * <li><p> If an authority is given then the string <tt>"//"</tt> is
+ * <li><p> If an authority is given then the string {@code "//"} is
* appended, followed by the authority. If the authority contains a
* literal IPv6 address then the address must be enclosed in square
- * brackets (<tt>'['</tt> and <tt>']'</tt>). Any character not in the
+ * brackets ({@code '['} and {@code ']'}). Any character not in the
* <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
* categories, and not equal to the commercial-at character
- * (<tt>'@'</tt>), is <a href="#quote">quoted</a>. </p></li>
+ * ({@code '@'}), is <a href="#quote">quoted</a>. </p></li>
*
* <li><p> If a path is given then it is appended. Any character not in
* the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, or <i>other</i>
- * categories, and not equal to the slash character (<tt>'/'</tt>) or the
- * commercial-at character (<tt>'@'</tt>), is quoted. </p></li>
+ * categories, and not equal to the slash character ({@code '/'}) or the
+ * commercial-at character ({@code '@'}), is quoted. </p></li>
*
* <li><p> If a query is given then a question-mark character
- * (<tt>'?'</tt>) is appended, followed by the query. Any character that
+ * ({@code '?'}) is appended, followed by the query. Any character that
* is not a <a href="#legal-chars">legal URI character</a> is quoted.
* </p></li>
*
* <li><p> Finally, if a fragment is given then a hash character
- * (<tt>'#'</tt>) is appended, followed by the fragment. Any character
+ * ({@code '#'}) is appended, followed by the fragment. Any character
* that is not a legal URI character is quoted. </p></li>
*
* </ol>
@@ -756,15 +749,15 @@
/**
* Constructs a hierarchical URI from the given components.
*
- * <p> A component may be left undefined by passing <tt>null</tt>.
+ * <p> A component may be left undefined by passing {@code null}.
*
* <p> This convenience constructor works as if by invoking the
* seven-argument constructor as follows:
*
- * <blockquote><tt>
- * new {@link #URI(String, String, String, int, String, String, String)
- * URI}(scheme, null, host, -1, path, null, fragment);
- * </tt></blockquote>
+ * <blockquote>
+ * {@code new} {@link #URI(String, String, String, int, String, String, String)
+ * URI}{@code (scheme, null, host, -1, path, null, fragment);}
+ * </blockquote>
*
* @param scheme Scheme name
* @param host Host name
@@ -784,7 +777,7 @@
/**
* Constructs a URI from the given components.
*
- * <p> A component may be left undefined by passing <tt>null</tt>.
+ * <p> A component may be left undefined by passing {@code null}.
*
* <p> This constructor first builds a URI in string form using the given
* components as follows: </p>
@@ -794,14 +787,14 @@
* <li><p> Initially, the result string is empty. </p></li>
*
* <li><p> If a scheme is given then it is appended to the result,
- * followed by a colon character (<tt>':'</tt>). </p></li>
+ * followed by a colon character ({@code ':'}). </p></li>
*
* <li><p> If a scheme-specific part is given then it is appended. Any
* character that is not a <a href="#legal-chars">legal URI character</a>
* is <a href="#quote">quoted</a>. </p></li>
*
* <li><p> Finally, if a fragment is given then a hash character
- * (<tt>'#'</tt>) is appended to the string, followed by the fragment.
+ * ({@code '#'}) is appended to the string, followed by the fragment.
* Any character that is not a legal URI character is quoted. </p></li>
*
* </ol>
@@ -847,7 +840,7 @@
* @return The new URI
*
* @throws NullPointerException
- * If <tt>str</tt> is <tt>null</tt>
+ * If {@code str} is {@code null}
*
* @throws IllegalArgumentException
* If the given string violates RFC 2396
@@ -882,7 +875,7 @@
* cannot always distinguish a malformed server-based authority from a
* legitimate registry-based authority. It must therefore treat some
* instances of the former as instances of the latter. The authority
- * component in the URI string <tt>"//foo:bar"</tt>, for example, is not a
+ * component in the URI string {@code "//foo:bar"}, for example, is not a
* legal server-based authority but it is legal as a registry-based
* authority.
*
@@ -892,7 +885,7 @@
* treated as an error. In these cases a statement such as
*
* <blockquote>
- * <tt>URI </tt><i>u</i><tt> = new URI(str).parseServerAuthority();</tt>
+ * {@code URI }<i>u</i>{@code = new URI(str).parseServerAuthority();}
* </blockquote>
*
* <p> can be used to ensure that <i>u</i> always refers to a URI that, if
@@ -936,26 +929,26 @@
*
* <ol>
*
- * <li><p> All <tt>"."</tt> segments are removed. </p></li>
+ * <li><p> All {@code "."} segments are removed. </p></li>
*
- * <li><p> If a <tt>".."</tt> segment is preceded by a non-<tt>".."</tt>
+ * <li><p> If a {@code ".."} segment is preceded by a non-{@code ".."}
* segment then both of these segments are removed. This step is
* repeated until it is no longer applicable. </p></li>
*
* <li><p> If the path is relative, and if its first segment contains a
- * colon character (<tt>':'</tt>), then a <tt>"."</tt> segment is
+ * colon character ({@code ':'}), then a {@code "."} segment is
* prepended. This prevents a relative URI with a path such as
- * <tt>"a:b/c/d"</tt> from later being re-parsed as an opaque URI with a
- * scheme of <tt>"a"</tt> and a scheme-specific part of <tt>"b/c/d"</tt>.
+ * {@code "a:b/c/d"} from later being re-parsed as an opaque URI with a
+ * scheme of {@code "a"} and a scheme-specific part of {@code "b/c/d"}.
* <b><i>(Deviation from RFC 2396)</i></b> </p></li>
*
* </ol>
*
- * <p> A normalized path will begin with one or more <tt>".."</tt> segments
- * if there were insufficient non-<tt>".."</tt> segments preceding them to
- * allow their removal. A normalized path will begin with a <tt>"."</tt>
+ * <p> A normalized path will begin with one or more {@code ".."} segments
+ * if there were insufficient non-{@code ".."} segments preceding them to
+ * allow their removal. A normalized path will begin with a {@code "."}
* segment if one was inserted by step 3 above. Otherwise, a normalized
- * path will not contain any <tt>"."</tt> or <tt>".."</tt> segments. </p>
+ * path will not contain any {@code "."} or {@code ".."} segments. </p>
*
* @return A URI equivalent to this URI,
* but whose path is in normal form
@@ -975,7 +968,7 @@
* query components are undefined, then a URI with the given fragment but
* with all other components equal to those of this URI is returned. This
* allows a URI representing a standalone fragment reference, such as
- * <tt>"#foo"</tt>, to be usefully resolved against a base URI.
+ * {@code "#foo"}, to be usefully resolved against a base URI.
*
* <p> Otherwise this method constructs a new hierarchical URI in a manner
* consistent with <a
@@ -1016,7 +1009,7 @@
* @return The resulting URI
*
* @throws NullPointerException
- * If <tt>uri</tt> is <tt>null</tt>
+ * If {@code uri} is {@code null}
*/
public URI resolve(URI uri) {
return resolve(this, uri);
@@ -1027,14 +1020,14 @@
* against this URI.
*
* <p> This convenience method works as if invoking it were equivalent to
- * evaluating the expression <tt>{@link #resolve(java.net.URI)
- * resolve}(URI.{@link #create(String) create}(str))</tt>. </p>
+ * evaluating the expression {@link #resolve(java.net.URI)
+ * resolve}{@code (URI.}{@link #create(String) create}{@code (str))}. </p>
*
* @param str The string to be parsed into a URI
* @return The resulting URI
*
* @throws NullPointerException
- * If <tt>str</tt> is <tt>null</tt>
+ * If {@code str} is {@code null}
*
* @throws IllegalArgumentException
* If the given string violates RFC 2396
@@ -1067,7 +1060,7 @@
* @return The resulting URI
*
* @throws NullPointerException
- * If <tt>uri</tt> is <tt>null</tt>
+ * If {@code uri} is {@code null}
*/
public URI relativize(URI uri) {
return relativize(this, uri);
@@ -1077,7 +1070,7 @@
* Constructs a URL from this URI.
*
* <p> This convenience method works as if invoking it were equivalent to
- * evaluating the expression <tt>new URL(this.toString())</tt> after
+ * evaluating the expression {@code new URL(this.toString())} after
* first checking that this URI is absolute. </p>
*
* @return A URL constructed from this URI
@@ -1102,14 +1095,14 @@
* Returns the scheme component of this URI.
*
* <p> The scheme component of a URI, if defined, only contains characters
- * in the <i>alphanum</i> category and in the string <tt>"-.+"</tt>. A
+ * in the <i>alphanum</i> category and in the string {@code "-.+"}. A
* scheme always starts with an <i>alpha</i> character. <p>
*
* The scheme component of a URI cannot contain escaped octets, hence this
* method does not perform any decoding.
*
* @return The scheme component of this URI,
- * or <tt>null</tt> if the scheme is undefined
+ * or {@code null} if the scheme is undefined
*/
public String getScheme() {
return scheme;
@@ -1120,7 +1113,7 @@
*
* <p> A URI is absolute if, and only if, it has a scheme component. </p>
*
- * @return <tt>true</tt> if, and only if, this URI is absolute
+ * @return {@code true} if, and only if, this URI is absolute
*/
public boolean isAbsolute() {
return scheme != null;
@@ -1134,7 +1127,7 @@
* An opaque URI has a scheme, a scheme-specific part, and possibly
* a fragment; all other components are undefined. </p>
*
- * @return <tt>true</tt> if, and only if, this URI is opaque
+ * @return {@code true} if, and only if, this URI is opaque
*/
public boolean isOpaque() {
return path == null;
@@ -1148,7 +1141,7 @@
* characters. </p>
*
* @return The raw scheme-specific part of this URI
- * (never <tt>null</tt>)
+ * (never {@code null})
*/
public String getRawSchemeSpecificPart() {
defineSchemeSpecificPart();
@@ -1164,7 +1157,7 @@
* href="#decode">decoded</a>. </p>
*
* @return The decoded scheme-specific part of this URI
- * (never <tt>null</tt>)
+ * (never {@code null})
*/
public String getSchemeSpecificPart() {
if (decodedSchemeSpecificPart == null)
@@ -1176,14 +1169,14 @@
* Returns the raw authority component of this URI.
*
* <p> The authority component of a URI, if defined, only contains the
- * commercial-at character (<tt>'@'</tt>) and characters in the
+ * commercial-at character ({@code '@'}) and characters in the
* <i>unreserved</i>, <i>punct</i>, <i>escaped</i>, and <i>other</i>
* categories. If the authority is server-based then it is further
* constrained to have valid user-information, host, and port
* components. </p>
*
* @return The raw authority component of this URI,
- * or <tt>null</tt> if the authority is undefined
+ * or {@code null} if the authority is undefined
*/
public String getRawAuthority() {
return authority;
@@ -1197,7 +1190,7 @@
* sequences of escaped octets are <a href="#decode">decoded</a>. </p>
*
* @return The decoded authority component of this URI,
- * or <tt>null</tt> if the authority is undefined
+ * or {@code null} if the authority is undefined
*/
public String getAuthority() {
if (decodedAuthority == null)
@@ -1213,7 +1206,7 @@
* <i>other</i> categories. </p>
*
* @return The raw user-information component of this URI,
- * or <tt>null</tt> if the user information is undefined
+ * or {@code null} if the user information is undefined
*/
public String getRawUserInfo() {
return userInfo;
@@ -1227,7 +1220,7 @@
* sequences of escaped octets are <a href="#decode">decoded</a>. </p>
*
* @return The decoded user-information component of this URI,
- * or <tt>null</tt> if the user information is undefined
+ * or {@code null} if the user information is undefined
*/
public String getUserInfo() {
if ((decodedUserInfo == null) && (userInfo != null))
@@ -1244,21 +1237,21 @@
* <ul>
*
* <li><p> A domain name consisting of one or more <i>labels</i>
- * separated by period characters (<tt>'.'</tt>), optionally followed by
+ * separated by period characters ({@code '.'}), optionally followed by
* a period character. Each label consists of <i>alphanum</i> characters
- * as well as hyphen characters (<tt>'-'</tt>), though hyphens never
+ * as well as hyphen characters ({@code '-'}), though hyphens never
* occur as the first or last characters in a label. The rightmost
* label of a domain name consisting of two or more labels, begins
* with an <i>alpha</i> character. </li>
*
* <li><p> A dotted-quad IPv4 address of the form
- * <i>digit</i><tt>+.</tt><i>digit</i><tt>+.</tt><i>digit</i><tt>+.</tt><i>digit</i><tt>+</tt>,
+ * <i>digit</i>{@code +.}<i>digit</i>{@code +.}<i>digit</i>{@code +.}<i>digit</i>{@code +},
* where no <i>digit</i> sequence is longer than three characters and no
* sequence has a value larger than 255. </p></li>
*
- * <li><p> An IPv6 address enclosed in square brackets (<tt>'['</tt> and
- * <tt>']'</tt>) and consisting of hexadecimal digits, colon characters
- * (<tt>':'</tt>), and possibly an embedded IPv4 address. The full
+ * <li><p> An IPv6 address enclosed in square brackets ({@code '['} and
+ * {@code ']'}) and consisting of hexadecimal digits, colon characters
+ * ({@code ':'}), and possibly an embedded IPv4 address. The full
* syntax of IPv6 addresses is specified in <a
* href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC 2373: IPv6
* Addressing Architecture</i></a>. </p></li>
@@ -1269,7 +1262,7 @@
* method does not perform any decoding.
*
* @return The host component of this URI,
- * or <tt>null</tt> if the host is undefined
+ * or {@code null} if the host is undefined
*/
public String getHost() {
return host;
@@ -1282,7 +1275,7 @@
* integer. </p>
*
* @return The port component of this URI,
- * or <tt>-1</tt> if the port is undefined
+ * or {@code -1} if the port is undefined
*/
public int getPort() {
return port;
@@ -1292,12 +1285,12 @@
* Returns the raw path component of this URI.
*
* <p> The path component of a URI, if defined, only contains the slash
- * character (<tt>'/'</tt>), the commercial-at character (<tt>'@'</tt>),
+ * character ({@code '/'}), the commercial-at character ({@code '@'}),
* and characters in the <i>unreserved</i>, <i>punct</i>, <i>escaped</i>,
* and <i>other</i> categories. </p>
*
* @return The path component of this URI,
- * or <tt>null</tt> if the path is undefined
+ * or {@code null} if the path is undefined
*/
public String getRawPath() {
return path;
@@ -1311,7 +1304,7 @@
* escaped octets are <a href="#decode">decoded</a>. </p>
*
* @return The decoded path component of this URI,
- * or <tt>null</tt> if the path is undefined
+ * or {@code null} if the path is undefined
*/
public String getPath() {
if ((decodedPath == null) && (path != null))
@@ -1326,7 +1319,7 @@
* characters. </p>
*
* @return The raw query component of this URI,
- * or <tt>null</tt> if the query is undefined
+ * or {@code null} if the query is undefined
*/
public String getRawQuery() {
return query;
@@ -1340,7 +1333,7 @@
* escaped octets are <a href="#decode">decoded</a>. </p>
*
* @return The decoded query component of this URI,
- * or <tt>null</tt> if the query is undefined
+ * or {@code null} if the query is undefined
*/
public String getQuery() {
if ((decodedQuery == null) && (query != null))
@@ -1355,7 +1348,7 @@
* characters. </p>
*
* @return The raw fragment component of this URI,
- * or <tt>null</tt> if the fragment is undefined
+ * or {@code null} if the fragment is undefined
*/
public String getRawFragment() {
return fragment;
@@ -1369,7 +1362,7 @@
* sequences of escaped octets are <a href="#decode">decoded</a>. </p>
*
* @return The decoded fragment component of this URI,
- * or <tt>null</tt> if the fragment is undefined
+ * or {@code null} if the fragment is undefined
*/
public String getFragment() {
if ((decodedFragment == null) && (fragment != null))
@@ -1384,7 +1377,7 @@
* Tests this URI for equality with another object.
*
* <p> If the given object is not a URI then this method immediately
- * returns <tt>false</tt>.
+ * returns {@code false}.
*
* <p> For two URIs to be considered equal requires that either both are
* opaque or both are hierarchical. Their schemes must either both be
@@ -1414,7 +1407,7 @@
*
* @param ob The object to which this object is to be compared
*
- * @return <tt>true</tt> if, and only if, the given object is a URI that
+ * @return {@code true} if, and only if, the given object is a URI that
* is identical to this URI
*/
public boolean equals(Object ob) {
@@ -1635,7 +1628,7 @@
/**
* Saves the content of this URI to the given serial stream.
*
- * <p> The only serializable field of a URI instance is its <tt>string</tt>
+ * <p> The only serializable field of a URI instance is its {@code string}
* field. That field is given a value, if it does not have one already,
* and then the {@link java.io.ObjectOutputStream#defaultWriteObject()}
* method of the given object-output stream is invoked. </p>
@@ -1654,7 +1647,7 @@
* Reconstitutes a URI from the given serial stream.
*
* <p> The {@link java.io.ObjectInputStream#defaultReadObject()} method is
- * invoked to read the value of the <tt>string</tt> field. The result is
+ * invoked to read the value of the {@code string} field. The result is
* then parsed in the usual way.
*
* @param is The object-input stream from which this object
--- a/jdk/src/share/classes/java/net/URISyntaxException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URISyntaxException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -50,13 +50,13 @@
* @param input The input string
* @param reason A string explaining why the input could not be parsed
* @param index The index at which the parse error occurred,
- * or <tt>-1</tt> if the index is not known
+ * or {@code -1} if the index is not known
*
* @throws NullPointerException
- * If either the input or reason strings are <tt>null</tt>
+ * If either the input or reason strings are {@code null}
*
* @throws IllegalArgumentException
- * If the error index is less than <tt>-1</tt>
+ * If the error index is less than {@code -1}
*/
public URISyntaxException(String input, String reason, int index) {
super(reason);
@@ -70,13 +70,13 @@
/**
* Constructs an instance from the given input string and reason. The
- * resulting object will have an error index of <tt>-1</tt>.
+ * resulting object will have an error index of {@code -1}.
*
* @param input The input string
* @param reason A string explaining why the input could not be parsed
*
* @throws NullPointerException
- * If either the input or reason strings are <tt>null</tt>
+ * If either the input or reason strings are {@code null}
*/
public URISyntaxException(String input, String reason) {
this(input, reason, -1);
@@ -102,7 +102,7 @@
/**
* Returns an index into the input string of the position at which the
- * parse error occurred, or <tt>-1</tt> if this position is not known.
+ * parse error occurred, or {@code -1} if this position is not known.
*
* @return The error index
*/
@@ -113,8 +113,8 @@
/**
* Returns a string describing the parse error. The resulting string
* consists of the reason string followed by a colon character
- * (<tt>':'</tt>), a space, and the input string. If the error index is
- * defined then the string <tt>" at index "</tt> followed by the index, in
+ * ({@code ':'}), a space, and the input string. If the error index is
+ * defined then the string {@code " at index "} followed by the index, in
* decimal, is inserted after the reason string and before the colon
* character.
*
--- a/jdk/src/share/classes/java/net/URL.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URL.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -32,7 +32,7 @@
import sun.security.util.SecurityConstants;
/**
- * Class <code>URL</code> represents a Uniform Resource
+ * Class {@code URL} represents a Uniform Resource
* Locator, a pointer to a "resource" on the World
* Wide Web. A resource can be something as simple as a file or a
* directory, or it can be a reference to a more complicated object,
@@ -49,10 +49,10 @@
* </pre></blockquote>
* <p>
* The URL above indicates that the protocol to use is
- * <code>http</code> (HyperText Transfer Protocol) and that the
+ * {@code http} (HyperText Transfer Protocol) and that the
* information resides on a host machine named
- * <code>www.example.com</code>. The information on that host
- * machine is named <code>/docs/resource1.html</code>. The exact
+ * {@code www.example.com}. The information on that host
+ * machine is named {@code /docs/resource1.html}. The exact
* meaning of this name on the host machine is both protocol
* dependent and host dependent. The information normally resides in
* a file, but it could be generated on the fly. This component of
@@ -62,13 +62,13 @@
* port number to which the TCP connection is made on the remote host
* machine. If the port is not specified, the default port for
* the protocol is used instead. For example, the default port for
- * <code>http</code> is <code>80</code>. An alternative port could be
+ * {@code http} is {@code 80}. An alternative port could be
* specified as:
* <blockquote><pre>
* http://www.example.com:1080/docs/resource1.html
* </pre></blockquote>
* <p>
- * The syntax of <code>URL</code> is defined by <a
+ * The syntax of {@code URL} is defined by <a
* href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC 2396: Uniform
* Resource Identifiers (URI): Generic Syntax</i></a>, amended by <a
* href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC 2732: Format for
@@ -86,7 +86,7 @@
* This fragment is not technically part of the URL. Rather, it
* indicates that after the specified resource is retrieved, the
* application is specifically interested in that part of the
- * document that has the tag <code>chapter1</code> attached to it. The
+ * document that has the tag {@code chapter1} attached to it. The
* meaning of a tag is resource specific.
* <p>
* An application can also specify a "relative URL",
@@ -170,8 +170,8 @@
private int port = -1;
/**
- * The specified file name on that host. <code>file</code> is
- * defined as <code>path[?query]</code>
+ * The specified file name on that host. {@code file} is
+ * defined as {@code path[?query]}
* @serial
*/
private String file;
@@ -220,42 +220,42 @@
private int hashCode = -1;
/**
- * Creates a <code>URL</code> object from the specified
- * <code>protocol</code>, <code>host</code>, <code>port</code>
- * number, and <code>file</code>.<p>
+ * Creates a {@code URL} object from the specified
+ * {@code protocol}, {@code host}, {@code port}
+ * number, and {@code file}.<p>
*
- * <code>host</code> can be expressed as a host name or a literal
+ * {@code host} can be expressed as a host name or a literal
* IP address. If IPv6 literal address is used, it should be
- * enclosed in square brackets (<tt>'['</tt> and <tt>']'</tt>), as
+ * enclosed in square brackets ({@code '['} and {@code ']'}), as
* specified by <a
* href="http://www.ietf.org/rfc/rfc2732.txt">RFC 2732</a>;
* However, the literal IPv6 address format defined in <a
* href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC 2373: IP
* Version 6 Addressing Architecture</i></a> is also accepted.<p>
*
- * Specifying a <code>port</code> number of <code>-1</code>
+ * Specifying a {@code port} number of {@code -1}
* indicates that the URL should use the default port for the
* protocol.<p>
*
* If this is the first URL object being created with the specified
* protocol, a <i>stream protocol handler</i> object, an instance of
- * class <code>URLStreamHandler</code>, is created for that protocol:
+ * class {@code URLStreamHandler}, is created for that protocol:
* <ol>
* <li>If the application has previously set up an instance of
- * <code>URLStreamHandlerFactory</code> as the stream handler factory,
- * then the <code>createURLStreamHandler</code> method of that instance
+ * {@code URLStreamHandlerFactory} as the stream handler factory,
+ * then the {@code createURLStreamHandler} method of that instance
* is called with the protocol string as an argument to create the
* stream protocol handler.
- * <li>If no <code>URLStreamHandlerFactory</code> has yet been set up,
- * or if the factory's <code>createURLStreamHandler</code> method
- * returns <code>null</code>, then the constructor finds the
+ * <li>If no {@code URLStreamHandlerFactory} has yet been set up,
+ * or if the factory's {@code createURLStreamHandler} method
+ * returns {@code null}, then the constructor finds the
* value of the system property:
* <blockquote><pre>
* java.protocol.handler.pkgs
* </pre></blockquote>
- * If the value of that system property is not <code>null</code>,
+ * If the value of that system property is not {@code null},
* it is interpreted as a list of packages separated by a vertical
- * slash character '<code>|</code>'. The constructor tries to load
+ * slash character '{@code |}'. The constructor tries to load
* the class named:
* <blockquote><pre>
* <<i>package</i>>.<<i>protocol</i>>.Handler
@@ -263,7 +263,7 @@
* where <<i>package</i>> is replaced by the name of the package
* and <<i>protocol</i>> is replaced by the name of the protocol.
* If this class does not exist, or if the class exists but it is not
- * a subclass of <code>URLStreamHandler</code>, then the next package
+ * a subclass of {@code URLStreamHandler}, then the next package
* in the list is tried.
* <li>If the previous step fails to find a protocol handler, then the
* constructor tries to load from a system default package.
@@ -271,8 +271,8 @@
* <<i>system default package</i>>.<<i>protocol</i>>.Handler
* </pre></blockquote>
* If this class does not exist, or if the class exists but it is not a
- * subclass of <code>URLStreamHandler</code>, then a
- * <code>MalformedURLException</code> is thrown.
+ * subclass of {@code URLStreamHandler}, then a
+ * {@code MalformedURLException} is thrown.
* </ol>
*
* <p>Protocol handlers for the following protocols are guaranteed
@@ -304,13 +304,13 @@
}
/**
- * Creates a URL from the specified <code>protocol</code>
- * name, <code>host</code> name, and <code>file</code> name. The
+ * Creates a URL from the specified {@code protocol}
+ * name, {@code host} name, and {@code file} name. The
* default port for the specified protocol is used.
* <p>
* This method is equivalent to calling the four-argument
- * constructor with the arguments being <code>protocol</code>,
- * <code>host</code>, <code>-1</code>, and <code>file</code>.
+ * constructor with the arguments being {@code protocol},
+ * {@code host}, {@code -1}, and {@code file}.
*
* No validation of the inputs is performed by this constructor.
*
@@ -327,21 +327,21 @@
}
/**
- * Creates a <code>URL</code> object from the specified
- * <code>protocol</code>, <code>host</code>, <code>port</code>
- * number, <code>file</code>, and <code>handler</code>. Specifying
- * a <code>port</code> number of <code>-1</code> indicates that
+ * Creates a {@code URL} object from the specified
+ * {@code protocol}, {@code host}, {@code port}
+ * number, {@code file}, and {@code handler}. Specifying
+ * a {@code port} number of {@code -1} indicates that
* the URL should use the default port for the protocol. Specifying
- * a <code>handler</code> of <code>null</code> indicates that the URL
+ * a {@code handler} of {@code null} indicates that the URL
* should use a default stream handler for the protocol, as outlined
* for:
* java.net.URL#URL(java.lang.String, java.lang.String, int,
* java.lang.String)
*
* <p>If the handler is not null and there is a security manager,
- * the security manager's <code>checkPermission</code>
+ * the security manager's {@code checkPermission}
* method is called with a
- * <code>NetPermission("specifyStreamHandler")</code> permission.
+ * {@code NetPermission("specifyStreamHandler")} permission.
* This may result in a SecurityException.
*
* No validation of the inputs is performed by this constructor.
@@ -354,7 +354,7 @@
* @exception MalformedURLException if an unknown protocol is specified.
* @exception SecurityException
* if a security manager exists and its
- * <code>checkPermission</code> method doesn't allow
+ * {@code checkPermission} method doesn't allow
* specifying a stream handler explicitly.
* @see java.lang.System#getProperty(java.lang.String)
* @see java.net.URL#setURLStreamHandlerFactory(
@@ -417,15 +417,15 @@
}
/**
- * Creates a <code>URL</code> object from the <code>String</code>
+ * Creates a {@code URL} object from the {@code String}
* representation.
* <p>
* This constructor is equivalent to a call to the two-argument
- * constructor with a <code>null</code> first argument.
+ * constructor with a {@code null} first argument.
*
- * @param spec the <code>String</code> to parse as a URL.
+ * @param spec the {@code String} to parse as a URL.
* @exception MalformedURLException if no protocol is specified, or an
- * unknown protocol is found, or <tt>spec</tt> is <tt>null</tt>.
+ * unknown protocol is found, or {@code spec} is {@code null}.
* @see java.net.URL#URL(java.net.URL, java.lang.String)
*/
public URL(String spec) throws MalformedURLException {
@@ -470,9 +470,9 @@
* For a more detailed description of URL parsing, refer to RFC2396.
*
* @param context the context in which to parse the specification.
- * @param spec the <code>String</code> to parse as a URL.
+ * @param spec the {@code String} to parse as a URL.
* @exception MalformedURLException if no protocol is specified, or an
- * unknown protocol is found, or <tt>spec</tt> is <tt>null</tt>.
+ * unknown protocol is found, or {@code spec} is {@code null}.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
* @see java.net.URLStreamHandler
@@ -489,13 +489,13 @@
* occurs as with the two argument constructor.
*
* @param context the context in which to parse the specification.
- * @param spec the <code>String</code> to parse as a URL.
+ * @param spec the {@code String} to parse as a URL.
* @param handler the stream handler for the URL.
* @exception MalformedURLException if no protocol is specified, or an
- * unknown protocol is found, or <tt>spec</tt> is <tt>null</tt>.
+ * unknown protocol is found, or {@code spec} is {@code null}.
* @exception SecurityException
* if a security manager exists and its
- * <code>checkPermission</code> method doesn't allow
+ * {@code checkPermission} method doesn't allow
* specifying a stream handler.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
@@ -719,9 +719,9 @@
}
/**
- * Gets the query part of this <code>URL</code>.
+ * Gets the query part of this {@code URL}.
*
- * @return the query part of this <code>URL</code>,
+ * @return the query part of this {@code URL},
* or <CODE>null</CODE> if one does not exist
* @since 1.3
*/
@@ -730,9 +730,9 @@
}
/**
- * Gets the path part of this <code>URL</code>.
+ * Gets the path part of this {@code URL}.
*
- * @return the path part of this <code>URL</code>, or an
+ * @return the path part of this {@code URL}, or an
* empty string if one does not exist
* @since 1.3
*/
@@ -741,9 +741,9 @@
}
/**
- * Gets the userInfo part of this <code>URL</code>.
+ * Gets the userInfo part of this {@code URL}.
*
- * @return the userInfo part of this <code>URL</code>, or
+ * @return the userInfo part of this {@code URL}, or
* <CODE>null</CODE> if one does not exist
* @since 1.3
*/
@@ -752,9 +752,9 @@
}
/**
- * Gets the authority part of this <code>URL</code>.
+ * Gets the authority part of this {@code URL}.
*
- * @return the authority part of this <code>URL</code>
+ * @return the authority part of this {@code URL}
* @since 1.3
*/
public String getAuthority() {
@@ -762,7 +762,7 @@
}
/**
- * Gets the port number of this <code>URL</code>.
+ * Gets the port number of this {@code URL}.
*
* @return the port number, or -1 if the port is not set
*/
@@ -772,7 +772,7 @@
/**
* Gets the default port number of the protocol associated
- * with this <code>URL</code>. If the URL scheme or the URLStreamHandler
+ * with this {@code URL}. If the URL scheme or the URLStreamHandler
* for the URL do not define a default port number,
* then -1 is returned.
*
@@ -784,35 +784,35 @@
}
/**
- * Gets the protocol name of this <code>URL</code>.
+ * Gets the protocol name of this {@code URL}.
*
- * @return the protocol of this <code>URL</code>.
+ * @return the protocol of this {@code URL}.
*/
public String getProtocol() {
return protocol;
}
/**
- * Gets the host name of this <code>URL</code>, if applicable.
+ * Gets the host name of this {@code URL}, if applicable.
* The format of the host conforms to RFC 2732, i.e. for a
* literal IPv6 address, this method will return the IPv6 address
- * enclosed in square brackets (<tt>'['</tt> and <tt>']'</tt>).
+ * enclosed in square brackets ({@code '['} and {@code ']'}).
*
- * @return the host name of this <code>URL</code>.
+ * @return the host name of this {@code URL}.
*/
public String getHost() {
return host;
}
/**
- * Gets the file name of this <code>URL</code>.
+ * Gets the file name of this {@code URL}.
* The returned file portion will be
* the same as <CODE>getPath()</CODE>, plus the concatenation of
* the value of <CODE>getQuery()</CODE>, if any. If there is
* no query portion, this method and <CODE>getPath()</CODE> will
* return identical results.
*
- * @return the file name of this <code>URL</code>,
+ * @return the file name of this {@code URL},
* or an empty string if one does not exist
*/
public String getFile() {
@@ -821,10 +821,10 @@
/**
* Gets the anchor (also known as the "reference") of this
- * <code>URL</code>.
+ * {@code URL}.
*
* @return the anchor (also known as the "reference") of this
- * <code>URL</code>, or <CODE>null</CODE> if one does not exist
+ * {@code URL}, or <CODE>null</CODE> if one does not exist
*/
public String getRef() {
return ref;
@@ -834,7 +834,7 @@
* Compares this URL for equality with another object.<p>
*
* If the given object is not a URL then this method immediately returns
- * <code>false</code>.<p>
+ * {@code false}.<p>
*
* Two URL objects are equal if they have the same protocol, reference
* equivalent hosts, have the same port number on the host, and the same
@@ -848,12 +848,12 @@
* Since hosts comparison requires name resolution, this operation is a
* blocking operation. <p>
*
- * Note: The defined behavior for <code>equals</code> is known to
+ * Note: The defined behavior for {@code equals} is known to
* be inconsistent with virtual hosting in HTTP.
*
* @param obj the URL to compare against.
- * @return <code>true</code> if the objects are the same;
- * <code>false</code> otherwise.
+ * @return {@code true} if the objects are the same;
+ * {@code false} otherwise.
*/
public boolean equals(Object obj) {
if (!(obj instanceof URL))
@@ -869,7 +869,7 @@
* The hash code is based upon all the URL components relevant for URL
* comparison. As such, this operation is a blocking operation.<p>
*
- * @return a hash code for this <code>URL</code>.
+ * @return a hash code for this {@code URL}.
*/
public synchronized int hashCode() {
if (hashCode != -1)
@@ -882,21 +882,21 @@
/**
* Compares two URLs, excluding the fragment component.<p>
*
- * Returns <code>true</code> if this <code>URL</code> and the
- * <code>other</code> argument are equal without taking the
+ * Returns {@code true} if this {@code URL} and the
+ * {@code other} argument are equal without taking the
* fragment component into consideration.
*
- * @param other the <code>URL</code> to compare against.
- * @return <code>true</code> if they reference the same remote object;
- * <code>false</code> otherwise.
+ * @param other the {@code URL} to compare against.
+ * @return {@code true} if they reference the same remote object;
+ * {@code false} otherwise.
*/
public boolean sameFile(URL other) {
return handler.sameFile(this, other);
}
/**
- * Constructs a string representation of this <code>URL</code>. The
- * string is created by calling the <code>toExternalForm</code>
+ * Constructs a string representation of this {@code URL}. The
+ * string is created by calling the {@code toExternalForm}
* method of the stream protocol handler for this object.
*
* @return a string representation of this object.
@@ -909,8 +909,8 @@
}
/**
- * Constructs a string representation of this <code>URL</code>. The
- * string is created by calling the <code>toExternalForm</code>
+ * Constructs a string representation of this {@code URL}. The
+ * string is created by calling the {@code toExternalForm}
* method of the stream protocol handler for this object.
*
* @return a string representation of this object.
@@ -924,7 +924,7 @@
/**
* Returns a {@link java.net.URI} equivalent to this URL.
- * This method functions in the same way as <code>new URI (this.toString())</code>.
+ * This method functions in the same way as {@code new URI (this.toString())}.
* <p>Note, any URL instance that complies with RFC 2396 can be converted
* to a URI. However, some URLs that are not strictly in compliance
* can not be converted to a URI.
@@ -984,7 +984,7 @@
* @param proxy the Proxy through which this connection
* will be made. If direct connection is desired,
* Proxy.NO_PROXY should be specified.
- * @return a <code>URLConnection</code> to the URL.
+ * @return a {@code URLConnection} to the URL.
* @exception IOException if an I/O exception occurs.
* @exception SecurityException if a security manager is present
* and the caller doesn't have permission to connect
@@ -1022,8 +1022,8 @@
}
/**
- * Opens a connection to this <code>URL</code> and returns an
- * <code>InputStream</code> for reading from that connection. This
+ * Opens a connection to this {@code URL} and returns an
+ * {@code InputStream} for reading from that connection. This
* method is a shorthand for:
* <blockquote><pre>
* openConnection().getInputStream()
@@ -1077,22 +1077,22 @@
static URLStreamHandlerFactory factory;
/**
- * Sets an application's <code>URLStreamHandlerFactory</code>.
+ * Sets an application's {@code URLStreamHandlerFactory}.
* This method can be called at most once in a given Java Virtual
* Machine.
*
- *<p> The <code>URLStreamHandlerFactory</code> instance is used to
+ *<p> The {@code URLStreamHandlerFactory} instance is used to
*construct a stream protocol handler from a protocol name.
*
* <p> If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception Error if the application has already set a factory.
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't allow
+ * {@code checkSetFactory} method doesn't allow
* the operation.
* @see java.net.URL#URL(java.lang.String, java.lang.String,
* int, java.lang.String)
--- a/jdk/src/share/classes/java/net/URLClassLoader.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URLClassLoader.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -117,7 +117,7 @@
/**
* Constructs a new URLClassLoader for the specified URLs using the
- * default delegation parent <code>ClassLoader</code>. The URLs will
+ * default delegation parent {@code ClassLoader}. The URLs will
* be searched in the order specified for classes and resources after
* first searching in the parent class loader. Any URL that ends with
* a '/' is assumed to refer to a directory. Otherwise, the URL is
@@ -125,13 +125,13 @@
* as needed.
*
* <p>If there is a security manager, this method first
- * calls the security manager's <code>checkCreateClassLoader</code> method
+ * calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
*
* @exception SecurityException if a security manager exists and its
- * <code>checkCreateClassLoader</code> method doesn't allow
+ * {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @see SecurityManager#checkCreateClassLoader
*/
@@ -165,7 +165,7 @@
* obtain protocol handlers when creating new jar URLs.
*
* <p>If there is a security manager, this method first
- * calls the security manager's <code>checkCreateClassLoader</code> method
+ * calls the security manager's {@code checkCreateClassLoader} method
* to ensure creation of a class loader is allowed.
*
* @param urls the URLs from which to load classes and resources
@@ -173,7 +173,7 @@
* @param factory the URLStreamHandlerFactory to use when creating URLs
*
* @exception SecurityException if a security manager exists and its
- * <code>checkCreateClassLoader</code> method doesn't allow
+ * {@code checkCreateClassLoader} method doesn't allow
* creation of a class loader.
* @see SecurityManager#checkCreateClassLoader
*/
@@ -217,7 +217,7 @@
* @param name
* The resource name
*
- * @return An input stream for reading the resource, or <tt>null</tt>
+ * @return An input stream for reading the resource, or {@code null}
* if the resource could not be found
*
* @since 1.7
@@ -273,7 +273,7 @@
* as suppressed exceptions of the first one caught, which is then re-thrown.
*
* @throws SecurityException if a security manager is set, and it denies
- * {@link RuntimePermission}<tt>("closeClassLoader")</tt>
+ * {@link RuntimePermission}{@code ("closeClassLoader")}
*
* @since 1.7
*/
@@ -316,7 +316,7 @@
* Appends the specified URL to the list of URLs to search for
* classes and resources.
* <p>
- * If the URL specified is <code>null</code> or is already in the
+ * If the URL specified is {@code null} or is already in the
* list of URLs, or if this loader is closed, then invoking this
* method has no effect.
*
@@ -537,7 +537,7 @@
* Finds the resource with the specified name on the URL search path.
*
* @param name the name of the resource
- * @return a <code>URL</code> for the resource, or <code>null</code>
+ * @return a {@code URL} for the resource, or {@code null}
* if the resource could not be found, or if the loader is closed.
*/
public URL findResource(final String name) {
@@ -560,7 +560,7 @@
*
* @param name the resource name
* @exception IOException if an I/O exception occurs
- * @return an <code>Enumeration</code> of <code>URL</code>s
+ * @return an {@code Enumeration} of {@code URL}s
* If the loader is closed, the Enumeration will be empty.
*/
public Enumeration<URL> findResources(final String name)
@@ -699,9 +699,9 @@
/**
* Creates a new instance of URLClassLoader for the specified
* URLs and parent class loader. If a security manager is
- * installed, the <code>loadClass</code> method of the URLClassLoader
+ * installed, the {@code loadClass} method of the URLClassLoader
* returned by this method will invoke the
- * <code>SecurityManager.checkPackageAccess</code> method before
+ * {@code SecurityManager.checkPackageAccess} method before
* loading the class.
*
* @param urls the URLs to search for classes and resources
@@ -725,9 +725,9 @@
/**
* Creates a new instance of URLClassLoader for the specified
* URLs and default parent class loader. If a security manager is
- * installed, the <code>loadClass</code> method of the URLClassLoader
+ * installed, the {@code loadClass} method of the URLClassLoader
* returned by this method will invoke the
- * <code>SecurityManager.checkPackageAccess</code> before
+ * {@code SecurityManager.checkPackageAccess} before
* loading the class.
*
* @param urls the URLs to search for classes and resources
--- a/jdk/src/share/classes/java/net/URLConnection.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URLConnection.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -40,15 +40,15 @@
import sun.net.www.MessageHeader;
/**
- * The abstract class <code>URLConnection</code> is the superclass
+ * The abstract class {@code URLConnection} is the superclass
* of all classes that represent a communications link between the
* application and a URL. Instances of this class can be used both to
* read from and to write to the resource referenced by the URL. In
* general, creating a connection to a URL is a multistep process:
* <p>
* <center><table border=2 summary="Describes the process of creating a connection to a URL: openConnection() and connect() over time.">
- * <tr><th><code>openConnection()</code></th>
- * <th><code>connect()</code></th></tr>
+ * <tr><th>{@code openConnection()}</th>
+ * <th>{@code connect()}</th></tr>
* <tr><td>Manipulate parameters that affect the connection to the remote
* resource.</td>
* <td>Interact with the resource; query header fields and
@@ -59,78 +59,78 @@
*
* <ol>
* <li>The connection object is created by invoking the
- * <code>openConnection</code> method on a URL.
+ * {@code openConnection} method on a URL.
* <li>The setup parameters and general request properties are manipulated.
* <li>The actual connection to the remote object is made, using the
- * <code>connect</code> method.
+ * {@code connect} method.
* <li>The remote object becomes available. The header fields and the contents
* of the remote object can be accessed.
* </ol>
* <p>
* The setup parameters are modified using the following methods:
* <ul>
- * <li><code>setAllowUserInteraction</code>
- * <li><code>setDoInput</code>
- * <li><code>setDoOutput</code>
- * <li><code>setIfModifiedSince</code>
- * <li><code>setUseCaches</code>
+ * <li>{@code setAllowUserInteraction}
+ * <li>{@code setDoInput}
+ * <li>{@code setDoOutput}
+ * <li>{@code setIfModifiedSince}
+ * <li>{@code setUseCaches}
* </ul>
* <p>
* and the general request properties are modified using the method:
* <ul>
- * <li><code>setRequestProperty</code>
+ * <li>{@code setRequestProperty}
* </ul>
* <p>
- * Default values for the <code>AllowUserInteraction</code> and
- * <code>UseCaches</code> parameters can be set using the methods
- * <code>setDefaultAllowUserInteraction</code> and
- * <code>setDefaultUseCaches</code>.
+ * Default values for the {@code AllowUserInteraction} and
+ * {@code UseCaches} parameters can be set using the methods
+ * {@code setDefaultAllowUserInteraction} and
+ * {@code setDefaultUseCaches}.
* <p>
- * Each of the above <code>set</code> methods has a corresponding
- * <code>get</code> method to retrieve the value of the parameter or
+ * Each of the above {@code set} methods has a corresponding
+ * {@code get} method to retrieve the value of the parameter or
* general request property. The specific parameters and general
* request properties that are applicable are protocol specific.
* <p>
* The following methods are used to access the header fields and
* the contents after the connection is made to the remote object:
* <ul>
- * <li><code>getContent</code>
- * <li><code>getHeaderField</code>
- * <li><code>getInputStream</code>
- * <li><code>getOutputStream</code>
+ * <li>{@code getContent}
+ * <li>{@code getHeaderField}
+ * <li>{@code getInputStream}
+ * <li>{@code getOutputStream}
* </ul>
* <p>
* Certain header fields are accessed frequently. The methods:
* <ul>
- * <li><code>getContentEncoding</code>
- * <li><code>getContentLength</code>
- * <li><code>getContentType</code>
- * <li><code>getDate</code>
- * <li><code>getExpiration</code>
- * <li><code>getLastModifed</code>
+ * <li>{@code getContentEncoding}
+ * <li>{@code getContentLength}
+ * <li>{@code getContentType}
+ * <li>{@code getDate}
+ * <li>{@code getExpiration}
+ * <li>{@code getLastModifed}
* </ul>
* <p>
* provide convenient access to these fields. The
- * <code>getContentType</code> method is used by the
- * <code>getContent</code> method to determine the type of the remote
+ * {@code getContentType} method is used by the
+ * {@code getContent} method to determine the type of the remote
* object; subclasses may find it convenient to override the
- * <code>getContentType</code> method.
+ * {@code getContentType} method.
* <p>
* In the common case, all of the pre-connection parameters and
* general request properties can be ignored: the pre-connection
* parameters and request properties default to sensible values. For
* most clients of this interface, there are only two interesting
- * methods: <code>getInputStream</code> and <code>getContent</code>,
- * which are mirrored in the <code>URL</code> class by convenience methods.
+ * methods: {@code getInputStream} and {@code getContent},
+ * which are mirrored in the {@code URL} class by convenience methods.
* <p>
* More information on the request properties and header fields of
- * an <code>http</code> connection can be found at:
+ * an {@code http} connection can be found at:
* <blockquote><pre>
* <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>
* </pre></blockquote>
*
- * Invoking the <tt>close()</tt> methods on the <tt>InputStream</tt> or <tt>OutputStream</tt> of an
- * <tt>URLConnection</tt> after a request may free network resources associated with this
+ * Invoking the {@code close()} methods on the {@code InputStream} or {@code OutputStream} of an
+ * {@code URLConnection} after a request may free network resources associated with this
* instance, unless particular protocol specifications specify different behaviours
* for it.
*
@@ -164,10 +164,10 @@
* which this connection is opened.
* <p>
* The value of this field can be accessed by the
- * <code>getURL</code> method.
+ * {@code getURL} method.
* <p>
* The default value of this variable is the value of the URL
- * argument in the <code>URLConnection</code> constructor.
+ * argument in the {@code URLConnection} constructor.
*
* @see java.net.URLConnection#getURL()
* @see java.net.URLConnection#url
@@ -175,14 +175,14 @@
protected URL url;
/**
- * This variable is set by the <code>setDoInput</code> method. Its
- * value is returned by the <code>getDoInput</code> method.
+ * This variable is set by the {@code setDoInput} method. Its
+ * value is returned by the {@code getDoInput} method.
* <p>
* A URL connection can be used for input and/or output. Setting the
- * <code>doInput</code> flag to <code>true</code> indicates that
+ * {@code doInput} flag to {@code true} indicates that
* the application intends to read data from the URL connection.
* <p>
- * The default value of this field is <code>true</code>.
+ * The default value of this field is {@code true}.
*
* @see java.net.URLConnection#getDoInput()
* @see java.net.URLConnection#setDoInput(boolean)
@@ -190,14 +190,14 @@
protected boolean doInput = true;
/**
- * This variable is set by the <code>setDoOutput</code> method. Its
- * value is returned by the <code>getDoOutput</code> method.
+ * This variable is set by the {@code setDoOutput} method. Its
+ * value is returned by the {@code getDoOutput} method.
* <p>
* A URL connection can be used for input and/or output. Setting the
- * <code>doOutput</code> flag to <code>true</code> indicates
+ * {@code doOutput} flag to {@code true} indicates
* that the application intends to write data to the URL connection.
* <p>
- * The default value of this field is <code>false</code>.
+ * The default value of this field is {@code false}.
*
* @see java.net.URLConnection#getDoOutput()
* @see java.net.URLConnection#setDoOutput(boolean)
@@ -207,17 +207,17 @@
private static boolean defaultAllowUserInteraction = false;
/**
- * If <code>true</code>, this <code>URL</code> is being examined in
+ * If {@code true}, this {@code URL} is being examined in
* a context in which it makes sense to allow user interactions such
- * as popping up an authentication dialog. If <code>false</code>,
+ * as popping up an authentication dialog. If {@code false},
* then no user interaction is allowed.
* <p>
* The value of this field can be set by the
- * <code>setAllowUserInteraction</code> method.
+ * {@code setAllowUserInteraction} method.
* Its value is returned by the
- * <code>getAllowUserInteraction</code> method.
+ * {@code getAllowUserInteraction} method.
* Its default value is the value of the argument in the last invocation
- * of the <code>setDefaultAllowUserInteraction</code> method.
+ * of the {@code setDefaultAllowUserInteraction} method.
*
* @see java.net.URLConnection#getAllowUserInteraction()
* @see java.net.URLConnection#setAllowUserInteraction(boolean)
@@ -228,15 +228,15 @@
private static boolean defaultUseCaches = true;
/**
- * If <code>true</code>, the protocol is allowed to use caching
- * whenever it can. If <code>false</code>, the protocol must always
+ * If {@code true}, the protocol is allowed to use caching
+ * whenever it can. If {@code false}, the protocol must always
* try to get a fresh copy of the object.
* <p>
- * This field is set by the <code>setUseCaches</code> method. Its
- * value is returned by the <code>getUseCaches</code> method.
+ * This field is set by the {@code setUseCaches} method. Its
+ * value is returned by the {@code getUseCaches} method.
* <p>
* Its default value is the value given in the last invocation of the
- * <code>setDefaultUseCaches</code> method.
+ * {@code setDefaultUseCaches} method.
*
* @see java.net.URLConnection#setUseCaches(boolean)
* @see java.net.URLConnection#getUseCaches()
@@ -252,11 +252,11 @@
* January 1, 1970, GMT. The object is fetched only if it has been
* modified more recently than that time.
* <p>
- * This variable is set by the <code>setIfModifiedSince</code>
+ * This variable is set by the {@code setIfModifiedSince}
* method. Its value is returned by the
- * <code>getIfModifiedSince</code> method.
+ * {@code getIfModifiedSince} method.
* <p>
- * The default value of this field is <code>0</code>, indicating
+ * The default value of this field is {@code 0}, indicating
* that the fetching must always occur.
*
* @see java.net.URLConnection#getIfModifiedSince()
@@ -265,8 +265,8 @@
protected long ifModifiedSince = 0;
/**
- * If <code>false</code>, this connection object has not created a
- * communications link to the specified URL. If <code>true</code>,
+ * If {@code false}, this connection object has not created a
+ * communications link to the specified URL. If {@code true},
* the communications link has been established.
*/
protected boolean connected = false;
@@ -320,13 +320,13 @@
* Sets the FileNameMap.
* <p>
* If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @param map the FileNameMap to be set
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't allow the operation.
+ * {@code checkSetFactory} method doesn't allow the operation.
* @see SecurityManager#checkSetFactory
* @see #getFileNameMap()
* @since 1.2
@@ -341,9 +341,9 @@
* Opens a communications link to the resource referenced by this
* URL, if such a connection has not already been established.
* <p>
- * If the <code>connect</code> method is called when the connection
- * has already been opened (indicated by the <code>connected</code>
- * field having the value <code>true</code>), the call is ignored.
+ * If the {@code connect} method is called when the connection
+ * has already been opened (indicated by the {@code connected}
+ * field having the value {@code true}), the call is ignored.
* <p>
* URLConnection objects go through two phases: first they are
* created, then they are connected. After being created, and
@@ -375,7 +375,7 @@
* the specified timeout. To see the connect timeout set, please
* call getConnectTimeout().
*
- * @param timeout an <code>int</code> that specifies the connect
+ * @param timeout an {@code int} that specifies the connect
* timeout value in milliseconds
* @throws IllegalArgumentException if the timeout parameter is negative
*
@@ -396,7 +396,7 @@
* 0 return implies that the option is disabled
* (i.e., timeout of infinity).
*
- * @return an <code>int</code> that indicates the connect timeout
+ * @return an {@code int} that indicates the connect timeout
* value in milliseconds
* @see #setConnectTimeout(int)
* @see #connect()
@@ -418,7 +418,7 @@
* specified timeout. To see the read timeout set, please call
* getReadTimeout().
*
- * @param timeout an <code>int</code> that specifies the timeout
+ * @param timeout an {@code int} that specifies the timeout
* value to be used in milliseconds
* @throws IllegalArgumentException if the timeout parameter is negative
*
@@ -437,7 +437,7 @@
* Returns setting for read timeout. 0 return implies that the
* option is disabled (i.e., timeout of infinity).
*
- * @return an <code>int</code> that indicates the read timeout
+ * @return an {@code int} that indicates the read timeout
* value in milliseconds
*
* @see #setReadTimeout(int)
@@ -459,10 +459,10 @@
}
/**
- * Returns the value of this <code>URLConnection</code>'s <code>URL</code>
+ * Returns the value of this {@code URLConnection}'s {@code URL}
* field.
*
- * @return the value of this <code>URLConnection</code>'s <code>URL</code>
+ * @return the value of this {@code URLConnection}'s {@code URL}
* field.
* @see java.net.URLConnection#url
*/
@@ -471,7 +471,7 @@
}
/**
- * Returns the value of the <code>content-length</code> header field.
+ * Returns the value of the {@code content-length} header field.
* <P>
* <B>Note</B>: {@link #getContentLengthLong() getContentLengthLong()}
* should be preferred over this method, since it returns a {@code long}
@@ -489,11 +489,11 @@
}
/**
- * Returns the value of the <code>content-length</code> header field as a
+ * Returns the value of the {@code content-length} header field as a
* long.
*
* @return the content length of the resource that this connection's URL
- * references, or <code>-1</code> if the content length is
+ * references, or {@code -1} if the content length is
* not known.
* @since 7.0
*/
@@ -502,10 +502,10 @@
}
/**
- * Returns the value of the <code>content-type</code> header field.
+ * Returns the value of the {@code content-type} header field.
*
* @return the content type of the resource that the URL references,
- * or <code>null</code> if not known.
+ * or {@code null} if not known.
* @see java.net.URLConnection#getHeaderField(java.lang.String)
*/
public String getContentType() {
@@ -513,10 +513,10 @@
}
/**
- * Returns the value of the <code>content-encoding</code> header field.
+ * Returns the value of the {@code content-encoding} header field.
*
* @return the content encoding of the resource that the URL references,
- * or <code>null</code> if not known.
+ * or {@code null} if not known.
* @see java.net.URLConnection#getHeaderField(java.lang.String)
*/
public String getContentEncoding() {
@@ -524,7 +524,7 @@
}
/**
- * Returns the value of the <code>expires</code> header field.
+ * Returns the value of the {@code expires} header field.
*
* @return the expiration date of the resource that this URL references,
* or 0 if not known. The value is the number of milliseconds since
@@ -536,10 +536,10 @@
}
/**
- * Returns the value of the <code>date</code> header field.
+ * Returns the value of the {@code date} header field.
*
* @return the sending date of the resource that the URL references,
- * or <code>0</code> if not known. The value returned is the
+ * or {@code 0} if not known. The value returned is the
* number of milliseconds since January 1, 1970 GMT.
* @see java.net.URLConnection#getHeaderField(java.lang.String)
*/
@@ -548,11 +548,11 @@
}
/**
- * Returns the value of the <code>last-modified</code> header field.
+ * Returns the value of the {@code last-modified} header field.
* The result is the number of milliseconds since January 1, 1970 GMT.
*
* @return the date the resource referenced by this
- * <code>URLConnection</code> was last modified, or 0 if not known.
+ * {@code URLConnection} was last modified, or 0 if not known.
* @see java.net.URLConnection#getHeaderField(java.lang.String)
*/
public long getLastModified() {
@@ -567,7 +567,7 @@
*
*
* @param name the name of a header field.
- * @return the value of the named header field, or <code>null</code>
+ * @return the value of the named header field, or {@code null}
* if there is no such field in the header.
*/
public String getHeaderField(String name) {
@@ -591,15 +591,15 @@
/**
* Returns the value of the named field parsed as a number.
* <p>
- * This form of <code>getHeaderField</code> exists because some
- * connection types (e.g., <code>http-ng</code>) have pre-parsed
+ * This form of {@code getHeaderField} exists because some
+ * connection types (e.g., {@code http-ng}) have pre-parsed
* headers. Classes for that connection type can override this method
* and short-circuit the parsing.
*
* @param name the name of the header field.
* @param Default the default value.
* @return the value of the named field, parsed as an integer. The
- * <code>Default</code> value is returned if the field is
+ * {@code Default} value is returned if the field is
* missing or malformed.
*/
public int getHeaderFieldInt(String name, int Default) {
@@ -613,15 +613,15 @@
/**
* Returns the value of the named field parsed as a number.
* <p>
- * This form of <code>getHeaderField</code> exists because some
- * connection types (e.g., <code>http-ng</code>) have pre-parsed
+ * This form of {@code getHeaderField} exists because some
+ * connection types (e.g., {@code http-ng}) have pre-parsed
* headers. Classes for that connection type can override this method
* and short-circuit the parsing.
*
* @param name the name of the header field.
* @param Default the default value.
* @return the value of the named field, parsed as a long. The
- * <code>Default</code> value is returned if the field is
+ * {@code Default} value is returned if the field is
* missing or malformed.
* @since 7.0
*/
@@ -638,15 +638,15 @@
* The result is the number of milliseconds since January 1, 1970 GMT
* represented by the named field.
* <p>
- * This form of <code>getHeaderField</code> exists because some
- * connection types (e.g., <code>http-ng</code>) have pre-parsed
+ * This form of {@code getHeaderField} exists because some
+ * connection types (e.g., {@code http-ng}) have pre-parsed
* headers. Classes for that connection type can override this method
* and short-circuit the parsing.
*
* @param name the name of the header field.
* @param Default a default value.
* @return the value of the field, parsed as a date. The value of the
- * <code>Default</code> argument is returned if the field is
+ * {@code Default} argument is returned if the field is
* missing or malformed.
*/
@SuppressWarnings("deprecation")
@@ -659,12 +659,12 @@
}
/**
- * Returns the key for the <code>n</code><sup>th</sup> header field.
- * It returns <code>null</code> if there are fewer than <code>n+1</code> fields.
+ * Returns the key for the {@code n}<sup>th</sup> header field.
+ * It returns {@code null} if there are fewer than {@code n+1} fields.
*
* @param n an index, where {@code n>=0}
- * @return the key for the <code>n</code><sup>th</sup> header field,
- * or <code>null</code> if there are fewer than <code>n+1</code>
+ * @return the key for the {@code n}<sup>th</sup> header field,
+ * or {@code null} if there are fewer than {@code n+1}
* fields.
*/
public String getHeaderFieldKey(int n) {
@@ -672,17 +672,17 @@
}
/**
- * Returns the value for the <code>n</code><sup>th</sup> header field.
- * It returns <code>null</code> if there are fewer than
- * <code>n+1</code>fields.
+ * Returns the value for the {@code n}<sup>th</sup> header field.
+ * It returns {@code null} if there are fewer than
+ * {@code n+1}fields.
* <p>
* This method can be used in conjunction with the
* {@link #getHeaderFieldKey(int) getHeaderFieldKey} method to iterate through all
* the headers in the message.
*
* @param n an index, where {@code n>=0}
- * @return the value of the <code>n</code><sup>th</sup> header field
- * or <code>null</code> if there are fewer than <code>n+1</code> fields
+ * @return the value of the {@code n}<sup>th</sup> header field
+ * or {@code null} if there are fewer than {@code n+1} fields
* @see java.net.URLConnection#getHeaderFieldKey(int)
*/
public String getHeaderField(int n) {
@@ -693,35 +693,35 @@
* Retrieves the contents of this URL connection.
* <p>
* This method first determines the content type of the object by
- * calling the <code>getContentType</code> method. If this is
+ * calling the {@code getContentType} method. If this is
* the first time that the application has seen that specific content
* type, a content handler for that content type is created:
* <ol>
* <li>If the application has set up a content handler factory instance
- * using the <code>setContentHandlerFactory</code> method, the
- * <code>createContentHandler</code> method of that instance is called
+ * using the {@code setContentHandlerFactory} method, the
+ * {@code createContentHandler} method of that instance is called
* with the content type as an argument; the result is a content
* handler for that content type.
* <li>If no content handler factory has yet been set up, or if the
- * factory's <code>createContentHandler</code> method returns
- * <code>null</code>, then the application loads the class named:
+ * factory's {@code createContentHandler} method returns
+ * {@code null}, then the application loads the class named:
* <blockquote><pre>
* sun.net.www.content.<<i>contentType</i>>
* </pre></blockquote>
* where <<i>contentType</i>> is formed by taking the
* content-type string, replacing all slash characters with a
- * <code>period</code> ('.'), and all other non-alphanumeric characters
- * with the underscore character '<code>_</code>'. The alphanumeric
+ * {@code period} ('.'), and all other non-alphanumeric characters
+ * with the underscore character '{@code _}'. The alphanumeric
* characters are specifically the 26 uppercase ASCII letters
- * '<code>A</code>' through '<code>Z</code>', the 26 lowercase ASCII
- * letters '<code>a</code>' through '<code>z</code>', and the 10 ASCII
- * digits '<code>0</code>' through '<code>9</code>'. If the specified
+ * '{@code A}' through '{@code Z}', the 26 lowercase ASCII
+ * letters '{@code a}' through '{@code z}', and the 10 ASCII
+ * digits '{@code 0}' through '{@code 9}'. If the specified
* class does not exist, or is not a subclass of
- * <code>ContentHandler</code>, then an
- * <code>UnknownServiceException</code> is thrown.
+ * {@code ContentHandler}, then an
+ * {@code UnknownServiceException} is thrown.
* </ol>
*
- * @return the object fetched. The <code>instanceof</code> operator
+ * @return the object fetched. The {@code instanceof} operator
* should be used to determine the specific kind of object
* returned.
* @exception IOException if an I/O error occurs while
@@ -743,12 +743,12 @@
/**
* Retrieves the contents of this URL connection.
*
- * @param classes the <code>Class</code> array
+ * @param classes the {@code Class} array
* indicating the requested types
* @return the object fetched that is the first match of the type
* specified in the classes array. null if none of
* the requested types are supported.
- * The <code>instanceof</code> operator should be used to
+ * The {@code instanceof} operator should be used to
* determine the specific kind of object returned.
* @exception IOException if an I/O error occurs while
* getting the content.
@@ -773,12 +773,12 @@
* necessary to make the connection represented by this
* object. This method returns null if no permission is
* required to make the connection. By default, this method
- * returns <code>java.security.AllPermission</code>. Subclasses
+ * returns {@code java.security.AllPermission}. Subclasses
* should override this method and return the permission
* that best represents the permission required to make a
- * a connection to the URL. For example, a <code>URLConnection</code>
- * representing a <code>file:</code> URL would return a
- * <code>java.io.FilePermission</code> object.
+ * a connection to the URL. For example, a {@code URLConnection}
+ * representing a {@code file:} URL would return a
+ * {@code java.io.FilePermission} object.
*
* <p>The permission returned may dependent upon the state of the
* connection. For example, the permission before connecting may be
@@ -844,17 +844,17 @@
}
/**
- * Returns a <code>String</code> representation of this URL connection.
+ * Returns a {@code String} representation of this URL connection.
*
- * @return a string representation of this <code>URLConnection</code>.
+ * @return a string representation of this {@code URLConnection}.
*/
public String toString() {
return this.getClass().getName() + ":" + url;
}
/**
- * Sets the value of the <code>doInput</code> field for this
- * <code>URLConnection</code> to the specified value.
+ * Sets the value of the {@code doInput} field for this
+ * {@code URLConnection} to the specified value.
* <p>
* A URL connection can be used for input and/or output. Set the DoInput
* flag to true if you intend to use the URL connection for input,
@@ -872,11 +872,11 @@
}
/**
- * Returns the value of this <code>URLConnection</code>'s
- * <code>doInput</code> flag.
+ * Returns the value of this {@code URLConnection}'s
+ * {@code doInput} flag.
*
- * @return the value of this <code>URLConnection</code>'s
- * <code>doInput</code> flag.
+ * @return the value of this {@code URLConnection}'s
+ * {@code doInput} flag.
* @see #setDoInput(boolean)
*/
public boolean getDoInput() {
@@ -884,8 +884,8 @@
}
/**
- * Sets the value of the <code>doOutput</code> field for this
- * <code>URLConnection</code> to the specified value.
+ * Sets the value of the {@code doOutput} field for this
+ * {@code URLConnection} to the specified value.
* <p>
* A URL connection can be used for input and/or output. Set the DoOutput
* flag to true if you intend to use the URL connection for output,
@@ -902,11 +902,11 @@
}
/**
- * Returns the value of this <code>URLConnection</code>'s
- * <code>doOutput</code> flag.
+ * Returns the value of this {@code URLConnection}'s
+ * {@code doOutput} flag.
*
- * @return the value of this <code>URLConnection</code>'s
- * <code>doOutput</code> flag.
+ * @return the value of this {@code URLConnection}'s
+ * {@code doOutput} flag.
* @see #setDoOutput(boolean)
*/
public boolean getDoOutput() {
@@ -914,8 +914,8 @@
}
/**
- * Set the value of the <code>allowUserInteraction</code> field of
- * this <code>URLConnection</code>.
+ * Set the value of the {@code allowUserInteraction} field of
+ * this {@code URLConnection}.
*
* @param allowuserinteraction the new value.
* @throws IllegalStateException if already connected
@@ -928,10 +928,10 @@
}
/**
- * Returns the value of the <code>allowUserInteraction</code> field for
+ * Returns the value of the {@code allowUserInteraction} field for
* this object.
*
- * @return the value of the <code>allowUserInteraction</code> field for
+ * @return the value of the {@code allowUserInteraction} field for
* this object.
* @see #setAllowUserInteraction(boolean)
*/
@@ -941,8 +941,8 @@
/**
* Sets the default value of the
- * <code>allowUserInteraction</code> field for all future
- * <code>URLConnection</code> objects to the specified value.
+ * {@code allowUserInteraction} field for all future
+ * {@code URLConnection} objects to the specified value.
*
* @param defaultallowuserinteraction the new value.
* @see #getDefaultAllowUserInteraction()
@@ -952,14 +952,14 @@
}
/**
- * Returns the default value of the <code>allowUserInteraction</code>
+ * Returns the default value of the {@code allowUserInteraction}
* field.
* <p>
* Ths default is "sticky", being a part of the static state of all
* URLConnections. This flag applies to the next, and all following
* URLConnections that are created.
*
- * @return the default value of the <code>allowUserInteraction</code>
+ * @return the default value of the {@code allowUserInteraction}
* field.
* @see #setDefaultAllowUserInteraction(boolean)
*/
@@ -968,8 +968,8 @@
}
/**
- * Sets the value of the <code>useCaches</code> field of this
- * <code>URLConnection</code> to the specified value.
+ * Sets the value of the {@code useCaches} field of this
+ * {@code URLConnection} to the specified value.
* <p>
* Some protocols do caching of documents. Occasionally, it is important
* to be able to "tunnel through" and ignore the caches (e.g., the
@@ -979,7 +979,7 @@
* The default value comes from DefaultUseCaches, which defaults to
* true.
*
- * @param usecaches a <code>boolean</code> indicating whether
+ * @param usecaches a {@code boolean} indicating whether
* or not to allow caching
* @throws IllegalStateException if already connected
* @see #getUseCaches()
@@ -991,11 +991,11 @@
}
/**
- * Returns the value of this <code>URLConnection</code>'s
- * <code>useCaches</code> field.
+ * Returns the value of this {@code URLConnection}'s
+ * {@code useCaches} field.
*
- * @return the value of this <code>URLConnection</code>'s
- * <code>useCaches</code> field.
+ * @return the value of this {@code URLConnection}'s
+ * {@code useCaches} field.
* @see #setUseCaches(boolean)
*/
public boolean getUseCaches() {
@@ -1003,8 +1003,8 @@
}
/**
- * Sets the value of the <code>ifModifiedSince</code> field of
- * this <code>URLConnection</code> to the specified value.
+ * Sets the value of the {@code ifModifiedSince} field of
+ * this {@code URLConnection} to the specified value.
*
* @param ifmodifiedsince the new value.
* @throws IllegalStateException if already connected
@@ -1017,9 +1017,9 @@
}
/**
- * Returns the value of this object's <code>ifModifiedSince</code> field.
+ * Returns the value of this object's {@code ifModifiedSince} field.
*
- * @return the value of this object's <code>ifModifiedSince</code> field.
+ * @return the value of this object's {@code ifModifiedSince} field.
* @see #setIfModifiedSince(long)
*/
public long getIfModifiedSince() {
@@ -1027,15 +1027,15 @@
}
/**
- * Returns the default value of a <code>URLConnection</code>'s
- * <code>useCaches</code> flag.
+ * Returns the default value of a {@code URLConnection}'s
+ * {@code useCaches} flag.
* <p>
* Ths default is "sticky", being a part of the static state of all
* URLConnections. This flag applies to the next, and all following
* URLConnections that are created.
*
- * @return the default value of a <code>URLConnection</code>'s
- * <code>useCaches</code> flag.
+ * @return the default value of a {@code URLConnection}'s
+ * {@code useCaches} flag.
* @see #setDefaultUseCaches(boolean)
*/
public boolean getDefaultUseCaches() {
@@ -1043,7 +1043,7 @@
}
/**
- * Sets the default value of the <code>useCaches</code> field to the
+ * Sets the default value of the {@code useCaches} field to the
* specified value.
*
* @param defaultusecaches the new value.
@@ -1063,7 +1063,7 @@
* properties to be appended into a single property.
*
* @param key the keyword by which the request is known
- * (e.g., "<code>Accept</code>").
+ * (e.g., "{@code Accept}").
* @param value the value associated with it.
* @throws IllegalStateException if already connected
* @throws NullPointerException if key is <CODE>null</CODE>
@@ -1087,7 +1087,7 @@
* existing values associated with the same key.
*
* @param key the keyword by which the request is known
- * (e.g., "<code>Accept</code>").
+ * (e.g., "{@code Accept}").
* @param value the value associated with it.
* @throws IllegalStateException if already connected
* @throws NullPointerException if key is null
@@ -1151,11 +1151,11 @@
/**
* Sets the default value of a general request property. When a
- * <code>URLConnection</code> is created, it is initialized with
+ * {@code URLConnection} is created, it is initialized with
* these properties.
*
* @param key the keyword by which the request is known
- * (e.g., "<code>Accept</code>").
+ * (e.g., "{@code Accept}").
* @param value the value associated with the key.
*
* @see java.net.URLConnection#setRequestProperty(java.lang.String,java.lang.String)
@@ -1197,21 +1197,21 @@
static ContentHandlerFactory factory;
/**
- * Sets the <code>ContentHandlerFactory</code> of an
+ * Sets the {@code ContentHandlerFactory} of an
* application. It can be called at most once by an application.
* <p>
- * The <code>ContentHandlerFactory</code> instance is used to
+ * The {@code ContentHandlerFactory} instance is used to
* construct a content handler from a content type
* <p>
* If there is a security manager, this method first calls
- * the security manager's <code>checkSetFactory</code> method
+ * the security manager's {@code checkSetFactory} method
* to ensure the operation is allowed.
* This could result in a SecurityException.
*
* @param fac the desired factory.
* @exception Error if the factory has already been defined.
* @exception SecurityException if a security manager exists and its
- * <code>checkSetFactory</code> method doesn't allow the operation.
+ * {@code checkSetFactory} method doesn't allow the operation.
* @see java.net.ContentHandlerFactory
* @see java.net.URLConnection#getContent()
* @see SecurityManager#checkSetFactory
@@ -1374,7 +1374,7 @@
* Tries to determine the content type of an object, based
* on the specified "file" component of a URL.
* This is a convenience method that can be used by
- * subclasses that override the <code>getContentType</code> method.
+ * subclasses that override the {@code getContentType} method.
*
* @param fname a filename.
* @return a guess as to what the content type of the object is,
@@ -1389,16 +1389,16 @@
* Tries to determine the type of an input stream based on the
* characters at the beginning of the input stream. This method can
* be used by subclasses that override the
- * <code>getContentType</code> method.
+ * {@code getContentType} method.
* <p>
* Ideally, this routine would not be needed. But many
- * <code>http</code> servers return the incorrect content type; in
+ * {@code http} servers return the incorrect content type; in
* addition, there are many nonstandard extensions. Direct inspection
* of the bytes to determine the content type is often more accurate
- * than believing the content type claimed by the <code>http</code> server.
+ * than believing the content type claimed by the {@code http} server.
*
* @param is an input stream that supports marks.
- * @return a guess at the content type, or <code>null</code> if none
+ * @return a guess at the content type, or {@code null} if none
* can be determined.
* @exception IOException if an I/O error occurs while reading the
* input stream.
--- a/jdk/src/share/classes/java/net/URLDecoder.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URLDecoder.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -34,27 +34,27 @@
* <p>
* The conversion process is the reverse of that used by the URLEncoder class. It is assumed
* that all characters in the encoded string are one of the following:
- * "<code>a</code>" through "<code>z</code>",
- * "<code>A</code>" through "<code>Z</code>",
- * "<code>0</code>" through "<code>9</code>", and
- * "<code>-</code>", "<code>_</code>",
- * "<code>.</code>", and "<code>*</code>". The
- * character "<code>%</code>" is allowed but is interpreted
+ * "{@code a}" through "{@code z}",
+ * "{@code A}" through "{@code Z}",
+ * "{@code 0}" through "{@code 9}", and
+ * "{@code -}", "{@code _}",
+ * "{@code .}", and "{@code *}". The
+ * character "{@code %}" is allowed but is interpreted
* as the start of a special escaped sequence.
* <p>
* The following rules are applied in the conversion:
* <p>
* <ul>
- * <li>The alphanumeric characters "<code>a</code>" through
- * "<code>z</code>", "<code>A</code>" through
- * "<code>Z</code>" and "<code>0</code>"
- * through "<code>9</code>" remain the same.
- * <li>The special characters "<code>.</code>",
- * "<code>-</code>", "<code>*</code>", and
- * "<code>_</code>" remain the same.
- * <li>The plus sign "<code>+</code>" is converted into a
- * space character "<code> </code>" .
- * <li>A sequence of the form "<code>%<i>xy</i></code>" will be
+ * <li>The alphanumeric characters "{@code a}" through
+ * "{@code z}", "{@code A}" through
+ * "{@code Z}" and "{@code 0}"
+ * through "{@code 9}" remain the same.
+ * <li>The special characters "{@code .}",
+ * "{@code -}", "{@code *}", and
+ * "{@code _}" remain the same.
+ * <li>The plus sign "{@code +}" is converted into a
+ * space character " " .
+ * <li>A sequence of the form "<i>{@code %xy}</i>" will be
* treated as representing a byte where <i>xy</i> is the two-digit
* hexadecimal representation of the 8 bits. Then, all substrings
* that contain one or more of these byte sequences consecutively
@@ -66,7 +66,7 @@
* <p>
* There are two possible ways in which this decoder could deal with
* illegal strings. It could either leave illegal characters alone or
- * it could throw an <tt>{@link java.lang.IllegalArgumentException}</tt>.
+ * it could throw an {@link java.lang.IllegalArgumentException}.
* Which approach the decoder takes is left to the
* implementation.
*
@@ -81,15 +81,15 @@
static String dfltEncName = URLEncoder.dfltEncName;
/**
- * Decodes a <code>x-www-form-urlencoded</code> string.
+ * Decodes a {@code x-www-form-urlencoded} string.
* The platform's default encoding is used to determine what characters
* are represented by any consecutive sequences of the form
- * "<code>%<i>xy</i></code>".
- * @param s the <code>String</code> to decode
+ * "<i>{@code %xy}</i>".
+ * @param s the {@code String} to decode
* @deprecated The resulting string may vary depending on the platform's
* default encoding. Instead, use the decode(String,String) method
* to specify the encoding.
- * @return the newly decoded <code>String</code>
+ * @return the newly decoded {@code String}
*/
@Deprecated
public static String decode(String s) {
@@ -106,11 +106,11 @@
}
/**
- * Decodes a <code>application/x-www-form-urlencoded</code> string using a specific
+ * Decodes a {@code application/x-www-form-urlencoded} string using a specific
* encoding scheme.
* The supplied encoding is used to determine
* what characters are represented by any consecutive sequences of the
- * form "<code>%<i>xy</i></code>".
+ * form "<i>{@code %xy}</i>".
* <p>
* <em><strong>Note:</strong> The <a href=
* "http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars">
@@ -118,11 +118,11 @@
* UTF-8 should be used. Not doing so may introduce
* incompatibilites.</em>
*
- * @param s the <code>String</code> to decode
+ * @param s the {@code String} to decode
* @param enc The name of a supported
* <a href="../lang/package-summary.html#charenc">character
* encoding</a>.
- * @return the newly decoded <code>String</code>
+ * @return the newly decoded {@code String}
* @exception UnsupportedEncodingException
* If character encoding needs to be consulted, but
* named character encoding is not supported
--- a/jdk/src/share/classes/java/net/URLEncoder.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URLEncoder.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -51,19 +51,19 @@
*
* <p>
* <ul>
- * <li>The alphanumeric characters "<code>a</code>" through
- * "<code>z</code>", "<code>A</code>" through
- * "<code>Z</code>" and "<code>0</code>"
- * through "<code>9</code>" remain the same.
- * <li>The special characters "<code>.</code>",
- * "<code>-</code>", "<code>*</code>", and
- * "<code>_</code>" remain the same.
- * <li>The space character "<code> </code>" is
- * converted into a plus sign "<code>+</code>".
+ * <li>The alphanumeric characters "{@code a}" through
+ * "{@code z}", "{@code A}" through
+ * "{@code Z}" and "{@code 0}"
+ * through "{@code 9}" remain the same.
+ * <li>The special characters "{@code .}",
+ * "{@code -}", "{@code *}", and
+ * "{@code _}" remain the same.
+ * <li>The space character " " is
+ * converted into a plus sign "{@code +}".
* <li>All other characters are unsafe and are first converted into
* one or more bytes using some encoding scheme. Then each byte is
* represented by the 3-character string
- * "<code>%<i>xy</i></code>", where <i>xy</i> is the
+ * "<i>{@code %xy}</i>", where <i>xy</i> is the
* two-digit hexadecimal representation of the byte.
* The recommended encoding scheme to use is UTF-8. However,
* for compatibility reasons, if an encoding is not specified,
@@ -152,15 +152,15 @@
private URLEncoder() { }
/**
- * Translates a string into <code>x-www-form-urlencoded</code>
+ * Translates a string into {@code x-www-form-urlencoded}
* format. This method uses the platform's default encoding
* as the encoding scheme to obtain the bytes for unsafe characters.
*
- * @param s <code>String</code> to be translated.
+ * @param s {@code String} to be translated.
* @deprecated The resulting string may vary depending on the platform's
* default encoding. Instead, use the encode(String,String)
* method to specify the encoding.
- * @return the translated <code>String</code>.
+ * @return the translated {@code String}.
*/
@Deprecated
public static String encode(String s) {
@@ -177,7 +177,7 @@
}
/**
- * Translates a string into <code>application/x-www-form-urlencoded</code>
+ * Translates a string into {@code application/x-www-form-urlencoded}
* format using a specific encoding scheme. This method uses the
* supplied encoding scheme to obtain the bytes for unsafe
* characters.
@@ -188,11 +188,11 @@
* UTF-8 should be used. Not doing so may introduce
* incompatibilites.</em>
*
- * @param s <code>String</code> to be translated.
+ * @param s {@code String} to be translated.
* @param enc The name of a supported
* <a href="../lang/package-summary.html#charenc">character
* encoding</a>.
- * @return the translated <code>String</code>.
+ * @return the translated {@code String}.
* @exception UnsupportedEncodingException
* If the named encoding is not supported
* @see URLDecoder#decode(java.lang.String, java.lang.String)
--- a/jdk/src/share/classes/java/net/URLStreamHandler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URLStreamHandler.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -34,15 +34,15 @@
import sun.net.www.ParseUtil;
/**
- * The abstract class <code>URLStreamHandler</code> is the common
+ * The abstract class {@code URLStreamHandler} is the common
* superclass for all stream protocol handlers. A stream protocol
* handler knows how to make a connection for a particular protocol
- * type, such as <code>http</code> or <code>https</code>.
+ * type, such as {@code http} or {@code https}.
* <p>
- * In most cases, an instance of a <code>URLStreamHandler</code>
+ * In most cases, an instance of a {@code URLStreamHandler}
* subclass is not created directly by an application. Rather, the
* first time a protocol name is encountered when constructing a
- * <code>URL</code>, the appropriate stream protocol handler is
+ * {@code URL}, the appropriate stream protocol handler is
* automatically loaded.
*
* @author James Gosling
@@ -52,7 +52,7 @@
public abstract class URLStreamHandler {
/**
* Opens a connection to the object referenced by the
- * <code>URL</code> argument.
+ * {@code URL} argument.
* This method should be overridden by a subclass.
*
* <p>If for the handler's protocol (such as HTTP or JAR), there
@@ -64,7 +64,7 @@
* JarURLConnection will be returned.
*
* @param u the URL that this connects to.
- * @return a <code>URLConnection</code> object for the <code>URL</code>.
+ * @return a {@code URLConnection} object for the {@code URL}.
* @exception IOException if an I/O error occurs while opening the
* connection.
*/
@@ -83,7 +83,7 @@
* @param p the proxy through which the connection will be made.
* If direct connection is desired, Proxy.NO_PROXY
* should be specified.
- * @return a <code>URLConnection</code> object for the <code>URL</code>.
+ * @return a {@code URLConnection} object for the {@code URL}.
* @exception IOException if an I/O error occurs while opening the
* connection.
* @exception IllegalArgumentException if either u or p is null,
@@ -97,28 +97,28 @@
}
/**
- * Parses the string representation of a <code>URL</code> into a
- * <code>URL</code> object.
+ * Parses the string representation of a {@code URL} into a
+ * {@code URL} object.
* <p>
* If there is any inherited context, then it has already been
- * copied into the <code>URL</code> argument.
+ * copied into the {@code URL} argument.
* <p>
- * The <code>parseURL</code> method of <code>URLStreamHandler</code>
+ * The {@code parseURL} method of {@code URLStreamHandler}
* parses the string representation as if it were an
- * <code>http</code> specification. Most URL protocol families have a
+ * {@code http} specification. Most URL protocol families have a
* similar parsing. A stream protocol handler for a protocol that has
* a different syntax must override this routine.
*
- * @param u the <code>URL</code> to receive the result of parsing
+ * @param u the {@code URL} to receive the result of parsing
* the spec.
- * @param spec the <code>String</code> representing the URL that
+ * @param spec the {@code String} representing the URL that
* must be parsed.
* @param start the character index at which to begin parsing. This is
- * just past the '<code>:</code>' (if there is one) that
+ * just past the '{@code :}' (if there is one) that
* specifies the determination of the protocol name.
* @param limit the character position to stop parsing at. This is the
* end of the string or the position of the
- * "<code>#</code>" character, if present. All information
+ * "{@code #}" character, if present. All information
* after the sharp sign indicates an anchor.
*/
protected void parseURL(URL u, String spec, int start, int limit) {
@@ -307,7 +307,7 @@
/**
* Returns the default port for a URL parsed by this handler. This method
* is meant to be overidden by handlers with default port numbers.
- * @return the default port for a <code>URL</code> parsed by this handler.
+ * @return the default port for a {@code URL} parsed by this handler.
* @since 1.3
*/
protected int getDefaultPort() {
@@ -321,7 +321,7 @@
* guaranteed by the fact that it is only called by java.net.URL class.
* @param u1 a URL object
* @param u2 a URL object
- * @return <tt>true</tt> if the two urls are
+ * @return {@code true} if the two urls are
* considered equal, ie. they refer to the same
* fragment in the same file.
* @since 1.3
@@ -338,7 +338,7 @@
* other protocols that have different requirements for hashCode
* calculation.
* @param u a URL object
- * @return an <tt>int</tt> suitable for hash table indexing
+ * @return an {@code int} suitable for hash table indexing
* @since 1.3
*/
protected int hashCode(URL u) {
@@ -420,7 +420,7 @@
* will result in a null return.
*
* @param u a URL object
- * @return an <code>InetAddress</code> representing the host
+ * @return an {@code InetAddress} representing the host
* IP address.
* @since 1.3
*/
@@ -447,8 +447,8 @@
* Compares the host components of two URLs.
* @param u1 the URL of the first host to compare
* @param u2 the URL of the second host to compare
- * @return <tt>true</tt> if and only if they
- * are equal, <tt>false</tt> otherwise.
+ * @return {@code true} if and only if they
+ * are equal, {@code false} otherwise.
* @since 1.3
*/
protected boolean hostsEqual(URL u1, URL u2) {
@@ -465,11 +465,11 @@
}
/**
- * Converts a <code>URL</code> of a specific protocol to a
- * <code>String</code>.
+ * Converts a {@code URL} of a specific protocol to a
+ * {@code String}.
*
* @param u the URL.
- * @return a string representation of the <code>URL</code> argument.
+ * @return a string representation of the {@code URL} argument.
*/
protected String toExternalForm(URL u) {
@@ -508,7 +508,7 @@
}
/**
- * Sets the fields of the <code>URL</code> argument to the indicated values.
+ * Sets the fields of the {@code URL} argument to the indicated values.
* Only classes derived from URLStreamHandler are able
* to use this method to set the values of the URL fields.
*
@@ -538,7 +538,7 @@
}
/**
- * Sets the fields of the <code>URL</code> argument to the indicated values.
+ * Sets the fields of the {@code URL} argument to the indicated values.
* Only classes derived from URLStreamHandler are able
* to use this method to set the values of the URL fields.
*
--- a/jdk/src/share/classes/java/net/URLStreamHandlerFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/URLStreamHandlerFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -26,11 +26,11 @@
package java.net;
/**
- * This interface defines a factory for <code>URL</code> stream
+ * This interface defines a factory for {@code URL} stream
* protocol handlers.
* <p>
- * It is used by the <code>URL</code> class to create a
- * <code>URLStreamHandler</code> for a specific protocol.
+ * It is used by the {@code URL} class to create a
+ * {@code URLStreamHandler} for a specific protocol.
*
* @author Arthur van Hoff
* @see java.net.URL
@@ -39,12 +39,12 @@
*/
public interface URLStreamHandlerFactory {
/**
- * Creates a new <code>URLStreamHandler</code> instance with the specified
+ * Creates a new {@code URLStreamHandler} instance with the specified
* protocol.
*
- * @param protocol the protocol ("<code>ftp</code>",
- * "<code>http</code>", "<code>nntp</code>", etc.).
- * @return a <code>URLStreamHandler</code> for the specific protocol.
+ * @param protocol the protocol ("{@code ftp}",
+ * "{@code http}", "{@code nntp}", etc.).
+ * @return a {@code URLStreamHandler} for the specific protocol.
* @see java.net.URLStreamHandler
*/
URLStreamHandler createURLStreamHandler(String protocol);
--- a/jdk/src/share/classes/java/net/UnknownHostException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/UnknownHostException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -38,7 +38,7 @@
private static final long serialVersionUID = -4639126076052875403L;
/**
- * Constructs a new <code>UnknownHostException</code> with the
+ * Constructs a new {@code UnknownHostException} with the
* specified detail message.
*
* @param host the detail message.
@@ -48,7 +48,7 @@
}
/**
- * Constructs a new <code>UnknownHostException</code> with no detail
+ * Constructs a new {@code UnknownHostException} with no detail
* message.
*/
public UnknownHostException() {
--- a/jdk/src/share/classes/java/net/UnknownServiceException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/net/UnknownServiceException.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -40,14 +40,14 @@
private static final long serialVersionUID = -4169033248853639508L;
/**
- * Constructs a new <code>UnknownServiceException</code> with no
+ * Constructs a new {@code UnknownServiceException} with no
* detail message.
*/
public UnknownServiceException() {
}
/**
- * Constructs a new <code>UnknownServiceException</code> with the
+ * Constructs a new {@code UnknownServiceException} with the
* specified detail message.
*
* @param msg the detail message.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/net/package-info.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 1998, 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.
+ */
+
+/**
+ * Provides the classes for implementing networking applications.
+ *
+ * <p> The java.net package can be roughly divided in two sections:</p>
+ * <ul>
+ * <li><p><i>A Low Level API</i>, which deals with the
+ * following abstractions:</p>
+ * <ul>
+ * <li><p><i>Addresses</i>, which are networking identifiers,
+ * like IP addresses.</p></li>
+ * <li><p><i>Sockets</i>, which are basic bidirectional data communication
+ * mechanisms.</p></li>
+ * <li><p><i>Interfaces</i>, which describe network interfaces. </p></li>
+ * </ul></li>
+ * <li> <p><i>A High Level API</i>, which deals with the following
+ * abstractions:</p>
+ * <ul>
+ * <li><p><i>URIs</i>, which represent
+ * Universal Resource Identifiers.</p></li>
+ * <li><p><i>URLs</i>, which represent
+ * Universal Resource Locators.</p></li>
+ * <li><p><i>Connections</i>, which represents connections to the resource
+ * pointed to by <i>URLs</i>.</p></li>
+ * </ul></li>
+ * </ul>
+ * <h2>Addresses</h2>
+ * <p>Addresses are used throughout the java.net APIs as either host
+ * identifiers, or socket endpoint identifiers.</p>
+ * <p>The {@link java.net.InetAddress} class is the abstraction representing an
+ * IP (Internet Protocol) address. It has two subclasses:
+ * <ul>
+ * <li>{@link java.net.Inet4Address} for IPv4 addresses.</li>
+ * <li>{@link java.net.Inet6Address} for IPv6 addresses.</li>
+ * </ul>
+ * <p>But, in most cases, there is no need to deal directly with the subclasses,
+ * as the InetAddress abstraction should cover most of the needed
+ * functionality.</p>
+ * <h3><b>About IPv6</b></h3>
+ * <p>Not all systems have support for the IPv6 protocol, and while the Java
+ * networking stack will attempt to detect it and use it transparently when
+ * available, it is also possible to disable its use with a system property.
+ * In the case where IPv6 is not available, or explicitly disabled,
+ * Inet6Address are not valid arguments for most networking operations any
+ * more. While methods like {@link java.net.InetAddress#getByName} are
+ * guaranteed not to return an Inet6Address when looking up host names, it
+ * is possible, by passing literals, to create such an object. In which
+ * case, most methods, when called with an Inet6Address will throw an
+ * Exception.</p>
+ * <h2>Sockets</h2>
+ * <p>Sockets are means to establish a communication link between machines over
+ * the network. The java.net package provides 4 kinds of Sockets:</p>
+ * <ul>
+ * <li>{@link java.net.Socket} is a TCP client API, and will typically
+ * be used to {@linkplain java.net.Socket#connect(SocketAddress)
+ * connect} to a remote host.</li>
+ * <li>{@link java.net.ServerSocket} is a TCP server API, and will
+ * typically {@linkplain java.net.ServerSocket#accept accept}
+ * connections from client sockets.</li>
+ * <li>{@link java.net.DatagramSocket} is a UDP endpoint API and is used
+ * to {@linkplain java.net.DatagramSocket#send send} and
+ * {@linkplain java.net.DatagramSocket#receive receive}
+ * {@linkplain java.net.DatagramPacket datagram packets}.</li>
+ * <li>{@link java.net.MulticastSocket} is a subclass of
+ * {@code DatagramSocket} used when dealing with multicast
+ * groups.</li>
+ * </ul>
+ * <p>Sending and receiving with TCP sockets is done through InputStreams and
+ * OutputStreams which can be obtained via the
+ * {@link java.net.Socket#getInputStream} and
+ * {@link java.net.Socket#getOutputStream} methods.</p>
+ * <h2>Interfaces</h2>
+ * <p>The {@link java.net.NetworkInterface} class provides APIs to browse and
+ * query all the networking interfaces (e.g. ethernet connection or PPP
+ * endpoint) of the local machine. It is through that class that you can
+ * check if any of the local interfaces is configured to support IPv6.</p>
+ * <p>Note, all conforming implementations must support at least one
+ * {@code NetworkInterface} object, which must either be connected to a
+ * network, or be a "loopback" interface that can only communicate with
+ * entities on the same machine.</p>
+ *
+ * <h2>High level API</h2>
+ * <p>A number of classes in the java.net package do provide for a much higher
+ * level of abstraction and allow for easy access to resources on the
+ * network. The classes are:
+ * <ul>
+ * <li>{@link java.net.URI} is the class representing a
+ * Universal Resource Identifier, as specified in RFC 2396.
+ * As the name indicates, this is just an Identifier and doesn't
+ * provide directly the means to access the resource.</li>
+ * <li>{@link java.net.URL} is the class representing a
+ * Universal Resource Locator, which is both an older concept for
+ * URIs and a means to access the resources.</li>
+ * <li>{@link java.net.URLConnection} is created from a URL and is the
+ * communication link used to access the resource pointed by the
+ * URL. This abstract class will delegate most of the work to the
+ * underlying protocol handlers like http or https.</li>
+ * <li>{@link java.net.HttpURLConnection} is a subclass of URLConnection
+ * and provides some additional functionalities specific to the
+ * HTTP protocol.</li>
+ * </ul>
+ * <p>The recommended usage is to use {@link java.net.URI} to identify
+ * resources, then convert it into a {@link java.net.URL} when it is time to
+ * access the resource. From that URL, you can either get the
+ * {@link java.net.URLConnection} for fine control, or get directly the
+ * InputStream.<p>
+ * <p>Here is an example:</p>
+ * <p><pre>
+ * URI uri = new URI("http://java.sun.com/");
+ * URL url = uri.toURL();
+ * InputStream in = url.openStream();
+ * </pre>
+ * <h2>Protocol Handlers</h2>
+ * As mentioned, URL and URLConnection rely on protocol handlers which must be
+ * present, otherwise an Exception is thrown. This is the major difference with
+ * URIs which only identify resources, and therefore don't need to have access
+ * to the protocol handler. So, while it is possible to create an URI with any
+ * kind of protocol scheme (e.g. {@code myproto://myhost.mydomain/resource/}),
+ * a similar URL will try to instantiate the handler for the specified protocol;
+ * if it doesn't exist an exception will be thrown.
+ * <p>By default the protocol handlers are loaded dynamically from the default
+ * location. It is, however, possible to add to the search path by setting
+ * the {@code java.protocol.handler.pkgs} system property. For instance if
+ * it is set to {@code myapp.protocols}, then the URL code will try, in the
+ * case of http, first to load {@code myapp.protocols.http.Handler}, then,
+ * if this fails, {@code http.Handler} from the default location.<p>
+ * <p>Note that the Handler class <b>has to</b> be a subclass of the abstract
+ * class {@link java.net.URLStreamHandler}.</p>
+ * <h2>Additional Specification</h2>
+ * <ul>
+ * <li><a href="doc-files/net-properties.html">
+ * Networking System Properties</a></li>
+ * </ul>
+ *
+ * @since JDK1.0
+ */
+package java.net;
--- a/jdk/src/share/classes/java/net/package.html Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-<!--
- Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<body bgcolor="white">
-
-Provides the classes for implementing networking applications.
-
-<p> The java.net package can be roughly divided in two sections:</p>
-<ul>
- <li> <p><i>A Low Level API</i>, which deals with the following abstractions:</p>
- <ul>
- <li><p><i>Addresses</i>, which are networking identifiers, like IP addresses.</p></li>
- <li><p><i>Sockets</i>, which are basic bidirectional data communication mechanisms.</p></li>
- <li><p><i>Interfaces</i>, which describe network interfaces. </p></li>
- </ul></li>
- <li> <p><i>A High Level API</i>, which deals with the following abstractions:</p>
- <ul>
- <li><p><i>URIs</i>, which represent Universal Resource Identifiers.</p></li>
- <li><p><i>URLs</i>, which represent Universal Resource Locators.</p></li>
- <li><p><i>Connections</i>, which represents connections to the resource pointed to by <i>URLs</i>.</p></li>
- </ul></li>
-</ul>
-<h2>Addresses</h2>
-<p>Addresses are used throughout the java.net APIs as either host identifiers, or socket endpoint identifiers.</p>
-<p>The {@link java.net.InetAddress} class is the abstraction representing an IP (Internet Protocol) address. It has two subclasses:
-<ul>
- <li>{@link java.net.Inet4Address} for IPv4 addresses.</li>
- <li>{@link java.net.Inet6Address} for IPv6 addresses.</li>
-</ul>
-<p>But, in most cases, there is no need to deal directly with the subclasses, as the InetAddress abstraction should cover most of the needed functionality.</p>
-<h3><b>About IPv6</b></h3>
-<p>Not all systems have support for the IPv6 protocol, and while the Java networking stack will attempt to detect it and use it transparently when available, it is also possible to disable its use with a system property. In the case where IPv6 is not available, or explicitly disabled, Inet6Address are not valid arguments for most networking operations any more. While methods like {@link java.net.InetAddress#getByName} are guaranteed not to return an Inet6Address when looking up host names, it is possible, by passing literals, to create such an object. In which case, most methods, when called with an Inet6Address will throw an Exception.</p>
-<h2>Sockets</h2>
-<p>Sockets are means to establish a communication link between machines over the network. The java.net package provides 4 kinds of Sockets:</p>
-<ul>
- <li>{@link java.net.Socket} is a TCP client API, and will typically be used to {@linkplain java.net.Socket#connect(SocketAddress) connect} to a remote host.</li>
- <li>{@link java.net.ServerSocket} is a TCP server API, and will typically {@linkplain java.net.ServerSocket#accept accept} connections from client sockets.</li>
- <li>{@link java.net.DatagramSocket} is a UDP endpoint API and is used to {@linkplain java.net.DatagramSocket#send send} and {@linkplain java.net.DatagramSocket#receive receive} {@linkplain java.net.DatagramPacket datagram packets}.</li>
- <li>{@link java.net.MulticastSocket} is a subclass of {@code DatagramSocket} used when dealing with multicast groups.</li>
-</ul>
-<p>Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the {@link java.net.Socket#getInputStream} and {@link java.net.Socket#getOutputStream} methods.</p>
-<h2>Interfaces</h2>
-<p>The {@link java.net.NetworkInterface} class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.</p>
-<p>Note, all conforming implementations must support at least one {@code NetworkInterface} object, which must either be connected to a network, or be a "loopback" interface that can only communicate with entities on the same machine.</p>
-
-<h2>High level API</h2>
-<p>A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are:
-<ul>
- <li>{@link java.net.URI} is the class representing a Universal Resource Identifier, as specified in RFC 2396. As the name indicates, this is just an Identifier and doesn't provide directly the means to access the resource.</li>
- <li>{@link java.net.URL} is the class representing a Universal Resource Locator, which is both an older concept for URIs and a means to access the resources.</li>
- <li>{@link java.net.URLConnection} is created from a URL and is the communication link used to access the resource pointed by the URL. This abstract class will delegate most of the work to the underlying protocol handlers like http or https.</li>
- <li>{@link java.net.HttpURLConnection} is a subclass of URLConnection and provides some additional functionalities specific to the HTTP protocol.</li>
-</ul>
-<p>The recommended usage is to use {@link java.net.URI} to identify resources, then convert it into a {@link java.net.URL} when it is time to access the resource. From that URL, you can either get the {@link java.net.URLConnection} for fine control, or get directly the InputStream.<p>
-<p>Here is an example:</p>
-<p><code>
-URI uri = new URI("http://java.sun.com/");<br>
-URL url = uri.toURL();<br>
-InputStream in = url.openStream();
-</code></p>
-<h2>Protocol Handlers</h2>
-As mentioned, URL and URLConnection rely on protocol handlers which must be present, otherwise an Exception is thrown. This is the major difference with URIs which only identify resources, and therefore don't need to have access to the protocol handler. So, while it is possible to create an URI with any kind of protocol scheme (e.g. <code>myproto://myhost.mydomain/resource/</code>), a similar URL will try to instantiate the handler for the specified protocol; if it doesn't exist an exception will be thrown.</p>
-<p>By default the protocol handlers are loaded dynamically from the default location. It is, however, possible to add to the search path by setting the <code>java.protocol.handler.pkgs</code> system property. For instance if it is set to <code>myapp.protocols</code>, then the URL code will try, in the case of http, first to load <code>myapp.protocols.http.Handler</code>, then, if this fails, <code>http.Handler</code> from the default location.<p>
-<p>Note that the Handler class <b>has to</b> be a subclass of the abstract class {@link java.net.URLStreamHandler}.</p>
-<h2>Additional Specification</h2>
-<ul>
- <li><a href="doc-files/net-properties.html">Networking System Properties</a></li>
-</ul>
-<!--
-<h2>Package Specification</h2>
-
-##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
-<ul>
- <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
-</ul>
-
-<h2>Related Documentation</h2>
-
-For overviews, tutorials, examples, guides, and tool documentation, please see:
-<ul>
- <li><a href="">##### REFER TO NON-SPEC DOCUMENTATION HERE #####</a>
-</ul>
-
--->
-
-@since JDK1.0
-</body>
-</html>
--- a/jdk/src/share/classes/java/nio/file/Files.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/nio/file/Files.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,10 +25,10 @@
package java.nio.file;
-import java.nio.ByteBuffer;
import java.nio.file.attribute.*;
import java.nio.file.spi.FileSystemProvider;
import java.nio.file.spi.FileTypeDetector;
+import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableByteChannel;
import java.io.Closeable;
@@ -2965,7 +2965,63 @@
}
/**
- * Read all the bytes from a file. The method ensures that the file is
+ * The maximum size of array to allocate.
+ * Some VMs reserve some header words in an array.
+ * Attempts to allocate larger arrays may result in
+ * OutOfMemoryError: Requested array size exceeds VM limit
+ */
+ private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
+
+ /**
+ * Reads all the bytes from an input stream. Uses {@code initialSize} as a hint
+ * about how many bytes the stream will have.
+ *
+ * @param source
+ * the input stream to read from
+ * @param initialSize
+ * the initial size of the byte array to allocate
+ *
+ * @return a byte array containing the bytes read from the file
+ *
+ * @throws IOException
+ * if an I/O error occurs reading from the stream
+ * @throws OutOfMemoryError
+ * if an array of the required size cannot be allocated
+ */
+ private static byte[] read(InputStream source, int initialSize)
+ throws IOException
+ {
+ int capacity = initialSize;
+ byte[] buf = new byte[capacity];
+ int nread = 0;
+ int n;
+ for (;;) {
+ // read to EOF which may read more or less than initialSize (eg: file
+ // is truncated while we are reading)
+ while ((n = source.read(buf, nread, capacity - nread)) > 0)
+ nread += n;
+
+ // if last call to source.read() returned -1, we are done
+ // otherwise, try to read one more byte; if that failed we're done too
+ if (n < 0 || (n = source.read()) < 0)
+ break;
+
+ // one more byte was read; need to allocate a larger buffer
+ if (capacity <= MAX_BUFFER_SIZE - capacity) {
+ capacity = Math.max(capacity << 1, BUFFER_SIZE);
+ } else {
+ if (capacity == MAX_BUFFER_SIZE)
+ throw new OutOfMemoryError("Required array size too large");
+ capacity = MAX_BUFFER_SIZE;
+ }
+ buf = Arrays.copyOf(buf, capacity);
+ buf[nread++] = (byte)n;
+ }
+ return (capacity == nread) ? buf : Arrays.copyOf(buf, nread);
+ }
+
+ /**
+ * Reads all the bytes from a file. The method ensures that the file is
* closed when all bytes have been read or an I/O error, or other runtime
* exception, is thrown.
*
@@ -2989,22 +3045,13 @@
* method is invoked to check read access to the file.
*/
public static byte[] readAllBytes(Path path) throws IOException {
- try (FileChannel fc = FileChannel.open(path)) {
+ try (FileChannel fc = FileChannel.open(path);
+ InputStream is = Channels.newInputStream(fc)) {
long size = fc.size();
- if (size > (long)Integer.MAX_VALUE)
+ if (size > (long)MAX_BUFFER_SIZE)
throw new OutOfMemoryError("Required array size too large");
- byte[] arr = new byte[(int)size];
- ByteBuffer bb = ByteBuffer.wrap(arr);
- while (bb.hasRemaining()) {
- if (fc.read(bb) < 0) {
- // truncated
- break;
- }
- }
-
- int nread = bb.position();
- return (nread == size) ? arr : Arrays.copyOf(arr, nread);
+ return read(is, (int)size);
}
}
--- a/jdk/src/share/classes/java/rmi/server/RMISocketFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/rmi/server/RMISocketFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -33,15 +33,47 @@
* in order to obtain client and server sockets for RMI calls. An
* application may use the <code>setSocketFactory</code> method to
* request that the RMI runtime use its socket factory instance
- * instead of the default implementation.<p>
+ * instead of the default implementation.
*
- * The default socket factory implementation used goes through a
+ * <p>The default socket factory implementation performs a
* three-tiered approach to creating client sockets. First, a direct
* socket connection to the remote VM is attempted. If that fails
* (due to a firewall), the runtime uses HTTP with the explicit port
* number of the server. If the firewall does not allow this type of
* communication, then HTTP to a cgi-bin script on the server is used
- * to POST the RMI call.<p>
+ * to POST the RMI call.
+ *
+ * <p>The default socket factory implementation creates server sockets that
+ * are bound to the wildcard address, which accepts requests from all network
+ * interfaces.
+ *
+ * @implNote
+ * <p>You can use the {@code RMISocketFactory} class to create a server socket that
+ * is bound to a specific address, restricting the origin of requests. For example,
+ * the following code implements a socket factory that binds server sockets to the
+ * loopback address. This restricts RMI to processing requests only from the local host.
+ *
+ * <pre>{@code
+ * class LoopbackSocketFactory extends RMISocketFactory {
+ * public ServerSocket createServerSocket(int port) throws IOException {
+ * return new ServerSocket(port, 5, InetAddress.getLoopbackAddress());
+ * }
+ *
+ * public Socket createSocket(String host, int port) throws IOException {
+ * // just call the default client socket factory
+ * return RMISocketFactory.getDefaultSocketFactory()
+ * .createSocket(host, port);
+ * }
+ * }
+ *
+ * // ...
+ *
+ * RMISocketFactory.setSocketFactory(new LoopbackSocketFactory());
+ * }</pre>
+ *
+ * Set the {@code java.rmi.server.hostname} system property
+ * to a host name (typically {@code localhost}) that resolves to the loopback
+ * interface to ensure that the generated stubs use the right network interface.
*
* @author Ann Wollrath
* @author Peter Jones
--- a/jdk/src/share/classes/java/rmi/server/UnicastRemoteObject.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/rmi/server/UnicastRemoteObject.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -100,6 +100,26 @@
* </ul>
* </ul>
*
+ * <p>If an object is exported with the
+ * {@link #exportObject(Remote) exportObject(Remote)}
+ * or
+ * {@link #exportObject(Remote, int) exportObject(Remote, port)}
+ * methods, or if a subclass constructor invokes one of the
+ * {@link #UnicastRemoteObject()}
+ * or
+ * {@link #UnicastRemoteObject(int) UnicastRemoteObject(port)}
+ * constructors, the object is exported with a server socket created using the
+ * {@link RMISocketFactory}
+ * class.
+ *
+ * @implNote
+ * <p>By default, server sockets created by the {@link RMISocketFactory} class
+ * listen on all network interfaces. See the
+ * {@link RMISocketFactory} class and the section
+ * <a href="{@docRoot}/../platform/rmi/spec/rmi-server29.html">RMI Socket Factories</a>
+ * in the
+ * <a href="{@docRoot}/../platform/rmi/spec/rmiTOC.html">Java RMI Specification</a>.
+ *
* @author Ann Wollrath
* @author Peter Jones
* @since JDK1.1
--- a/jdk/src/share/classes/java/security/Security.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/security/Security.java Mon Aug 12 09:29:06 2013 -0400
@@ -326,17 +326,13 @@
*
* <p>A provider cannot be added if it is already installed.
*
- * <p>First, if there is a security manager, its
- * {@code checkSecurityAccess}
- * method is called with the string
- * {@code "insertProvider."+provider.getName()}
- * to see if it's ok to add a new provider.
- * If the default implementation of {@code checkSecurityAccess}
- * is used (i.e., that method is not overriden), then this will result in
- * a call to the security manager's {@code checkPermission} method
- * with a
- * {@code SecurityPermission("insertProvider."+provider.getName())}
- * permission.
+ * <p>If there is a security manager, the
+ * {@link java.lang.SecurityManager#checkSecurityAccess} method is called
+ * with the {@code "insertProvider"} permission target name to see if
+ * it's ok to add a new provider. If this permission check is denied,
+ * {@code checkSecurityAccess} is called again with the
+ * {@code "insertProvider."+provider.getName()} permission target name. If
+ * both checks are denied, a {@code SecurityException} is thrown.
*
* @param provider the provider to be added.
*
@@ -360,7 +356,7 @@
public static synchronized int insertProviderAt(Provider provider,
int position) {
String providerName = provider.getName();
- check("insertProvider." + providerName);
+ checkInsertProvider(providerName);
ProviderList list = Providers.getFullProviderList();
ProviderList newList = ProviderList.insertAt(list, provider, position - 1);
if (list == newList) {
@@ -373,17 +369,13 @@
/**
* Adds a provider to the next position available.
*
- * <p>First, if there is a security manager, its
- * {@code checkSecurityAccess}
- * method is called with the string
- * {@code "insertProvider."+provider.getName()}
- * to see if it's ok to add a new provider.
- * If the default implementation of {@code checkSecurityAccess}
- * is used (i.e., that method is not overriden), then this will result in
- * a call to the security manager's {@code checkPermission} method
- * with a
- * {@code SecurityPermission("insertProvider."+provider.getName())}
- * permission.
+ * <p>If there is a security manager, the
+ * {@link java.lang.SecurityManager#checkSecurityAccess} method is called
+ * with the {@code "insertProvider"} permission target name to see if
+ * it's ok to add a new provider. If this permission check is denied,
+ * {@code checkSecurityAccess} is called again with the
+ * {@code "insertProvider."+provider.getName()} permission target name. If
+ * both checks are denied, a {@code SecurityException} is thrown.
*
* @param provider the provider to be added.
*
@@ -863,6 +855,23 @@
}
}
+ private static void checkInsertProvider(String name) {
+ SecurityManager security = System.getSecurityManager();
+ if (security != null) {
+ try {
+ security.checkSecurityAccess("insertProvider");
+ } catch (SecurityException se1) {
+ try {
+ security.checkSecurityAccess("insertProvider." + name);
+ } catch (SecurityException se2) {
+ // throw first exception, but add second to suppressed
+ se1.addSuppressed(se2);
+ throw se1;
+ }
+ }
+ }
+ }
+
/*
* Returns all providers who satisfy the specified
* criterion.
--- a/jdk/src/share/classes/java/security/SecurityPermission.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/security/SecurityPermission.java Mon Aug 12 09:29:06 2013 -0400
@@ -130,14 +130,17 @@
* </tr>
*
* <tr>
- * <td>insertProvider.{provider name}</td>
- * <td>Addition of a new provider, with the specified name</td>
+ * <td>insertProvider</td>
+ * <td>Addition of a new provider</td>
* <td>This would allow somebody to introduce a possibly
* malicious provider (e.g., one that discloses the private keys passed
* to it) as the highest-priority provider. This would be possible
* because the Security object (which manages the installed providers)
* currently does not check the integrity or authenticity of a provider
- * before attaching it.</td>
+ * before attaching it. The "insertProvider" permission subsumes the
+ * "insertProvider.{provider name}" permission (see the section below for
+ * more information).
+ * </td>
* </tr>
*
* <tr>
@@ -186,9 +189,10 @@
* </table>
*
* <P>
- * The following permissions are associated with classes that have been
- * deprecated: {@link Identity}, {@link IdentityScope}, {@link Signer}. Use of
- * them is discouraged. See the applicable classes for more information.
+ * The following permissions have been superseded by newer permissions or are
+ * associated with classes that have been deprecated: {@link Identity},
+ * {@link IdentityScope}, {@link Signer}. Use of them is discouraged. See the
+ * applicable classes for more information.
* <P>
*
* <table border=1 cellpadding=5 summary="target name,what the permission allows, and associated risks">
@@ -199,6 +203,23 @@
* </tr>
*
* <tr>
+ * <td>insertProvider.{provider name}</td>
+ * <td>Addition of a new provider, with the specified name</td>
+ * <td>Use of this permission is discouraged from further use because it is
+ * possible to circumvent the name restrictions by overriding the
+ * {@link java.security.Provider#getName} method. Also, there is an equivalent
+ * level of risk associated with granting code permission to insert a provider
+ * with a specific name, or any name it chooses. Users should use the
+ * "insertProvider" permission instead.
+ * <p>This would allow somebody to introduce a possibly
+ * malicious provider (e.g., one that discloses the private keys passed
+ * to it) as the highest-priority provider. This would be possible
+ * because the Security object (which manages the installed providers)
+ * currently does not check the integrity or authenticity of a provider
+ * before attaching it.</td>
+ * </tr>
+ *
+ * <tr>
* <td>setSystemScope</td>
* <td>Setting of the system identity scope</td>
* <td>This would allow an attacker to configure the system identity scope with
@@ -306,7 +327,6 @@
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
-
public SecurityPermission(String name)
{
super(name);
@@ -323,7 +343,6 @@
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty.
*/
-
public SecurityPermission(String name, String actions)
{
super(name, actions);
--- a/jdk/src/share/classes/java/util/ArrayPrefixHelpers.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/ArrayPrefixHelpers.java Mon Aug 12 09:29:06 2013 -0400
@@ -128,6 +128,7 @@
this.lo = lo; this.hi = hi;
}
+ @SuppressWarnings("unchecked")
public final void compute() {
final BinaryOperator<T> fn;
final T[] a;
@@ -692,6 +693,4 @@
}
}
}
-
-
-}
\ No newline at end of file
+}
--- a/jdk/src/share/classes/java/util/Collections.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Collections.java Mon Aug 12 09:29:06 2013 -0400
@@ -1143,6 +1143,7 @@
public boolean removeIf(Predicate<? super E> filter) {
throw new UnsupportedOperationException();
}
+ @SuppressWarnings("unchecked")
@Override
public Spliterator<E> spliterator() {
return (Spliterator<E>)c.spliterator();
@@ -1900,7 +1901,7 @@
private static final long serialVersionUID = -2239321462712562324L;
- EmptyNavigableMap() { super(new TreeMap()); }
+ EmptyNavigableMap() { super(new TreeMap<K,V>()); }
@Override
public NavigableSet<K> navigableKeySet()
@@ -1928,46 +1929,52 @@
public K ceilingKey(K key) { return nm.ceilingKey(key); }
public K higherKey(K key) { return nm.higherKey(key); }
+ @SuppressWarnings("unchecked")
public Entry<K, V> lowerEntry(K key) {
Entry<K,V> lower = (Entry<K, V>) nm.lowerEntry(key);
return (null != lower)
- ? new UnmodifiableEntrySet.UnmodifiableEntry(lower)
+ ? new UnmodifiableEntrySet.UnmodifiableEntry<>(lower)
: null;
}
+ @SuppressWarnings("unchecked")
public Entry<K, V> floorEntry(K key) {
Entry<K,V> floor = (Entry<K, V>) nm.floorEntry(key);
return (null != floor)
- ? new UnmodifiableEntrySet.UnmodifiableEntry(floor)
+ ? new UnmodifiableEntrySet.UnmodifiableEntry<>(floor)
: null;
}
+ @SuppressWarnings("unchecked")
public Entry<K, V> ceilingEntry(K key) {
Entry<K,V> ceiling = (Entry<K, V>) nm.ceilingEntry(key);
return (null != ceiling)
- ? new UnmodifiableEntrySet.UnmodifiableEntry(ceiling)
+ ? new UnmodifiableEntrySet.UnmodifiableEntry<>(ceiling)
: null;
}
+ @SuppressWarnings("unchecked")
public Entry<K, V> higherEntry(K key) {
Entry<K,V> higher = (Entry<K, V>) nm.higherEntry(key);
return (null != higher)
- ? new UnmodifiableEntrySet.UnmodifiableEntry(higher)
+ ? new UnmodifiableEntrySet.UnmodifiableEntry<>(higher)
: null;
}
+ @SuppressWarnings("unchecked")
public Entry<K, V> firstEntry() {
Entry<K,V> first = (Entry<K, V>) nm.firstEntry();
return (null != first)
- ? new UnmodifiableEntrySet.UnmodifiableEntry(first)
+ ? new UnmodifiableEntrySet.UnmodifiableEntry<>(first)
: null;
}
+ @SuppressWarnings("unchecked")
public Entry<K, V> lastEntry() {
Entry<K,V> last = (Entry<K, V>) nm.lastEntry();
return (null != last)
- ? new UnmodifiableEntrySet.UnmodifiableEntry(last)
+ ? new UnmodifiableEntrySet.UnmodifiableEntry<>(last)
: null;
}
@@ -2360,7 +2367,7 @@
}
public NavigableSet<E> tailSet(E fromElement) {
synchronized (mutex) {
- return new SynchronizedNavigableSet(ns.tailSet(fromElement, true), mutex);
+ return new SynchronizedNavigableSet<>(ns.tailSet(fromElement, true), mutex);
}
}
@@ -2925,7 +2932,7 @@
public NavigableMap<K, V> descendingMap() {
synchronized (mutex) {
return
- new SynchronizedNavigableMap(nm.descendingMap(), mutex);
+ new SynchronizedNavigableMap<>(nm.descendingMap(), mutex);
}
}
@@ -2935,13 +2942,13 @@
public NavigableSet<K> navigableKeySet() {
synchronized (mutex) {
- return new SynchronizedNavigableSet(nm.navigableKeySet(), mutex);
+ return new SynchronizedNavigableSet<>(nm.navigableKeySet(), mutex);
}
}
public NavigableSet<K> descendingKeySet() {
synchronized (mutex) {
- return new SynchronizedNavigableSet(nm.descendingKeySet(), mutex);
+ return new SynchronizedNavigableSet<>(nm.descendingKeySet(), mutex);
}
}
@@ -2959,27 +2966,27 @@
}
public SortedMap<K,V> tailMap(K fromKey) {
synchronized (mutex) {
- return new SynchronizedNavigableMap<>(nm.tailMap(fromKey, true),mutex);
+ return new SynchronizedNavigableMap<>(nm.tailMap(fromKey, true),mutex);
}
}
public NavigableMap<K, V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) {
synchronized (mutex) {
- return new SynchronizedNavigableMap(
+ return new SynchronizedNavigableMap<>(
nm.subMap(fromKey, fromInclusive, toKey, toInclusive), mutex);
}
}
public NavigableMap<K, V> headMap(K toKey, boolean inclusive) {
synchronized (mutex) {
- return new SynchronizedNavigableMap(
+ return new SynchronizedNavigableMap<>(
nm.headMap(toKey, inclusive), mutex);
}
}
public NavigableMap<K, V> tailMap(K fromKey, boolean inclusive) {
synchronized (mutex) {
- return new SynchronizedNavigableMap(
+ return new SynchronizedNavigableMap<>(
nm.tailMap(fromKey, inclusive), mutex);
}
}
@@ -4081,7 +4088,7 @@
public Entry<K, V> lowerEntry(K key) {
Entry<K,V> lower = nm.lowerEntry(key);
return (null != lower)
- ? new CheckedMap.CheckedEntrySet.CheckedEntry(lower, valueType)
+ ? new CheckedMap.CheckedEntrySet.CheckedEntry<>(lower, valueType)
: null;
}
@@ -4090,7 +4097,7 @@
public Entry<K, V> floorEntry(K key) {
Entry<K,V> floor = nm.floorEntry(key);
return (null != floor)
- ? new CheckedMap.CheckedEntrySet.CheckedEntry(floor, valueType)
+ ? new CheckedMap.CheckedEntrySet.CheckedEntry<>(floor, valueType)
: null;
}
@@ -4099,7 +4106,7 @@
public Entry<K, V> ceilingEntry(K key) {
Entry<K,V> ceiling = nm.ceilingEntry(key);
return (null != ceiling)
- ? new CheckedMap.CheckedEntrySet.CheckedEntry(ceiling, valueType)
+ ? new CheckedMap.CheckedEntrySet.CheckedEntry<>(ceiling, valueType)
: null;
}
@@ -4108,7 +4115,7 @@
public Entry<K, V> higherEntry(K key) {
Entry<K,V> higher = nm.higherEntry(key);
return (null != higher)
- ? new CheckedMap.CheckedEntrySet.CheckedEntry(higher, valueType)
+ ? new CheckedMap.CheckedEntrySet.CheckedEntry<>(higher, valueType)
: null;
}
@@ -4117,14 +4124,14 @@
public Entry<K, V> firstEntry() {
Entry<K,V> first = nm.firstEntry();
return (null != first)
- ? new CheckedMap.CheckedEntrySet.CheckedEntry(first, valueType)
+ ? new CheckedMap.CheckedEntrySet.CheckedEntry<>(first, valueType)
: null;
}
public Entry<K, V> lastEntry() {
Entry<K,V> last = nm.lastEntry();
return (null != last)
- ? new CheckedMap.CheckedEntrySet.CheckedEntry(last, valueType)
+ ? new CheckedMap.CheckedEntrySet.CheckedEntry<>(last, valueType)
: null;
}
@@ -4132,14 +4139,14 @@
Entry<K,V> entry = nm.pollFirstEntry();
return (null == entry)
? null
- : new CheckedMap.CheckedEntrySet.CheckedEntry(entry, valueType);
+ : new CheckedMap.CheckedEntrySet.CheckedEntry<>(entry, valueType);
}
public Entry<K, V> pollLastEntry() {
Entry<K,V> entry = nm.pollLastEntry();
return (null == entry)
? null
- : new CheckedMap.CheckedEntrySet.CheckedEntry(entry, valueType);
+ : new CheckedMap.CheckedEntrySet.CheckedEntry<>(entry, valueType);
}
public NavigableMap<K, V> descendingMap() {
--- a/jdk/src/share/classes/java/util/Comparator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Comparator.java Mon Aug 12 09:29:06 2013 -0400
@@ -352,6 +352,7 @@
* @see Comparable
* @since 1.8
*/
+ @SuppressWarnings("unchecked")
public static <T extends Comparable<? super T>> Comparator<T> naturalOrder() {
return (Comparator<T>) Comparators.NaturalOrderComparator.INSTANCE;
}
@@ -374,7 +375,7 @@
* @since 1.8
*/
public static <T> Comparator<T> nullsFirst(Comparator<? super T> comparator) {
- return new Comparators.NullComparator(true, comparator);
+ return new Comparators.NullComparator<>(true, comparator);
}
/**
@@ -395,7 +396,7 @@
* @since 1.8
*/
public static <T> Comparator<T> nullsLast(Comparator<? super T> comparator) {
- return new Comparators.NullComparator(false, comparator);
+ return new Comparators.NullComparator<>(false, comparator);
}
/**
--- a/jdk/src/share/classes/java/util/Comparators.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Comparators.java Mon Aug 12 09:29:06 2013 -0400
@@ -87,12 +87,12 @@
@Override
public Comparator<T> thenComparing(Comparator<? super T> other) {
Objects.requireNonNull(other);
- return new NullComparator(nullFirst, real == null ? other : real.thenComparing(other));
+ return new NullComparator<>(nullFirst, real == null ? other : real.thenComparing(other));
}
@Override
public Comparator<T> reversed() {
- return new NullComparator(!nullFirst, real == null ? null : real.reversed());
+ return new NullComparator<>(!nullFirst, real == null ? null : real.reversed());
}
}
}
--- a/jdk/src/share/classes/java/util/Deque.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Deque.java Mon Aug 12 09:29:06 2013 -0400
@@ -38,7 +38,7 @@
/**
* A linear collection that supports element insertion and removal at
* both ends. The name <i>deque</i> is short for "double ended queue"
- * and is usually pronounced "deck". Most <tt>Deque</tt>
+ * and is usually pronounced "deck". Most {@code Deque}
* implementations place no fixed limits on the number of elements
* they may contain, but this interface supports capacity-restricted
* deques as well as those with no fixed size limit.
@@ -47,10 +47,10 @@
* ends of the deque. Methods are provided to insert, remove, and
* examine the element. Each of these methods exists in two forms:
* one throws an exception if the operation fails, the other returns a
- * special value (either <tt>null</tt> or <tt>false</tt>, depending on
+ * special value (either {@code null} or {@code false}, depending on
* the operation). The latter form of the insert operation is
* designed specifically for use with capacity-restricted
- * <tt>Deque</tt> implementations; in most implementations, insert
+ * {@code Deque} implementations; in most implementations, insert
* operations cannot fail.
*
* <p>The twelve methods described above are summarized in the
@@ -58,6 +58,7 @@
*
* <p>
* <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <caption>Summary of Deque methods</caption>
* <tr>
* <td></td>
* <td ALIGN=CENTER COLSPAN = 2> <b>First Element (Head)</b></td>
@@ -72,38 +73,39 @@
* </tr>
* <tr>
* <td><b>Insert</b></td>
- * <td>{@link #addFirst addFirst(e)}</td>
- * <td>{@link #offerFirst offerFirst(e)}</td>
- * <td>{@link #addLast addLast(e)}</td>
- * <td>{@link #offerLast offerLast(e)}</td>
+ * <td>{@link Deque#addFirst addFirst(e)}</td>
+ * <td>{@link Deque#offerFirst offerFirst(e)}</td>
+ * <td>{@link Deque#addLast addLast(e)}</td>
+ * <td>{@link Deque#offerLast offerLast(e)}</td>
* </tr>
* <tr>
* <td><b>Remove</b></td>
- * <td>{@link #removeFirst removeFirst()}</td>
- * <td>{@link #pollFirst pollFirst()}</td>
- * <td>{@link #removeLast removeLast()}</td>
- * <td>{@link #pollLast pollLast()}</td>
+ * <td>{@link Deque#removeFirst removeFirst()}</td>
+ * <td>{@link Deque#pollFirst pollFirst()}</td>
+ * <td>{@link Deque#removeLast removeLast()}</td>
+ * <td>{@link Deque#pollLast pollLast()}</td>
* </tr>
* <tr>
* <td><b>Examine</b></td>
- * <td>{@link #getFirst getFirst()}</td>
- * <td>{@link #peekFirst peekFirst()}</td>
- * <td>{@link #getLast getLast()}</td>
- * <td>{@link #peekLast peekLast()}</td>
+ * <td>{@link Deque#getFirst getFirst()}</td>
+ * <td>{@link Deque#peekFirst peekFirst()}</td>
+ * <td>{@link Deque#getLast getLast()}</td>
+ * <td>{@link Deque#peekLast peekLast()}</td>
* </tr>
* </table>
*
* <p>This interface extends the {@link Queue} interface. When a deque is
* used as a queue, FIFO (First-In-First-Out) behavior results. Elements are
* added at the end of the deque and removed from the beginning. The methods
- * inherited from the <tt>Queue</tt> interface are precisely equivalent to
- * <tt>Deque</tt> methods as indicated in the following table:
+ * inherited from the {@code Queue} interface are precisely equivalent to
+ * {@code Deque} methods as indicated in the following table:
*
* <p>
* <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <caption>Comparison of Queue and Deque methods</caption>
* <tr>
- * <td ALIGN=CENTER> <b><tt>Queue</tt> Method</b></td>
- * <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td>
+ * <td ALIGN=CENTER> <b>{@code Queue} Method</b></td>
+ * <td ALIGN=CENTER> <b>Equivalent {@code Deque} Method</b></td>
* </tr>
* <tr>
* <td>{@link java.util.Queue#add add(e)}</td>
@@ -135,13 +137,14 @@
* interface should be used in preference to the legacy {@link Stack} class.
* When a deque is used as a stack, elements are pushed and popped from the
* beginning of the deque. Stack methods are precisely equivalent to
- * <tt>Deque</tt> methods as indicated in the table below:
+ * {@code Deque} methods as indicated in the table below:
*
* <p>
* <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <caption>Comparison of Stack and Deque methods</caption>
* <tr>
* <td ALIGN=CENTER> <b>Stack Method</b></td>
- * <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td>
+ * <td ALIGN=CENTER> <b>Equivalent {@code Deque} Method</b></td>
* </tr>
* <tr>
* <td>{@link #push push(e)}</td>
@@ -168,18 +171,18 @@
* <p>Unlike the {@link List} interface, this interface does not
* provide support for indexed access to elements.
*
- * <p>While <tt>Deque</tt> implementations are not strictly required
+ * <p>While {@code Deque} implementations are not strictly required
* to prohibit the insertion of null elements, they are strongly
- * encouraged to do so. Users of any <tt>Deque</tt> implementations
+ * encouraged to do so. Users of any {@code Deque} implementations
* that do allow null elements are strongly encouraged <i>not</i> to
* take advantage of the ability to insert nulls. This is so because
- * <tt>null</tt> is used as a special return value by various methods
+ * {@code null} is used as a special return value by various methods
* to indicated that the deque is empty.
*
- * <p><tt>Deque</tt> implementations generally do not define
- * element-based versions of the <tt>equals</tt> and <tt>hashCode</tt>
+ * <p>{@code Deque} implementations generally do not define
+ * element-based versions of the {@code equals} and {@code hashCode}
* methods, but instead inherit the identity-based versions from class
- * <tt>Object</tt>.
+ * {@code Object}.
*
* <p>This interface is a member of the <a
* href="{@docRoot}/../technotes/guides/collections/index.html"> Java Collections
@@ -190,13 +193,13 @@
* @since 1.6
* @param <E> the type of elements held in this collection
*/
-
public interface Deque<E> extends Queue<E> {
/**
* Inserts the specified element at the front of this deque if it is
- * possible to do so immediately without violating capacity restrictions.
- * When using a capacity-restricted deque, it is generally preferable to
- * use method {@link #offerFirst}.
+ * possible to do so immediately without violating capacity restrictions,
+ * throwing an {@code IllegalStateException} if no space is currently
+ * available. When using a capacity-restricted deque, it is generally
+ * preferable to use method {@link #offerFirst}.
*
* @param e the element to add
* @throws IllegalStateException if the element cannot be added at this
@@ -212,9 +215,10 @@
/**
* Inserts the specified element at the end of this deque if it is
- * possible to do so immediately without violating capacity restrictions.
- * When using a capacity-restricted deque, it is generally preferable to
- * use method {@link #offerLast}.
+ * possible to do so immediately without violating capacity restrictions,
+ * throwing an {@code IllegalStateException} if no space is currently
+ * available. When using a capacity-restricted deque, it is generally
+ * preferable to use method {@link #offerLast}.
*
* <p>This method is equivalent to {@link #add}.
*
@@ -237,8 +241,8 @@
* which can fail to insert an element only by throwing an exception.
*
* @param e the element to add
- * @return <tt>true</tt> if the element was added to this deque, else
- * <tt>false</tt>
+ * @return {@code true} if the element was added to this deque, else
+ * {@code false}
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this deque
* @throws NullPointerException if the specified element is null and this
@@ -255,8 +259,8 @@
* which can fail to insert an element only by throwing an exception.
*
* @param e the element to add
- * @return <tt>true</tt> if the element was added to this deque, else
- * <tt>false</tt>
+ * @return {@code true} if the element was added to this deque, else
+ * {@code false}
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this deque
* @throws NullPointerException if the specified element is null and this
@@ -288,17 +292,17 @@
/**
* Retrieves and removes the first element of this deque,
- * or returns <tt>null</tt> if this deque is empty.
+ * or returns {@code null} if this deque is empty.
*
- * @return the head of this deque, or <tt>null</tt> if this deque is empty
+ * @return the head of this deque, or {@code null} if this deque is empty
*/
E pollFirst();
/**
* Retrieves and removes the last element of this deque,
- * or returns <tt>null</tt> if this deque is empty.
+ * or returns {@code null} if this deque is empty.
*
- * @return the tail of this deque, or <tt>null</tt> if this deque is empty
+ * @return the tail of this deque, or {@code null} if this deque is empty
*/
E pollLast();
@@ -325,31 +329,31 @@
/**
* Retrieves, but does not remove, the first element of this deque,
- * or returns <tt>null</tt> if this deque is empty.
+ * or returns {@code null} if this deque is empty.
*
- * @return the head of this deque, or <tt>null</tt> if this deque is empty
+ * @return the head of this deque, or {@code null} if this deque is empty
*/
E peekFirst();
/**
* Retrieves, but does not remove, the last element of this deque,
- * or returns <tt>null</tt> if this deque is empty.
+ * or returns {@code null} if this deque is empty.
*
- * @return the tail of this deque, or <tt>null</tt> if this deque is empty
+ * @return the tail of this deque, or {@code null} if this deque is empty
*/
E peekLast();
/**
* Removes the first occurrence of the specified element from this deque.
* If the deque does not contain the element, it is unchanged.
- * More formally, removes the first element <tt>e</tt> such that
+ * More formally, removes the first element {@code e} such that
* <tt>(o==null ? e==null : o.equals(e))</tt>
* (if such an element exists).
- * Returns <tt>true</tt> if this deque contained the specified element
+ * Returns {@code true} if this deque contained the specified element
* (or equivalently, if this deque changed as a result of the call).
*
* @param o element to be removed from this deque, if present
- * @return <tt>true</tt> if an element was removed as a result of this call
+ * @return {@code true} if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
* is incompatible with this deque
* (<a href="Collection.html#optional-restrictions">optional</a>)
@@ -362,14 +366,14 @@
/**
* Removes the last occurrence of the specified element from this deque.
* If the deque does not contain the element, it is unchanged.
- * More formally, removes the last element <tt>e</tt> such that
+ * More formally, removes the last element {@code e} such that
* <tt>(o==null ? e==null : o.equals(e))</tt>
* (if such an element exists).
- * Returns <tt>true</tt> if this deque contained the specified element
+ * Returns {@code true} if this deque contained the specified element
* (or equivalently, if this deque changed as a result of the call).
*
* @param o element to be removed from this deque, if present
- * @return <tt>true</tt> if an element was removed as a result of this call
+ * @return {@code true} if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
* is incompatible with this deque
* (<a href="Collection.html#optional-restrictions">optional</a>)
@@ -385,15 +389,15 @@
* Inserts the specified element into the queue represented by this deque
* (in other words, at the tail of this deque) if it is possible to do so
* immediately without violating capacity restrictions, returning
- * <tt>true</tt> upon success and throwing an
- * <tt>IllegalStateException</tt> if no space is currently available.
+ * {@code true} upon success and throwing an
+ * {@code IllegalStateException} if no space is currently available.
* When using a capacity-restricted deque, it is generally preferable to
* use {@link #offer(Object) offer}.
*
* <p>This method is equivalent to {@link #addLast}.
*
* @param e the element to add
- * @return <tt>true</tt> (as specified by {@link Collection#add})
+ * @return {@code true} (as specified by {@link Collection#add})
* @throws IllegalStateException if the element cannot be added at this
* time due to capacity restrictions
* @throws ClassCastException if the class of the specified element
@@ -409,7 +413,7 @@
* Inserts the specified element into the queue represented by this deque
* (in other words, at the tail of this deque) if it is possible to do so
* immediately without violating capacity restrictions, returning
- * <tt>true</tt> upon success and <tt>false</tt> if no space is currently
+ * {@code true} upon success and {@code false} if no space is currently
* available. When using a capacity-restricted deque, this method is
* generally preferable to the {@link #add} method, which can fail to
* insert an element only by throwing an exception.
@@ -417,8 +421,8 @@
* <p>This method is equivalent to {@link #offerLast}.
*
* @param e the element to add
- * @return <tt>true</tt> if the element was added to this deque, else
- * <tt>false</tt>
+ * @return {@code true} if the element was added to this deque, else
+ * {@code false}
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this deque
* @throws NullPointerException if the specified element is null and this
@@ -444,11 +448,11 @@
/**
* Retrieves and removes the head of the queue represented by this deque
* (in other words, the first element of this deque), or returns
- * <tt>null</tt> if this deque is empty.
+ * {@code null} if this deque is empty.
*
* <p>This method is equivalent to {@link #pollFirst()}.
*
- * @return the first element of this deque, or <tt>null</tt> if
+ * @return the first element of this deque, or {@code null} if
* this deque is empty
*/
E poll();
@@ -469,12 +473,12 @@
/**
* Retrieves, but does not remove, the head of the queue represented by
* this deque (in other words, the first element of this deque), or
- * returns <tt>null</tt> if this deque is empty.
+ * returns {@code null} if this deque is empty.
*
* <p>This method is equivalent to {@link #peekFirst()}.
*
* @return the head of the queue represented by this deque, or
- * <tt>null</tt> if this deque is empty
+ * {@code null} if this deque is empty
*/
E peek();
@@ -484,9 +488,8 @@
/**
* Pushes an element onto the stack represented by this deque (in other
* words, at the head of this deque) if it is possible to do so
- * immediately without violating capacity restrictions, returning
- * <tt>true</tt> upon success and throwing an
- * <tt>IllegalStateException</tt> if no space is currently available.
+ * immediately without violating capacity restrictions, throwing an
+ * {@code IllegalStateException} if no space is currently available.
*
* <p>This method is equivalent to {@link #addFirst}.
*
@@ -520,16 +523,16 @@
/**
* Removes the first occurrence of the specified element from this deque.
* If the deque does not contain the element, it is unchanged.
- * More formally, removes the first element <tt>e</tt> such that
+ * More formally, removes the first element {@code e} such that
* <tt>(o==null ? e==null : o.equals(e))</tt>
* (if such an element exists).
- * Returns <tt>true</tt> if this deque contained the specified element
+ * Returns {@code true} if this deque contained the specified element
* (or equivalently, if this deque changed as a result of the call).
*
- * <p>This method is equivalent to {@link #removeFirstOccurrence}.
+ * <p>This method is equivalent to {@link #removeFirstOccurrence(Object)}.
*
* @param o element to be removed from this deque, if present
- * @return <tt>true</tt> if an element was removed as a result of this call
+ * @return {@code true} if an element was removed as a result of this call
* @throws ClassCastException if the class of the specified element
* is incompatible with this deque
* (<a href="Collection.html#optional-restrictions">optional</a>)
@@ -540,13 +543,13 @@
boolean remove(Object o);
/**
- * Returns <tt>true</tt> if this deque contains the specified element.
- * More formally, returns <tt>true</tt> if and only if this deque contains
- * at least one element <tt>e</tt> such that
+ * Returns {@code true} if this deque contains the specified element.
+ * More formally, returns {@code true} if and only if this deque contains
+ * at least one element {@code e} such that
* <tt>(o==null ? e==null : o.equals(e))</tt>.
*
* @param o element whose presence in this deque is to be tested
- * @return <tt>true</tt> if this deque contains the specified element
+ * @return {@code true} if this deque contains the specified element
* @throws ClassCastException if the type of the specified element
* is incompatible with this deque
* (<a href="Collection.html#optional-restrictions">optional</a>)
--- a/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package java.util;
import java.util.function.DoubleConsumer;
+import java.util.stream.Collector;
/**
* A state object for collecting statistics such as count, min, max, sum, and
@@ -35,24 +36,24 @@
* summary statistics on a stream of doubles with:
* <pre> {@code
* DoubleSummaryStatistics stats = doubleStream.collect(DoubleSummaryStatistics::new,
- * DoubleSummaryStatistics::accept,
- * DoubleSummaryStatistics::combine);
+ * DoubleSummaryStatistics::accept,
+ * DoubleSummaryStatistics::combine);
* }</pre>
*
* <p>{@code DoubleSummaryStatistics} can be used as a
- * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
+ * {@linkplain java.util.stream.Stream#collect(Collector) reduction}
* target for a {@linkplain java.util.stream.Stream stream}. For example:
*
* <pre> {@code
* DoubleSummaryStatistics stats = people.stream()
- * .collect(Collectors.toDoubleSummaryStatistics(Person::getWeight));
+ * .collect(Collectors.summarizingDouble(Person::getWeight));
*}</pre>
*
* This computes, in a single pass, the count of people, as well as the minimum,
* maximum, sum, and average of their weights.
*
* @implNote This implementation is not thread safe. However, it is safe to use
- * {@link java.util.stream.Collectors#toDoubleSummaryStatistics(java.util.function.ToDoubleFunction)
+ * {@link java.util.stream.Collectors#summarizingDouble(java.util.function.ToDoubleFunction)
* Collectors.toDoubleStatistics()} on a parallel stream, because the parallel
* implementation of {@link java.util.stream.Stream#collect Stream.collect()}
* provides the necessary partitioning, isolation, and merging of results for
@@ -152,7 +153,7 @@
}
/**
- * Returns the average of values recorded, or zero if no values have been
+ * Returns the arithmetic mean of values recorded, or zero if no values have been
* recorded. The average returned can vary depending upon the order in
* which values are recorded. This is due to accumulated rounding error in
* addition of values of differing magnitudes. Values sorted by increasing
@@ -160,7 +161,7 @@
* value is a {@code NaN} or the sum is at any point a {@code NaN} then the
* average will be {@code NaN}.
*
- * @return the average of values, or zero if none
+ * @return the arithmetic mean of values, or zero if none
*/
public final double getAverage() {
return getCount() > 0 ? getSum() / getCount() : 0.0d;
--- a/jdk/src/share/classes/java/util/Formatter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Formatter.java Mon Aug 12 09:29:06 2013 -0400
@@ -626,12 +626,11 @@
* <p> For general argument types, the precision is the maximum number of
* characters to be written to the output.
*
- * <p> For the floating-point conversions {@code 'e'}, {@code 'E'}, and
- * {@code 'f'} the precision is the number of digits after the decimal
- * separator. If the conversion is {@code 'g'} or {@code 'G'}, then the
+ * <p> For the floating-point conversions {@code 'a'}, {@code 'A'}, {@code 'e'},
+ * {@code 'E'}, and {@code 'f'} the precision is the number of digits after the
+ * radix point. If the conversion is {@code 'g'} or {@code 'G'}, then the
* precision is the total number of digits in the resulting magnitude after
- * rounding. If the conversion is {@code 'a'} or {@code 'A'}, then the
- * precision must not be specified.
+ * rounding.
*
* <p> For character, integral, and date/time argument types and the percent
* and line separator conversions, the precision is not applicable; if a
@@ -1297,14 +1296,21 @@
* of the significand as a fraction. The exponent is represented by
* {@code 'p'} (<tt>'\u0070'</tt>) followed by a decimal string of the
* unbiased exponent as if produced by invoking {@link
- * Integer#toString(int) Integer.toString} on the exponent value.
+ * Integer#toString(int) Integer.toString} on the exponent value. If the
+ * precision is specified, the value is rounded to the given number of
+ * hexadecimal digits.
*
* <li> If <i>m</i> is a {@code double} value with a subnormal
- * representation then the significand is represented by the characters
- * {@code '0x0.'} followed by the hexadecimal representation of the rest
- * of the significand as a fraction. The exponent is represented by
- * {@code 'p-1022'}. Note that there must be at least one nonzero digit
- * in a subnormal significand.
+ * representation then, unless the precision is specified to be in the range
+ * 1 through 12, inclusive, the significand is represented by the characters
+ * {@code '0x0.'} followed by the hexadecimal representation of the rest of
+ * the significand as a fraction, and the exponent represented by
+ * {@code 'p-1022'}. If the precision is in the interval
+ * [1, 12], the subnormal value is normalized such that it
+ * begins with the characters {@code '0x1.'}, rounded to the number of
+ * hexadecimal digits of precision, and the exponent adjusted
+ * accordingly. Note that there must be at least one nonzero digit in a
+ * subnormal significand.
*
* </ul>
*
@@ -1367,7 +1373,7 @@
* {@code 1}.
*
* <p> If the conversion is {@code 'a'} or {@code 'A'}, then the precision
- * is the number of hexadecimal digits after the decimal separator. If the
+ * is the number of hexadecimal digits after the radix point. If the
* precision is not provided, then all of the digits as returned by {@link
* Double#toHexString(double)} will be output.
*
--- a/jdk/src/share/classes/java/util/HashMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/HashMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -876,13 +876,9 @@
private static int roundUpToPowerOf2(int number) {
// assert number >= 0 : "number must be non-negative";
- int rounded = number >= MAXIMUM_CAPACITY
+ return number >= MAXIMUM_CAPACITY
? MAXIMUM_CAPACITY
- : (rounded = Integer.highestOneBit(number)) != 0
- ? (Integer.bitCount(number) > 1) ? rounded << 1 : rounded
- : 1;
-
- return rounded;
+ : (number > 1) ? Integer.highestOneBit((number - 1) << 1) : 1;
}
/**
--- a/jdk/src/share/classes/java/util/Hashtable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Hashtable.java Mon Aug 12 09:29:06 2013 -0400
@@ -928,6 +928,7 @@
return (null == result) ? defaultValue : result;
}
+ @SuppressWarnings("unchecked")
@Override
public synchronized void forEach(BiConsumer<? super K, ? super V> action) {
Objects.requireNonNull(action); // explicit check required in case
@@ -947,6 +948,7 @@
}
}
+ @SuppressWarnings("unchecked")
@Override
public synchronized void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
Objects.requireNonNull(function); // explicit check required in case
--- a/jdk/src/share/classes/java/util/IdentityHashMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/IdentityHashMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -1339,6 +1339,7 @@
tab[i + 1] = value;
}
+ @SuppressWarnings("unchecked")
@Override
public void forEach(BiConsumer<? super K, ? super V> action) {
Objects.requireNonNull(action);
@@ -1357,6 +1358,7 @@
}
}
+ @SuppressWarnings("unchecked")
@Override
public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
Objects.requireNonNull(function);
--- a/jdk/src/share/classes/java/util/IntSummaryStatistics.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/IntSummaryStatistics.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package java.util;
import java.util.function.IntConsumer;
+import java.util.stream.Collector;
/**
* A state object for collecting statistics such as count, min, max, sum, and
@@ -35,24 +36,24 @@
* summary statistics on a stream of ints with:
* <pre> {@code
* IntSummaryStatistics stats = intStream.collect(IntSummaryStatistics::new,
- * IntSummaryStatistics::accept,
- * IntSummaryStatistics::combine);
+ * IntSummaryStatistics::accept,
+ * IntSummaryStatistics::combine);
* }</pre>
*
* <p>{@code IntSummaryStatistics} can be used as a
- * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
+ * {@linkplain java.util.stream.Stream#collect(Collector) reduction}
* target for a {@linkplain java.util.stream.Stream stream}. For example:
*
* <pre> {@code
* IntSummaryStatistics stats = people.stream()
- * .collect(Collectors.toIntSummaryStatistics(Person::getDependents));
+ * .collect(Collectors.summarizingInt(Person::getDependents));
*}</pre>
*
* This computes, in a single pass, the count of people, as well as the minimum,
* maximum, sum, and average of their number of dependents.
*
* @implNote This implementation is not thread safe. However, it is safe to use
- * {@link java.util.stream.Collectors#toIntSummaryStatistics(java.util.function.ToIntFunction)
+ * {@link java.util.stream.Collectors#summarizingInt(java.util.function.ToIntFunction)
* Collectors.toIntStatistics()} on a parallel stream, because the parallel
* implementation of {@link java.util.stream.Stream#collect Stream.collect()}
* provides the necessary partitioning, isolation, and merging of results for
@@ -140,10 +141,10 @@
}
/**
- * Returns the average of values recorded, or zero if no values have been
+ * Returns the arithmetic mean of values recorded, or zero if no values have been
* recorded.
*
- * @return the average of values, or zero if none
+ * @return the arithmetic mean of values, or zero if none
*/
public final double getAverage() {
return getCount() > 0 ? (double) getSum() / getCount() : 0.0d;
--- a/jdk/src/share/classes/java/util/List.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/List.java Mon Aug 12 09:29:06 2013 -0400
@@ -384,10 +384,12 @@
* @implSpec
* The default implementation is equivalent to, for this {@code list}:
* <pre>
+ * {@code
* final ListIterator<E> li = list.listIterator();
* while (li.hasNext()) {
* li.set(operator.apply(li.next()));
* }
+ * }
* </pre>
* If the list's list-iterator does not support the {@code set} operation
* then an {@code UnsupportedOperationException} will be thrown when
--- a/jdk/src/share/classes/java/util/LongSummaryStatistics.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/LongSummaryStatistics.java Mon Aug 12 09:29:06 2013 -0400
@@ -26,6 +26,7 @@
import java.util.function.IntConsumer;
import java.util.function.LongConsumer;
+import java.util.stream.Collector;
/**
* A state object for collecting statistics such as count, min, max, sum, and
@@ -36,24 +37,24 @@
* summary statistics on a stream of longs with:
* <pre> {@code
* LongSummaryStatistics stats = longStream.collect(LongSummaryStatistics::new,
- * LongSummaryStatistics::accept,
- * LongSummaryStatistics::combine);
+ * LongSummaryStatistics::accept,
+ * LongSummaryStatistics::combine);
* }</pre>
*
* <p>{@code LongSummaryStatistics} can be used as a
- * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
+ * {@linkplain java.util.stream.Stream#collect(Collector)} reduction}
* target for a {@linkplain java.util.stream.Stream stream}. For example:
*
* <pre> {@code
* LongSummaryStatistics stats = people.stream()
- * .collect(Collectors.toLongSummaryStatistics(Person::getAge));
+ * .collect(Collectors.summarizingLong(Person::getAge));
*}</pre>
*
* This computes, in a single pass, the count of people, as well as the minimum,
- * maximum, sum, and average of their ages in milliseconds.
+ * maximum, sum, and average of their ages.
*
* @implNote This implementation is not thread safe. However, it is safe to use
- * {@link java.util.stream.Collectors#toLongSummaryStatistics(java.util.function.ToLongFunction)
+ * {@link java.util.stream.Collectors#summarizingLong(java.util.function.ToLongFunction)
* Collectors.toLongStatistics()} on a parallel stream, because the parallel
* implementation of {@link java.util.stream.Stream#collect Stream.collect()}
* provides the necessary partitioning, isolation, and merging of results for
@@ -152,10 +153,10 @@
}
/**
- * Returns the average of values recorded, or zero if no values have been
+ * Returns the arithmetic mean of values recorded, or zero if no values have been
* recorded.
*
- * @return The average of values, or zero if none
+ * @return The arithmetic mean of values, or zero if none
*/
public final double getAverage() {
return getCount() > 0 ? (double) getSum() / getCount() : 0.0d;
--- a/jdk/src/share/classes/java/util/Map.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Map.java Mon Aug 12 09:29:06 2013 -0400
@@ -561,6 +561,7 @@
* concurrency properties.
*
* @param key the key whose associated value is to be returned
+ * @param defaultValue the default mapping of the key
* @return the value to which the specified key is mapped, or
* {@code defaultValue} if this map contains no mapping for the key
* @throws ClassCastException if the key is of an inappropriate type for
--- a/jdk/src/share/classes/java/util/Optional.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Optional.java Mon Aug 12 09:29:06 2013 -0400
@@ -93,6 +93,7 @@
/**
* Returns an {@code Optional} with the specified present non-null value.
*
+ * @param <T> the class of the value
* @param value the value to be present, which must be non-null
* @return an {@code Optional} with the value present
*/
@@ -104,6 +105,7 @@
* Returns an {@code Optional} describing the specified value, if non-null,
* otherwise returns an empty {@code Optional}.
*
+ * @param <T> the class of the value
* @param value the possibly-null value to describe
* @return an {@code Optional} with a present value if the specified value
* is non-null, otherwise an empty {@code Optional}
@@ -305,7 +307,7 @@
return false;
}
- Optional other = (Optional) obj;
+ Optional<?> other = (Optional<?>) obj;
return Objects.equals(value, other.value);
}
--- a/jdk/src/share/classes/java/util/Queue.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Queue.java Mon Aug 12 09:29:06 2013 -0400
@@ -41,14 +41,15 @@
* queues provide additional insertion, extraction, and inspection
* operations. Each of these methods exists in two forms: one throws
* an exception if the operation fails, the other returns a special
- * value (either <tt>null</tt> or <tt>false</tt>, depending on the
+ * value (either {@code null} or {@code false}, depending on the
* operation). The latter form of the insert operation is designed
- * specifically for use with capacity-restricted <tt>Queue</tt>
+ * specifically for use with capacity-restricted {@code Queue}
* implementations; in most implementations, insert operations cannot
* fail.
*
* <p>
* <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <caption>Summary of Queue methods</caption>
* <tr>
* <td></td>
* <td ALIGN=CENTER><em>Throws exception</em></td>
@@ -56,18 +57,18 @@
* </tr>
* <tr>
* <td><b>Insert</b></td>
- * <td>{@link #add add(e)}</td>
- * <td>{@link #offer offer(e)}</td>
+ * <td>{@link Queue#add add(e)}</td>
+ * <td>{@link Queue#offer offer(e)}</td>
* </tr>
* <tr>
* <td><b>Remove</b></td>
- * <td>{@link #remove remove()}</td>
- * <td>{@link #poll poll()}</td>
+ * <td>{@link Queue#remove remove()}</td>
+ * <td>{@link Queue#poll poll()}</td>
* </tr>
* <tr>
* <td><b>Examine</b></td>
- * <td>{@link #element element()}</td>
- * <td>{@link #peek peek()}</td>
+ * <td>{@link Queue#element element()}</td>
+ * <td>{@link Queue#peek peek()}</td>
* </tr>
* </table>
*
@@ -79,15 +80,15 @@
* Whatever the ordering used, the <em>head</em> of the queue is that
* element which would be removed by a call to {@link #remove() } or
* {@link #poll()}. In a FIFO queue, all new elements are inserted at
- * the <em> tail</em> of the queue. Other kinds of queues may use
- * different placement rules. Every <tt>Queue</tt> implementation
+ * the <em>tail</em> of the queue. Other kinds of queues may use
+ * different placement rules. Every {@code Queue} implementation
* must specify its ordering properties.
*
* <p>The {@link #offer offer} method inserts an element if possible,
- * otherwise returning <tt>false</tt>. This differs from the {@link
+ * otherwise returning {@code false}. This differs from the {@link
* java.util.Collection#add Collection.add} method, which can fail to
* add an element only by throwing an unchecked exception. The
- * <tt>offer</tt> method is designed for use when failure is a normal,
+ * {@code offer} method is designed for use when failure is a normal,
* rather than exceptional occurrence, for example, in fixed-capacity
* (or "bounded") queues.
*
@@ -95,32 +96,32 @@
* return the head of the queue.
* Exactly which element is removed from the queue is a
* function of the queue's ordering policy, which differs from
- * implementation to implementation. The <tt>remove()</tt> and
- * <tt>poll()</tt> methods differ only in their behavior when the
- * queue is empty: the <tt>remove()</tt> method throws an exception,
- * while the <tt>poll()</tt> method returns <tt>null</tt>.
+ * implementation to implementation. The {@code remove()} and
+ * {@code poll()} methods differ only in their behavior when the
+ * queue is empty: the {@code remove()} method throws an exception,
+ * while the {@code poll()} method returns {@code null}.
*
* <p>The {@link #element()} and {@link #peek()} methods return, but do
* not remove, the head of the queue.
*
- * <p>The <tt>Queue</tt> interface does not define the <i>blocking queue
+ * <p>The {@code Queue} interface does not define the <i>blocking queue
* methods</i>, which are common in concurrent programming. These methods,
* which wait for elements to appear or for space to become available, are
* defined in the {@link java.util.concurrent.BlockingQueue} interface, which
* extends this interface.
*
- * <p><tt>Queue</tt> implementations generally do not allow insertion
- * of <tt>null</tt> elements, although some implementations, such as
- * {@link LinkedList}, do not prohibit insertion of <tt>null</tt>.
- * Even in the implementations that permit it, <tt>null</tt> should
- * not be inserted into a <tt>Queue</tt>, as <tt>null</tt> is also
- * used as a special return value by the <tt>poll</tt> method to
+ * <p>{@code Queue} implementations generally do not allow insertion
+ * of {@code null} elements, although some implementations, such as
+ * {@link LinkedList}, do not prohibit insertion of {@code null}.
+ * Even in the implementations that permit it, {@code null} should
+ * not be inserted into a {@code Queue}, as {@code null} is also
+ * used as a special return value by the {@code poll} method to
* indicate that the queue contains no elements.
*
- * <p><tt>Queue</tt> implementations generally do not define
- * element-based versions of methods <tt>equals</tt> and
- * <tt>hashCode</tt> but instead inherit the identity based versions
- * from class <tt>Object</tt>, because element-based equality is not
+ * <p>{@code Queue} implementations generally do not define
+ * element-based versions of methods {@code equals} and
+ * {@code hashCode} but instead inherit the identity based versions
+ * from class {@code Object}, because element-based equality is not
* always well-defined for queues with the same elements but different
* ordering properties.
*
@@ -145,11 +146,11 @@
/**
* Inserts the specified element into this queue if it is possible to do so
* immediately without violating capacity restrictions, returning
- * <tt>true</tt> upon success and throwing an <tt>IllegalStateException</tt>
+ * {@code true} upon success and throwing an {@code IllegalStateException}
* if no space is currently available.
*
* @param e the element to add
- * @return <tt>true</tt> (as specified by {@link Collection#add})
+ * @return {@code true} (as specified by {@link Collection#add})
* @throws IllegalStateException if the element cannot be added at this
* time due to capacity restrictions
* @throws ClassCastException if the class of the specified element
@@ -169,8 +170,8 @@
* by throwing an exception.
*
* @param e the element to add
- * @return <tt>true</tt> if the element was added to this queue, else
- * <tt>false</tt>
+ * @return {@code true} if the element was added to this queue, else
+ * {@code false}
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this queue
* @throws NullPointerException if the specified element is null and
@@ -192,9 +193,9 @@
/**
* Retrieves and removes the head of this queue,
- * or returns <tt>null</tt> if this queue is empty.
+ * or returns {@code null} if this queue is empty.
*
- * @return the head of this queue, or <tt>null</tt> if this queue is empty
+ * @return the head of this queue, or {@code null} if this queue is empty
*/
E poll();
@@ -210,9 +211,9 @@
/**
* Retrieves, but does not remove, the head of this queue,
- * or returns <tt>null</tt> if this queue is empty.
+ * or returns {@code null} if this queue is empty.
*
- * @return the head of this queue, or <tt>null</tt> if this queue is empty
+ * @return the head of this queue, or {@code null} if this queue is empty
*/
E peek();
}
--- a/jdk/src/share/classes/java/util/Random.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Random.java Mon Aug 12 09:29:06 2013 -0400
@@ -225,9 +225,8 @@
* Returns the next pseudorandom, uniformly distributed {@code int}
* value from this random number generator's sequence. The general
* contract of {@code nextInt} is that one {@code int} value is
- * pseudorandomly generated and returned. All 2<font size="-1"><sup>32
- * </sup></font> possible {@code int} values are produced with
- * (approximately) equal probability.
+ * pseudorandomly generated and returned. All 2<sup>32</sup> possible
+ * {@code int} values are produced with (approximately) equal probability.
*
* <p>The method {@code nextInt} is implemented by class {@code Random}
* as if by:
@@ -370,11 +369,9 @@
* <p>The general contract of {@code nextFloat} is that one
* {@code float} value, chosen (approximately) uniformly from the
* range {@code 0.0f} (inclusive) to {@code 1.0f} (exclusive), is
- * pseudorandomly generated and returned. All 2<font
- * size="-1"><sup>24</sup></font> possible {@code float} values
- * of the form <i>m x </i>2<font
- * size="-1"><sup>-24</sup></font>, where <i>m</i> is a positive
- * integer less than 2<font size="-1"><sup>24</sup> </font>, are
+ * pseudorandomly generated and returned. All 2<sup>24</sup> possible
+ * {@code float} values of the form <i>m x </i>2<sup>-24</sup>,
+ * where <i>m</i> is a positive integer less than 2<sup>24</sup>, are
* produced with (approximately) equal probability.
*
* <p>The method {@code nextFloat} is implemented by class {@code Random}
--- a/jdk/src/share/classes/java/util/Scanner.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Scanner.java Mon Aug 12 09:29:06 2013 -0400
@@ -76,7 +76,7 @@
* }</pre></blockquote>
* <p>
* prints the following output:
- * <blockqjote><pre>{@code
+ * <blockquote><pre>{@code
* 1
* 2
* red
@@ -149,8 +149,7 @@
* {@link #reset} method will reset the value of the scanner's radix to
* <code>10</code> regardless of whether it was previously changed.
*
- * <a name="localized-numbers">
- * <h4> Localized numbers </h4>
+ * <h3> <a name="localized-numbers">Localized numbers</a> </h3>
*
* <p> An instance of this class is capable of scanning numbers in the standard
* formats as well as in the formats of the scanner's locale. A scanner's
@@ -167,186 +166,139 @@
* {@link java.text.DecimalFormatSymbols DecimalFormatSymbols} object,
* <tt>dfs</tt>.
*
- * <blockquote><table>
- * <tr><td valign="top"><i>LocalGroupSeparator </i></td>
- * <td valign="top">The character used to separate thousands groups,
- * <i>i.e.,</i> <tt>dfs.</tt>{@link
- * java.text.DecimalFormatSymbols#getGroupingSeparator
- * getGroupingSeparator()}</td></tr>
- * <tr><td valign="top"><i>LocalDecimalSeparator </i></td>
- * <td valign="top">The character used for the decimal point,
- * <i>i.e.,</i> <tt>dfs.</tt>{@link
- * java.text.DecimalFormatSymbols#getDecimalSeparator
- * getDecimalSeparator()}</td></tr>
- * <tr><td valign="top"><i>LocalPositivePrefix </i></td>
- * <td valign="top">The string that appears before a positive number (may
- * be empty), <i>i.e.,</i> <tt>df.</tt>{@link
- * java.text.DecimalFormat#getPositivePrefix
- * getPositivePrefix()}</td></tr>
- * <tr><td valign="top"><i>LocalPositiveSuffix </i></td>
- * <td valign="top">The string that appears after a positive number (may be
- * empty), <i>i.e.,</i> <tt>df.</tt>{@link
- * java.text.DecimalFormat#getPositiveSuffix
- * getPositiveSuffix()}</td></tr>
- * <tr><td valign="top"><i>LocalNegativePrefix </i></td>
- * <td valign="top">The string that appears before a negative number (may
- * be empty), <i>i.e.,</i> <tt>df.</tt>{@link
- * java.text.DecimalFormat#getNegativePrefix
- * getNegativePrefix()}</td></tr>
- * <tr><td valign="top"><i>LocalNegativeSuffix </i></td>
- * <td valign="top">The string that appears after a negative number (may be
- * empty), <i>i.e.,</i> <tt>df.</tt>{@link
- * java.text.DecimalFormat#getNegativeSuffix
- * getNegativeSuffix()}</td></tr>
- * <tr><td valign="top"><i>LocalNaN </i></td>
- * <td valign="top">The string that represents not-a-number for
- * floating-point values,
- * <i>i.e.,</i> <tt>dfs.</tt>{@link
- * java.text.DecimalFormatSymbols#getNaN
- * getNaN()}</td></tr>
- * <tr><td valign="top"><i>LocalInfinity </i></td>
- * <td valign="top">The string that represents infinity for floating-point
- * values, <i>i.e.,</i> <tt>dfs.</tt>{@link
- * java.text.DecimalFormatSymbols#getInfinity
- * getInfinity()}</td></tr>
- * </table></blockquote>
+ * <blockquote><dl>
+ * <dt><i>LocalGroupSeparator </i>
+ * <dd>The character used to separate thousands groups,
+ * <i>i.e.,</i> <tt>dfs.</tt>{@link
+ * java.text.DecimalFormatSymbols#getGroupingSeparator
+ * getGroupingSeparator()}
+ * <dt><i>LocalDecimalSeparator </i>
+ * <dd>The character used for the decimal point,
+ * <i>i.e.,</i> <tt>dfs.</tt>{@link
+ * java.text.DecimalFormatSymbols#getDecimalSeparator
+ * getDecimalSeparator()}
+ * <dt><i>LocalPositivePrefix </i>
+ * <dd>The string that appears before a positive number (may
+ * be empty), <i>i.e.,</i> <tt>df.</tt>{@link
+ * java.text.DecimalFormat#getPositivePrefix
+ * getPositivePrefix()}
+ * <dt><i>LocalPositiveSuffix </i>
+ * <dd>The string that appears after a positive number (may be
+ * empty), <i>i.e.,</i> <tt>df.</tt>{@link
+ * java.text.DecimalFormat#getPositiveSuffix
+ * getPositiveSuffix()}
+ * <dt><i>LocalNegativePrefix </i>
+ * <dd>The string that appears before a negative number (may
+ * be empty), <i>i.e.,</i> <tt>df.</tt>{@link
+ * java.text.DecimalFormat#getNegativePrefix
+ * getNegativePrefix()}
+ * <dt><i>LocalNegativeSuffix </i>
+ * <dd>The string that appears after a negative number (may be
+ * empty), <i>i.e.,</i> <tt>df.</tt>{@link
+ * java.text.DecimalFormat#getNegativeSuffix
+ * getNegativeSuffix()}
+ * <dt><i>LocalNaN </i>
+ * <dd>The string that represents not-a-number for
+ * floating-point values,
+ * <i>i.e.,</i> <tt>dfs.</tt>{@link
+ * java.text.DecimalFormatSymbols#getNaN
+ * getNaN()}
+ * <dt><i>LocalInfinity </i>
+ * <dd>The string that represents infinity for floating-point
+ * values, <i>i.e.,</i> <tt>dfs.</tt>{@link
+ * java.text.DecimalFormatSymbols#getInfinity
+ * getInfinity()}
+ * </dl></blockquote>
*
- * <a name="number-syntax">
- * <h4> Number syntax </h4>
+ * <h4> <a name="number-syntax">Number syntax</a> </h4>
*
* <p> The strings that can be parsed as numbers by an instance of this class
* are specified in terms of the following regular-expression grammar, where
- * Rmax is the highest digit in the radix being used (for example, Rmax is 9
- * in base 10).
+ * Rmax is the highest digit in the radix being used (for example, Rmax is 9 in base 10).
*
* <p>
- * <table cellspacing=0 cellpadding=0 align=center>
- *
- * <tr><td valign=top align=right><i>NonASCIIDigit</i> ::</td>
- * <td valign=top>= A non-ASCII character c for which
+ * <dl>
+ * <dt><i>NonAsciiDigit</i>:
+ * <dd>A non-ASCII character c for which
* {@link java.lang.Character#isDigit Character.isDigit}<tt>(c)</tt>
- * returns true</td></tr>
- *
- * <tr><td> </td></tr>
+ * returns true
*
- * <tr><td align=right><i>Non0Digit</i> ::</td>
- * <td><tt>= [1-</tt><i>Rmax</i><tt>] | </tt><i>NonASCIIDigit</i></td></tr>
- *
- * <tr><td> </td></tr>
+ * <dt><i>Non0Digit</i>:
+ * <dd><tt>[1-</tt><i>Rmax</i><tt>] | </tt><i>NonASCIIDigit</i>
*
- * <tr><td align=right><i>Digit</i> ::</td>
- * <td><tt>= [0-</tt><i>Rmax</i><tt>] | </tt><i>NonASCIIDigit</i></td></tr>
- *
- * <tr><td> </td></tr>
+ * <dt><i>Digit</i>:
+ * <dd><tt>[0-</tt><i>Rmax</i><tt>] | </tt><i>NonASCIIDigit</i>
*
- * <tr><td valign=top align=right><i>GroupedNumeral</i> ::</td>
- * <td valign=top>
- * <table cellpadding=0 cellspacing=0>
- * <tr><td><tt>= ( </tt></td>
- * <td><i>Non0Digit</i><tt>
- * </tt><i>Digit</i><tt>?
- * </tt><i>Digit</i><tt>?</tt></td></tr>
- * <tr><td></td>
- * <td><tt>( </tt><i>LocalGroupSeparator</i><tt>
- * </tt><i>Digit</i><tt>
- * </tt><i>Digit</i><tt>
- * </tt><i>Digit</i><tt> )+ )</tt></td></tr>
- * </table></td></tr>
+ * <dt><i>GroupedNumeral</i>:
+ * <dd><tt>( </tt><i>Non0Digit</i>
+ * <i>Digit</i><tt>?
+ * </tt><i>Digit</i><tt>?</tt>
+ * <dd> <tt>( </tt><i>LocalGroupSeparator</i>
+ * <i>Digit</i>
+ * <i>Digit</i>
+ * <i>Digit</i><tt> )+ )</tt>
*
- * <tr><td> </td></tr>
- *
- * <tr><td align=right><i>Numeral</i> ::</td>
- * <td><tt>= ( ( </tt><i>Digit</i><tt>+ )
- * | </tt><i>GroupedNumeral</i><tt> )</tt></td></tr>
- *
- * <tr><td> </td></tr>
+ * <dt><i>Numeral</i>:
+ * <dd><tt>( ( </tt><i>Digit</i><tt>+ )
+ * | </tt><i>GroupedNumeral</i><tt> )</tt>
*
- * <tr><td valign=top align=right>
- * <a name="Integer-regex"><i>Integer</i> ::</td>
- * <td valign=top><tt>= ( [-+]? ( </tt><i>Numeral</i><tt>
- * ) )</tt></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalPositivePrefix</i><tt> </tt><i>Numeral</i><tt>
- * </tt><i>LocalPositiveSuffix</i></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalNegativePrefix</i><tt> </tt><i>Numeral</i><tt>
- * </tt><i>LocalNegativeSuffix</i></td></tr>
- *
- * <tr><td> </td></tr>
+ * <dt><a name="Integer-regex"><i>Integer</i>:</a>
+ * <dd><tt>( [-+]? ( </tt><i>Numeral</i><tt>
+ * ) )</tt>
+ * <dd><tt>| </tt><i>LocalPositivePrefix</i> <i>Numeral</i>
+ * <i>LocalPositiveSuffix</i>
+ * <dd><tt>| </tt><i>LocalNegativePrefix</i> <i>Numeral</i>
+ * <i>LocalNegativeSuffix</i>
*
- * <tr><td align=right><i>DecimalNumeral</i> ::</td>
- * <td><tt>= </tt><i>Numeral</i></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>Numeral</i><tt>
- * </tt><i>LocalDecimalSeparator</i><tt>
- * </tt><i>Digit</i><tt>*</tt></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalDecimalSeparator</i><tt>
- * </tt><i>Digit</i><tt>+</tt></td></tr>
+ * <dt><i>DecimalNumeral</i>:
+ * <dd><i>Numeral</i>
+ * <dd><tt>| </tt><i>Numeral</i>
+ * <i>LocalDecimalSeparator</i>
+ * <i>Digit</i><tt>*</tt>
+ * <dd><tt>| </tt><i>LocalDecimalSeparator</i>
+ * <i>Digit</i><tt>+</tt>
*
- * <tr><td> </td></tr>
- *
- * <tr><td align=right><i>Exponent</i> ::</td>
- * <td><tt>= ( [eE] [+-]? </tt><i>Digit</i><tt>+ )</tt></td></tr>
+ * <dt><i>Exponent</i>:
+ * <dd><tt>( [eE] [+-]? </tt><i>Digit</i><tt>+ )</tt>
*
- * <tr><td> </td></tr>
+ * <dt><a name="Decimal-regex"><i>Decimal</i>:</a>
+ * <dd><tt>( [-+]? </tt><i>DecimalNumeral</i>
+ * <i>Exponent</i><tt>? )</tt>
+ * <dd><tt>| </tt><i>LocalPositivePrefix</i>
+ * <i>DecimalNumeral</i>
+ * <i>LocalPositiveSuffix</i>
+ * <i>Exponent</i><tt>?</tt>
+ * <dd><tt>| </tt><i>LocalNegativePrefix</i>
+ * <i>DecimalNumeral</i>
+ * <i>LocalNegativeSuffix</i>
+ * <i>Exponent</i><tt>?</tt>
*
- * <tr><td align=right>
- * <a name="Decimal-regex"><i>Decimal</i> ::</td>
- * <td><tt>= ( [-+]? </tt><i>DecimalNumeral</i><tt>
- * </tt><i>Exponent</i><tt>? )</tt></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalPositivePrefix</i><tt>
- * </tt><i>DecimalNumeral</i><tt>
- * </tt><i>LocalPositiveSuffix</i>
- * </tt><i>Exponent</i><tt>?</td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalNegativePrefix</i><tt>
- * </tt><i>DecimalNumeral</i><tt>
- * </tt><i>LocalNegativeSuffix</i>
- * </tt><i>Exponent</i><tt>?</td></tr>
+ * <dt><i>HexFloat</i>:
+ * <dd><tt>[-+]? 0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+
+ * ([pP][-+]?[0-9]+)?</tt>
*
- * <tr><td> </td></tr>
- *
- * <tr><td align=right><i>HexFloat</i> ::</td>
- * <td><tt>= [-+]? 0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+
- * ([pP][-+]?[0-9]+)?</tt></td></tr>
- *
- * <tr><td> </td></tr>
- *
- * <tr><td align=right><i>NonNumber</i> ::</td>
- * <td valign=top><tt>= NaN
+ * <dt><i>NonNumber</i>:
+ * <dd><tt>NaN
* | </tt><i>LocalNan</i><tt>
* | Infinity
- * | </tt><i>LocalInfinity</i></td></tr>
- *
- * <tr><td> </td></tr>
- *
- * <tr><td align=right><i>SignedNonNumber</i> ::</td>
- * <td><tt>= ( [-+]? </tt><i>NonNumber</i><tt> )</tt></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalPositivePrefix</i><tt>
- * </tt><i>NonNumber</i><tt>
- * </tt><i>LocalPositiveSuffix</i></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>LocalNegativePrefix</i><tt>
- * </tt><i>NonNumber</i><tt>
- * </tt><i>LocalNegativeSuffix</i></td></tr>
+ * | </tt><i>LocalInfinity</i>
*
- * <tr><td> </td></tr>
+ * <dt><i>SignedNonNumber</i>:
+ * <dd><tt>( [-+]? </tt><i>NonNumber</i><tt> )</tt>
+ * <dd><tt>| </tt><i>LocalPositivePrefix</i>
+ * <i>NonNumber</i>
+ * <i>LocalPositiveSuffix</i>
+ * <dd><tt>| </tt><i>LocalNegativePrefix</i>
+ * <i>NonNumber</i>
+ * <i>LocalNegativeSuffix</i>
*
- * <tr><td valign=top align=right>
- * <a name="Float-regex"><i>Float</i> ::</td>
- * <td valign=top><tt>= </tt><i>Decimal</i><tt></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>HexFloat</i><tt></td></tr>
- * <tr><td></td>
- * <td><tt>| </tt><i>SignedNonNumber</i><tt></td></tr>
+ * <dt><a name="Float-regex"><i>Float</i></a>:
+ * <dd><i>Decimal</i>
+ * <tt>| </tt><i>HexFloat</i>
+ * <tt>| </tt><i>SignedNonNumber</i>
*
- * </table>
- * </center>
- *
- * <p> Whitespace is not significant in the above regular expressions.
+ * </dl>
+ * <p>Whitespace is not significant in the above regular expressions.
*
* @since 1.5
*/
@@ -1675,6 +1627,7 @@
* <tt>findWithinHorizon(Pattern.compile(pattern, horizon))</tt>.
*
* @param pattern a string specifying the pattern to search for
+ * @param horizon the search horizon
* @return the text that matched the specified pattern
* @throws IllegalStateException if this scanner is closed
* @throws IllegalArgumentException if horizon is negative
@@ -1709,6 +1662,7 @@
* thrown.
*
* @param pattern the pattern to scan for
+ * @param horizon the search horizon
* @return the text that matched the specified pattern
* @throws IllegalStateException if this scanner is closed
* @throws IllegalArgumentException if horizon is negative
--- a/jdk/src/share/classes/java/util/ServiceLoader.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/ServiceLoader.java Mon Aug 12 09:29:06 2013 -0400
@@ -68,12 +68,13 @@
*
* <p><a name="format"> A service provider is identified by placing a
* <i>provider-configuration file</i> in the resource directory
- * <tt>META-INF/services</tt>. The file's name is the fully-qualified <a
+ * <tt>META-INF/services</tt>.</a> The file's name is the fully-qualified <a
* href="../lang/ClassLoader.html#name">binary name</a> of the service's type.
* The file contains a list of fully-qualified binary names of concrete
* provider classes, one per line. Space and tab characters surrounding each
* name, as well as blank lines, are ignored. The comment character is
- * <tt>'#'</tt> (<tt>'\u0023'</tt>, <font size="-1">NUMBER SIGN</font>); on
+ * <tt>'#'</tt> (<tt>'\u0023'</tt>,
+ * <font style="font-size:smaller;">NUMBER SIGN</font>); on
* each line all characters following the first comment character are ignored.
* The file must be encoded in UTF-8.
*
@@ -484,6 +485,8 @@
* Creates a new service loader for the given service type and class
* loader.
*
+ * @param <S> the class of the service type
+ *
* @param service
* The interface or abstract class representing the service
*
@@ -517,6 +520,8 @@
* ServiceLoader.load(<i>service</i>,
* Thread.currentThread().getContextClassLoader())</pre></blockquote>
*
+ * @param <S> the class of the service type
+ *
* @param service
* The interface or abstract class representing the service
*
@@ -546,6 +551,8 @@
* have been installed into the current Java virtual machine; providers on
* the application's class path will be ignored.
*
+ * @param <S> the class of the service type
+ *
* @param service
* The interface or abstract class representing the service
*
--- a/jdk/src/share/classes/java/util/StringJoiner.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/StringJoiner.java Mon Aug 12 09:29:06 2013 -0400
@@ -49,16 +49,17 @@
* <p>
* A {@code StringJoiner} may be employed to create formatted output from a
* {@link java.util.stream.Stream} using
- * {@link java.util.stream.Collectors#toStringJoiner}. For example:
+ * {@link java.util.stream.Collectors#joining(CharSequence)}. For example:
*
* <pre> {@code
* List<Integer> numbers = Arrays.asList(1, 2, 3, 4);
* String commaSeparatedNumbers = numbers.stream()
* .map(i -> i.toString())
- * .collect(Collectors.toStringJoiner(", ")).toString();
+ * .collect(Collectors.joining(", "));
* }</pre>
*
- * @see java.util.stream.Collectors#toStringJoiner
+ * @see java.util.stream.Collectors#joining(CharSequence)
+ * @see java.util.stream.Collectors#joining(CharSequence, CharSequence, CharSequence)
* @since 1.8
*/
public final class StringJoiner {
@@ -202,15 +203,17 @@
* @param other The {@code StringJoiner} whose contents should be merged
* into this one
* @throws NullPointerException if the other {@code StringJoiner} is null
+ * @return This {@code StringJoiner}
*/
public StringJoiner merge(StringJoiner other) {
Objects.requireNonNull(other);
if (other.value != null) {
+ final int length = other.value.length();
+ // lock the length so that we can seize the data to be appended
+ // before initiate copying to avoid interference, especially when
+ // merge 'this'
StringBuilder builder = prepareBuilder();
- StringBuilder otherBuilder = other.value;
- if (other.prefix.length() < otherBuilder.length()) {
- builder.append(otherBuilder, other.prefix.length(), otherBuilder.length());
- }
+ builder.append(other.value, other.prefix.length(), length);
}
return this;
}
--- a/jdk/src/share/classes/java/util/TimeZone.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/TimeZone.java Mon Aug 12 09:29:06 2013 -0400
@@ -118,7 +118,7 @@
* </pre></blockquote>
* For example, TimeZone.getTimeZone("GMT-8").getID() returns "GMT-08:00".
*
- * <h4>Three-letter time zone IDs</h4>
+ * <h3>Three-letter time zone IDs</h3>
*
* For compatibility with JDK 1.1.x, some other three-letter time zone IDs
* (such as "PST", "CTT", "AST") are also supported. However, <strong>their
@@ -304,10 +304,10 @@
* presentation to the user in the default locale.
*
* <p>This method is equivalent to:
- * <pre><blockquote>
+ * <blockquote><pre>
* getDisplayName(false, {@link #LONG},
* Locale.getDefault({@link Locale.Category#DISPLAY}))
- * </blockquote></pre>
+ * </pre></blockquote>
*
* @return the human-readable name of this time zone in the default locale.
* @since 1.2
@@ -325,9 +325,9 @@
* presentation to the user in the specified {@code locale}.
*
* <p>This method is equivalent to:
- * <pre><blockquote>
+ * <blockquote><pre>
* getDisplayName(false, {@link #LONG}, locale)
- * </blockquote></pre>
+ * </pre></blockquote>
*
* @param locale the locale in which to supply the display name.
* @return the human-readable name of this time zone in the given locale.
@@ -347,10 +347,10 @@
* Time). Otherwise, a Standard Time name is returned.
*
* <p>This method is equivalent to:
- * <pre><blockquote>
+ * <blockquote><pre>
* getDisplayName(daylight, style,
* Locale.getDefault({@link Locale.Category#DISPLAY}))
- * </blockquote></pre>
+ * </pre></blockquote>
*
* @param daylight {@code true} specifying a Daylight Saving Time name, or
* {@code false} specifying a Standard Time name
--- a/jdk/src/share/classes/java/util/TreeMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/TreeMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -2944,16 +2944,11 @@
@Override
public Comparator<Map.Entry<K, V>> getComparator() {
- // Since SORTED is reported and Map.Entry elements are not comparable
- // then a non-null comparator needs to be returned
+ // Adapt or create a key-based comparator
if (tree.comparator != null) {
- // Adapt the existing non-null comparator to compare entries
- // by key
return Map.Entry.comparingByKey(tree.comparator);
}
else {
- // Return a comparator of entries by key, with K assumed to be
- // of Comparable
return (Comparator<Map.Entry<K, V>> & Serializable) (e1, e2) -> {
@SuppressWarnings("unchecked")
Comparable<? super K> k1 = (Comparable<? super K>) e1.getKey();
--- a/jdk/src/share/classes/java/util/UUID.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/UUID.java Mon Aug 12 09:29:06 2013 -0400
@@ -286,6 +286,7 @@
*
* @throws UnsupportedOperationException
* If this UUID is not a version 1 UUID
+ * @return The timestamp of this {@code UUID}.
*/
public long timestamp() {
if (version() != 1) {
--- a/jdk/src/share/classes/java/util/Vector.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/Vector.java Mon Aug 12 09:29:06 2013 -0400
@@ -45,9 +45,9 @@
* capacity of a vector before inserting a large number of
* components; this reduces the amount of incremental reallocation.
*
- * <p><a name="fail-fast"/>
+ * <p><a name="fail-fast">
* The iterators returned by this class's {@link #iterator() iterator} and
- * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em>:
+ * {@link #listIterator(int) listIterator} methods are <em>fail-fast</em></a>:
* if the vector is structurally modified at any time after the iterator is
* created, in any way except through the iterator's own
* {@link ListIterator#remove() remove} or
@@ -1164,12 +1164,13 @@
if (i >= size) {
return;
}
- final Object[] elementData = Vector.this.elementData;
+ @SuppressWarnings("unchecked")
+ final E[] elementData = (E[]) Vector.this.elementData;
if (i >= elementData.length) {
throw new ConcurrentModificationException();
}
while (i != size && modCount == expectedModCount) {
- action.accept((E) elementData[i++]);
+ action.accept(elementData[i++]);
}
// update once at end of iteration to reduce heap write traffic
cursor = i;
@@ -1311,8 +1312,8 @@
modCount++;
}
+ @SuppressWarnings("unchecked")
@Override
- @SuppressWarnings("unchecked")
public synchronized void sort(Comparator<? super E> c) {
final int expectedModCount = modCount;
Arrays.sort((E[]) elementData, 0, elementCount, c);
--- a/jdk/src/share/classes/java/util/WeakHashMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/WeakHashMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -1038,6 +1038,7 @@
}
}
+ @SuppressWarnings("unchecked")
@Override
public void forEach(BiConsumer<? super K, ? super V> action) {
Objects.requireNonNull(action);
@@ -1059,6 +1060,7 @@
}
}
+ @SuppressWarnings("unchecked")
@Override
public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
Objects.requireNonNull(function);
--- a/jdk/src/share/classes/java/util/concurrent/CompletableFuture.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/concurrent/CompletableFuture.java Mon Aug 12 09:29:06 2013 -0400
@@ -48,13 +48,16 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.CancellationException;
+import java.util.concurrent.CompletionException;
+import java.util.concurrent.CompletionStage;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.LockSupport;
/**
* A {@link Future} that may be explicitly completed (setting its
- * value and status), and may include dependent functions and actions
- * that trigger upon its completion.
+ * value and status), and may be used as a {@link CompletionStage},
+ * supporting dependent functions and actions that trigger upon its
+ * completion.
*
* <p>When two or more threads attempt to
* {@link #complete complete},
@@ -62,64 +65,50 @@
* {@link #cancel cancel}
* a CompletableFuture, only one of them succeeds.
*
- * <p>Methods are available for adding dependents based on
- * user-provided Functions, Consumers, or Runnables. The appropriate
- * form to use depends on whether actions require arguments and/or
- * produce results. Completion of a dependent action will trigger the
- * completion of another CompletableFuture. Actions may also be
- * triggered after either or both the current and another
- * CompletableFuture complete. Multiple CompletableFutures may also
- * be grouped as one using {@link #anyOf(CompletableFuture...)} and
- * {@link #allOf(CompletableFuture...)}.
+ * <p>In addition to these and related methods for directly
+ * manipulating status and results, CompletableFuture implements
+ * interface {@link CompletionStage} with the following policies: <ul>
*
- * <p>CompletableFutures themselves do not execute asynchronously.
- * However, actions supplied for dependent completions of another
- * CompletableFuture may do so, depending on whether they are provided
- * via one of the <em>async</em> methods (that is, methods with names
- * of the form <tt><var>xxx</var>Async</tt>). The <em>async</em>
- * methods provide a way to commence asynchronous processing of an
- * action using either a given {@link Executor} or by default the
- * {@link ForkJoinPool#commonPool()}. To simplify monitoring,
+ * <li>Actions supplied for dependent completions of
+ * <em>non-async</em> methods may be performed by the thread that
+ * completes the current CompletableFuture, or by any other caller of
+ * a completion method.</li>
+ *
+ * <li>All <em>async</em> methods without an explicit Executor
+ * argument are performed using the {@link ForkJoinPool#commonPool()}
+ * (unless it does not support a parallelism level of at least two, in
+ * which case, a new Thread is used). To simplify monitoring,
* debugging, and tracking, all generated asynchronous tasks are
- * instances of the marker interface {@link AsynchronousCompletionTask}.
+ * instances of the marker interface {@link
+ * AsynchronousCompletionTask}. </li>
*
- * <p>Actions supplied for dependent completions of <em>non-async</em>
- * methods may be performed by the thread that completes the current
- * CompletableFuture, or by any other caller of these methods. There
- * are no guarantees about the order of processing completions unless
- * constrained by these methods.
+ * <li>All CompletionStage methods are implemented independently of
+ * other public methods, so the behavior of one method is not impacted
+ * by overrides of others in subclasses. </li> </ul>
*
- * <p>Since (unlike {@link FutureTask}) this class has no direct
- * control over the computation that causes it to be completed,
- * cancellation is treated as just another form of exceptional completion.
- * Method {@link #cancel cancel} has the same effect as
- * {@code completeExceptionally(new CancellationException())}.
+ * <p>CompletableFuture also implements {@link Future} with the following
+ * policies: <ul>
*
- * <p>Upon exceptional completion (including cancellation), or when a
- * completion entails an additional computation which terminates
- * abruptly with an (unchecked) exception or error, then all of their
- * dependent completions (and their dependents in turn) generally act
- * as {@code completeExceptionally} with a {@link CompletionException}
- * holding that exception as its cause. However, the {@link
- * #exceptionally exceptionally} and {@link #handle handle}
- * completions <em>are</em> able to handle exceptional completions of
- * the CompletableFutures they depend on.
+ * <li>Since (unlike {@link FutureTask}) this class has no direct
+ * control over the computation that causes it to be completed,
+ * cancellation is treated as just another form of exceptional
+ * completion. Method {@link #cancel cancel} has the same effect as
+ * {@code completeExceptionally(new CancellationException())}. Method
+ * {@link #isCompletedExceptionally} can be used to determine if a
+ * CompletableFuture completed in any exceptional fashion.</li>
*
- * <p>In case of exceptional completion with a CompletionException,
+ * <li>In case of exceptional completion with a CompletionException,
* methods {@link #get()} and {@link #get(long, TimeUnit)} throw an
* {@link ExecutionException} with the same cause as held in the
- * corresponding CompletionException. However, in these cases,
- * methods {@link #join()} and {@link #getNow} throw the
- * CompletionException, which simplifies usage.
- *
- * <p>Arguments used to pass a completion result (that is, for parameters
- * of type {@code T}) may be null, but passing a null value for any other
- * parameter will result in a {@link NullPointerException} being thrown.
+ * corresponding CompletionException. To simplify usage in most
+ * contexts, this class also defines methods {@link #join()} and
+ * {@link #getNow} that instead throw the CompletionException directly
+ * in these cases.</li> </ul>
*
* @author Doug Lea
* @since 1.8
*/
-public class CompletableFuture<T> implements Future<T> {
+public class CompletableFuture<T> implements Future<T>, CompletionStage<T> {
/*
* Overview:
@@ -431,6 +420,7 @@
}
/** Base class can act as either FJ or plain Runnable */
+ @SuppressWarnings("serial")
abstract static class Async extends ForkJoinTask<Void>
implements Runnable, AsynchronousCompletionTask {
public final Void getRawResult() { return null; }
@@ -438,6 +428,19 @@
public final void run() { exec(); }
}
+ /**
+ * Starts the given async task using the given executor, unless
+ * the executor is ForkJoinPool.commonPool and it has been
+ * disabled, in which case starts a new thread.
+ */
+ static void execAsync(Executor e, Async r) {
+ if (e == ForkJoinPool.commonPool() &&
+ ForkJoinPool.getCommonPoolParallelism() <= 1)
+ new Thread(r).start();
+ else
+ e.execute(r);
+ }
+
static final class AsyncRun extends Async {
final Runnable fn;
final CompletableFuture<Void> dst;
@@ -538,13 +541,13 @@
static final class AsyncAccept<T> extends Async {
final T arg;
final Consumer<? super T> fn;
- final CompletableFuture<Void> dst;
+ final CompletableFuture<?> dst;
AsyncAccept(T arg, Consumer<? super T> fn,
- CompletableFuture<Void> dst) {
+ CompletableFuture<?> dst) {
this.arg = arg; this.fn = fn; this.dst = dst;
}
public final boolean exec() {
- CompletableFuture<Void> d; Throwable ex;
+ CompletableFuture<?> d; Throwable ex;
if ((d = this.dst) != null && d.result == null) {
try {
fn.accept(arg);
@@ -563,14 +566,14 @@
final T arg1;
final U arg2;
final BiConsumer<? super T,? super U> fn;
- final CompletableFuture<Void> dst;
+ final CompletableFuture<?> dst;
AsyncAcceptBoth(T arg1, U arg2,
BiConsumer<? super T,? super U> fn,
- CompletableFuture<Void> dst) {
+ CompletableFuture<?> dst) {
this.arg1 = arg1; this.arg2 = arg2; this.fn = fn; this.dst = dst;
}
public final boolean exec() {
- CompletableFuture<Void> d; Throwable ex;
+ CompletableFuture<?> d; Throwable ex;
if ((d = this.dst) != null && d.result == null) {
try {
fn.accept(arg1, arg2);
@@ -587,10 +590,10 @@
static final class AsyncCompose<T,U> extends Async {
final T arg;
- final Function<? super T, CompletableFuture<U>> fn;
+ final Function<? super T, ? extends CompletionStage<U>> fn;
final CompletableFuture<U> dst;
AsyncCompose(T arg,
- Function<? super T, CompletableFuture<U>> fn,
+ Function<? super T, ? extends CompletionStage<U>> fn,
CompletableFuture<U> dst) {
this.arg = arg; this.fn = fn; this.dst = dst;
}
@@ -598,7 +601,8 @@
CompletableFuture<U> d, fr; U u; Throwable ex;
if ((d = this.dst) != null && d.result == null) {
try {
- fr = fn.apply(arg);
+ CompletionStage<U> cs = fn.apply(arg);
+ fr = (cs == null) ? null : cs.toCompletableFuture();
ex = (fr == null) ? new NullPointerException() : null;
} catch (Throwable rex) {
ex = rex;
@@ -626,6 +630,33 @@
private static final long serialVersionUID = 5232453952276885070L;
}
+ static final class AsyncWhenComplete<T> extends Async {
+ final T arg1;
+ final Throwable arg2;
+ final BiConsumer<? super T,? super Throwable> fn;
+ final CompletableFuture<T> dst;
+ AsyncWhenComplete(T arg1, Throwable arg2,
+ BiConsumer<? super T,? super Throwable> fn,
+ CompletableFuture<T> dst) {
+ this.arg1 = arg1; this.arg2 = arg2; this.fn = fn; this.dst = dst;
+ }
+ public final boolean exec() {
+ CompletableFuture<T> d;
+ if ((d = this.dst) != null && d.result == null) {
+ Throwable ex = arg2;
+ try {
+ fn.accept(arg1, ex);
+ } catch (Throwable rex) {
+ if (ex == null)
+ ex = rex;
+ }
+ d.internalComplete(arg1, ex);
+ }
+ return true;
+ }
+ private static final long serialVersionUID = 5232453952276885070L;
+ }
+
/* ------------- Completions -------------- */
/**
@@ -641,6 +672,7 @@
}
// Opportunistically subclass AtomicInteger to use compareAndSet to claim.
+ @SuppressWarnings("serial")
abstract static class Completion extends AtomicInteger implements Runnable {
}
@@ -680,7 +712,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncApply<T,U>(t, fn, dst));
+ execAsync(e, new AsyncApply<T,U>(t, fn, dst));
else
u = fn.apply(t);
} catch (Throwable rex) {
@@ -697,11 +729,11 @@
static final class ThenAccept<T> extends Completion {
final CompletableFuture<? extends T> src;
final Consumer<? super T> fn;
- final CompletableFuture<Void> dst;
+ final CompletableFuture<?> dst;
final Executor executor;
ThenAccept(CompletableFuture<? extends T> src,
Consumer<? super T> fn,
- CompletableFuture<Void> dst,
+ CompletableFuture<?> dst,
Executor executor) {
this.src = src; this.fn = fn; this.dst = dst;
this.executor = executor;
@@ -709,7 +741,7 @@
public final void run() {
final CompletableFuture<? extends T> a;
final Consumer<? super T> fn;
- final CompletableFuture<Void> dst;
+ final CompletableFuture<?> dst;
Object r; T t; Throwable ex;
if ((dst = this.dst) != null &&
(fn = this.fn) != null &&
@@ -729,7 +761,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncAccept<T>(t, fn, dst));
+ execAsync(e, new AsyncAccept<T>(t, fn, dst));
else
fn.accept(t);
} catch (Throwable rex) {
@@ -773,7 +805,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncRun(fn, dst));
+ execAsync(e, new AsyncRun(fn, dst));
else
fn.run();
} catch (Throwable rex) {
@@ -839,7 +871,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncCombine<T,U,V>(t, u, fn, dst));
+ execAsync(e, new AsyncCombine<T,U,V>(t, u, fn, dst));
else
v = fn.apply(t, u);
} catch (Throwable rex) {
@@ -904,7 +936,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncAcceptBoth<T,U>(t, u, fn, dst));
+ execAsync(e, new AsyncAcceptBoth<T,U>(t, u, fn, dst));
else
fn.accept(t, u);
} catch (Throwable rex) {
@@ -956,7 +988,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncRun(fn, dst));
+ execAsync(e, new AsyncRun(fn, dst));
else
fn.run();
} catch (Throwable rex) {
@@ -1042,7 +1074,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncApply<T,U>(t, fn, dst));
+ execAsync(e, new AsyncApply<T,U>(t, fn, dst));
else
u = fn.apply(t);
} catch (Throwable rex) {
@@ -1095,7 +1127,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncAccept<T>(t, fn, dst));
+ execAsync(e, new AsyncAccept<T>(t, fn, dst));
else
fn.accept(t);
} catch (Throwable rex) {
@@ -1143,7 +1175,7 @@
if (ex == null) {
try {
if (e != null)
- e.execute(new AsyncRun(fn, dst));
+ execAsync(e, new AsyncRun(fn, dst));
else
fn.run();
} catch (Throwable rex) {
@@ -1226,6 +1258,54 @@
private static final long serialVersionUID = 5232453952276885070L;
}
+ static final class WhenCompleteCompletion<T> extends Completion {
+ final CompletableFuture<? extends T> src;
+ final BiConsumer<? super T, ? super Throwable> fn;
+ final CompletableFuture<T> dst;
+ final Executor executor;
+ WhenCompleteCompletion(CompletableFuture<? extends T> src,
+ BiConsumer<? super T, ? super Throwable> fn,
+ CompletableFuture<T> dst,
+ Executor executor) {
+ this.src = src; this.fn = fn; this.dst = dst;
+ this.executor = executor;
+ }
+ public final void run() {
+ final CompletableFuture<? extends T> a;
+ final BiConsumer<? super T, ? super Throwable> fn;
+ final CompletableFuture<T> dst;
+ Object r; T t; Throwable ex;
+ if ((dst = this.dst) != null &&
+ (fn = this.fn) != null &&
+ (a = this.src) != null &&
+ (r = a.result) != null &&
+ compareAndSet(0, 1)) {
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ Executor e = executor;
+ Throwable dx = null;
+ try {
+ if (e != null)
+ execAsync(e, new AsyncWhenComplete<T>(t, ex, fn, dst));
+ else
+ fn.accept(t, ex);
+ } catch (Throwable rex) {
+ dx = rex;
+ }
+ if (e == null || dx != null)
+ dst.internalComplete(t, ex != null ? ex : dx);
+ }
+ }
+ private static final long serialVersionUID = 5232453952276885070L;
+ }
+
static final class ThenCopy<T> extends Completion {
final CompletableFuture<?> src;
final CompletableFuture<T> dst;
@@ -1286,10 +1366,13 @@
final CompletableFuture<? extends T> src;
final BiFunction<? super T, Throwable, ? extends U> fn;
final CompletableFuture<U> dst;
+ final Executor executor;
HandleCompletion(CompletableFuture<? extends T> src,
BiFunction<? super T, Throwable, ? extends U> fn,
- CompletableFuture<U> dst) {
+ CompletableFuture<U> dst,
+ Executor executor) {
this.src = src; this.fn = fn; this.dst = dst;
+ this.executor = executor;
}
public final void run() {
final CompletableFuture<? extends T> a;
@@ -1310,13 +1393,19 @@
@SuppressWarnings("unchecked") T tr = (T) r;
t = tr;
}
- U u = null; Throwable dx = null;
+ Executor e = executor;
+ U u = null;
+ Throwable dx = null;
try {
- u = fn.apply(t, ex);
+ if (e != null)
+ execAsync(e, new AsyncCombine<T,Throwable,U>(t, ex, fn, dst));
+ else
+ u = fn.apply(t, ex);
} catch (Throwable rex) {
dx = rex;
}
- dst.internalComplete(u, dx);
+ if (e == null || dx != null)
+ dst.internalComplete(u, dx);
}
}
private static final long serialVersionUID = 5232453952276885070L;
@@ -1324,11 +1413,11 @@
static final class ThenCompose<T,U> extends Completion {
final CompletableFuture<? extends T> src;
- final Function<? super T, CompletableFuture<U>> fn;
+ final Function<? super T, ? extends CompletionStage<U>> fn;
final CompletableFuture<U> dst;
final Executor executor;
ThenCompose(CompletableFuture<? extends T> src,
- Function<? super T, CompletableFuture<U>> fn,
+ Function<? super T, ? extends CompletionStage<U>> fn,
CompletableFuture<U> dst,
Executor executor) {
this.src = src; this.fn = fn; this.dst = dst;
@@ -1336,7 +1425,7 @@
}
public final void run() {
final CompletableFuture<? extends T> a;
- final Function<? super T, CompletableFuture<U>> fn;
+ final Function<? super T, ? extends CompletionStage<U>> fn;
final CompletableFuture<U> dst;
Object r; T t; Throwable ex; Executor e;
if ((dst = this.dst) != null &&
@@ -1358,10 +1447,12 @@
boolean complete = false;
if (ex == null) {
if ((e = executor) != null)
- e.execute(new AsyncCompose<T,U>(t, fn, dst));
+ execAsync(e, new AsyncCompose<T,U>(t, fn, dst));
else {
try {
- if ((c = fn.apply(t)) == null)
+ CompletionStage<U> cs = fn.apply(t);
+ c = (cs == null) ? null : cs.toCompletableFuture();
+ if (c == null)
ex = new NullPointerException();
} catch (Throwable rex) {
ex = rex;
@@ -1401,6 +1492,619 @@
private static final long serialVersionUID = 5232453952276885070L;
}
+ // Implementations of stage methods with (plain, async, Executor) forms
+
+ private <U> CompletableFuture<U> doThenApply
+ (Function<? super T,? extends U> fn,
+ Executor e) {
+ if (fn == null) throw new NullPointerException();
+ CompletableFuture<U> dst = new CompletableFuture<U>();
+ ThenApply<T,U> d = null;
+ Object r;
+ if ((r = result) == null) {
+ CompletionNode p = new CompletionNode
+ (d = new ThenApply<T,U>(this, fn, dst, e));
+ while ((r = result) == null) {
+ if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ break;
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ U u = null;
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncApply<T,U>(t, fn, dst));
+ else
+ u = fn.apply(t);
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(u, ex);
+ }
+ helpPostComplete();
+ return dst;
+ }
+
+ private CompletableFuture<Void> doThenAccept(Consumer<? super T> fn,
+ Executor e) {
+ if (fn == null) throw new NullPointerException();
+ CompletableFuture<Void> dst = new CompletableFuture<Void>();
+ ThenAccept<T> d = null;
+ Object r;
+ if ((r = result) == null) {
+ CompletionNode p = new CompletionNode
+ (d = new ThenAccept<T>(this, fn, dst, e));
+ while ((r = result) == null) {
+ if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ break;
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncAccept<T>(t, fn, dst));
+ else
+ fn.accept(t);
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ return dst;
+ }
+
+ private CompletableFuture<Void> doThenRun(Runnable action,
+ Executor e) {
+ if (action == null) throw new NullPointerException();
+ CompletableFuture<Void> dst = new CompletableFuture<Void>();
+ ThenRun d = null;
+ Object r;
+ if ((r = result) == null) {
+ CompletionNode p = new CompletionNode
+ (d = new ThenRun(this, action, dst, e));
+ while ((r = result) == null) {
+ if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ break;
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ Throwable ex;
+ if (r instanceof AltResult)
+ ex = ((AltResult)r).ex;
+ else
+ ex = null;
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncRun(action, dst));
+ else
+ action.run();
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ return dst;
+ }
+
+ private <U,V> CompletableFuture<V> doThenCombine
+ (CompletableFuture<? extends U> other,
+ BiFunction<? super T,? super U,? extends V> fn,
+ Executor e) {
+ if (other == null || fn == null) throw new NullPointerException();
+ CompletableFuture<V> dst = new CompletableFuture<V>();
+ ThenCombine<T,U,V> d = null;
+ Object r, s = null;
+ if ((r = result) == null || (s = other.result) == null) {
+ d = new ThenCombine<T,U,V>(this, other, fn, dst, e);
+ CompletionNode q = null, p = new CompletionNode(d);
+ while ((r == null && (r = result) == null) ||
+ (s == null && (s = other.result) == null)) {
+ if (q != null) {
+ if (s != null ||
+ UNSAFE.compareAndSwapObject
+ (other, COMPLETIONS, q.next = other.completions, q))
+ break;
+ }
+ else if (r != null ||
+ UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p)) {
+ if (s != null)
+ break;
+ q = new CompletionNode(d);
+ }
+ }
+ }
+ if (r != null && s != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; U u; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ if (ex != null)
+ u = null;
+ else if (s instanceof AltResult) {
+ ex = ((AltResult)s).ex;
+ u = null;
+ }
+ else {
+ @SuppressWarnings("unchecked") U us = (U) s;
+ u = us;
+ }
+ V v = null;
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncCombine<T,U,V>(t, u, fn, dst));
+ else
+ v = fn.apply(t, u);
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(v, ex);
+ }
+ helpPostComplete();
+ other.helpPostComplete();
+ return dst;
+ }
+
+ private <U> CompletableFuture<Void> doThenAcceptBoth
+ (CompletableFuture<? extends U> other,
+ BiConsumer<? super T,? super U> fn,
+ Executor e) {
+ if (other == null || fn == null) throw new NullPointerException();
+ CompletableFuture<Void> dst = new CompletableFuture<Void>();
+ ThenAcceptBoth<T,U> d = null;
+ Object r, s = null;
+ if ((r = result) == null || (s = other.result) == null) {
+ d = new ThenAcceptBoth<T,U>(this, other, fn, dst, e);
+ CompletionNode q = null, p = new CompletionNode(d);
+ while ((r == null && (r = result) == null) ||
+ (s == null && (s = other.result) == null)) {
+ if (q != null) {
+ if (s != null ||
+ UNSAFE.compareAndSwapObject
+ (other, COMPLETIONS, q.next = other.completions, q))
+ break;
+ }
+ else if (r != null ||
+ UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p)) {
+ if (s != null)
+ break;
+ q = new CompletionNode(d);
+ }
+ }
+ }
+ if (r != null && s != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; U u; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ if (ex != null)
+ u = null;
+ else if (s instanceof AltResult) {
+ ex = ((AltResult)s).ex;
+ u = null;
+ }
+ else {
+ @SuppressWarnings("unchecked") U us = (U) s;
+ u = us;
+ }
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncAcceptBoth<T,U>(t, u, fn, dst));
+ else
+ fn.accept(t, u);
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ other.helpPostComplete();
+ return dst;
+ }
+
+ private CompletableFuture<Void> doRunAfterBoth(CompletableFuture<?> other,
+ Runnable action,
+ Executor e) {
+ if (other == null || action == null) throw new NullPointerException();
+ CompletableFuture<Void> dst = new CompletableFuture<Void>();
+ RunAfterBoth d = null;
+ Object r, s = null;
+ if ((r = result) == null || (s = other.result) == null) {
+ d = new RunAfterBoth(this, other, action, dst, e);
+ CompletionNode q = null, p = new CompletionNode(d);
+ while ((r == null && (r = result) == null) ||
+ (s == null && (s = other.result) == null)) {
+ if (q != null) {
+ if (s != null ||
+ UNSAFE.compareAndSwapObject
+ (other, COMPLETIONS, q.next = other.completions, q))
+ break;
+ }
+ else if (r != null ||
+ UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p)) {
+ if (s != null)
+ break;
+ q = new CompletionNode(d);
+ }
+ }
+ }
+ if (r != null && s != null && (d == null || d.compareAndSet(0, 1))) {
+ Throwable ex;
+ if (r instanceof AltResult)
+ ex = ((AltResult)r).ex;
+ else
+ ex = null;
+ if (ex == null && (s instanceof AltResult))
+ ex = ((AltResult)s).ex;
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncRun(action, dst));
+ else
+ action.run();
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ other.helpPostComplete();
+ return dst;
+ }
+
+ private <U> CompletableFuture<U> doApplyToEither
+ (CompletableFuture<? extends T> other,
+ Function<? super T, U> fn,
+ Executor e) {
+ if (other == null || fn == null) throw new NullPointerException();
+ CompletableFuture<U> dst = new CompletableFuture<U>();
+ ApplyToEither<T,U> d = null;
+ Object r;
+ if ((r = result) == null && (r = other.result) == null) {
+ d = new ApplyToEither<T,U>(this, other, fn, dst, e);
+ CompletionNode q = null, p = new CompletionNode(d);
+ while ((r = result) == null && (r = other.result) == null) {
+ if (q != null) {
+ if (UNSAFE.compareAndSwapObject
+ (other, COMPLETIONS, q.next = other.completions, q))
+ break;
+ }
+ else if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ q = new CompletionNode(d);
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ U u = null;
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncApply<T,U>(t, fn, dst));
+ else
+ u = fn.apply(t);
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(u, ex);
+ }
+ helpPostComplete();
+ other.helpPostComplete();
+ return dst;
+ }
+
+ private CompletableFuture<Void> doAcceptEither
+ (CompletableFuture<? extends T> other,
+ Consumer<? super T> fn,
+ Executor e) {
+ if (other == null || fn == null) throw new NullPointerException();
+ CompletableFuture<Void> dst = new CompletableFuture<Void>();
+ AcceptEither<T> d = null;
+ Object r;
+ if ((r = result) == null && (r = other.result) == null) {
+ d = new AcceptEither<T>(this, other, fn, dst, e);
+ CompletionNode q = null, p = new CompletionNode(d);
+ while ((r = result) == null && (r = other.result) == null) {
+ if (q != null) {
+ if (UNSAFE.compareAndSwapObject
+ (other, COMPLETIONS, q.next = other.completions, q))
+ break;
+ }
+ else if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ q = new CompletionNode(d);
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncAccept<T>(t, fn, dst));
+ else
+ fn.accept(t);
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ other.helpPostComplete();
+ return dst;
+ }
+
+ private CompletableFuture<Void> doRunAfterEither
+ (CompletableFuture<?> other,
+ Runnable action,
+ Executor e) {
+ if (other == null || action == null) throw new NullPointerException();
+ CompletableFuture<Void> dst = new CompletableFuture<Void>();
+ RunAfterEither d = null;
+ Object r;
+ if ((r = result) == null && (r = other.result) == null) {
+ d = new RunAfterEither(this, other, action, dst, e);
+ CompletionNode q = null, p = new CompletionNode(d);
+ while ((r = result) == null && (r = other.result) == null) {
+ if (q != null) {
+ if (UNSAFE.compareAndSwapObject
+ (other, COMPLETIONS, q.next = other.completions, q))
+ break;
+ }
+ else if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ q = new CompletionNode(d);
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ Throwable ex;
+ if (r instanceof AltResult)
+ ex = ((AltResult)r).ex;
+ else
+ ex = null;
+ if (ex == null) {
+ try {
+ if (e != null)
+ execAsync(e, new AsyncRun(action, dst));
+ else
+ action.run();
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ other.helpPostComplete();
+ return dst;
+ }
+
+ private <U> CompletableFuture<U> doThenCompose
+ (Function<? super T, ? extends CompletionStage<U>> fn,
+ Executor e) {
+ if (fn == null) throw new NullPointerException();
+ CompletableFuture<U> dst = null;
+ ThenCompose<T,U> d = null;
+ Object r;
+ if ((r = result) == null) {
+ dst = new CompletableFuture<U>();
+ CompletionNode p = new CompletionNode
+ (d = new ThenCompose<T,U>(this, fn, dst, e));
+ while ((r = result) == null) {
+ if (UNSAFE.compareAndSwapObject
+ (this, COMPLETIONS, p.next = completions, p))
+ break;
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ if (ex == null) {
+ if (e != null) {
+ if (dst == null)
+ dst = new CompletableFuture<U>();
+ execAsync(e, new AsyncCompose<T,U>(t, fn, dst));
+ }
+ else {
+ try {
+ CompletionStage<U> cs = fn.apply(t);
+ if (cs == null ||
+ (dst = cs.toCompletableFuture()) == null)
+ ex = new NullPointerException();
+ } catch (Throwable rex) {
+ ex = rex;
+ }
+ }
+ }
+ if (dst == null)
+ dst = new CompletableFuture<U>();
+ if (e == null || ex != null)
+ dst.internalComplete(null, ex);
+ }
+ helpPostComplete();
+ dst.helpPostComplete();
+ return dst;
+ }
+
+ private CompletableFuture<T> doWhenComplete
+ (BiConsumer<? super T, ? super Throwable> fn,
+ Executor e) {
+ if (fn == null) throw new NullPointerException();
+ CompletableFuture<T> dst = new CompletableFuture<T>();
+ WhenCompleteCompletion<T> d = null;
+ Object r;
+ if ((r = result) == null) {
+ CompletionNode p =
+ new CompletionNode(d = new WhenCompleteCompletion<T>
+ (this, fn, dst, e));
+ while ((r = result) == null) {
+ if (UNSAFE.compareAndSwapObject(this, COMPLETIONS,
+ p.next = completions, p))
+ break;
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ Throwable dx = null;
+ try {
+ if (e != null)
+ execAsync(e, new AsyncWhenComplete<T>(t, ex, fn, dst));
+ else
+ fn.accept(t, ex);
+ } catch (Throwable rex) {
+ dx = rex;
+ }
+ if (e == null || dx != null)
+ dst.internalComplete(t, ex != null ? ex : dx);
+ }
+ helpPostComplete();
+ return dst;
+ }
+
+ private <U> CompletableFuture<U> doHandle
+ (BiFunction<? super T, Throwable, ? extends U> fn,
+ Executor e) {
+ if (fn == null) throw new NullPointerException();
+ CompletableFuture<U> dst = new CompletableFuture<U>();
+ HandleCompletion<T,U> d = null;
+ Object r;
+ if ((r = result) == null) {
+ CompletionNode p =
+ new CompletionNode(d = new HandleCompletion<T,U>
+ (this, fn, dst, e));
+ while ((r = result) == null) {
+ if (UNSAFE.compareAndSwapObject(this, COMPLETIONS,
+ p.next = completions, p))
+ break;
+ }
+ }
+ if (r != null && (d == null || d.compareAndSet(0, 1))) {
+ T t; Throwable ex;
+ if (r instanceof AltResult) {
+ ex = ((AltResult)r).ex;
+ t = null;
+ }
+ else {
+ ex = null;
+ @SuppressWarnings("unchecked") T tr = (T) r;
+ t = tr;
+ }
+ U u = null;
+ Throwable dx = null;
+ try {
+ if (e != null)
+ execAsync(e, new AsyncCombine<T,Throwable,U>(t, ex, fn, dst));
+ else {
+ u = fn.apply(t, ex);
+ dx = null;
+ }
+ } catch (Throwable rex) {
+ dx = rex;
+ u = null;
+ }
+ if (e == null || dx != null)
+ dst.internalComplete(u, dx);
+ }
+ helpPostComplete();
+ return dst;
+ }
+
+
// public methods
/**
@@ -1416,13 +2120,13 @@
*
* @param supplier a function returning the value to be used
* to complete the returned CompletableFuture
+ * @param <U> the function's return type
* @return the new CompletableFuture
*/
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) {
if (supplier == null) throw new NullPointerException();
CompletableFuture<U> f = new CompletableFuture<U>();
- ForkJoinPool.commonPool().
- execute((ForkJoinTask<?>)new AsyncSupply<U>(supplier, f));
+ execAsync(ForkJoinPool.commonPool(), new AsyncSupply<U>(supplier, f));
return f;
}
@@ -1434,6 +2138,7 @@
* @param supplier a function returning the value to be used
* to complete the returned CompletableFuture
* @param executor the executor to use for asynchronous execution
+ * @param <U> the function's return type
* @return the new CompletableFuture
*/
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier,
@@ -1441,7 +2146,7 @@
if (executor == null || supplier == null)
throw new NullPointerException();
CompletableFuture<U> f = new CompletableFuture<U>();
- executor.execute(new AsyncSupply<U>(supplier, f));
+ execAsync(executor, new AsyncSupply<U>(supplier, f));
return f;
}
@@ -1457,8 +2162,7 @@
public static CompletableFuture<Void> runAsync(Runnable runnable) {
if (runnable == null) throw new NullPointerException();
CompletableFuture<Void> f = new CompletableFuture<Void>();
- ForkJoinPool.commonPool().
- execute((ForkJoinTask<?>)new AsyncRun(runnable, f));
+ execAsync(ForkJoinPool.commonPool(), new AsyncRun(runnable, f));
return f;
}
@@ -1477,7 +2181,7 @@
if (executor == null || runnable == null)
throw new NullPointerException();
CompletableFuture<Void> f = new CompletableFuture<Void>();
- executor.execute(new AsyncRun(runnable, f));
+ execAsync(executor, new AsyncRun(runnable, f));
return f;
}
@@ -1486,6 +2190,7 @@
* the given value.
*
* @param value the value
+ * @param <U> the type of the value
* @return the completed CompletableFuture
*/
public static <U> CompletableFuture<U> completedFuture(U value) {
@@ -1657,60 +2362,18 @@
return triggered;
}
- /**
- * Returns a new CompletableFuture that is completed
- * when this CompletableFuture completes, with the result of the
- * given function of this CompletableFuture's result.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied function throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<U> thenApply(Function<? super T,? extends U> fn) {
+ // CompletionStage methods
+
+ public <U> CompletableFuture<U> thenApply
+ (Function<? super T,? extends U> fn) {
return doThenApply(fn, null);
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when this CompletableFuture completes, with the result of the
- * given function of this CompletableFuture's result from a
- * task running in the {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied function throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @return the new CompletableFuture
- */
public <U> CompletableFuture<U> thenApplyAsync
(Function<? super T,? extends U> fn) {
return doThenApply(fn, ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when this CompletableFuture completes, with the result of the
- * given function of this CompletableFuture's result from a
- * task running in the given executor.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied function throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
public <U> CompletableFuture<U> thenApplyAsync
(Function<? super T,? extends U> fn,
Executor executor) {
@@ -1718,1149 +2381,228 @@
return doThenApply(fn, executor);
}
- private <U> CompletableFuture<U> doThenApply
- (Function<? super T,? extends U> fn,
- Executor e) {
- if (fn == null) throw new NullPointerException();
- CompletableFuture<U> dst = new CompletableFuture<U>();
- ThenApply<T,U> d = null;
- Object r;
- if ((r = result) == null) {
- CompletionNode p = new CompletionNode
- (d = new ThenApply<T,U>(this, fn, dst, e));
- while ((r = result) == null) {
- if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- break;
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- T t; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- U u = null;
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncApply<T,U>(t, fn, dst));
- else
- u = fn.apply(t);
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(u, ex);
- }
- helpPostComplete();
- return dst;
+ public CompletableFuture<Void> thenAccept
+ (Consumer<? super T> action) {
+ return doThenAccept(action, null);
}
- /**
- * Returns a new CompletableFuture that is completed
- * when this CompletableFuture completes, after performing the given
- * action with this CompletableFuture's result.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied action throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> thenAccept(Consumer<? super T> block) {
- return doThenAccept(block, null);
+ public CompletableFuture<Void> thenAcceptAsync
+ (Consumer<? super T> action) {
+ return doThenAccept(action, ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when this CompletableFuture completes, after performing the given
- * action with this CompletableFuture's result from a task running
- * in the {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied action throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> thenAcceptAsync(Consumer<? super T> block) {
- return doThenAccept(block, ForkJoinPool.commonPool());
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when this CompletableFuture completes, after performing the given
- * action with this CompletableFuture's result from a task running
- * in the given executor.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied action throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> thenAcceptAsync(Consumer<? super T> block,
- Executor executor) {
+ public CompletableFuture<Void> thenAcceptAsync
+ (Consumer<? super T> action,
+ Executor executor) {
if (executor == null) throw new NullPointerException();
- return doThenAccept(block, executor);
+ return doThenAccept(action, executor);
}
- private CompletableFuture<Void> doThenAccept(Consumer<? super T> fn,
- Executor e) {
- if (fn == null) throw new NullPointerException();
- CompletableFuture<Void> dst = new CompletableFuture<Void>();
- ThenAccept<T> d = null;
- Object r;
- if ((r = result) == null) {
- CompletionNode p = new CompletionNode
- (d = new ThenAccept<T>(this, fn, dst, e));
- while ((r = result) == null) {
- if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- break;
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- T t; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncAccept<T>(t, fn, dst));
- else
- fn.accept(t);
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- return dst;
- }
-
- /**
- * Returns a new CompletableFuture that is completed
- * when this CompletableFuture completes, after performing the given
- * action.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied action throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> thenRun(Runnable action) {
+ public CompletableFuture<Void> thenRun
+ (Runnable action) {
return doThenRun(action, null);
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when this CompletableFuture completes, after performing the given
- * action from a task running in the {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied action throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> thenRunAsync(Runnable action) {
+ public CompletableFuture<Void> thenRunAsync
+ (Runnable action) {
return doThenRun(action, ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when this CompletableFuture completes, after performing the given
- * action from a task running in the given executor.
- *
- * <p>If this CompletableFuture completes exceptionally, or the
- * supplied action throws an exception, then the returned
- * CompletableFuture completes exceptionally with a
- * CompletionException holding the exception as its cause.
- *
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> thenRunAsync(Runnable action,
- Executor executor) {
+ public CompletableFuture<Void> thenRunAsync
+ (Runnable action,
+ Executor executor) {
if (executor == null) throw new NullPointerException();
return doThenRun(action, executor);
}
- private CompletableFuture<Void> doThenRun(Runnable action,
- Executor e) {
- if (action == null) throw new NullPointerException();
- CompletableFuture<Void> dst = new CompletableFuture<Void>();
- ThenRun d = null;
- Object r;
- if ((r = result) == null) {
- CompletionNode p = new CompletionNode
- (d = new ThenRun(this, action, dst, e));
- while ((r = result) == null) {
- if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- break;
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- Throwable ex;
- if (r instanceof AltResult)
- ex = ((AltResult)r).ex;
- else
- ex = null;
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncRun(action, dst));
- else
- action.run();
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- return dst;
+ public <U,V> CompletableFuture<V> thenCombine
+ (CompletionStage<? extends U> other,
+ BiFunction<? super T,? super U,? extends V> fn) {
+ return doThenCombine(other.toCompletableFuture(), fn, null);
}
- /**
- * Returns a new CompletableFuture that is completed
- * when both this and the other given CompletableFuture complete,
- * with the result of the given function of the results of the two
- * CompletableFutures.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied function throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @return the new CompletableFuture
- */
- public <U,V> CompletableFuture<V> thenCombine
- (CompletableFuture<? extends U> other,
+ public <U,V> CompletableFuture<V> thenCombineAsync
+ (CompletionStage<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn) {
- return doThenCombine(other, fn, null);
+ return doThenCombine(other.toCompletableFuture(), fn,
+ ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when both this and the other given CompletableFuture complete,
- * with the result of the given function of the results of the two
- * CompletableFutures from a task running in the
- * {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied function throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @return the new CompletableFuture
- */
public <U,V> CompletableFuture<V> thenCombineAsync
- (CompletableFuture<? extends U> other,
- BiFunction<? super T,? super U,? extends V> fn) {
- return doThenCombine(other, fn, ForkJoinPool.commonPool());
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when both this and the other given CompletableFuture complete,
- * with the result of the given function of the results of the two
- * CompletableFutures from a task running in the given executor.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied function throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public <U,V> CompletableFuture<V> thenCombineAsync
- (CompletableFuture<? extends U> other,
+ (CompletionStage<? extends U> other,
BiFunction<? super T,? super U,? extends V> fn,
Executor executor) {
if (executor == null) throw new NullPointerException();
- return doThenCombine(other, fn, executor);
+ return doThenCombine(other.toCompletableFuture(), fn, executor);
+ }
+
+ public <U> CompletableFuture<Void> thenAcceptBoth
+ (CompletionStage<? extends U> other,
+ BiConsumer<? super T, ? super U> action) {
+ return doThenAcceptBoth(other.toCompletableFuture(), action, null);
}
- private <U,V> CompletableFuture<V> doThenCombine
- (CompletableFuture<? extends U> other,
- BiFunction<? super T,? super U,? extends V> fn,
- Executor e) {
- if (other == null || fn == null) throw new NullPointerException();
- CompletableFuture<V> dst = new CompletableFuture<V>();
- ThenCombine<T,U,V> d = null;
- Object r, s = null;
- if ((r = result) == null || (s = other.result) == null) {
- d = new ThenCombine<T,U,V>(this, other, fn, dst, e);
- CompletionNode q = null, p = new CompletionNode(d);
- while ((r == null && (r = result) == null) ||
- (s == null && (s = other.result) == null)) {
- if (q != null) {
- if (s != null ||
- UNSAFE.compareAndSwapObject
- (other, COMPLETIONS, q.next = other.completions, q))
- break;
- }
- else if (r != null ||
- UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p)) {
- if (s != null)
- break;
- q = new CompletionNode(d);
- }
- }
- }
- if (r != null && s != null && (d == null || d.compareAndSet(0, 1))) {
- T t; U u; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- if (ex != null)
- u = null;
- else if (s instanceof AltResult) {
- ex = ((AltResult)s).ex;
- u = null;
- }
- else {
- @SuppressWarnings("unchecked") U us = (U) s;
- u = us;
- }
- V v = null;
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncCombine<T,U,V>(t, u, fn, dst));
- else
- v = fn.apply(t, u);
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(v, ex);
- }
- helpPostComplete();
- other.helpPostComplete();
- return dst;
+ public <U> CompletableFuture<Void> thenAcceptBothAsync
+ (CompletionStage<? extends U> other,
+ BiConsumer<? super T, ? super U> action) {
+ return doThenAcceptBoth(other.toCompletableFuture(), action,
+ ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is completed
- * when both this and the other given CompletableFuture complete,
- * after performing the given action with the results of the two
- * CompletableFutures.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied action throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<Void> thenAcceptBoth
- (CompletableFuture<? extends U> other,
- BiConsumer<? super T, ? super U> block) {
- return doThenAcceptBoth(other, block, null);
+ public <U> CompletableFuture<Void> thenAcceptBothAsync
+ (CompletionStage<? extends U> other,
+ BiConsumer<? super T, ? super U> action,
+ Executor executor) {
+ if (executor == null) throw new NullPointerException();
+ return doThenAcceptBoth(other.toCompletableFuture(), action, executor);
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when both this and the other given CompletableFuture complete,
- * after performing the given action with the results of the two
- * CompletableFutures from a task running in the {@link
- * ForkJoinPool#commonPool()}.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied action throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<Void> thenAcceptBothAsync
- (CompletableFuture<? extends U> other,
- BiConsumer<? super T, ? super U> block) {
- return doThenAcceptBoth(other, block, ForkJoinPool.commonPool());
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when both this and the other given CompletableFuture complete,
- * after performing the given action with the results of the two
- * CompletableFutures from a task running in the given executor.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied action throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<Void> thenAcceptBothAsync
- (CompletableFuture<? extends U> other,
- BiConsumer<? super T, ? super U> block,
- Executor executor) {
- if (executor == null) throw new NullPointerException();
- return doThenAcceptBoth(other, block, executor);
+ public CompletableFuture<Void> runAfterBoth
+ (CompletionStage<?> other,
+ Runnable action) {
+ return doRunAfterBoth(other.toCompletableFuture(), action, null);
}
- private <U> CompletableFuture<Void> doThenAcceptBoth
- (CompletableFuture<? extends U> other,
- BiConsumer<? super T,? super U> fn,
- Executor e) {
- if (other == null || fn == null) throw new NullPointerException();
- CompletableFuture<Void> dst = new CompletableFuture<Void>();
- ThenAcceptBoth<T,U> d = null;
- Object r, s = null;
- if ((r = result) == null || (s = other.result) == null) {
- d = new ThenAcceptBoth<T,U>(this, other, fn, dst, e);
- CompletionNode q = null, p = new CompletionNode(d);
- while ((r == null && (r = result) == null) ||
- (s == null && (s = other.result) == null)) {
- if (q != null) {
- if (s != null ||
- UNSAFE.compareAndSwapObject
- (other, COMPLETIONS, q.next = other.completions, q))
- break;
- }
- else if (r != null ||
- UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p)) {
- if (s != null)
- break;
- q = new CompletionNode(d);
- }
- }
- }
- if (r != null && s != null && (d == null || d.compareAndSet(0, 1))) {
- T t; U u; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- if (ex != null)
- u = null;
- else if (s instanceof AltResult) {
- ex = ((AltResult)s).ex;
- u = null;
- }
- else {
- @SuppressWarnings("unchecked") U us = (U) s;
- u = us;
- }
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncAcceptBoth<T,U>(t, u, fn, dst));
- else
- fn.accept(t, u);
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- other.helpPostComplete();
- return dst;
+ public CompletableFuture<Void> runAfterBothAsync
+ (CompletionStage<?> other,
+ Runnable action) {
+ return doRunAfterBoth(other.toCompletableFuture(), action,
+ ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is completed
- * when both this and the other given CompletableFuture complete,
- * after performing the given action.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied action throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> runAfterBoth(CompletableFuture<?> other,
- Runnable action) {
- return doRunAfterBoth(other, action, null);
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when both this and the other given CompletableFuture complete,
- * after performing the given action from a task running in the
- * {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied action throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> runAfterBothAsync(CompletableFuture<?> other,
- Runnable action) {
- return doRunAfterBoth(other, action, ForkJoinPool.commonPool());
+ public CompletableFuture<Void> runAfterBothAsync
+ (CompletionStage<?> other,
+ Runnable action,
+ Executor executor) {
+ if (executor == null) throw new NullPointerException();
+ return doRunAfterBoth(other.toCompletableFuture(), action, executor);
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when both this and the other given CompletableFuture complete,
- * after performing the given action from a task running in the
- * given executor.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, or the supplied action throws an exception,
- * then the returned CompletableFuture completes exceptionally
- * with a CompletionException holding the exception as its cause.
- *
- * @param other the other CompletableFuture
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> runAfterBothAsync(CompletableFuture<?> other,
- Runnable action,
- Executor executor) {
- if (executor == null) throw new NullPointerException();
- return doRunAfterBoth(other, action, executor);
- }
- private CompletableFuture<Void> doRunAfterBoth(CompletableFuture<?> other,
- Runnable action,
- Executor e) {
- if (other == null || action == null) throw new NullPointerException();
- CompletableFuture<Void> dst = new CompletableFuture<Void>();
- RunAfterBoth d = null;
- Object r, s = null;
- if ((r = result) == null || (s = other.result) == null) {
- d = new RunAfterBoth(this, other, action, dst, e);
- CompletionNode q = null, p = new CompletionNode(d);
- while ((r == null && (r = result) == null) ||
- (s == null && (s = other.result) == null)) {
- if (q != null) {
- if (s != null ||
- UNSAFE.compareAndSwapObject
- (other, COMPLETIONS, q.next = other.completions, q))
- break;
- }
- else if (r != null ||
- UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p)) {
- if (s != null)
- break;
- q = new CompletionNode(d);
- }
- }
- }
- if (r != null && s != null && (d == null || d.compareAndSet(0, 1))) {
- Throwable ex;
- if (r instanceof AltResult)
- ex = ((AltResult)r).ex;
- else
- ex = null;
- if (ex == null && (s instanceof AltResult))
- ex = ((AltResult)s).ex;
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncRun(action, dst));
- else
- action.run();
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- other.helpPostComplete();
- return dst;
+ public <U> CompletableFuture<U> applyToEither
+ (CompletionStage<? extends T> other,
+ Function<? super T, U> fn) {
+ return doApplyToEither(other.toCompletableFuture(), fn, null);
}
- /**
- * Returns a new CompletableFuture that is completed
- * when either this or the other given CompletableFuture completes,
- * with the result of the given function of either this or the other
- * CompletableFuture's result.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied function
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<U> applyToEither
- (CompletableFuture<? extends T> other,
+ public <U> CompletableFuture<U> applyToEitherAsync
+ (CompletionStage<? extends T> other,
Function<? super T, U> fn) {
- return doApplyToEither(other, fn, null);
+ return doApplyToEither(other.toCompletableFuture(), fn,
+ ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when either this or the other given CompletableFuture completes,
- * with the result of the given function of either this or the other
- * CompletableFuture's result from a task running in the
- * {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied function
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @return the new CompletableFuture
- */
public <U> CompletableFuture<U> applyToEitherAsync
- (CompletableFuture<? extends T> other,
- Function<? super T, U> fn) {
- return doApplyToEither(other, fn, ForkJoinPool.commonPool());
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when either this or the other given CompletableFuture completes,
- * with the result of the given function of either this or the other
- * CompletableFuture's result from a task running in the
- * given executor.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied function
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param fn the function to use to compute the value of
- * the returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<U> applyToEitherAsync
- (CompletableFuture<? extends T> other,
+ (CompletionStage<? extends T> other,
Function<? super T, U> fn,
Executor executor) {
if (executor == null) throw new NullPointerException();
- return doApplyToEither(other, fn, executor);
+ return doApplyToEither(other.toCompletableFuture(), fn, executor);
}
- private <U> CompletableFuture<U> doApplyToEither
- (CompletableFuture<? extends T> other,
- Function<? super T, U> fn,
- Executor e) {
- if (other == null || fn == null) throw new NullPointerException();
- CompletableFuture<U> dst = new CompletableFuture<U>();
- ApplyToEither<T,U> d = null;
- Object r;
- if ((r = result) == null && (r = other.result) == null) {
- d = new ApplyToEither<T,U>(this, other, fn, dst, e);
- CompletionNode q = null, p = new CompletionNode(d);
- while ((r = result) == null && (r = other.result) == null) {
- if (q != null) {
- if (UNSAFE.compareAndSwapObject
- (other, COMPLETIONS, q.next = other.completions, q))
- break;
- }
- else if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- q = new CompletionNode(d);
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- T t; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- U u = null;
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncApply<T,U>(t, fn, dst));
- else
- u = fn.apply(t);
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(u, ex);
- }
- helpPostComplete();
- other.helpPostComplete();
- return dst;
+ public CompletableFuture<Void> acceptEither
+ (CompletionStage<? extends T> other,
+ Consumer<? super T> action) {
+ return doAcceptEither(other.toCompletableFuture(), action, null);
}
- /**
- * Returns a new CompletableFuture that is completed
- * when either this or the other given CompletableFuture completes,
- * after performing the given action with the result of either this
- * or the other CompletableFuture's result.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied action
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> acceptEither
- (CompletableFuture<? extends T> other,
- Consumer<? super T> block) {
- return doAcceptEither(other, block, null);
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when either this or the other given CompletableFuture completes,
- * after performing the given action with the result of either this
- * or the other CompletableFuture's result from a task running in
- * the {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied action
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
public CompletableFuture<Void> acceptEitherAsync
- (CompletableFuture<? extends T> other,
- Consumer<? super T> block) {
- return doAcceptEither(other, block, ForkJoinPool.commonPool());
+ (CompletionStage<? extends T> other,
+ Consumer<? super T> action) {
+ return doAcceptEither(other.toCompletableFuture(), action,
+ ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when either this or the other given CompletableFuture completes,
- * after performing the given action with the result of either this
- * or the other CompletableFuture's result from a task running in
- * the given executor.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied action
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param block the action to perform before completing the
- * returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
public CompletableFuture<Void> acceptEitherAsync
- (CompletableFuture<? extends T> other,
- Consumer<? super T> block,
+ (CompletionStage<? extends T> other,
+ Consumer<? super T> action,
Executor executor) {
if (executor == null) throw new NullPointerException();
- return doAcceptEither(other, block, executor);
+ return doAcceptEither(other.toCompletableFuture(), action, executor);
}
- private CompletableFuture<Void> doAcceptEither
- (CompletableFuture<? extends T> other,
- Consumer<? super T> fn,
- Executor e) {
- if (other == null || fn == null) throw new NullPointerException();
- CompletableFuture<Void> dst = new CompletableFuture<Void>();
- AcceptEither<T> d = null;
- Object r;
- if ((r = result) == null && (r = other.result) == null) {
- d = new AcceptEither<T>(this, other, fn, dst, e);
- CompletionNode q = null, p = new CompletionNode(d);
- while ((r = result) == null && (r = other.result) == null) {
- if (q != null) {
- if (UNSAFE.compareAndSwapObject
- (other, COMPLETIONS, q.next = other.completions, q))
- break;
- }
- else if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- q = new CompletionNode(d);
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- T t; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncAccept<T>(t, fn, dst));
- else
- fn.accept(t);
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- other.helpPostComplete();
- return dst;
+ public CompletableFuture<Void> runAfterEither(CompletionStage<?> other,
+ Runnable action) {
+ return doRunAfterEither(other.toCompletableFuture(), action, null);
}
- /**
- * Returns a new CompletableFuture that is completed
- * when either this or the other given CompletableFuture completes,
- * after performing the given action.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied action
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> runAfterEither(CompletableFuture<?> other,
- Runnable action) {
- return doRunAfterEither(other, action, null);
+ public CompletableFuture<Void> runAfterEitherAsync
+ (CompletionStage<?> other,
+ Runnable action) {
+ return doRunAfterEither(other.toCompletableFuture(), action,
+ ForkJoinPool.commonPool());
}
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when either this or the other given CompletableFuture completes,
- * after performing the given action from a task running in the
- * {@link ForkJoinPool#commonPool()}.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied action
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
public CompletableFuture<Void> runAfterEitherAsync
- (CompletableFuture<?> other,
- Runnable action) {
- return doRunAfterEither(other, action, ForkJoinPool.commonPool());
- }
-
- /**
- * Returns a new CompletableFuture that is asynchronously completed
- * when either this or the other given CompletableFuture completes,
- * after performing the given action from a task running in the
- * given executor.
- *
- * <p>If this and/or the other CompletableFuture complete
- * exceptionally, then the returned CompletableFuture may also do so,
- * with a CompletionException holding one of these exceptions as its
- * cause. No guarantees are made about which result or exception is
- * used in the returned CompletableFuture. If the supplied action
- * throws an exception, then the returned CompletableFuture completes
- * exceptionally with a CompletionException holding the exception as
- * its cause.
- *
- * @param other the other CompletableFuture
- * @param action the action to perform before completing the
- * returned CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the new CompletableFuture
- */
- public CompletableFuture<Void> runAfterEitherAsync
- (CompletableFuture<?> other,
+ (CompletionStage<?> other,
Runnable action,
Executor executor) {
if (executor == null) throw new NullPointerException();
- return doRunAfterEither(other, action, executor);
+ return doRunAfterEither(other.toCompletableFuture(), action, executor);
}
- private CompletableFuture<Void> doRunAfterEither
- (CompletableFuture<?> other,
- Runnable action,
- Executor e) {
- if (other == null || action == null) throw new NullPointerException();
- CompletableFuture<Void> dst = new CompletableFuture<Void>();
- RunAfterEither d = null;
- Object r;
- if ((r = result) == null && (r = other.result) == null) {
- d = new RunAfterEither(this, other, action, dst, e);
- CompletionNode q = null, p = new CompletionNode(d);
- while ((r = result) == null && (r = other.result) == null) {
- if (q != null) {
- if (UNSAFE.compareAndSwapObject
- (other, COMPLETIONS, q.next = other.completions, q))
- break;
- }
- else if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- q = new CompletionNode(d);
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- Throwable ex;
- if (r instanceof AltResult)
- ex = ((AltResult)r).ex;
- else
- ex = null;
- if (ex == null) {
- try {
- if (e != null)
- e.execute(new AsyncRun(action, dst));
- else
- action.run();
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- other.helpPostComplete();
- return dst;
- }
-
- /**
- * Returns a CompletableFuture that upon completion, has the same
- * value as produced by the given function of the result of this
- * CompletableFuture.
- *
- * <p>If this CompletableFuture completes exceptionally, then the
- * returned CompletableFuture also does so, with a
- * CompletionException holding this exception as its cause.
- * Similarly, if the computed CompletableFuture completes
- * exceptionally, then so does the returned CompletableFuture.
- *
- * @param fn the function returning a new CompletableFuture
- * @return the CompletableFuture
- */
public <U> CompletableFuture<U> thenCompose
- (Function<? super T, CompletableFuture<U>> fn) {
+ (Function<? super T, ? extends CompletionStage<U>> fn) {
return doThenCompose(fn, null);
}
- /**
- * Returns a CompletableFuture that upon completion, has the same
- * value as that produced asynchronously using the {@link
- * ForkJoinPool#commonPool()} by the given function of the result
- * of this CompletableFuture.
- *
- * <p>If this CompletableFuture completes exceptionally, then the
- * returned CompletableFuture also does so, with a
- * CompletionException holding this exception as its cause.
- * Similarly, if the computed CompletableFuture completes
- * exceptionally, then so does the returned CompletableFuture.
- *
- * @param fn the function returning a new CompletableFuture
- * @return the CompletableFuture
- */
public <U> CompletableFuture<U> thenComposeAsync
- (Function<? super T, CompletableFuture<U>> fn) {
+ (Function<? super T, ? extends CompletionStage<U>> fn) {
return doThenCompose(fn, ForkJoinPool.commonPool());
}
- /**
- * Returns a CompletableFuture that upon completion, has the same
- * value as that produced asynchronously using the given executor
- * by the given function of this CompletableFuture.
- *
- * <p>If this CompletableFuture completes exceptionally, then the
- * returned CompletableFuture also does so, with a
- * CompletionException holding this exception as its cause.
- * Similarly, if the computed CompletableFuture completes
- * exceptionally, then so does the returned CompletableFuture.
- *
- * @param fn the function returning a new CompletableFuture
- * @param executor the executor to use for asynchronous execution
- * @return the CompletableFuture
- */
public <U> CompletableFuture<U> thenComposeAsync
- (Function<? super T, CompletableFuture<U>> fn,
+ (Function<? super T, ? extends CompletionStage<U>> fn,
Executor executor) {
if (executor == null) throw new NullPointerException();
return doThenCompose(fn, executor);
}
- private <U> CompletableFuture<U> doThenCompose
- (Function<? super T, CompletableFuture<U>> fn,
- Executor e) {
- if (fn == null) throw new NullPointerException();
- CompletableFuture<U> dst = null;
- ThenCompose<T,U> d = null;
- Object r;
- if ((r = result) == null) {
- dst = new CompletableFuture<U>();
- CompletionNode p = new CompletionNode
- (d = new ThenCompose<T,U>(this, fn, dst, e));
- while ((r = result) == null) {
- if (UNSAFE.compareAndSwapObject
- (this, COMPLETIONS, p.next = completions, p))
- break;
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- T t; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- if (ex == null) {
- if (e != null) {
- if (dst == null)
- dst = new CompletableFuture<U>();
- e.execute(new AsyncCompose<T,U>(t, fn, dst));
- }
- else {
- try {
- if ((dst = fn.apply(t)) == null)
- ex = new NullPointerException();
- } catch (Throwable rex) {
- ex = rex;
- }
- }
- }
- if (dst == null)
- dst = new CompletableFuture<U>();
- if (e == null || ex != null)
- dst.internalComplete(null, ex);
- }
- helpPostComplete();
- dst.helpPostComplete();
- return dst;
+ public CompletableFuture<T> whenComplete
+ (BiConsumer<? super T, ? super Throwable> action) {
+ return doWhenComplete(action, null);
+ }
+
+ public CompletableFuture<T> whenCompleteAsync
+ (BiConsumer<? super T, ? super Throwable> action) {
+ return doWhenComplete(action, ForkJoinPool.commonPool());
+ }
+
+ public CompletableFuture<T> whenCompleteAsync
+ (BiConsumer<? super T, ? super Throwable> action,
+ Executor executor) {
+ if (executor == null) throw new NullPointerException();
+ return doWhenComplete(action, executor);
+ }
+
+ public <U> CompletableFuture<U> handle
+ (BiFunction<? super T, Throwable, ? extends U> fn) {
+ return doHandle(fn, null);
}
+ public <U> CompletableFuture<U> handleAsync
+ (BiFunction<? super T, Throwable, ? extends U> fn) {
+ return doHandle(fn, ForkJoinPool.commonPool());
+ }
+
+ public <U> CompletableFuture<U> handleAsync
+ (BiFunction<? super T, Throwable, ? extends U> fn,
+ Executor executor) {
+ if (executor == null) throw new NullPointerException();
+ return doHandle(fn, executor);
+ }
+
+ /**
+ * Returns this CompletableFuture
+ *
+ * @return this CompletableFuture
+ */
+ public CompletableFuture<T> toCompletableFuture() {
+ return this;
+ }
+
+ // not in interface CompletionStage
+
/**
* Returns a new CompletableFuture that is completed when this
* CompletableFuture completes, with the result of the given
@@ -2868,6 +2610,8 @@
* completion when it completes exceptionally; otherwise, if this
* CompletableFuture completes normally, then the returned
* CompletableFuture also completes normally with the same value.
+ * Note: More flexible versions of this functionality are
+ * available using methods {@code whenComplete} and {@code handle}.
*
* @param fn the function to use to compute the value of the
* returned CompletableFuture if this CompletableFuture completed
@@ -2882,7 +2626,8 @@
Object r;
if ((r = result) == null) {
CompletionNode p =
- new CompletionNode(d = new ExceptionCompletion<T>(this, fn, dst));
+ new CompletionNode(d = new ExceptionCompletion<T>
+ (this, fn, dst));
while ((r = result) == null) {
if (UNSAFE.compareAndSwapObject(this, COMPLETIONS,
p.next = completions, p))
@@ -2910,59 +2655,6 @@
return dst;
}
- /**
- * Returns a new CompletableFuture that is completed when this
- * CompletableFuture completes, with the result of the given
- * function of the result and exception of this CompletableFuture's
- * completion. The given function is invoked with the result (or
- * {@code null} if none) and the exception (or {@code null} if none)
- * of this CompletableFuture when complete.
- *
- * @param fn the function to use to compute the value of the
- * returned CompletableFuture
- * @return the new CompletableFuture
- */
- public <U> CompletableFuture<U> handle
- (BiFunction<? super T, Throwable, ? extends U> fn) {
- if (fn == null) throw new NullPointerException();
- CompletableFuture<U> dst = new CompletableFuture<U>();
- HandleCompletion<T,U> d = null;
- Object r;
- if ((r = result) == null) {
- CompletionNode p =
- new CompletionNode(d = new HandleCompletion<T,U>(this, fn, dst));
- while ((r = result) == null) {
- if (UNSAFE.compareAndSwapObject(this, COMPLETIONS,
- p.next = completions, p))
- break;
- }
- }
- if (r != null && (d == null || d.compareAndSet(0, 1))) {
- T t; Throwable ex;
- if (r instanceof AltResult) {
- ex = ((AltResult)r).ex;
- t = null;
- }
- else {
- ex = null;
- @SuppressWarnings("unchecked") T tr = (T) r;
- t = tr;
- }
- U u; Throwable dx;
- try {
- u = fn.apply(t, ex);
- dx = null;
- } catch (Throwable rex) {
- dx = rex;
- u = null;
- }
- dst.internalComplete(u, dx);
- }
- helpPostComplete();
- return dst;
- }
-
-
/* ------------- Arbitrary-arity constructions -------------- */
/*
@@ -3215,6 +2907,21 @@
}
/**
+ * Returns {@code true} if this CompletableFuture completed
+ * exceptionally, in any way. Possible causes include
+ * cancellation, explicit invocation of {@code
+ * completeExceptionally}, and abrupt termination of a
+ * CompletionStage action.
+ *
+ * @return {@code true} if this CompletableFuture completed
+ * exceptionally
+ */
+ public boolean isCompletedExceptionally() {
+ Object r;
+ return ((r = result) instanceof AltResult) && r != NIL;
+ }
+
+ /**
* Forcibly sets or resets the value subsequently returned by
* method {@link #get()} and related methods, whether or not
* already completed. This method is designed for use only in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/util/concurrent/CompletionStage.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,760 @@
+/*
+ * 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.
+ */
+
+/*
+ * This file is available under and governed by the GNU General Public
+ * License version 2 only, as published by the Free Software Foundation.
+ * However, the following notice accompanied the original version of this
+ * file:
+ *
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+package java.util.concurrent;
+import java.util.function.Supplier;
+import java.util.function.Consumer;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.function.BiFunction;
+import java.util.concurrent.Executor;
+
+/**
+ * A stage of a possibly asynchronous computation, that performs an
+ * action or computes a value when another CompletionStage completes.
+ * A stage completes upon termination of its computation, but this may
+ * in turn trigger other dependent stages. The functionality defined
+ * in this interface takes only a few basic forms, which expand out to
+ * a larger set of methods to capture a range of usage styles: <ul>
+ *
+ * <li>The computation performed by a stage may be expressed as a
+ * Function, Consumer, or Runnable (using methods with names including
+ * <em>apply</em>, <em>accept</em>, or <em>run</em>, respectively)
+ * depending on whether it requires arguments and/or produces results.
+ * For example, {@code stage.thenApply(x -> square(x)).thenAccept(x ->
+ * System.out.print(x)).thenRun(() -> System.out.println())}. An
+ * additional form (<em>compose</em>) applies functions of stages
+ * themselves, rather than their results. </li>
+ *
+ * <li> One stage's execution may be triggered by completion of a
+ * single stage, or both of two stages, or either of two stages.
+ * Dependencies on a single stage are arranged using methods with
+ * prefix <em>then</em>. Those triggered by completion of
+ * <em>both</em> of two stages may <em>combine</em> their results or
+ * effects, using correspondingly named methods. Those triggered by
+ * <em>either</em> of two stages make no guarantees about which of the
+ * results or effects are used for the dependent stage's
+ * computation.</li>
+ *
+ * <li> Dependencies among stages control the triggering of
+ * computations, but do not otherwise guarantee any particular
+ * ordering. Additionally, execution of a new stage's computations may
+ * be arranged in any of three ways: default execution, default
+ * asynchronous execution (using methods with suffix <em>async</em>
+ * that employ the stage's default asynchronous execution facility),
+ * or custom (via a supplied {@link Executor}). The execution
+ * properties of default and async modes are specified by
+ * CompletionStage implementations, not this interface. Methods with
+ * explicit Executor arguments may have arbitrary execution
+ * properties, and might not even support concurrent execution, but
+ * are arranged for processing in a way that accommodates asynchrony.
+ *
+ * <li> Two method forms support processing whether the triggering
+ * stage completed normally or exceptionally: Method {@link
+ * #whenComplete whenComplete} allows injection of an action
+ * regardless of outcome, otherwise preserving the outcome in its
+ * completion. Method {@link #handle handle} additionally allows the
+ * stage to compute a replacement result that may enable further
+ * processing by other dependent stages. In all other cases, if a
+ * stage's computation terminates abruptly with an (unchecked)
+ * exception or error, then all dependent stages requiring its
+ * completion complete exceptionally as well, with a {@link
+ * CompletionException} holding the exception as its cause. If a
+ * stage is dependent on <em>both</em> of two stages, and both
+ * complete exceptionally, then the CompletionException may correspond
+ * to either one of these exceptions. If a stage is dependent on
+ * <em>either</em> of two others, and only one of them completes
+ * exceptionally, no guarantees are made about whether the dependent
+ * stage completes normally or exceptionally. In the case of method
+ * {@code whenComplete}, when the supplied action itself encounters an
+ * exception, then the stage exceptionally completes with this
+ * exception if not already completed exceptionally.</li>
+ *
+ * </ul>
+ *
+ * <p>All methods adhere to the above triggering, execution, and
+ * exceptional completion specifications (which are not repeated in
+ * individual method specifications). Additionally, while arguments
+ * used to pass a completion result (that is, for parameters of type
+ * {@code T}) for methods accepting them may be null, passing a null
+ * value for any other parameter will result in a {@link
+ * NullPointerException} being thrown.
+ *
+ * <p>This interface does not define methods for initially creating,
+ * forcibly completing normally or exceptionally, probing completion
+ * status or results, or awaiting completion of a stage.
+ * Implementations of CompletionStage may provide means of achieving
+ * such effects, as appropriate. Method {@link #toCompletableFuture}
+ * enables interoperability among different implementations of this
+ * interface by providing a common conversion type.
+ *
+ * @author Doug Lea
+ * @since 1.8
+ */
+public interface CompletionStage<T> {
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed with this stage's result as the argument
+ * to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> thenApply(Function<? super T,? extends U> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed using this stage's default asynchronous
+ * execution facility, with this stage's result as the argument to
+ * the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> thenApplyAsync
+ (Function<? super T,? extends U> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed using the supplied Executor, with this
+ * stage's result as the argument to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> thenApplyAsync
+ (Function<? super T,? extends U> fn,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed with this stage's result as the argument
+ * to the supplied action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> thenAccept(Consumer<? super T> action);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed using this stage's default asynchronous
+ * execution facility, with this stage's result as the argument to
+ * the supplied action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> thenAcceptAsync(Consumer<? super T> action);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed using the supplied Executor, with this
+ * stage's result as the argument to the supplied action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> thenAcceptAsync(Consumer<? super T> action,
+ Executor executor);
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, executes the given action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> thenRun(Runnable action);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, executes the given action using this stage's default
+ * asynchronous execution facility.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> thenRunAsync(Runnable action);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, executes the given action using the supplied Executor.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> thenRunAsync(Runnable action,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage both complete normally, is executed with the two
+ * results as arguments to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param <U> the type of the other CompletionStage's result
+ * @param <V> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U,V> CompletionStage<V> thenCombine
+ (CompletionStage<? extends U> other,
+ BiFunction<? super T,? super U,? extends V> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage complete normally, is executed using this stage's
+ * default asynchronous execution facility, with the two results
+ * as arguments to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param <U> the type of the other CompletionStage's result
+ * @param <V> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U,V> CompletionStage<V> thenCombineAsync
+ (CompletionStage<? extends U> other,
+ BiFunction<? super T,? super U,? extends V> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage complete normally, is executed using the supplied
+ * executor, with the two results as arguments to the supplied
+ * function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @param <U> the type of the other CompletionStage's result
+ * @param <V> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U,V> CompletionStage<V> thenCombineAsync
+ (CompletionStage<? extends U> other,
+ BiFunction<? super T,? super U,? extends V> fn,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage both complete normally, is executed with the two
+ * results as arguments to the supplied action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param <U> the type of the other CompletionStage's result
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<Void> thenAcceptBoth
+ (CompletionStage<? extends U> other,
+ BiConsumer<? super T, ? super U> action);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage complete normally, is executed using this stage's
+ * default asynchronous execution facility, with the two results
+ * as arguments to the supplied action.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param <U> the type of the other CompletionStage's result
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<Void> thenAcceptBothAsync
+ (CompletionStage<? extends U> other,
+ BiConsumer<? super T, ? super U> action);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage complete normally, is executed using the supplied
+ * executor, with the two results as arguments to the supplied
+ * function.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @param <U> the type of the other CompletionStage's result
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<Void> thenAcceptBothAsync
+ (CompletionStage<? extends U> other,
+ BiConsumer<? super T, ? super U> action,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage both complete normally, executes the given action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> runAfterBoth(CompletionStage<?> other,
+ Runnable action);
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage complete normally, executes the given action using
+ * this stage's default asynchronous execution facility.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> runAfterBothAsync(CompletionStage<?> other,
+ Runnable action);
+
+ /**
+ * Returns a new CompletionStage that, when this and the other
+ * given stage complete normally, executes the given action using
+ * the supplied executor
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> runAfterBothAsync(CompletionStage<?> other,
+ Runnable action,
+ Executor executor);
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, is executed with the
+ * corresponding result as argument to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> applyToEither
+ (CompletionStage<? extends T> other,
+ Function<? super T, U> fn);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, is executed using this
+ * stage's default asynchronous execution facility, with the
+ * corresponding result as argument to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> applyToEitherAsync
+ (CompletionStage<? extends T> other,
+ Function<? super T, U> fn);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, is executed using the
+ * supplied executor, with the corresponding result as argument to
+ * the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param fn the function to use to compute the value of
+ * the returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> applyToEitherAsync
+ (CompletionStage<? extends T> other,
+ Function<? super T, U> fn,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, is executed with the
+ * corresponding result as argument to the supplied action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> acceptEither
+ (CompletionStage<? extends T> other,
+ Consumer<? super T> action);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, is executed using this
+ * stage's default asynchronous execution facility, with the
+ * corresponding result as argument to the supplied action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> acceptEitherAsync
+ (CompletionStage<? extends T> other,
+ Consumer<? super T> action);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, is executed using the
+ * supplied executor, with the corresponding result as argument to
+ * the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> acceptEitherAsync
+ (CompletionStage<? extends T> other,
+ Consumer<? super T> action,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, executes the given action.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> runAfterEither(CompletionStage<?> other,
+ Runnable action);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, executes the given action
+ * using this stage's default asynchronous execution facility.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> runAfterEitherAsync
+ (CompletionStage<?> other,
+ Runnable action);
+
+ /**
+ * Returns a new CompletionStage that, when either this or the
+ * other given stage complete normally, executes the given action
+ * using supplied executor.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param other the other CompletionStage
+ * @param action the action to perform before completing the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @return the new CompletionStage
+ */
+ public CompletionStage<Void> runAfterEitherAsync
+ (CompletionStage<?> other,
+ Runnable action,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed with this stage as the argument
+ * to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param fn the function returning a new CompletionStage
+ * @param <U> the type of the returned CompletionStage's result
+ * @return the CompletionStage
+ */
+ public <U> CompletionStage<U> thenCompose
+ (Function<? super T, ? extends CompletionStage<U>> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed using this stage's default asynchronous
+ * execution facility, with this stage as the argument to the
+ * supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param fn the function returning a new CompletionStage
+ * @param <U> the type of the returned CompletionStage's result
+ * @return the CompletionStage
+ */
+ public <U> CompletionStage<U> thenComposeAsync
+ (Function<? super T, ? extends CompletionStage<U>> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * normally, is executed using the supplied Executor, with this
+ * stage's result as the argument to the supplied function.
+ *
+ * See the {@link CompletionStage} documentation for rules
+ * covering exceptional completion.
+ *
+ * @param fn the function returning a new CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @param <U> the type of the returned CompletionStage's result
+ * @return the CompletionStage
+ */
+ public <U> CompletionStage<U> thenComposeAsync
+ (Function<? super T, ? extends CompletionStage<U>> fn,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * exceptionally, is executed with this stage's exception as the
+ * argument to the supplied function. Otherwise, if this stage
+ * completes normally, then the returned stage also completes
+ * normally with the same value.
+ *
+ * @param fn the function to use to compute the value of the
+ * returned CompletionStage if this CompletionStage completed
+ * exceptionally
+ * @return the new CompletionStage
+ */
+ public CompletionStage<T> exceptionally
+ (Function<Throwable, ? extends T> fn);
+
+ /**
+ * Returns a new CompletionStage with the same result or exception
+ * as this stage, and when this stage completes, executes the
+ * given action with the result (or {@code null} if none) and the
+ * exception (or {@code null} if none) of this stage.
+ *
+ * @param action the action to perform
+ * @return the new CompletionStage
+ */
+ public CompletionStage<T> whenComplete
+ (BiConsumer<? super T, ? super Throwable> action);
+
+ /**
+ * Returns a new CompletionStage with the same result or exception
+ * as this stage, and when this stage completes, executes the
+ * given action executes the given action using this stage's
+ * default asynchronous execution facility, with the result (or
+ * {@code null} if none) and the exception (or {@code null} if
+ * none) of this stage as arguments.
+ *
+ * @param action the action to perform
+ * @return the new CompletionStage
+ */
+ public CompletionStage<T> whenCompleteAsync
+ (BiConsumer<? super T, ? super Throwable> action);
+
+ /**
+ * Returns a new CompletionStage with the same result or exception
+ * as this stage, and when this stage completes, executes using
+ * the supplied Executor, the given action with the result (or
+ * {@code null} if none) and the exception (or {@code null} if
+ * none) of this stage as arguments.
+ *
+ * @param action the action to perform
+ * @param executor the executor to use for asynchronous execution
+ * @return the new CompletionStage
+ */
+ public CompletionStage<T> whenCompleteAsync
+ (BiConsumer<? super T, ? super Throwable> action,
+ Executor executor);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * either normally or exceptionally, is executed with this stage's
+ * result and exception as arguments to the supplied function.
+ * The given function is invoked with the result (or {@code null}
+ * if none) and the exception (or {@code null} if none) of this
+ * stage when complete as arguments.
+ *
+ * @param fn the function to use to compute the value of the
+ * returned CompletionStage
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> handle
+ (BiFunction<? super T, Throwable, ? extends U> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * either normally or exceptionally, is executed using this stage's
+ * default asynchronous execution facility, with this stage's
+ * result and exception as arguments to the supplied function.
+ * The given function is invoked with the result (or {@code null}
+ * if none) and the exception (or {@code null} if none) of this
+ * stage when complete as arguments.
+ *
+ * @param fn the function to use to compute the value of the
+ * returned CompletionStage
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> handleAsync
+ (BiFunction<? super T, Throwable, ? extends U> fn);
+
+ /**
+ * Returns a new CompletionStage that, when this stage completes
+ * either normally or exceptionally, is executed using the
+ * supplied executor, with this stage's result and exception as
+ * arguments to the supplied function. The given function is
+ * invoked with the result (or {@code null} if none) and the
+ * exception (or {@code null} if none) of this stage when complete
+ * as arguments.
+ *
+ * @param fn the function to use to compute the value of the
+ * returned CompletionStage
+ * @param executor the executor to use for asynchronous execution
+ * @param <U> the function's return type
+ * @return the new CompletionStage
+ */
+ public <U> CompletionStage<U> handleAsync
+ (BiFunction<? super T, Throwable, ? extends U> fn,
+ Executor executor);
+
+ /**
+ * Returns a {@link CompletableFuture} maintaining the same
+ * completion properties as this stage. If this stage is already a
+ * CompletableFuture, this method may return this stage itself.
+ * Otherwise, invocation of this method may be equivalent in
+ * effect to {@code thenApply(x -> x)}, but returning an instance
+ * of type {@code CompletableFuture}. A CompletionStage
+ * implementation that does not choose to interoperate with others
+ * may throw {@code UnsupportedOperationException}.
+ *
+ * @return the CompletableFuture
+ * @throws UnsupportedOperationException if this implementation
+ * does not interoperate with CompletableFuture
+ */
+ public CompletableFuture<T> toCompletableFuture();
+
+}
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -4716,6 +4716,7 @@
* Base class for bulk tasks. Repeats some fields and code from
* class Traverser, because we need to subclass CountedCompleter.
*/
+ @SuppressWarnings("serial")
abstract static class BulkTask<K,V,R> extends CountedCompleter<R> {
Node<K,V>[] tab; // same as Traverser
Node<K,V> next;
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentSkipListMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -34,6 +34,7 @@
*/
package java.util.concurrent;
+import java.io.Serializable;
import java.util.AbstractCollection;
import java.util.AbstractMap;
import java.util.AbstractSet;
@@ -44,11 +45,15 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.NavigableMap;
import java.util.NavigableSet;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.SortedMap;
+import java.util.SortedSet;
import java.util.Spliterator;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentNavigableMap;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.BiConsumer;
@@ -108,9 +113,7 @@
* @since 1.6
*/
public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
- implements ConcurrentNavigableMap<K,V>,
- Cloneable,
- java.io.Serializable {
+ implements ConcurrentNavigableMap<K,V>, Cloneable, Serializable {
/*
* This class implements a tree-like two-dimensionally linked skip
* list in which the index levels are represented in separate
@@ -1412,6 +1415,8 @@
/**
* Saves this map to a stream (that is, serializes it).
*
+ * @param s the stream
+ * @throws java.io.IOException if an I/O error occurs
* @serialData The key (Object) and value (Object) for each
* key-value mapping represented by the map, followed by
* {@code null}. The key-value mappings are emitted in key-order
@@ -1436,6 +1441,10 @@
/**
* Reconstitutes this map from a stream (that is, deserializes it).
+ * @param s the stream
+ * @throws ClassNotFoundException if the class of a serialized object
+ * could not be found
+ * @throws java.io.IOException if an I/O error occurs
*/
@SuppressWarnings("unchecked")
private void readObject(final java.io.ObjectInputStream s)
@@ -2548,8 +2557,7 @@
* @serial include
*/
static final class SubMap<K,V> extends AbstractMap<K,V>
- implements ConcurrentNavigableMap<K,V>, Cloneable,
- java.io.Serializable {
+ implements ConcurrentNavigableMap<K,V>, Cloneable, Serializable {
private static final long serialVersionUID = -7647078645895051609L;
/** Underlying map */
@@ -3180,6 +3188,7 @@
public long estimateSize() {
return Long.MAX_VALUE;
}
+
}
final class SubMapValueIterator extends SubMapIter<V> {
@@ -3434,7 +3443,8 @@
}
public int characteristics() {
- return Spliterator.CONCURRENT | Spliterator.NONNULL;
+ return Spliterator.CONCURRENT | Spliterator.ORDERED |
+ Spliterator.NONNULL;
}
}
@@ -3528,8 +3538,17 @@
}
public final Comparator<Map.Entry<K,V>> getComparator() {
- return comparator == null ? null :
- Map.Entry.comparingByKey(comparator);
+ // Adapt or create a key-based comparator
+ if (comparator != null) {
+ return Map.Entry.comparingByKey(comparator);
+ }
+ else {
+ return (Comparator<Map.Entry<K,V>> & Serializable) (e1, e2) -> {
+ @SuppressWarnings("unchecked")
+ Comparable<? super K> k1 = (Comparable<? super K>) e1.getKey();
+ return k1.compareTo(e2.getKey());
+ };
+ }
}
}
--- a/jdk/src/share/classes/java/util/concurrent/atomic/Striped64.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/concurrent/atomic/Striped64.java Mon Aug 12 09:29:06 2013 -0400
@@ -43,6 +43,7 @@
* for classes supporting dynamic striping on 64bit values. The class
* extends Number so that concrete subclasses must publicly do so.
*/
+@SuppressWarnings("serial")
abstract class Striped64 extends Number {
/*
* This class maintains a lazily-initialized table of atomically
--- a/jdk/src/share/classes/java/util/jar/JarVerifier.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/jar/JarVerifier.java Mon Aug 12 09:29:06 2013 -0400
@@ -139,13 +139,21 @@
return;
}
+ if (uname.equals(JarFile.MANIFEST_NAME)) {
+ return;
+ }
+
if (SignatureFileVerifier.isBlockOrSF(uname)) {
/* We parse only DSA, RSA or EC PKCS7 blocks. */
parsingBlockOrSF = true;
baos.reset();
mev.setEntry(null, je);
+ return;
}
- return;
+
+ // If a META-INF entry is not MF or block or SF, they should
+ // be normal entries. According to 2 above, no more block or
+ // SF will appear. Let's doneWithMeta.
}
}
--- a/jdk/src/share/classes/java/util/logging/XMLFormatter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/logging/XMLFormatter.java Mon Aug 12 09:29:06 2013 -0400
@@ -47,7 +47,7 @@
private LogManager manager = LogManager.getLogManager();
// Append a two digit number.
- private void a2(StringBuffer sb, int x) {
+ private void a2(StringBuilder sb, int x) {
if (x < 10) {
sb.append('0');
}
@@ -55,25 +55,26 @@
}
// Append the time and date in ISO 8601 format
- private void appendISO8601(StringBuffer sb, long millis) {
- Date date = new Date(millis);
- sb.append(date.getYear() + 1900);
+ private void appendISO8601(StringBuilder sb, long millis) {
+ GregorianCalendar cal = new GregorianCalendar();
+ cal.setTimeInMillis(millis);
+ sb.append(cal.get(Calendar.YEAR) + 1900);
sb.append('-');
- a2(sb, date.getMonth() + 1);
+ a2(sb, cal.get(Calendar.MONTH) + 1);
sb.append('-');
- a2(sb, date.getDate());
+ a2(sb, cal.get(Calendar.DAY_OF_MONTH));
sb.append('T');
- a2(sb, date.getHours());
+ a2(sb, cal.get(Calendar.HOUR_OF_DAY));
sb.append(':');
- a2(sb, date.getMinutes());
+ a2(sb, cal.get(Calendar.MINUTE));
sb.append(':');
- a2(sb, date.getSeconds());
+ a2(sb, cal.get(Calendar.SECOND));
}
- // Append to the given StringBuffer an escaped version of the
+ // Append to the given StringBuilder an escaped version of the
// given text string where XML special characters have been escaped.
// For a null string we append "<null>"
- private void escape(StringBuffer sb, String text) {
+ private void escape(StringBuilder sb, String text) {
if (text == null) {
text = "<null>";
}
@@ -102,7 +103,7 @@
* @return a formatted log record
*/
public String format(LogRecord record) {
- StringBuffer sb = new StringBuffer(500);
+ StringBuilder sb = new StringBuilder(500);
sb.append("<record>\n");
sb.append(" <date>");
@@ -224,7 +225,7 @@
* @return a valid XML string
*/
public String getHead(Handler h) {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
String encoding;
sb.append("<?xml version=\"1.0\"");
--- a/jdk/src/share/classes/java/util/stream/AbstractPipeline.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/AbstractPipeline.java Mon Aug 12 09:29:06 2013 -0400
@@ -75,11 +75,13 @@
* Backlink to the head of the pipeline chain (self if this is the source
* stage).
*/
+ @SuppressWarnings("rawtypes")
private final AbstractPipeline sourceStage;
/**
* The "upstream" pipeline, or null if this is the source stage.
*/
+ @SuppressWarnings("rawtypes")
private final AbstractPipeline previousStage;
/**
@@ -92,6 +94,7 @@
* The next stage in the pipeline, or null if this is the last stage.
* Effectively final at the point of linking to the next pipeline.
*/
+ @SuppressWarnings("rawtypes")
private AbstractPipeline nextStage;
/**
@@ -222,8 +225,8 @@
linkedOrConsumed = true;
return isParallel()
- ? (R) terminalOp.evaluateParallel(this, sourceSpliterator(terminalOp.getOpFlags()))
- : (R) terminalOp.evaluateSequential(this, sourceSpliterator(terminalOp.getOpFlags()));
+ ? terminalOp.evaluateParallel(this, sourceSpliterator(terminalOp.getOpFlags()))
+ : terminalOp.evaluateSequential(this, sourceSpliterator(terminalOp.getOpFlags()));
}
/**
@@ -232,6 +235,7 @@
* @param generator the array generator to be used to create array instances
* @return a flat array-backed Node that holds the collected output elements
*/
+ @SuppressWarnings("unchecked")
final Node<E_OUT> evaluateToArrayNode(IntFunction<E_OUT[]> generator) {
if (linkedOrConsumed)
throw new IllegalStateException("stream has already been operated upon");
@@ -256,6 +260,7 @@
* @throws IllegalStateException if this pipeline stage is not the source
* stage.
*/
+ @SuppressWarnings("unchecked")
final Spliterator<E_OUT> sourceStageSpliterator() {
if (this != sourceStage)
throw new IllegalStateException();
@@ -265,11 +270,13 @@
linkedOrConsumed = true;
if (sourceStage.sourceSpliterator != null) {
+ @SuppressWarnings("unchecked")
Spliterator<E_OUT> s = sourceStage.sourceSpliterator;
sourceStage.sourceSpliterator = null;
return s;
}
else if (sourceStage.sourceSupplier != null) {
+ @SuppressWarnings("unchecked")
Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSupplier.get();
sourceStage.sourceSupplier = null;
return s;
@@ -282,12 +289,14 @@
// BaseStream
@Override
+ @SuppressWarnings("unchecked")
public final S sequential() {
sourceStage.parallel = false;
return (S) this;
}
@Override
+ @SuppressWarnings("unchecked")
public final S parallel() {
sourceStage.parallel = true;
return (S) this;
@@ -295,6 +304,7 @@
// Primitive specialization use co-variant overrides, hence is not final
@Override
+ @SuppressWarnings("unchecked")
public Spliterator<E_OUT> spliterator() {
if (linkedOrConsumed)
throw new IllegalStateException("stream has already been operated upon");
@@ -302,12 +312,14 @@
if (this == sourceStage) {
if (sourceStage.sourceSpliterator != null) {
- Spliterator<E_OUT> s = sourceStage.sourceSpliterator;
+ @SuppressWarnings("unchecked")
+ Spliterator<E_OUT> s = (Spliterator<E_OUT>) sourceStage.sourceSpliterator;
sourceStage.sourceSpliterator = null;
return s;
}
else if (sourceStage.sourceSupplier != null) {
- Supplier<Spliterator<E_OUT>> s = sourceStage.sourceSupplier;
+ @SuppressWarnings("unchecked")
+ Supplier<Spliterator<E_OUT>> s = (Supplier<Spliterator<E_OUT>>) sourceStage.sourceSupplier;
sourceStage.sourceSupplier = null;
return lazySpliterator(s);
}
@@ -349,10 +361,11 @@
* @param terminalFlags Operation flags for the terminal operation
*/
private void parallelPrepare(int terminalFlags) {
+ @SuppressWarnings("rawtypes")
AbstractPipeline backPropagationHead = sourceStage;
if (sourceStage.sourceAnyStateful) {
int depth = 1;
- for (AbstractPipeline u = sourceStage, p = sourceStage.nextStage;
+ for ( @SuppressWarnings("rawtypes") AbstractPipeline u = sourceStage, p = sourceStage.nextStage;
p != null;
u = p, p = p.nextStage) {
int thisOpFlags = p.sourceOrOpFlags;
@@ -383,7 +396,7 @@
// Apply the upstream terminal flags
if (terminalFlags != 0) {
int upstreamTerminalFlags = terminalFlags & StreamOpFlag.UPSTREAM_TERMINAL_OP_MASK;
- for (AbstractPipeline p = backPropagationHead; p.nextStage != null; p = p.nextStage) {
+ for ( @SuppressWarnings("rawtypes") AbstractPipeline p = backPropagationHead; p.nextStage != null; p = p.nextStage) {
p.combinedFlags = StreamOpFlag.combineOpFlags(upstreamTerminalFlags, p.combinedFlags);
}
@@ -398,6 +411,7 @@
* of all computations up to and including the most recent stateful
* operation.
*/
+ @SuppressWarnings("unchecked")
private Spliterator<?> sourceSpliterator(int terminalFlags) {
// Get the source spliterator of the pipeline
Spliterator<?> spliterator = null;
@@ -421,7 +435,7 @@
// Adapt the source spliterator, evaluating each stateful op
// in the pipeline up to and including this pipeline stage
- for (AbstractPipeline u = sourceStage, p = sourceStage.nextStage, e = this;
+ for ( @SuppressWarnings("rawtypes") AbstractPipeline u = sourceStage, p = sourceStage.nextStage, e = this;
u != e;
u = p, p = p.nextStage) {
@@ -442,6 +456,7 @@
@Override
final StreamShape getSourceShape() {
+ @SuppressWarnings("rawtypes")
AbstractPipeline p = AbstractPipeline.this;
while (p.depth > 0) {
p = p.previousStage;
@@ -475,7 +490,9 @@
}
@Override
+ @SuppressWarnings("unchecked")
final <P_IN> void copyIntoWithCancel(Sink<P_IN> wrappedSink, Spliterator<P_IN> spliterator) {
+ @SuppressWarnings({"rawtypes","unchecked"})
AbstractPipeline p = AbstractPipeline.this;
while (p.depth > 0) {
p = p.previousStage;
@@ -495,16 +512,18 @@
}
@Override
+ @SuppressWarnings("unchecked")
final <P_IN> Sink<P_IN> wrapSink(Sink<E_OUT> sink) {
Objects.requireNonNull(sink);
- for (AbstractPipeline p=AbstractPipeline.this; p.depth > 0; p=p.previousStage) {
+ for ( @SuppressWarnings("rawtypes") AbstractPipeline p=AbstractPipeline.this; p.depth > 0; p=p.previousStage) {
sink = p.opWrapSink(p.previousStage.combinedFlags, sink);
}
return (Sink<P_IN>) sink;
}
@Override
+ @SuppressWarnings("unchecked")
final <P_IN> Spliterator<E_OUT> wrapSpliterator(Spliterator<P_IN> sourceSpliterator) {
if (depth == 0) {
return (Spliterator<E_OUT>) sourceSpliterator;
@@ -591,16 +610,19 @@
/**
* Make a node builder compatible with this stream shape.
*
- * @param exactSizeIfKnown if {@literal >=0}, then a node builder will be created that
- * has a fixed capacity of at most sizeIfKnown elements. If {@literal < 0},
- * then the node builder has an unfixed capacity. A fixed capacity node
- * builder will throw exceptions if an element is added after builder has
- * reached capacity, or is built before the builder has reached capacity.
+ * @param exactSizeIfKnown if {@literal >=0}, then a node builder will be
+ * created that has a fixed capacity of at most sizeIfKnown elements. If
+ * {@literal < 0}, then the node builder has an unfixed capacity. A fixed
+ * capacity node builder will throw exceptions if an element is added after
+ * builder has reached capacity, or is built before the builder has reached
+ * capacity.
+ *
* @param generator the array generator to be used to create instances of a
* T[] array. For implementations supporting primitive nodes, this parameter
* may be ignored.
* @return a node builder
*/
+ @Override
abstract Node.Builder<E_OUT> makeNodeBuilder(long exactSizeIfKnown,
IntFunction<E_OUT[]> generator);
@@ -679,6 +701,7 @@
* @param spliterator the source {@code Spliterator}
* @return a {@code Spliterator} describing the result of the evaluation
*/
+ @SuppressWarnings("unchecked")
<P_IN> Spliterator<E_OUT> opEvaluateParallelLazy(PipelineHelper<E_OUT> helper,
Spliterator<P_IN> spliterator) {
return opEvaluateParallel(helper, spliterator, i -> (E_OUT[]) new Object[i]).spliterator();
--- a/jdk/src/share/classes/java/util/stream/AbstractShortCircuitTask.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/AbstractShortCircuitTask.java Mon Aug 12 09:29:06 2013 -0400
@@ -39,6 +39,7 @@
* @param <K> type of child and sibling tasks
* @since 1.8
*/
+@SuppressWarnings("serial")
abstract class AbstractShortCircuitTask<P_IN, P_OUT, R,
K extends AbstractShortCircuitTask<P_IN, P_OUT, R, K>>
extends AbstractTask<P_IN, P_OUT, R, K> {
@@ -219,7 +220,8 @@
*/
protected void cancelLaterNodes() {
// Go up the tree, cancel right siblings of this node and all parents
- for (K parent = getParent(), node = (K) this; parent != null;
+ for (@SuppressWarnings("unchecked") K parent = getParent(), node = (K) this;
+ parent != null;
node = parent, parent = parent.getParent()) {
// If node is a left child of parent, then has a right sibling
if (parent.leftChild == node) {
--- a/jdk/src/share/classes/java/util/stream/AbstractTask.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/AbstractTask.java Mon Aug 12 09:29:06 2013 -0400
@@ -73,6 +73,9 @@
* }
* }</pre>
*
+ * <p>Serialization is not supported as there is no intention to serialize
+ * tasks managed by stream ops.
+ *
* @param <P_IN> Type of elements input to the pipeline
* @param <P_OUT> Type of elements output from the pipeline
* @param <R> Type of intermediate result, which may be different from operation
@@ -80,6 +83,7 @@
* @param <K> Type of parent, child and sibling tasks
* @since 1.8
*/
+@SuppressWarnings("serial")
abstract class AbstractTask<P_IN, P_OUT, R,
K extends AbstractTask<P_IN, P_OUT, R, K>>
extends CountedCompleter<R> {
--- a/jdk/src/share/classes/java/util/stream/Collector.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/Collector.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,40 +25,45 @@
package java.util.stream;
import java.util.Collections;
+import java.util.EnumSet;
import java.util.Set;
-import java.util.function.BiFunction;
+import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
+import java.util.function.Function;
import java.util.function.Supplier;
/**
* A <a href="package-summary.html#Reduction">reduction operation</a> that
- * supports folding input elements into a cumulative result. The result may be
- * a value or may be a mutable result container. Examples of operations
- * accumulating results into a mutable result container include: accumulating
- * input elements into a {@code Collection}; concatenating strings into a
- * {@code StringBuilder}; computing summary information about elements such as
- * sum, min, max, or average; computing "pivot table" summaries such as "maximum
- * valued transaction by seller", etc. Reduction operations can be performed
- * either sequentially or in parallel.
+ * folds input elements into a mutable result container, optionally transforming
+ * the accumulated result into a final representation after all input elements
+ * have been processed.
+ *
+ * <p>Examples of mutable reduction operations include:
+ * accumulating elements into a {@code Collection}; concatenating
+ * strings using a {@code StringBuilder}; computing summary information about
+ * elements such as sum, min, max, or average; computing "pivot table" summaries
+ * such as "maximum valued transaction by seller", etc. Reduction operations
+ * can be performed either sequentially or in parallel.
*
* <p>The following are examples of using the predefined {@code Collector}
* implementations in {@link Collectors} with the {@code Stream} API to perform
* mutable reduction tasks:
* <pre>{@code
- * // Accumulate elements into a List
- * List<String> list = stream.collect(Collectors.toList());
+ * // Accumulate names into a List
+ * List<String> list = people.stream().map(Person::getName).collect(Collectors.toList());
*
- * // Accumulate elements into a TreeSet
- * Set<String> list = stream.collect(Collectors.toCollection(TreeSet::new));
+ * // Accumulate names into a TreeSet
+ * Set<String> list = people.stream().map(Person::getName).collect(Collectors.toCollection(TreeSet::new));
*
* // Convert elements to strings and concatenate them, separated by commas
- * String joined = stream.map(Object::toString)
- * .collect(Collectors.toStringJoiner(", "))
- * .toString();
+ * String joined = things.stream()
+ * .map(Object::toString)
+ * .collect(Collectors.joining(", "));
*
* // Find highest-paid employee
* Employee highestPaid = employees.stream()
- * .collect(Collectors.maxBy(Comparators.comparing(Employee::getSalary)));
+ * .collect(Collectors.maxBy(Comparators.comparing(Employee::getSalary)))
+ * .get();
*
* // Group employees by department
* Map<Department, List<Employee>> byDept
@@ -66,7 +71,7 @@
* .collect(Collectors.groupingBy(Employee::getDepartment));
*
* // Find highest-paid employee by department
- * Map<Department, Employee> highestPaidByDept
+ * Map<Department, Optional<Employee>> highestPaidByDept
* = employees.stream()
* .collect(Collectors.groupingBy(Employee::getDepartment,
* Collectors.maxBy(Comparators.comparing(Employee::getSalary))));
@@ -74,43 +79,42 @@
* // Partition students into passing and failing
* Map<Boolean, List<Student>> passingFailing =
* students.stream()
- * .collect(Collectors.partitioningBy(s -> s.getGrade() >= PASS_THRESHOLD);
+ * .collect(Collectors.partitioningBy(s -> s.getGrade() >= PASS_THRESHOLD));
*
* }</pre>
*
- * <p>A {@code Collector} is specified by three functions that work together to
- * manage a result or result container. They are: creation of an initial
- * result, incorporating a new data element into a result, and combining two
- * results into one. The last function -- combining two results into one -- is
- * used during parallel operations, where subsets of the input are accumulated
- * in parallel, and then the subresults merged into a combined result. The
- * result may be a mutable container or a value. If the result is mutable, the
- * accumulation and combination functions may either mutate their left argument
- * and return that (such as adding elements to a collection), or return a new
- * result, in which case it should not perform any mutation.
+ * <p>A {@code Collector} is specified by four functions that work together to
+ * accumulate entries into a mutable result container, and optionally perform
+ * a final transform on the result. They are: creation of a new result container,
+ * incorporating a new data element into a result container, combining two
+ * result containers into one, and performing a final transform on the container.
+ * The combiner function is used during parallel operations, where
+ * subsets of the input are accumulated into separate result
+ * containers, and then the subresults merged into a combined result. The
+ * combiner function may merge one set of subresults into the other and return
+ * that, or it may return a new object to describe the combined results.
*
- * <p>Collectors also have a set of characteristics, including
- * {@link Characteristics#CONCURRENT} and
- * {@link Characteristics#STRICTLY_MUTATIVE}. These characteristics provide
+ * <p>Collectors also have a set of characteristics, such as
+ * {@link Characteristics#CONCURRENT}. These characteristics provide
* hints that can be used by a reduction implementation to provide better
* performance.
*
* <p>Libraries that implement reduction based on {@code Collector}, such as
* {@link Stream#collect(Collector)}, must adhere to the following constraints:
* <ul>
- * <li>The first argument passed to the accumulator function, and both
- * arguments passed to the combiner function, must be the result of a
- * previous invocation of {@link #resultSupplier()}, {@link #accumulator()},
- * or {@link #combiner()}.</li>
+ * <li>The first argument passed to the accumulator function, both
+ * arguments passed to the combiner function, and the argument passed to the
+ * finisher function must be the result of a previous invocation of the
+ * result supplier, accumulator, or combiner functions.</li>
* <li>The implementation should not do anything with the result of any of
* the result supplier, accumulator, or combiner functions other than to
- * pass them again to the accumulator or combiner functions, or return them
- * to the caller of the reduction operation.</li>
- * <li>If a result is passed to the accumulator or combiner function, and
- * the same object is not returned from that function, it is never used
- * again.</li>
- * <li>Once a result is passed to the combiner function, it is never passed
- * to the accumulator function again.</li>
+ * pass them again to the accumulator, combiner, or finisher functions,
+ * or return them to the caller of the reduction operation.</li>
+ * <li>If a result is passed to the combiner or finisher
+ * function, and the same object is not returned from that function, it is
+ * never used again.</li>
+ * <li>Once a result is passed to the combiner or finisher function, it
+ * is never passed to the accumulator function again.</li>
* <li>For non-concurrent collectors, any result returned from the result
* supplier, accumulator, or combiner functions must be serially
* thread-confined. This enables collection to occur in parallel without
@@ -132,11 +136,10 @@
* Performing a reduction operation with a {@code Collector} should produce a
* result equivalent to:
* <pre>{@code
- * BiFunction<R,T,R> accumulator = collector.accumulator();
- * R result = collector.resultSupplier().get();
+ * R container = collector.supplier().get();
* for (T t : data)
- * result = accumulator.apply(result, t);
- * return result;
+ * collector.accumulator().accept(container, t);
+ * return collector.finisher().apply(container);
* }</pre>
*
* <p>However, the library is free to partition the input, perform the reduction
@@ -149,7 +152,7 @@
* is accumulating elements into a {@code TreeSet}. In this case, the {@code
* resultSupplier()} function is {@code () -> new Treeset<T>()}, the
* {@code accumulator} function is
- * {@code (set, element) -> { set.add(element); return set; }}, and the combiner
+ * {@code (set, element) -> set.add(element) }, and the combiner
* function is {@code (left, right) -> { left.addAll(right); return left; }}.
* (This behavior is implemented by
* {@code Collectors.toCollection(TreeSet::new)}).
@@ -159,51 +162,49 @@
* @see Stream#collect(Collector)
* @see Collectors
*
- * @param <T> the type of input element to the collect operation
- * @param <R> the result type of the collect operation
+ * @param <T> the type of input elements to the reduction operation
+ * @param <A> the mutable accumulation type of the reduction operation (often
+ * hidden as an implementation detail)
+ * @param <R> the result type of the reduction operation
* @since 1.8
*/
-public interface Collector<T, R> {
+public interface Collector<T, A, R> {
/**
- * A function that creates and returns a new result that represents
- * "no values". If the accumulator or combiner functions may mutate their
- * arguments, this must be a new, empty result container.
+ * A function that creates and returns a new mutable result container.
*
- * @return a function which, when invoked, returns a result representing
- * "no values"
+ * @return a function which returns a new, mutable result container
*/
- Supplier<R> resultSupplier();
+ Supplier<A> supplier();
/**
- * A function that folds a new value into a cumulative result. The result
- * may be a mutable result container or a value. The accumulator function
- * may modify a mutable container and return it, or create a new result and
- * return that, but if it returns a new result object, it must not modify
- * any of its arguments.
+ * A function that folds a new value into a mutable result container.
*
- * <p>If the collector has the {@link Characteristics#STRICTLY_MUTATIVE}
- * characteristic, then the accumulator function <em>must</em> always return
- * its first argument, after possibly mutating its state.
- *
- * @return a function which folds a new value into a cumulative result
+ * @return a function which folds a new value into a mutable result container
*/
- BiFunction<R, T, R> accumulator();
+ BiConsumer<A, T> accumulator();
/**
* A function that accepts two partial results and merges them. The
* combiner function may fold state from one argument into the other and
- * return that, or may return a new result object, but if it returns
- * a new result object, it must not modify the state of either of its
- * arguments.
- *
- * <p>If the collector has the {@link Characteristics#STRICTLY_MUTATIVE}
- * characteristic, then the combiner function <em>must</em> always return
- * its first argument, after possibly mutating its state.
+ * return that, or may return a new result object.
*
* @return a function which combines two partial results into a cumulative
* result
*/
- BinaryOperator<R> combiner();
+ BinaryOperator<A> combiner();
+
+ /**
+ * Perform the final transformation from the intermediate accumulation type
+ * {@code A} to the final result representation {@code R}.
+ *
+ * <p>If the characteristic {@code IDENTITY_TRANSFORM} is
+ * set, this function may be presumed to be an identity transform with an
+ * unchecked cast from {@code A} to {@code R}.
+ *
+ * @return a function which transforms the intermediate result to the final
+ * result
+ */
+ Function<A, R> finisher();
/**
* Returns a {@code Set} of {@code Collector.Characteristics} indicating
@@ -214,6 +215,62 @@
Set<Characteristics> characteristics();
/**
+ * Returns a new {@code Collector} described by the given {@code supplier},
+ * {@code accumulator}, and {@code combiner} functions. The resulting
+ * {@code Collector} has the {@code Collector.Characteristics.IDENTITY_FINISH}
+ * characteristic.
+ *
+ * @param supplier The supplier function for the new collector
+ * @param accumulator The accumulator function for the new collector
+ * @param combiner The combiner function for the new collector
+ * @param characteristics The collector characteristics for the new
+ * collector
+ * @param <T> The type of input elements for the new collector
+ * @param <R> The type of intermediate accumulation result, and final result,
+ * for the new collector
+ * @return the new {@code Collector}
+ */
+ public static<T, R> Collector<T, R, R> of(Supplier<R> supplier,
+ BiConsumer<R, T> accumulator,
+ BinaryOperator<R> combiner,
+ Characteristics... characteristics) {
+ Set<Characteristics> cs = (characteristics.length == 0)
+ ? Collectors.CH_ID
+ : Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.IDENTITY_FINISH,
+ characteristics));
+ return new Collectors.CollectorImpl<>(supplier, accumulator, combiner, cs);
+ }
+
+ /**
+ * Returns a new {@code Collector} described by the given {@code supplier},
+ * {@code accumulator}, {@code combiner}, and {@code finisher} functions.
+ *
+ * @param supplier The supplier function for the new collector
+ * @param accumulator The accumulator function for the new collector
+ * @param combiner The combiner function for the new collector
+ * @param finisher The finisher function for the new collector
+ * @param characteristics The collector characteristics for the new
+ * collector
+ * @param <T> The type of input elements for the new collector
+ * @param <A> The intermediate accumulation type of the new collector
+ * @param <R> The final result type of the new collector
+ * @return the new {@code Collector}
+ */
+ public static<T, A, R> Collector<T, A, R> of(Supplier<A> supplier,
+ BiConsumer<A, T> accumulator,
+ BinaryOperator<A> combiner,
+ Function<A, R> finisher,
+ Characteristics... characteristics) {
+ Set<Characteristics> cs = Collectors.CH_NOID;
+ if (characteristics.length > 0) {
+ cs = EnumSet.noneOf(Characteristics.class);
+ Collections.addAll(cs, characteristics);
+ cs = Collections.unmodifiableSet(cs);
+ }
+ return new Collectors.CollectorImpl<>(supplier, accumulator, combiner, finisher, cs);
+ }
+
+ /**
* Characteristics indicating properties of a {@code Collector}, which can
* be used to optimize reduction implementations.
*/
@@ -222,8 +279,7 @@
* Indicates that this collector is <em>concurrent</em>, meaning that
* the result container can support the accumulator function being
* called concurrently with the same result container from multiple
- * threads. Concurrent collectors must also always have the
- * {@code STRICTLY_MUTATIVE} characteristic.
+ * threads.
*
* <p>If a {@code CONCURRENT} collector is not also {@code UNORDERED},
* then it should only be evaluated concurrently if applied to an
@@ -238,12 +294,10 @@
UNORDERED,
/**
- * Indicates that this collector operates by strict mutation of its
- * result container. This means that the {@link #accumulator()} and
- * {@link #combiner()} functions will always modify the state of and
- * return their first argument, rather than returning a different result
- * container.
+ * Indicates that the finisher function is the identity function and
+ * can be elided. If set, it must be the case that an unchecked cast
+ * from A to R will succeed.
*/
- STRICTLY_MUTATIVE
+ IDENTITY_FINISH
}
}
--- a/jdk/src/share/classes/java/util/stream/Collectors.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/Collectors.java Mon Aug 12 09:29:06 2013 -0400
@@ -27,6 +27,7 @@
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
@@ -39,14 +40,16 @@
import java.util.List;
import java.util.LongSummaryStatistics;
import java.util.Map;
-import java.util.NoSuchElementException;
import java.util.Objects;
+import java.util.Optional;
import java.util.Set;
import java.util.StringJoiner;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
+import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.BinaryOperator;
+import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
@@ -64,20 +67,21 @@
* mutable reduction tasks:
*
* <pre>{@code
- * // Accumulate elements into a List
- * List<Person> list = people.collect(Collectors.toList());
+ * // Accumulate names into a List
+ * List<String> list = people.stream().map(Person::getName).collect(Collectors.toList());
*
- * // Accumulate elements into a TreeSet
- * List<Person> list = people.collect(Collectors.toCollection(TreeSet::new));
+ * // Accumulate names into a TreeSet
+ * Set<String> list = people.stream().map(Person::getName).collect(Collectors.toCollection(TreeSet::new));
*
* // Convert elements to strings and concatenate them, separated by commas
- * String joined = stream.map(Object::toString)
- * .collect(Collectors.toStringJoiner(", "))
- * .toString();
+ * String joined = things.stream()
+ * .map(Object::toString)
+ * .collect(Collectors.joining(", "));
*
* // Find highest-paid employee
* Employee highestPaid = employees.stream()
- * .collect(Collectors.maxBy(Comparator.comparing(Employee::getSalary)));
+ * .collect(Collectors.maxBy(Comparator.comparing(Employee::getSalary)))
+ * .get();
*
* // Group employees by department
* Map<Department, List<Employee>> byDept
@@ -85,7 +89,7 @@
* .collect(Collectors.groupingBy(Employee::getDepartment));
*
* // Find highest-paid employee by department
- * Map<Department, Employee> highestPaidByDept
+ * Map<Department, Optional<Employee>> highestPaidByDept
* = employees.stream()
* .collect(Collectors.groupingBy(Employee::getDepartment,
* Collectors.maxBy(Comparator.comparing(Employee::getSalary))));
@@ -93,7 +97,7 @@
* // Partition students into passing and failing
* Map<Boolean, List<Student>> passingFailing =
* students.stream()
- * .collect(Collectors.partitioningBy(s -> s.getGrade() >= PASS_THRESHOLD);
+ * .collect(Collectors.partitioningBy(s -> s.getGrade() >= PASS_THRESHOLD));
*
* }</pre>
*
@@ -103,15 +107,19 @@
*/
public final class Collectors {
- private static final Set<Collector.Characteristics> CH_CONCURRENT
+ static final Set<Collector.Characteristics> CH_CONCURRENT_ID
= Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.CONCURRENT,
- Collector.Characteristics.STRICTLY_MUTATIVE,
+ Collector.Characteristics.UNORDERED,
+ Collector.Characteristics.IDENTITY_FINISH));
+ static final Set<Collector.Characteristics> CH_CONCURRENT_NOID
+ = Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.CONCURRENT,
Collector.Characteristics.UNORDERED));
- private static final Set<Collector.Characteristics> CH_STRICT
- = Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.STRICTLY_MUTATIVE));
- private static final Set<Collector.Characteristics> CH_STRICT_UNORDERED
- = Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.STRICTLY_MUTATIVE,
- Collector.Characteristics.UNORDERED));
+ static final Set<Collector.Characteristics> CH_ID
+ = Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.IDENTITY_FINISH));
+ static final Set<Collector.Characteristics> CH_UNORDERED_ID
+ = Collections.unmodifiableSet(EnumSet.of(Collector.Characteristics.UNORDERED,
+ Collector.Characteristics.IDENTITY_FINISH));
+ static final Set<Collector.Characteristics> CH_NOID = Collections.emptySet();
private Collectors() { }
@@ -124,88 +132,64 @@
*
* @param <T> the type of input arguments to the merge function
* @return a merge function which always throw {@code IllegalStateException}
- *
- * @see #firstWinsMerger()
- * @see #lastWinsMerger()
*/
- public static <T> BinaryOperator<T> throwingMerger() {
+ private static <T> BinaryOperator<T> throwingMerger() {
return (u,v) -> { throw new IllegalStateException(String.format("Duplicate key %s", u)); };
}
/**
- * Returns a merge function, suitable for use in
- * {@link Map#merge(Object, Object, BiFunction) Map.merge()} or
- * {@link #toMap(Function, Function, BinaryOperator) toMap()},
- * which implements a "first wins" policy.
- *
- * @param <T> the type of input arguments to the merge function
- * @return a merge function which always returns its first argument
- * @see #lastWinsMerger()
- * @see #throwingMerger()
- */
- public static <T> BinaryOperator<T> firstWinsMerger() {
- return (u,v) -> u;
- }
-
- /**
- * Returns a merge function, suitable for use in
- * {@link Map#merge(Object, Object, BiFunction) Map.merge()} or
- * {@link #toMap(Function, Function, BinaryOperator) toMap()},
- * which implements a "last wins" policy.
- *
- * @param <T> the type of input arguments to the merge function
- * @return a merge function which always returns its second argument
- * @see #firstWinsMerger()
- * @see #throwingMerger()
- */
- public static <T> BinaryOperator<T> lastWinsMerger() {
- return (u,v) -> v;
- }
-
- /**
* Simple implementation class for {@code Collector}.
*
* @param <T> the type of elements to be collected
* @param <R> the type of the result
*/
- private static final class CollectorImpl<T, R> implements Collector<T,R> {
- private final Supplier<R> resultSupplier;
- private final BiFunction<R, T, R> accumulator;
- private final BinaryOperator<R> combiner;
+ static class CollectorImpl<T, A, R> implements Collector<T, A, R> {
+ private final Supplier<A> supplier;
+ private final BiConsumer<A, T> accumulator;
+ private final BinaryOperator<A> combiner;
+ private final Function<A, R> finisher;
private final Set<Characteristics> characteristics;
- CollectorImpl(Supplier<R> resultSupplier,
- BiFunction<R, T, R> accumulator,
- BinaryOperator<R> combiner,
+ CollectorImpl(Supplier<A> supplier,
+ BiConsumer<A, T> accumulator,
+ BinaryOperator<A> combiner,
+ Function<A,R> finisher,
Set<Characteristics> characteristics) {
- this.resultSupplier = resultSupplier;
+ this.supplier = supplier;
this.accumulator = accumulator;
this.combiner = combiner;
+ this.finisher = finisher;
this.characteristics = characteristics;
}
- CollectorImpl(Supplier<R> resultSupplier,
- BiFunction<R, T, R> accumulator,
- BinaryOperator<R> combiner) {
- this(resultSupplier, accumulator, combiner, Collections.emptySet());
+ CollectorImpl(Supplier<A> supplier,
+ BiConsumer<A, T> accumulator,
+ BinaryOperator<A> combiner,
+ Set<Characteristics> characteristics) {
+ this(supplier, accumulator, combiner, i -> (R) i, characteristics);
}
@Override
- public BiFunction<R, T, R> accumulator() {
+ public BiConsumer<A, T> accumulator() {
return accumulator;
}
@Override
- public Supplier<R> resultSupplier() {
- return resultSupplier;
+ public Supplier<A> supplier() {
+ return supplier;
}
@Override
- public BinaryOperator<R> combiner() {
+ public BinaryOperator<A> combiner() {
return combiner;
}
@Override
+ public Function<A, R> finisher() {
+ return finisher;
+ }
+
+ @Override
public Set<Characteristics> characteristics() {
return characteristics;
}
@@ -224,11 +208,10 @@
* {@code Collection}, in encounter order
*/
public static <T, C extends Collection<T>>
- Collector<T, C> toCollection(Supplier<C> collectionFactory) {
- return new CollectorImpl<>(collectionFactory,
- (r, t) -> { r.add(t); return r; },
+ Collector<T, ?, C> toCollection(Supplier<C> collectionFactory) {
+ return new CollectorImpl<>(collectionFactory, Collection::add,
(r1, r2) -> { r1.addAll(r2); return r1; },
- CH_STRICT);
+ CH_ID);
}
/**
@@ -241,36 +224,10 @@
* {@code List}, in encounter order
*/
public static <T>
- Collector<T, List<T>> toList() {
- BiFunction<List<T>, T, List<T>> accumulator = (list, t) -> {
- switch (list.size()) {
- case 0:
- return Collections.singletonList(t);
- case 1:
- List<T> newList = new ArrayList<>();
- newList.add(list.get(0));
- newList.add(t);
- return newList;
- default:
- list.add(t);
- return list;
- }
- };
- BinaryOperator<List<T>> combiner = (left, right) -> {
- switch (left.size()) {
- case 0:
- return right;
- case 1:
- List<T> newList = new ArrayList<>(left.size() + right.size());
- newList.addAll(left);
- newList.addAll(right);
- return newList;
- default:
- left.addAll(right);
- return left;
- }
- };
- return new CollectorImpl<>(Collections::emptyList, accumulator, combiner);
+ Collector<T, ?, List<T>> toList() {
+ return new CollectorImpl<>((Supplier<List<T>>) ArrayList::new, List::add,
+ (left, right) -> { left.addAll(right); return left; },
+ CH_ID);
}
/**
@@ -286,44 +243,58 @@
* {@code Set}
*/
public static <T>
- Collector<T, Set<T>> toSet() {
- return new CollectorImpl<>((Supplier<Set<T>>) HashSet::new,
- (r, t) -> { r.add(t); return r; },
- (r1, r2) -> { r1.addAll(r2); return r1; },
- CH_STRICT_UNORDERED);
+ Collector<T, ?, Set<T>> toSet() {
+ return new CollectorImpl<>((Supplier<Set<T>>) HashSet::new, Set::add,
+ (left, right) -> { left.addAll(right); return left; },
+ CH_UNORDERED_ID);
}
/**
* Returns a {@code Collector} that concatenates the input elements into a
- * new {@link StringBuilder}.
+ * {@code String}, in encounter order.
*
- * @return a {@code Collector} which collects String elements into a
- * {@code StringBuilder}, in encounter order
+ * @return a {@code Collector} that concatenates the input elements into a
+ * {@code String}, in encounter order
*/
- public static Collector<String, StringBuilder> toStringBuilder() {
- return new CollectorImpl<>(StringBuilder::new,
- (r, t) -> { r.append(t); return r; },
- (r1, r2) -> { r1.append(r2); return r1; },
- CH_STRICT);
+ public static Collector<CharSequence, ?, String> joining() {
+ return new CollectorImpl<CharSequence, StringBuilder, String>(
+ StringBuilder::new, StringBuilder::append,
+ (r1, r2) -> { r1.append(r2); return r1; },
+ StringBuilder::toString, CH_NOID);
}
/**
- * Returns a {@code Collector} that concatenates the input elements into a
- * new {@link StringJoiner}, using the specified delimiter.
+ * Returns a {@code Collector} that concatenates the input elements,
+ * separated by the specified delimiter, in encounter order.
*
* @param delimiter the delimiter to be used between each element
- * @return A {@code Collector} which collects String elements into a
- * {@code StringJoiner}, in encounter order
+ * @return A {@code Collector} which concatenates CharSequence elements,
+ * separated by the specified delimiter, in encounter order
*/
- public static Collector<CharSequence, StringJoiner> toStringJoiner(CharSequence delimiter) {
- BinaryOperator<StringJoiner> merger = (sj, other) -> {
- if (other.length() > 0)
- sj.add(other.toString());
- return sj;
- };
- return new CollectorImpl<>(() -> new StringJoiner(delimiter),
- (r, t) -> { r.add(t); return r; },
- merger, CH_STRICT);
+ public static Collector<CharSequence, ?, String> joining(CharSequence delimiter) {
+ return joining(delimiter, "", "");
+ }
+
+ /**
+ * Returns a {@code Collector} that concatenates the input elements,
+ * separated by the specified delimiter, with the specified prefix and
+ * suffix, in encounter order.
+ *
+ * @param delimiter the delimiter to be used between each element
+ * @param prefix the sequence of characters to be used at the beginning
+ * of the joined result
+ * @param suffix the sequence of characters to be used at the end
+ * of the joined result
+ * @return A {@code Collector} which concatenates CharSequence elements,
+ * separated by the specified delimiter, in encounter order
+ */
+ public static Collector<CharSequence, ?, String> joining(CharSequence delimiter,
+ CharSequence prefix,
+ CharSequence suffix) {
+ return new CollectorImpl<>(
+ () -> new StringJoiner(delimiter, prefix, suffix),
+ StringJoiner::add, StringJoiner::merge,
+ StringJoiner::toString, CH_NOID);
}
/**
@@ -348,12 +319,13 @@
}
/**
- * Adapts a {@code Collector<U,R>} to a {@code Collector<T,R>} by applying
- * a mapping function to each input element before accumulation.
+ * Adapts a {@code Collector} accepting elements of type {@code U} to one
+ * accepting elements of type {@code T} by applying a mapping function to
+ * each input element before accumulation.
*
* @apiNote
* The {@code mapping()} collectors are most useful when used in a
- * multi-level reduction, downstream of {@code groupingBy} or
+ * multi-level reduction, such as downstream of a {@code groupingBy} or
* {@code partitioningBy}. For example, given a stream of
* {@code Person}, to accumulate the set of last names in each city:
* <pre>{@code
@@ -364,23 +336,27 @@
*
* @param <T> the type of the input elements
* @param <U> type of elements accepted by downstream collector
+ * @param <A> intermediate accumulation type of the downstream collector
* @param <R> result type of collector
* @param mapper a function to be applied to the input elements
* @param downstream a collector which will accept mapped values
* @return a collector which applies the mapping function to the input
* elements and provides the mapped results to the downstream collector
*/
- public static <T, U, R> Collector<T, R>
- mapping(Function<? super T, ? extends U> mapper, Collector<? super U, R> downstream) {
- BiFunction<R, ? super U, R> downstreamAccumulator = downstream.accumulator();
- return new CollectorImpl<>(downstream.resultSupplier(),
- (r, t) -> downstreamAccumulator.apply(r, mapper.apply(t)),
- downstream.combiner(), downstream.characteristics());
+ public static <T, U, A, R>
+ Collector<T, ?, R> mapping(Function<? super T, ? extends U> mapper,
+ Collector<? super U, A, R> downstream) {
+ BiConsumer<A, ? super U> downstreamAccumulator = downstream.accumulator();
+ return new CollectorImpl<>(downstream.supplier(),
+ (r, t) -> downstreamAccumulator.accept(r, mapper.apply(t)),
+ downstream.combiner(), downstream.finisher(),
+ downstream.characteristics());
}
/**
- * Returns a {@code Collector<T, Long>} that counts the number of input
- * elements.
+ * Returns a {@code Collector} accepting elements of type {@code T} that
+ * counts the number of input elements. If no elements are present, the
+ * result is 0.
*
* @implSpec
* This produces a result equivalent to:
@@ -391,14 +367,14 @@
* @param <T> the type of the input elements
* @return a {@code Collector} that counts the input elements
*/
- public static <T> Collector<T, Long>
+ public static <T> Collector<T, ?, Long>
counting() {
return reducing(0L, e -> 1L, Long::sum);
}
/**
- * Returns a {@code Collector<T, T>} that produces the minimal element
- * according to a given {@code Comparator}.
+ * Returns a {@code Collector} that produces the minimal element according
+ * to a given {@code Comparator}, described as an {@code Optional<T>}.
*
* @implSpec
* This produces a result equivalent to:
@@ -410,14 +386,14 @@
* @param comparator a {@code Comparator} for comparing elements
* @return a {@code Collector} that produces the minimal value
*/
- public static <T> Collector<T, T>
+ public static <T> Collector<T, ?, Optional<T>>
minBy(Comparator<? super T> comparator) {
return reducing(BinaryOperator.minBy(comparator));
}
/**
- * Returns a {@code Collector<T, T>} that produces the maximal element
- * according to a given {@code Comparator}.
+ * Returns a {@code Collector} that produces the maximal element according
+ * to a given {@code Comparator}, described as an {@code Optional<T>}.
*
* @implSpec
* This produces a result equivalent to:
@@ -429,39 +405,143 @@
* @param comparator a {@code Comparator} for comparing elements
* @return a {@code Collector} that produces the maximal value
*/
- public static <T> Collector<T, T>
+ public static <T> Collector<T, ?, Optional<T>>
maxBy(Comparator<? super T> comparator) {
return reducing(BinaryOperator.maxBy(comparator));
}
/**
- * Returns a {@code Collector<T, Long>} that produces the sum of a
- * long-valued function applied to the input element.
+ * Returns a {@code Collector} that produces the sum of a integer-valued
+ * function applied to the input elements. If no elements are present,
+ * the result is 0.
+ *
+ * @param <T> the type of the input elements
+ * @param mapper a function extracting the property to be summed
+ * @return a {@code Collector} that produces the sum of a derived property
+ */
+ public static <T> Collector<T, ?, Integer>
+ summingInt(ToIntFunction<? super T> mapper) {
+ return new CollectorImpl<T, int[], Integer>(
+ () -> new int[1],
+ (a, t) -> { a[0] += mapper.applyAsInt(t); },
+ (a, b) -> { a[0] += b[0]; return a; },
+ a -> a[0], CH_NOID);
+ }
+
+ /**
+ * Returns a {@code Collector} that produces the sum of a long-valued
+ * function applied to the input elements. If no elements are present,
+ * the result is 0.
*
- * @implSpec
- * This produces a result equivalent to:
- * <pre>{@code
- * reducing(0L, mapper, Long::sum)
- * }</pre>
+ * @param <T> the type of the input elements
+ * @param mapper a function extracting the property to be summed
+ * @return a {@code Collector} that produces the sum of a derived property
+ */
+ public static <T> Collector<T, ?, Long>
+ summingLong(ToLongFunction<? super T> mapper) {
+ return new CollectorImpl<T, long[], Long>(
+ () -> new long[1],
+ (a, t) -> { a[0] += mapper.applyAsLong(t); },
+ (a, b) -> { a[0] += b[0]; return a; },
+ a -> a[0], CH_NOID);
+ }
+
+ /**
+ * Returns a {@code Collector} that produces the sum of a double-valued
+ * function applied to the input elements. If no elements are present,
+ * the result is 0.
+ *
+ * <p>The sum returned can vary depending upon the order in which
+ * values are recorded, due to accumulated rounding error in
+ * addition of values of differing magnitudes. Values sorted by increasing
+ * absolute magnitude tend to yield more accurate results. If any recorded
+ * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
+ * sum will be {@code NaN}.
*
* @param <T> the type of the input elements
* @param mapper a function extracting the property to be summed
* @return a {@code Collector} that produces the sum of a derived property
*/
- public static <T> Collector<T, Long>
- sumBy(Function<? super T, Long> mapper) {
- return reducing(0L, mapper, Long::sum);
+ public static <T> Collector<T, ?, Double>
+ summingDouble(ToDoubleFunction<? super T> mapper) {
+ return new CollectorImpl<T, double[], Double>(
+ () -> new double[1],
+ (a, t) -> { a[0] += mapper.applyAsDouble(t); },
+ (a, b) -> { a[0] += b[0]; return a; },
+ a -> a[0], CH_NOID);
+ }
+
+ /**
+ * Returns a {@code Collector} that produces the arithmetic mean of an integer-valued
+ * function applied to the input elements. If no elements are present,
+ * the result is 0.
+ *
+ * @param <T> the type of the input elements
+ * @param mapper a function extracting the property to be summed
+ * @return a {@code Collector} that produces the sum of a derived property
+ */
+ public static <T> Collector<T, ?, Double>
+ averagingInt(ToIntFunction<? super T> mapper) {
+ return new CollectorImpl<T, long[], Double>(
+ () -> new long[2],
+ (a, t) -> { a[0] += mapper.applyAsInt(t); a[1]++; },
+ (a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
+ a -> (a[1] == 0) ? 0.0d : (double) a[0] / a[1], CH_NOID);
}
/**
- * Returns a {@code Collector<T,T>} which performs a reduction of its
- * input elements under a specified {@code BinaryOperator}.
+ * Returns a {@code Collector} that produces the arithmetic mean of a long-valued
+ * function applied to the input elements. If no elements are present,
+ * the result is 0.
+ *
+ * @param <T> the type of the input elements
+ * @param mapper a function extracting the property to be summed
+ * @return a {@code Collector} that produces the sum of a derived property
+ */
+ public static <T> Collector<T, ?, Double>
+ averagingLong(ToLongFunction<? super T> mapper) {
+ return new CollectorImpl<T, long[], Double>(
+ () -> new long[2],
+ (a, t) -> { a[0] += mapper.applyAsLong(t); a[1]++; },
+ (a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
+ a -> (a[1] == 0) ? 0.0d : (double) a[0] / a[1], CH_NOID);
+ }
+
+ /**
+ * Returns a {@code Collector} that produces the arithmetic mean of a double-valued
+ * function applied to the input elements. If no elements are present,
+ * the result is 0.
+ *
+ * <p>The average returned can vary depending upon the order in which
+ * values are recorded, due to accumulated rounding error in
+ * addition of values of differing magnitudes. Values sorted by increasing
+ * absolute magnitude tend to yield more accurate results. If any recorded
+ * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
+ * average will be {@code NaN}.
+ *
+ * @param <T> the type of the input elements
+ * @param mapper a function extracting the property to be summed
+ * @return a {@code Collector} that produces the sum of a derived property
+ */
+ public static <T> Collector<T, ?, Double>
+ averagingDouble(ToDoubleFunction<? super T> mapper) {
+ return new CollectorImpl<T, double[], Double>(
+ () -> new double[2],
+ (a, t) -> { a[0] += mapper.applyAsDouble(t); a[1]++; },
+ (a, b) -> { a[0] += b[0]; a[1] += b[1]; return a; },
+ a -> (a[1] == 0) ? 0.0d : a[0] / a[1], CH_NOID);
+ }
+
+ /**
+ * Returns a {@code Collector} which performs a reduction of its
+ * input elements under a specified {@code BinaryOperator} using the
+ * provided identity.
*
* @apiNote
* The {@code reducing()} collectors are most useful when used in a
* multi-level reduction, downstream of {@code groupingBy} or
* {@code partitioningBy}. To perform a simple reduction on a stream,
- * use {@link Stream#reduce(BinaryOperator)} instead.
+ * use {@link Stream#reduce(Object, BinaryOperator)}} instead.
*
* @param <T> element type for the input and output of the reduction
* @param identity the identity value for the reduction (also, the value
@@ -472,14 +552,25 @@
* @see #reducing(BinaryOperator)
* @see #reducing(Object, Function, BinaryOperator)
*/
- public static <T> Collector<T, T>
+ public static <T> Collector<T, ?, T>
reducing(T identity, BinaryOperator<T> op) {
- return new CollectorImpl<>(() -> identity, (r, t) -> (r == null ? t : op.apply(r, t)), op);
+ return new CollectorImpl<>(
+ boxSupplier(identity),
+ (a, t) -> { a[0] = op.apply(a[0], t); },
+ (a, b) -> { a[0] = op.apply(a[0], b[0]); return a; },
+ a -> a[0],
+ CH_NOID);
+ }
+
+ @SuppressWarnings("unchecked")
+ private static <T> Supplier<T[]> boxSupplier(T identity) {
+ return () -> (T[]) new Object[] { identity };
}
/**
- * Returns a {@code Collector<T,T>} which performs a reduction of its
- * input elements under a specified {@code BinaryOperator}.
+ * Returns a {@code Collector} which performs a reduction of its
+ * input elements under a specified {@code BinaryOperator}. The result
+ * is described as an {@code Optional<T>}.
*
* @apiNote
* The {@code reducing()} collectors are most useful when used in a
@@ -491,15 +582,8 @@
* person in each city:
* <pre>{@code
* Comparator<Person> byHeight = Comparator.comparing(Person::getHeight);
- * BinaryOperator<Person> tallerOf = BinaryOperator.greaterOf(byHeight);
* Map<City, Person> tallestByCity
- * = people.stream().collect(groupingBy(Person::getCity, reducing(tallerOf)));
- * }</pre>
- *
- * @implSpec
- * The default implementation is equivalent to:
- * <pre>{@code
- * reducing(null, op);
+ * = people.stream().collect(groupingBy(Person::getCity, reducing(BinaryOperator.maxBy(byHeight))));
* }</pre>
*
* @param <T> element type for the input and output of the reduction
@@ -509,13 +593,32 @@
* @see #reducing(Object, BinaryOperator)
* @see #reducing(Object, Function, BinaryOperator)
*/
- public static <T> Collector<T, T>
+ public static <T> Collector<T, ?, Optional<T>>
reducing(BinaryOperator<T> op) {
- return reducing(null, op);
+ class OptionalBox implements Consumer<T> {
+ T value = null;
+ boolean present = false;
+
+ @Override
+ public void accept(T t) {
+ if (present) {
+ value = op.apply(value, t);
+ }
+ else {
+ value = t;
+ present = true;
+ }
+ }
+ }
+
+ return new CollectorImpl<T, OptionalBox, Optional<T>>(
+ OptionalBox::new, OptionalBox::accept,
+ (a, b) -> { if (b.present) a.accept(b.value); return a; },
+ a -> Optional.ofNullable(a.value), CH_NOID);
}
/**
- * Returns a {@code Collector<T,U>} which performs a reduction of its
+ * Returns a {@code Collector} which performs a reduction of its
* input elements under a specified mapping function and
* {@code BinaryOperator}. This is a generalization of
* {@link #reducing(Object, BinaryOperator)} which allows a transformation
@@ -524,17 +627,17 @@
* @apiNote
* The {@code reducing()} collectors are most useful when used in a
* multi-level reduction, downstream of {@code groupingBy} or
- * {@code partitioningBy}. To perform a simple reduction on a stream,
- * use {@link Stream#reduce(BinaryOperator)} instead.
+ * {@code partitioningBy}. To perform a simple map-reduce on a stream,
+ * use {@link Stream#map(Function)} and {@link Stream#reduce(Object, BinaryOperator)}
+ * instead.
*
* <p>For example, given a stream of {@code Person}, to calculate the longest
* last name of residents in each city:
* <pre>{@code
* Comparator<String> byLength = Comparator.comparing(String::length);
- * BinaryOperator<String> longerOf = BinaryOperator.greaterOf(byLength);
* Map<City, String> longestLastNameByCity
* = people.stream().collect(groupingBy(Person::getCity,
- * reducing(Person::getLastName, longerOf)));
+ * reducing(Person::getLastName, BinaryOperator.maxBy(byLength))));
* }</pre>
*
* @param <T> the type of the input elements
@@ -549,18 +652,20 @@
* @see #reducing(BinaryOperator)
*/
public static <T, U>
- Collector<T, U> reducing(U identity,
- Function<? super T, ? extends U> mapper,
- BinaryOperator<U> op) {
- return new CollectorImpl<>(() -> identity,
- (r, t) -> (r == null ? mapper.apply(t) : op.apply(r, mapper.apply(t))),
- op);
+ Collector<T, ?, U> reducing(U identity,
+ Function<? super T, ? extends U> mapper,
+ BinaryOperator<U> op) {
+ return new CollectorImpl<>(
+ boxSupplier(identity),
+ (a, t) -> { a[0] = op.apply(a[0], mapper.apply(t)); },
+ (a, b) -> { a[0] = op.apply(a[0], b[0]); return a; },
+ a -> a[0], CH_NOID);
}
/**
* Returns a {@code Collector} implementing a "group by" operation on
* input elements of type {@code T}, grouping elements according to a
- * classification function.
+ * classification function, and returning the results in a {@code Map}.
*
* <p>The classification function maps elements to some key type {@code K}.
* The collector produces a {@code Map<K, List<T>>} whose keys are the
@@ -586,9 +691,9 @@
* @see #groupingBy(Function, Supplier, Collector)
* @see #groupingByConcurrent(Function)
*/
- public static <T, K>
- Collector<T, Map<K, List<T>>> groupingBy(Function<? super T, ? extends K> classifier) {
- return groupingBy(classifier, HashMap::new, toList());
+ public static <T, K> Collector<T, ?, Map<K, List<T>>>
+ groupingBy(Function<? super T, ? extends K> classifier) {
+ return groupingBy(classifier, toList());
}
/**
@@ -615,6 +720,7 @@
*
* @param <T> the type of the input elements
* @param <K> the type of the keys
+ * @param <A> the intermediate accumulation type of the downstream collector
* @param <D> the result type of the downstream reduction
* @param classifier a classifier function mapping input elements to keys
* @param downstream a {@code Collector} implementing the downstream reduction
@@ -624,9 +730,9 @@
* @see #groupingBy(Function, Supplier, Collector)
* @see #groupingByConcurrent(Function, Collector)
*/
- public static <T, K, D>
- Collector<T, Map<K, D>> groupingBy(Function<? super T, ? extends K> classifier,
- Collector<? super T, D> downstream) {
+ public static <T, K, A, D>
+ Collector<T, ?, Map<K, D>> groupingBy(Function<? super T, ? extends K> classifier,
+ Collector<? super T, A, D> downstream) {
return groupingBy(classifier, HashMap::new, downstream);
}
@@ -653,6 +759,7 @@
*
* @param <T> the type of the input elements
* @param <K> the type of the keys
+ * @param <A> the intermediate accumulation type of the downstream collector
* @param <D> the result type of the downstream reduction
* @param <M> the type of the resulting {@code Map}
* @param classifier a classifier function mapping input elements to keys
@@ -665,25 +772,39 @@
* @see #groupingBy(Function)
* @see #groupingByConcurrent(Function, Supplier, Collector)
*/
- public static <T, K, D, M extends Map<K, D>>
- Collector<T, M> groupingBy(Function<? super T, ? extends K> classifier,
- Supplier<M> mapFactory,
- Collector<? super T, D> downstream) {
- Supplier<D> downstreamSupplier = downstream.resultSupplier();
- BiFunction<D, ? super T, D> downstreamAccumulator = downstream.accumulator();
- BiFunction<M, T, M> accumulator = (m, t) -> {
+ public static <T, K, D, A, M extends Map<K, D>>
+ Collector<T, ?, M> groupingBy(Function<? super T, ? extends K> classifier,
+ Supplier<M> mapFactory,
+ Collector<? super T, A, D> downstream) {
+ Supplier<A> downstreamSupplier = downstream.supplier();
+ BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
+ BiConsumer<Map<K, A>, T> accumulator = (m, t) -> {
K key = Objects.requireNonNull(classifier.apply(t), "element cannot be mapped to a null key");
- D oldContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
- D newContainer = downstreamAccumulator.apply(oldContainer, t);
- if (newContainer != oldContainer)
- m.put(key, newContainer);
- return m;
+ A container = m.computeIfAbsent(key, k -> downstreamSupplier.get());
+ downstreamAccumulator.accept(container, t);
};
- return new CollectorImpl<>(mapFactory, accumulator, mapMerger(downstream.combiner()), CH_STRICT);
+ BinaryOperator<Map<K, A>> merger = Collectors.<K, A, Map<K, A>>mapMerger(downstream.combiner());
+ @SuppressWarnings("unchecked")
+ Supplier<Map<K, A>> mangledFactory = (Supplier<Map<K, A>>) mapFactory;
+
+ if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
+ return new CollectorImpl<>(mangledFactory, accumulator, merger, CH_ID);
+ }
+ else {
+ @SuppressWarnings("unchecked")
+ Function<A, A> downstreamFinisher = (Function<A, A>) downstream.finisher();
+ Function<Map<K, A>, M> finisher = intermediate -> {
+ intermediate.replaceAll((k, v) -> downstreamFinisher.apply(v));
+ @SuppressWarnings("unchecked")
+ M castResult = (M) intermediate;
+ return castResult;
+ };
+ return new CollectorImpl<>(mangledFactory, accumulator, merger, finisher, CH_NOID);
+ }
}
/**
- * Returns a {@code Collector} implementing a concurrent "group by"
+ * Returns a concurrent {@code Collector} implementing a "group by"
* operation on input elements of type {@code T}, grouping elements
* according to a classification function.
*
@@ -716,12 +837,13 @@
* @see #groupingByConcurrent(Function, Supplier, Collector)
*/
public static <T, K>
- Collector<T, ConcurrentMap<K, List<T>>> groupingByConcurrent(Function<? super T, ? extends K> classifier) {
+ Collector<T, ?, ConcurrentMap<K, List<T>>>
+ groupingByConcurrent(Function<? super T, ? extends K> classifier) {
return groupingByConcurrent(classifier, ConcurrentHashMap::new, toList());
}
/**
- * Returns a {@code Collector} implementing a concurrent cascaded "group by"
+ * Returns a concurrent {@code Collector} implementing a cascaded "group by"
* operation on input elements of type {@code T}, grouping elements
* according to a classification function, and then performing a reduction
* operation on the values associated with a given key using the specified
@@ -739,12 +861,13 @@
* where the city names are sorted:
* <pre>{@code
* ConcurrentMap<City, Set<String>> namesByCity
- * = people.stream().collect(groupingByConcurrent(Person::getCity, TreeMap::new,
+ * = people.stream().collect(groupingByConcurrent(Person::getCity, ConcurrentSkipListMap::new,
* mapping(Person::getLastName, toSet())));
* }</pre>
*
* @param <T> the type of the input elements
* @param <K> the type of the keys
+ * @param <A> the intermediate accumulation type of the downstream collector
* @param <D> the result type of the downstream reduction
* @param classifier a classifier function mapping input elements to keys
* @param downstream a {@code Collector} implementing the downstream reduction
@@ -754,9 +877,9 @@
* @see #groupingByConcurrent(Function)
* @see #groupingByConcurrent(Function, Supplier, Collector)
*/
- public static <T, K, D>
- Collector<T, ConcurrentMap<K, D>> groupingByConcurrent(Function<? super T, ? extends K> classifier,
- Collector<? super T, D> downstream) {
+ public static <T, K, A, D>
+ Collector<T, ?, ConcurrentMap<K, D>> groupingByConcurrent(Function<? super T, ? extends K> classifier,
+ Collector<? super T, A, D> downstream) {
return groupingByConcurrent(classifier, ConcurrentHashMap::new, downstream);
}
@@ -787,6 +910,7 @@
*
* @param <T> the type of the input elements
* @param <K> the type of the keys
+ * @param <A> the intermediate accumulation type of the downstream collector
* @param <D> the result type of the downstream reduction
* @param <M> the type of the resulting {@code ConcurrentMap}
* @param classifier a classifier function mapping input elements to keys
@@ -799,51 +923,46 @@
* @see #groupingByConcurrent(Function, Collector)
* @see #groupingBy(Function, Supplier, Collector)
*/
- public static <T, K, D, M extends ConcurrentMap<K, D>>
- Collector<T, M> groupingByConcurrent(Function<? super T, ? extends K> classifier,
- Supplier<M> mapFactory,
- Collector<? super T, D> downstream) {
- Supplier<D> downstreamSupplier = downstream.resultSupplier();
- BiFunction<D, ? super T, D> downstreamAccumulator = downstream.accumulator();
- BinaryOperator<M> combiner = mapMerger(downstream.combiner());
+ public static <T, K, A, D, M extends ConcurrentMap<K, D>>
+ Collector<T, ?, M> groupingByConcurrent(Function<? super T, ? extends K> classifier,
+ Supplier<M> mapFactory,
+ Collector<? super T, A, D> downstream) {
+ Supplier<A> downstreamSupplier = downstream.supplier();
+ BiConsumer<A, ? super T> downstreamAccumulator = downstream.accumulator();
+ BinaryOperator<ConcurrentMap<K, A>> merger = Collectors.<K, A, ConcurrentMap<K, A>>mapMerger(downstream.combiner());
+ @SuppressWarnings("unchecked")
+ Supplier<ConcurrentMap<K, A>> mangledFactory = (Supplier<ConcurrentMap<K, A>>) mapFactory;
+ BiConsumer<ConcurrentMap<K, A>, T> accumulator;
if (downstream.characteristics().contains(Collector.Characteristics.CONCURRENT)) {
- BiFunction<M, T, M> accumulator = (m, t) -> {
+ accumulator = (m, t) -> {
K key = Objects.requireNonNull(classifier.apply(t), "element cannot be mapped to a null key");
- downstreamAccumulator.apply(m.computeIfAbsent(key, k -> downstreamSupplier.get()), t);
- return m;
- };
- return new CollectorImpl<>(mapFactory, accumulator, combiner, CH_CONCURRENT);
- } else if (downstream.characteristics().contains(Collector.Characteristics.STRICTLY_MUTATIVE)) {
- BiFunction<M, T, M> accumulator = (m, t) -> {
- K key = Objects.requireNonNull(classifier.apply(t), "element cannot be mapped to a null key");
- D resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
- synchronized (resultContainer) {
- downstreamAccumulator.apply(resultContainer, t);
- }
- return m;
+ A resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
+ downstreamAccumulator.accept(resultContainer, t);
};
- return new CollectorImpl<>(mapFactory, accumulator, combiner, CH_CONCURRENT);
- } else {
- BiFunction<M, T, M> accumulator = (m, t) -> {
+ }
+ else {
+ accumulator = (m, t) -> {
K key = Objects.requireNonNull(classifier.apply(t), "element cannot be mapped to a null key");
- do {
- D oldResult = m.computeIfAbsent(key, k -> downstreamSupplier.get());
- if (oldResult == null) {
- if (m.putIfAbsent(key, downstreamAccumulator.apply(null, t)) == null)
- return m;
- } else {
- synchronized (oldResult) {
- if (m.get(key) != oldResult)
- continue;
- D newResult = downstreamAccumulator.apply(oldResult, t);
- if (oldResult != newResult)
- m.put(key, newResult);
- return m;
- }
- }
- } while (true);
+ A resultContainer = m.computeIfAbsent(key, k -> downstreamSupplier.get());
+ synchronized (resultContainer) {
+ downstreamAccumulator.accept(resultContainer, t);
+ }
};
- return new CollectorImpl<>(mapFactory, accumulator, combiner, CH_CONCURRENT);
+ }
+
+ if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
+ return new CollectorImpl<>(mangledFactory, accumulator, merger, CH_CONCURRENT_ID);
+ }
+ else {
+ @SuppressWarnings("unchecked")
+ Function<A, A> downstreamFinisher = (Function<A, A>) downstream.finisher();
+ Function<ConcurrentMap<K, A>, M> finisher = intermediate -> {
+ intermediate.replaceAll((k, v) -> downstreamFinisher.apply(v));
+ @SuppressWarnings("unchecked")
+ M castResult = (M) intermediate;
+ return castResult;
+ };
+ return new CollectorImpl<>(mangledFactory, accumulator, merger, finisher, CH_CONCURRENT_NOID);
}
}
@@ -862,7 +981,7 @@
* @see #partitioningBy(Predicate, Collector)
*/
public static <T>
- Collector<T, Map<Boolean, List<T>>> partitioningBy(Predicate<? super T> predicate) {
+ Collector<T, ?, Map<Boolean, List<T>>> partitioningBy(Predicate<? super T> predicate) {
return partitioningBy(predicate, toList());
}
@@ -877,6 +996,7 @@
* serializability, or thread-safety of the {@code Map} returned.
*
* @param <T> the type of the input elements
+ * @param <A> the intermediate accumulation type of the downstream collector
* @param <D> the result type of the downstream reduction
* @param predicate a predicate used for classifying input elements
* @param downstream a {@code Collector} implementing the downstream
@@ -886,52 +1006,43 @@
*
* @see #partitioningBy(Predicate)
*/
- public static <T, D>
- Collector<T, Map<Boolean, D>> partitioningBy(Predicate<? super T> predicate,
- Collector<? super T, D> downstream) {
- BiFunction<D, ? super T, D> downstreamAccumulator = downstream.accumulator();
- BiFunction<Map<Boolean, D>, T, Map<Boolean, D>> accumulator = (result, t) -> {
+ public static <T, D, A>
+ Collector<T, ?, Map<Boolean, D>> partitioningBy(Predicate<? super T> predicate,
+ Collector<? super T, A, D> downstream) {
+ @SuppressWarnings("unchecked")
+ BiConsumer<D, ? super T> downstreamAccumulator = (BiConsumer<D, ? super T>) downstream.accumulator();
+ BiConsumer<Map<Boolean, A>, T> accumulator = (result, t) -> {
Partition<D> asPartition = ((Partition<D>) result);
- if (predicate.test(t)) {
- D newResult = downstreamAccumulator.apply(asPartition.forTrue, t);
- if (newResult != asPartition.forTrue)
- asPartition.forTrue = newResult;
- } else {
- D newResult = downstreamAccumulator.apply(asPartition.forFalse, t);
- if (newResult != asPartition.forFalse)
- asPartition.forFalse = newResult;
- }
- return result;
+ downstreamAccumulator.accept(predicate.test(t) ? asPartition.forTrue : asPartition.forFalse, t);
+ };
+ BinaryOperator<A> op = downstream.combiner();
+ BinaryOperator<Map<Boolean, A>> merger = (m1, m2) -> {
+ Partition<A> left = (Partition<A>) m1;
+ Partition<A> right = (Partition<A>) m2;
+ return new Partition<>(op.apply(left.forTrue, right.forTrue),
+ op.apply(left.forFalse, right.forFalse));
};
- return new CollectorImpl<>(() -> new Partition<>(downstream.resultSupplier().get(),
- downstream.resultSupplier().get()),
- accumulator, partitionMerger(downstream.combiner()), CH_STRICT);
+ Supplier<Map<Boolean, A>> supplier = () -> new Partition<>(downstream.supplier().get(),
+ downstream.supplier().get());
+ if (downstream.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)) {
+ return new CollectorImpl<>(supplier, accumulator, merger, CH_ID);
+ }
+ else {
+ Function<Map<Boolean, A>, Map<Boolean, D>> finisher = (Map<Boolean, A> par) -> {
+ Partition<A> asAPartition = (Partition<A>) par;
+ return new Partition<>(downstream.finisher().apply(asAPartition.forTrue),
+ downstream.finisher().apply(asAPartition.forFalse));
+ };
+ return new CollectorImpl<>(supplier, accumulator, merger, finisher, CH_NOID);
+ }
}
/**
- * Merge function for two partitions, given a merge function for the
- * elements.
- */
- private static <D> BinaryOperator<Map<Boolean, D>> partitionMerger(BinaryOperator<D> op) {
- return (m1, m2) -> {
- Partition<D> left = (Partition<D>) m1;
- Partition<D> right = (Partition<D>) m2;
- if (left.forFalse == null)
- left.forFalse = right.forFalse;
- else if (right.forFalse != null)
- left.forFalse = op.apply(left.forFalse, right.forFalse);
- if (left.forTrue == null)
- left.forTrue = right.forTrue;
- else if (right.forTrue != null)
- left.forTrue = op.apply(left.forTrue, right.forTrue);
- return left;
- };
- }
-
- /**
- * Accumulate elements into a {@code Map} whose keys and values are the
- * result of applying mapping functions to the input elements.
- * If the mapped keys contains duplicates (according to
+ * Returns a {@code Collector} that accumulate elements into a
+ * {@code Map} whose keys and values are the result of applying the provided
+ * mapping functions to the input elements.
+ *
+ * <p>If the mapped keys contains duplicates (according to
* {@link Object#equals(Object)}), an {@code IllegalStateException} is
* thrown when the collection operation is performed. If the mapped keys
* may have duplicates, use {@link #toMap(Function, Function, BinaryOperator)}
@@ -970,24 +1081,26 @@
* @see #toConcurrentMap(Function, Function)
*/
public static <T, K, U>
- Collector<T, Map<K,U>> toMap(Function<? super T, ? extends K> keyMapper,
- Function<? super T, ? extends U> valueMapper) {
+ Collector<T, ?, Map<K,U>> toMap(Function<? super T, ? extends K> keyMapper,
+ Function<? super T, ? extends U> valueMapper) {
return toMap(keyMapper, valueMapper, throwingMerger(), HashMap::new);
}
/**
- * Accumulate elements into a {@code Map} whose keys and values are the
- * result of applying mapping functions to the input elements. If the mapped
+ * Returns a {@code Collector} that accumulate elements into a
+ * {@code Map} whose keys and values are the result of applying the provided
+ * mapping functions to the input elements.
+ *
+ * <p>If the mapped
* keys contains duplicates (according to {@link Object#equals(Object)}),
* the value mapping function is applied to each equal element, and the
* results are merged using the provided merging function.
*
* @apiNote
* There are multiple ways to deal with collisions between multiple elements
- * mapping to the same key. There are some predefined merging functions,
- * such as {@link #throwingMerger()}, {@link #firstWinsMerger()}, and
- * {@link #lastWinsMerger()}, that implement common policies, or you can
- * implement custom policies easily. For example, if you have a stream
+ * mapping to the same key. The other forms of {@code toMap} simply use
+ * a merge function that throws unconditionally, but you can easily write
+ * more flexible merge policies. For example, if you have a stream
* of {@code Person}, and you want to produce a "phone book" mapping name to
* address, but it is possible that two persons have the same name, you can
* do as follows to gracefully deals with these collisions, and produce a
@@ -1018,15 +1131,18 @@
* @see #toConcurrentMap(Function, Function, BinaryOperator)
*/
public static <T, K, U>
- Collector<T, Map<K,U>> toMap(Function<? super T, ? extends K> keyMapper,
- Function<? super T, ? extends U> valueMapper,
- BinaryOperator<U> mergeFunction) {
+ Collector<T, ?, Map<K,U>> toMap(Function<? super T, ? extends K> keyMapper,
+ Function<? super T, ? extends U> valueMapper,
+ BinaryOperator<U> mergeFunction) {
return toMap(keyMapper, valueMapper, mergeFunction, HashMap::new);
}
/**
- * Accumulate elements into a {@code Map} whose keys and values are the
- * result of applying mapping functions to the input elements. If the mapped
+ * Returns a {@code Collector} that accumulate elements into a
+ * {@code Map} whose keys and values are the result of applying the provided
+ * mapping functions to the input elements.
+ *
+ * <p>If the mapped
* keys contains duplicates (according to {@link Object#equals(Object)}),
* the value mapping function is applied to each equal element, and the
* results are merged using the provided merging function. The {@code Map}
@@ -1054,22 +1170,22 @@
* @see #toConcurrentMap(Function, Function, BinaryOperator, Supplier)
*/
public static <T, K, U, M extends Map<K, U>>
- Collector<T, M> toMap(Function<? super T, ? extends K> keyMapper,
- Function<? super T, ? extends U> valueMapper,
- BinaryOperator<U> mergeFunction,
- Supplier<M> mapSupplier) {
- BiFunction<M, T, M> accumulator
- = (map, element) -> {
- map.merge(keyMapper.apply(element), valueMapper.apply(element), mergeFunction);
- return map;
- };
- return new CollectorImpl<>(mapSupplier, accumulator, mapMerger(mergeFunction), CH_STRICT);
+ Collector<T, ?, M> toMap(Function<? super T, ? extends K> keyMapper,
+ Function<? super T, ? extends U> valueMapper,
+ BinaryOperator<U> mergeFunction,
+ Supplier<M> mapSupplier) {
+ BiConsumer<M, T> accumulator
+ = (map, element) -> map.merge(keyMapper.apply(element),
+ valueMapper.apply(element), mergeFunction);
+ return new CollectorImpl<>(mapSupplier, accumulator, mapMerger(mergeFunction), CH_ID);
}
/**
- * Accumulate elements into a {@code ConcurrentMap} whose keys and values
- * are the result of applying mapping functions to the input elements.
- * If the mapped keys contains duplicates (according to
+ * Returns a {@code Collector} that accumulate elements into a
+ * {@code ConcurrentMap} whose keys and values are the result of applying
+ * the provided mapping functions to the input elements.
+ *
+ * <p>If the mapped keys contains duplicates (according to
* {@link Object#equals(Object)}), an {@code IllegalStateException} is
* thrown when the collection operation is performed. If the mapped keys
* may have duplicates, use
@@ -1112,24 +1228,25 @@
* @see #toConcurrentMap(Function, Function, BinaryOperator, Supplier)
*/
public static <T, K, U>
- Collector<T, ConcurrentMap<K,U>> toConcurrentMap(Function<? super T, ? extends K> keyMapper,
- Function<? super T, ? extends U> valueMapper) {
+ Collector<T, ?, ConcurrentMap<K,U>> toConcurrentMap(Function<? super T, ? extends K> keyMapper,
+ Function<? super T, ? extends U> valueMapper) {
return toConcurrentMap(keyMapper, valueMapper, throwingMerger(), ConcurrentHashMap::new);
}
/**
- * Accumulate elements into a {@code ConcurrentMap} whose keys and values
- * are the result of applying mapping functions to the input elements. If
- * the mapped keys contains duplicates (according to {@link Object#equals(Object)}),
+ * Returns a {@code Collector} that accumulate elements into a
+ * {@code ConcurrentMap} whose keys and values are the result of applying
+ * the provided mapping functions to the input elements.
+ *
+ * <p>If the mapped keys contains duplicates (according to {@link Object#equals(Object)}),
* the value mapping function is applied to each equal element, and the
* results are merged using the provided merging function.
*
* @apiNote
* There are multiple ways to deal with collisions between multiple elements
- * mapping to the same key. There are some predefined merging functions,
- * such as {@link #throwingMerger()}, {@link #firstWinsMerger()}, and
- * {@link #lastWinsMerger()}, that implement common policies, or you can
- * implement custom policies easily. For example, if you have a stream
+ * mapping to the same key. The other forms of {@code toConcurrentMap} simply use
+ * a merge function that throws unconditionally, but you can easily write
+ * more flexible merge policies. For example, if you have a stream
* of {@code Person}, and you want to produce a "phone book" mapping name to
* address, but it is possible that two persons have the same name, you can
* do as follows to gracefully deals with these collisions, and produce a
@@ -1163,16 +1280,19 @@
* @see #toMap(Function, Function, BinaryOperator)
*/
public static <T, K, U>
- Collector<T, ConcurrentMap<K,U>> toConcurrentMap(Function<? super T, ? extends K> keyMapper,
- Function<? super T, ? extends U> valueMapper,
- BinaryOperator<U> mergeFunction) {
+ Collector<T, ?, ConcurrentMap<K,U>>
+ toConcurrentMap(Function<? super T, ? extends K> keyMapper,
+ Function<? super T, ? extends U> valueMapper,
+ BinaryOperator<U> mergeFunction) {
return toConcurrentMap(keyMapper, valueMapper, mergeFunction, ConcurrentHashMap::new);
}
/**
- * Accumulate elements into a {@code ConcurrentMap} whose keys and values
- * are the result of applying mapping functions to the input elements. If
- * the mapped keys contains duplicates (according to {@link Object#equals(Object)}),
+ * Returns a {@code Collector} that accumulate elements into a
+ * {@code ConcurrentMap} whose keys and values are the result of applying
+ * the provided mapping functions to the input elements.
+ *
+ * <p>If the mapped keys contains duplicates (according to {@link Object#equals(Object)}),
* the value mapping function is applied to each equal element, and the
* results are merged using the provided merging function. The
* {@code ConcurrentMap} is created by a provided supplier function.
@@ -1202,15 +1322,14 @@
* @see #toMap(Function, Function, BinaryOperator, Supplier)
*/
public static <T, K, U, M extends ConcurrentMap<K, U>>
- Collector<T, M> toConcurrentMap(Function<? super T, ? extends K> keyMapper,
- Function<? super T, ? extends U> valueMapper,
- BinaryOperator<U> mergeFunction,
- Supplier<M> mapSupplier) {
- BiFunction<M, T, M> accumulator = (map, element) -> {
- map.merge(keyMapper.apply(element), valueMapper.apply(element), mergeFunction);
- return map;
- };
- return new CollectorImpl<>(mapSupplier, accumulator, mapMerger(mergeFunction), CH_CONCURRENT);
+ Collector<T, ?, M> toConcurrentMap(Function<? super T, ? extends K> keyMapper,
+ Function<? super T, ? extends U> valueMapper,
+ BinaryOperator<U> mergeFunction,
+ Supplier<M> mapSupplier) {
+ BiConsumer<M, T> accumulator
+ = (map, element) -> map.merge(keyMapper.apply(element),
+ valueMapper.apply(element), mergeFunction);
+ return new CollectorImpl<>(mapSupplier, accumulator, mapMerger(mergeFunction), CH_CONCURRENT_ID);
}
/**
@@ -1222,14 +1341,15 @@
* @param mapper a mapping function to apply to each element
* @return a {@code Collector} implementing the summary-statistics reduction
*
- * @see #toDoubleSummaryStatistics(ToDoubleFunction)
- * @see #toLongSummaryStatistics(ToLongFunction)
+ * @see #summarizingDouble(ToDoubleFunction)
+ * @see #summarizingLong(ToLongFunction)
*/
public static <T>
- Collector<T, IntSummaryStatistics> toIntSummaryStatistics(ToIntFunction<? super T> mapper) {
- return new CollectorImpl<>(IntSummaryStatistics::new,
- (r, t) -> { r.accept(mapper.applyAsInt(t)); return r; },
- (l, r) -> { l.combine(r); return l; }, CH_STRICT);
+ Collector<T, ?, IntSummaryStatistics> summarizingInt(ToIntFunction<? super T> mapper) {
+ return new CollectorImpl<T, IntSummaryStatistics, IntSummaryStatistics>(
+ IntSummaryStatistics::new,
+ (r, t) -> r.accept(mapper.applyAsInt(t)),
+ (l, r) -> { l.combine(r); return l; }, CH_ID);
}
/**
@@ -1241,14 +1361,15 @@
* @param mapper the mapping function to apply to each element
* @return a {@code Collector} implementing the summary-statistics reduction
*
- * @see #toDoubleSummaryStatistics(ToDoubleFunction)
- * @see #toIntSummaryStatistics(ToIntFunction)
+ * @see #summarizingDouble(ToDoubleFunction)
+ * @see #summarizingInt(ToIntFunction)
*/
public static <T>
- Collector<T, LongSummaryStatistics> toLongSummaryStatistics(ToLongFunction<? super T> mapper) {
- return new CollectorImpl<>(LongSummaryStatistics::new,
- (r, t) -> { r.accept(mapper.applyAsLong(t)); return r; },
- (l, r) -> { l.combine(r); return l; }, CH_STRICT);
+ Collector<T, ?, LongSummaryStatistics> summarizingLong(ToLongFunction<? super T> mapper) {
+ return new CollectorImpl<T, LongSummaryStatistics, LongSummaryStatistics>(
+ LongSummaryStatistics::new,
+ (r, t) -> r.accept(mapper.applyAsLong(t)),
+ (l, r) -> { l.combine(r); return l; }, CH_ID);
}
/**
@@ -1260,14 +1381,15 @@
* @param mapper a mapping function to apply to each element
* @return a {@code Collector} implementing the summary-statistics reduction
*
- * @see #toLongSummaryStatistics(ToLongFunction)
- * @see #toIntSummaryStatistics(ToIntFunction)
+ * @see #summarizingLong(ToLongFunction)
+ * @see #summarizingInt(ToIntFunction)
*/
public static <T>
- Collector<T, DoubleSummaryStatistics> toDoubleSummaryStatistics(ToDoubleFunction<? super T> mapper) {
- return new CollectorImpl<>(DoubleSummaryStatistics::new,
- (r, t) -> { r.accept(mapper.applyAsDouble(t)); return r; },
- (l, r) -> { l.combine(r); return l; }, CH_STRICT);
+ Collector<T, ?, DoubleSummaryStatistics> summarizingDouble(ToDoubleFunction<? super T> mapper) {
+ return new CollectorImpl<T, DoubleSummaryStatistics, DoubleSummaryStatistics>(
+ DoubleSummaryStatistics::new,
+ (r, t) -> r.accept(mapper.applyAsDouble(t)),
+ (l, r) -> { l.combine(r); return l; }, CH_ID);
}
/**
@@ -1276,8 +1398,8 @@
private static final class Partition<T>
extends AbstractMap<Boolean, T>
implements Map<Boolean, T> {
- T forTrue;
- T forFalse;
+ final T forTrue;
+ final T forFalse;
Partition(T forTrue, T forFalse) {
this.forTrue = forTrue;
@@ -1289,24 +1411,9 @@
return new AbstractSet<Map.Entry<Boolean, T>>() {
@Override
public Iterator<Map.Entry<Boolean, T>> iterator() {
-
- return new Iterator<Map.Entry<Boolean, T>>() {
- int state = 0;
-
- @Override
- public boolean hasNext() {
- return state < 2;
- }
-
- @Override
- public Map.Entry<Boolean, T> next() {
- if (state >= 2)
- throw new NoSuchElementException();
- return (state++ == 0)
- ? new SimpleImmutableEntry<>(false, forFalse)
- : new SimpleImmutableEntry<>(true, forTrue);
- }
- };
+ Map.Entry<Boolean, T> falseEntry = new SimpleImmutableEntry<>(false, forFalse);
+ Map.Entry<Boolean, T> trueEntry = new SimpleImmutableEntry<>(true, forTrue);
+ return Arrays.asList(falseEntry, trueEntry).iterator();
}
@Override
--- a/jdk/src/share/classes/java/util/stream/DelegatingStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/DelegatingStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -209,7 +209,7 @@
}
@Override
- public <R> R collect(Collector<? super T, R> collector) {
+ public <R, A> R collect(Collector<? super T, A, ? extends R> collector) {
return delegate.collect(collector);
}
--- a/jdk/src/share/classes/java/util/stream/DoublePipeline.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/DoublePipeline.java Mon Aug 12 09:29:06 2013 -0400
@@ -147,6 +147,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
final Spliterator.OfDouble lazySpliterator(Supplier<? extends Spliterator<Double>> supplier) {
return new StreamSpliterators.DelegatingSpliterator.OfDouble((Supplier<Spliterator.OfDouble>) supplier);
}
@@ -209,6 +210,7 @@
Sink<Double> opWrapSink(int flags, Sink<U> sink) {
return new Sink.ChainedDouble(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(double t) {
downstream.accept(mapper.apply(t));
}
--- a/jdk/src/share/classes/java/util/stream/DoubleStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/DoubleStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -527,7 +527,7 @@
long count();
/**
- * Returns an {@code OptionalDouble} describing the average of elements of
+ * Returns an {@code OptionalDouble} describing the arithmetic mean of elements of
* this stream, or an empty optional if this stream is empty. The average
* returned can vary depending upon the order in which elements are
* encountered. This is due to accumulated rounding error in addition of
--- a/jdk/src/share/classes/java/util/stream/FindOps.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/FindOps.java Mon Aug 12 09:29:06 2013 -0400
@@ -246,6 +246,7 @@
* @param <P_OUT> Output element type from the stream pipeline
* @param <O> Result type from the find operation
*/
+ @SuppressWarnings("serial")
private static final class FindTask<P_IN, P_OUT, O>
extends AbstractShortCircuitTask<P_IN, P_OUT, O, FindTask<P_IN, P_OUT, O>> {
private final FindOp<P_OUT, O> op;
--- a/jdk/src/share/classes/java/util/stream/ForEachOps.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/ForEachOps.java Mon Aug 12 09:29:06 2013 -0400
@@ -249,6 +249,7 @@
}
/** A {@code ForkJoinTask} for performing a parallel for-each operation */
+ @SuppressWarnings("serial")
static final class ForEachTask<S, T> extends CountedCompleter<Void> {
private Spliterator<S> spliterator;
private final Sink<S> sink;
@@ -314,6 +315,7 @@
* A {@code ForkJoinTask} for performing a parallel for-each operation
* which visits the elements in encounter order
*/
+ @SuppressWarnings("serial")
static final class ForEachOrderedTask<S, T> extends CountedCompleter<Void> {
private final PipelineHelper<T> helper;
private Spliterator<S> spliterator;
--- a/jdk/src/share/classes/java/util/stream/IntPipeline.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/IntPipeline.java Mon Aug 12 09:29:06 2013 -0400
@@ -150,6 +150,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
final Spliterator.OfInt lazySpliterator(Supplier<? extends Spliterator<Integer>> supplier) {
return new StreamSpliterators.DelegatingSpliterator.OfInt((Supplier<Spliterator.OfInt>) supplier);
}
@@ -190,6 +191,7 @@
Sink<Integer> opWrapSink(int flags, Sink<Long> sink) {
return new Sink.ChainedInt(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(int t) {
downstream.accept((long) t);
}
@@ -206,6 +208,7 @@
Sink<Integer> opWrapSink(int flags, Sink<Double> sink) {
return new Sink.ChainedInt(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(int t) {
downstream.accept((double) t);
}
@@ -245,6 +248,7 @@
Sink<Integer> opWrapSink(int flags, Sink<U> sink) {
return new Sink.ChainedInt(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(int t) {
downstream.accept(mapper.apply(t));
}
--- a/jdk/src/share/classes/java/util/stream/IntStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/IntStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -517,7 +517,7 @@
long count();
/**
- * Returns an {@code OptionalDouble} describing the average of elements of
+ * Returns an {@code OptionalDouble} describing the arithmetic mean of elements of
* this stream, or an empty optional if this stream is empty. This is a
* special case of a
* <a href="package-summary.html#MutableReduction">reduction</a>.
--- a/jdk/src/share/classes/java/util/stream/LongPipeline.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/LongPipeline.java Mon Aug 12 09:29:06 2013 -0400
@@ -148,6 +148,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
final Spliterator.OfLong lazySpliterator(Supplier<? extends Spliterator<Long>> supplier) {
return new StreamSpliterators.DelegatingSpliterator.OfLong((Supplier<Spliterator.OfLong>) supplier);
}
@@ -209,6 +210,7 @@
Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
return new Sink.ChainedLong(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(long t) {
downstream.accept(mapper.applyAsLong(t));
}
@@ -226,6 +228,7 @@
Sink<Long> opWrapSink(int flags, Sink<U> sink) {
return new Sink.ChainedLong(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(long t) {
downstream.accept(mapper.apply(t));
}
@@ -243,6 +246,7 @@
Sink<Long> opWrapSink(int flags, Sink<Integer> sink) {
return new Sink.ChainedLong(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(long t) {
downstream.accept(mapper.applyAsInt(t));
}
--- a/jdk/src/share/classes/java/util/stream/LongStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/LongStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -517,7 +517,7 @@
long count();
/**
- * Returns an {@code OptionalDouble} describing the average of elements of
+ * Returns an {@code OptionalDouble} describing the arithmetic mean of elements of
* this stream, or an empty optional if this stream is empty. This is a
* special case of a
* <a href="package-summary.html#MutableReduction">reduction</a>.
--- a/jdk/src/share/classes/java/util/stream/MatchOps.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/MatchOps.java Mon Aug 12 09:29:06 2013 -0400
@@ -274,6 +274,7 @@
* @param <P_IN> the type of source elements for the pipeline
* @param <P_OUT> the type of output elements for the pipeline
*/
+ @SuppressWarnings("serial")
private static final class MatchTask<P_IN, P_OUT>
extends AbstractShortCircuitTask<P_IN, P_OUT, Boolean, MatchTask<P_IN, P_OUT>> {
private final MatchOp<P_OUT> op;
--- a/jdk/src/share/classes/java/util/stream/Nodes.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/Nodes.java Mon Aug 12 09:29:06 2013 -0400
@@ -60,6 +60,7 @@
*/
static final long MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
+ @SuppressWarnings("raw")
private static final Node EMPTY_NODE = new EmptyNode.OfRef();
private static final Node.OfInt EMPTY_INT_NODE = new EmptyNode.OfInt();
private static final Node.OfLong EMPTY_LONG_NODE = new EmptyNode.OfLong();
@@ -1786,6 +1787,10 @@
}
}
+ /*
+ * This and subclasses are not intended to be serializable
+ */
+ @SuppressWarnings("serial")
private static abstract class SizedCollectorTask<P_IN, P_OUT, T_SINK extends Sink<P_OUT>,
K extends SizedCollectorTask<P_IN, P_OUT, T_SINK, K>>
extends CountedCompleter<Void>
@@ -1855,6 +1860,7 @@
fence = (int) offset + (int) length;
}
+ @SuppressWarnings("serial")
static final class OfRef<P_IN, P_OUT>
extends SizedCollectorTask<P_IN, P_OUT, Sink<P_OUT>, OfRef<P_IN, P_OUT>>
implements Sink<P_OUT> {
@@ -1886,6 +1892,7 @@
}
}
+ @SuppressWarnings("serial")
static final class OfInt<P_IN>
extends SizedCollectorTask<P_IN, Integer, Sink.OfInt, OfInt<P_IN>>
implements Sink.OfInt {
@@ -1917,6 +1924,7 @@
}
}
+ @SuppressWarnings("serial")
static final class OfLong<P_IN>
extends SizedCollectorTask<P_IN, Long, Sink.OfLong, OfLong<P_IN>>
implements Sink.OfLong {
@@ -1948,6 +1956,7 @@
}
}
+ @SuppressWarnings("serial")
static final class OfDouble<P_IN>
extends SizedCollectorTask<P_IN, Double, Sink.OfDouble, OfDouble<P_IN>>
implements Sink.OfDouble {
@@ -1980,6 +1989,7 @@
}
}
+ @SuppressWarnings("serial")
private static abstract class ToArrayTask<T, T_NODE extends Node<T>,
K extends ToArrayTask<T, T_NODE, K>>
extends CountedCompleter<Void> {
@@ -2025,6 +2035,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfRef<T>
extends ToArrayTask<T, Node<T>, OfRef<T>> {
private final T[] array;
@@ -2050,6 +2061,7 @@
}
}
+ @SuppressWarnings("serial")
private static class OfPrimitive<T, T_CONS, T_ARR,
T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>,
T_NODE extends Node.OfPrimitive<T, T_CONS, T_ARR, T_SPLITR, T_NODE>>
@@ -2077,6 +2089,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfInt
extends OfPrimitive<Integer, IntConsumer, int[], Spliterator.OfInt, Node.OfInt> {
private OfInt(Node.OfInt node, int[] array, int offset) {
@@ -2084,6 +2097,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfLong
extends OfPrimitive<Long, LongConsumer, long[], Spliterator.OfLong, Node.OfLong> {
private OfLong(Node.OfLong node, long[] array, int offset) {
@@ -2091,6 +2105,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfDouble
extends OfPrimitive<Double, DoubleConsumer, double[], Spliterator.OfDouble, Node.OfDouble> {
private OfDouble(Node.OfDouble node, double[] array, int offset) {
@@ -2099,6 +2114,7 @@
}
}
+ @SuppressWarnings("serial")
private static class CollectorTask<P_IN, P_OUT, T_NODE extends Node<P_OUT>, T_BUILDER extends Node.Builder<P_OUT>>
extends AbstractTask<P_IN, P_OUT, T_NODE, CollectorTask<P_IN, P_OUT, T_NODE, T_BUILDER>> {
protected final PipelineHelper<P_OUT> helper;
@@ -2135,12 +2151,13 @@
}
@Override
- public void onCompletion(CountedCompleter caller) {
+ public void onCompletion(CountedCompleter<?> caller) {
if (!isLeaf())
setLocalResult(concFactory.apply(leftChild.getLocalResult(), rightChild.getLocalResult()));
super.onCompletion(caller);
}
+ @SuppressWarnings("serial")
private static final class OfRef<P_IN, P_OUT>
extends CollectorTask<P_IN, P_OUT, Node<P_OUT>, Node.Builder<P_OUT>> {
OfRef(PipelineHelper<P_OUT> helper,
@@ -2150,6 +2167,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfInt<P_IN>
extends CollectorTask<P_IN, Integer, Node.OfInt, Node.Builder.OfInt> {
OfInt(PipelineHelper<Integer> helper, Spliterator<P_IN> spliterator) {
@@ -2157,6 +2175,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfLong<P_IN>
extends CollectorTask<P_IN, Long, Node.OfLong, Node.Builder.OfLong> {
OfLong(PipelineHelper<Long> helper, Spliterator<P_IN> spliterator) {
@@ -2164,6 +2183,7 @@
}
}
+ @SuppressWarnings("serial")
private static final class OfDouble<P_IN>
extends CollectorTask<P_IN, Double, Node.OfDouble, Node.Builder.OfDouble> {
OfDouble(PipelineHelper<Double> helper, Spliterator<P_IN> spliterator) {
--- a/jdk/src/share/classes/java/util/stream/ReduceOps.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/ReduceOps.java Mon Aug 12 09:29:06 2013 -0400
@@ -43,7 +43,7 @@
import java.util.function.Supplier;
/**
- * Factory for the creating instances of {@code TerminalOp) that implement
+ * Factory for creating instances of {@code TerminalOp} that implement
* reductions.
*
* @since 1.8
@@ -148,17 +148,17 @@
* reference values.
*
* @param <T> the type of the input elements
- * @param <R> the type of the result
+ * @param <I> the type of the intermediate reduction result
* @param collector a {@code Collector} defining the reduction
* @return a {@code ReduceOp} implementing the reduction
*/
- public static <T,R> TerminalOp<T, R>
- makeRef(Collector<? super T,R> collector) {
- Supplier<R> supplier = Objects.requireNonNull(collector).resultSupplier();
- BiFunction<R, ? super T, R> accumulator = collector.accumulator();
- BinaryOperator<R> combiner = collector.combiner();
- class ReducingSink extends Box<R>
- implements AccumulatingSink<T, R, ReducingSink> {
+ public static <T, I> TerminalOp<T, I>
+ makeRef(Collector<? super T, I, ?> collector) {
+ Supplier<I> supplier = Objects.requireNonNull(collector).supplier();
+ BiConsumer<I, ? super T> accumulator = collector.accumulator();
+ BinaryOperator<I> combiner = collector.combiner();
+ class ReducingSink extends Box<I>
+ implements AccumulatingSink<T, I, ReducingSink> {
@Override
public void begin(long size) {
state = supplier.get();
@@ -166,9 +166,7 @@
@Override
public void accept(T t) {
- R newResult = accumulator.apply(state, t);
- if (state != newResult)
- state = newResult;
+ accumulator.accept(state, t);
}
@Override
@@ -176,7 +174,7 @@
state = combiner.apply(state, other.state);
}
}
- return new ReduceOp<T, R, ReducingSink>(StreamShape.REFERENCE) {
+ return new ReduceOp<T, I, ReducingSink>(StreamShape.REFERENCE) {
@Override
public ReducingSink makeSink() {
return new ReducingSink();
@@ -720,6 +718,7 @@
/**
* A {@code ForkJoinTask} for performing a parallel reduce operation.
*/
+ @SuppressWarnings("serial")
private static final class ReduceTask<P_IN, P_OUT, R,
S extends AccumulatingSink<P_OUT, R, S>>
extends AbstractTask<P_IN, P_OUT, S, ReduceTask<P_IN, P_OUT, R, S>> {
@@ -749,7 +748,7 @@
}
@Override
- public void onCompletion(CountedCompleter caller) {
+ public void onCompletion(CountedCompleter<?> caller) {
if (!isLeaf()) {
S leftResult = leftChild.getLocalResult();
leftResult.combine(rightChild.getLocalResult());
--- a/jdk/src/share/classes/java/util/stream/ReferencePipeline.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/ReferencePipeline.java Mon Aug 12 09:29:06 2013 -0400
@@ -170,9 +170,10 @@
}
@Override
+ @SuppressWarnings("unchecked")
public void accept(P_OUT u) {
if (predicate.test(u))
- downstream.accept(u);
+ downstream.accept((Object) u);
}
};
}
@@ -180,6 +181,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
public final <R> Stream<R> map(Function<? super P_OUT, ? extends R> mapper) {
Objects.requireNonNull(mapper);
return new StatelessOp<P_OUT, R>(this, StreamShape.REFERENCE,
@@ -262,6 +264,7 @@
}
@Override
+ @SuppressWarnings("unchecked")
public void accept(P_OUT u) {
// We can do better that this too; optimize for depth=0 case and just grab spliterator and forEach it
Stream<? extends R> result = mapper.apply(u);
@@ -363,6 +366,7 @@
Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) {
return new Sink.ChainedReference<P_OUT>(sink) {
@Override
+ @SuppressWarnings("unchecked")
public void accept(P_OUT u) {
tee.accept(u);
downstream.accept(u);
@@ -439,6 +443,7 @@
// The runtime type of U is never checked for equality with the component type of the runtime type of A[].
// Runtime checking will be performed when an element is stored in A[], thus if A is not a
// super type of U an ArrayStoreException will be thrown.
+ @SuppressWarnings("rawtypes")
IntFunction rawGenerator = (IntFunction) generator;
return (A[]) Nodes.flatten(evaluateToArrayNode(rawGenerator), rawGenerator)
.asArray(rawGenerator);
@@ -490,16 +495,21 @@
}
@Override
- public final <R> R collect(Collector<? super P_OUT, R> collector) {
+ public final <R, A> R collect(Collector<? super P_OUT, A, ? extends R> collector) {
+ A container;
if (isParallel()
&& (collector.characteristics().contains(Collector.Characteristics.CONCURRENT))
&& (!isOrdered() || collector.characteristics().contains(Collector.Characteristics.UNORDERED))) {
- R container = collector.resultSupplier().get();
- BiFunction<R, ? super P_OUT, R> accumulator = collector.accumulator();
- forEach(u -> accumulator.apply(container, u));
- return container;
+ container = collector.supplier().get();
+ BiConsumer<A, ? super P_OUT> accumulator = collector.accumulator();
+ forEach(u -> accumulator.accept(container, u));
}
- return evaluate(ReduceOps.makeRef(collector));
+ else {
+ container = evaluate(ReduceOps.makeRef(collector));
+ }
+ return collector.characteristics().contains(Collector.Characteristics.IDENTITY_FINISH)
+ ? (R) container
+ : collector.finisher().apply(container);
}
@Override
--- a/jdk/src/share/classes/java/util/stream/Sink.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/Sink.java Mon Aug 12 09:29:06 2013 -0400
@@ -242,6 +242,7 @@
* {@code accept()} method on the downstream {@code Sink}.
*/
static abstract class ChainedReference<T> implements Sink<T> {
+ @SuppressWarnings("rawtypes")
protected final Sink downstream;
public ChainedReference(Sink downstream) {
@@ -274,6 +275,7 @@
* {@code accept()} method on the downstream {@code Sink}.
*/
static abstract class ChainedInt implements Sink.OfInt {
+ @SuppressWarnings("rawtypes")
protected final Sink downstream;
public ChainedInt(Sink downstream) {
@@ -306,6 +308,7 @@
* {@code accept()} method on the downstream {@code Sink}.
*/
static abstract class ChainedLong implements Sink.OfLong {
+ @SuppressWarnings("rawtypes")
protected final Sink downstream;
public ChainedLong(Sink downstream) {
@@ -338,6 +341,7 @@
* {@code accept()} method on the downstream {@code Sink}.
*/
static abstract class ChainedDouble implements Sink.OfDouble {
+ @SuppressWarnings("rawtypes")
protected final Sink downstream;
public ChainedDouble(Sink downstream) {
--- a/jdk/src/share/classes/java/util/stream/SliceOps.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/SliceOps.java Mon Aug 12 09:29:06 2013 -0400
@@ -550,6 +550,7 @@
* @param <P_IN> Input element type to the stream pipeline
* @param <P_OUT> Output element type from the stream pipeline
*/
+ @SuppressWarnings("serial")
private static final class SliceTask<P_IN, P_OUT>
extends AbstractShortCircuitTask<P_IN, P_OUT, Node<P_OUT>, SliceTask<P_IN, P_OUT>> {
private final AbstractPipeline<P_OUT, P_OUT, ?> op;
--- a/jdk/src/share/classes/java/util/stream/SortedOps.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/SortedOps.java Mon Aug 12 09:29:06 2013 -0400
@@ -209,7 +209,7 @@
}
@Override
- public Sink<Long> opWrapSink(int flags, Sink sink) {
+ public Sink<Long> opWrapSink(int flags, Sink<Long> sink) {
Objects.requireNonNull(sink);
if (StreamOpFlag.SORTED.isKnown(flags))
@@ -248,7 +248,7 @@
}
@Override
- public Sink<Double> opWrapSink(int flags, Sink sink) {
+ public Sink<Double> opWrapSink(int flags, Sink<Double> sink) {
Objects.requireNonNull(sink);
if (StreamOpFlag.SORTED.isKnown(flags))
@@ -285,7 +285,7 @@
private T[] array;
private int offset;
- SizedRefSortingSink(Sink sink, Comparator<? super T> comparator) {
+ SizedRefSortingSink(Sink<T> sink, Comparator<? super T> comparator) {
super(sink);
this.comparator = comparator;
}
@@ -324,7 +324,7 @@
private final Comparator<? super T> comparator;
private ArrayList<T> list;
- RefSortingSink(Sink sink, Comparator<? super T> comparator) {
+ RefSortingSink(Sink<T> sink, Comparator<? super T> comparator) {
super(sink);
this.comparator = comparator;
}
--- a/jdk/src/share/classes/java/util/stream/SpinedBuffer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/SpinedBuffer.java Mon Aug 12 09:29:06 2013 -0400
@@ -28,6 +28,7 @@
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.Objects;
import java.util.PrimitiveIterator;
import java.util.Spliterator;
import java.util.Spliterators;
@@ -317,6 +318,8 @@
@Override
public boolean tryAdvance(Consumer<? super E> consumer) {
+ Objects.requireNonNull(consumer);
+
if (splSpineIndex < lastSpineIndex
|| (splSpineIndex == lastSpineIndex && splElementIndex < lastSpineElementFence)) {
consumer.accept(splChunk[splElementIndex++]);
@@ -334,6 +337,8 @@
@Override
public void forEachRemaining(Consumer<? super E> consumer) {
+ Objects.requireNonNull(consumer);
+
if (splSpineIndex < lastSpineIndex
|| (splSpineIndex == lastSpineIndex && splElementIndex < lastSpineElementFence)) {
int i = splElementIndex;
@@ -634,6 +639,8 @@
@Override
public boolean tryAdvance(T_CONS consumer) {
+ Objects.requireNonNull(consumer);
+
if (splSpineIndex < lastSpineIndex
|| (splSpineIndex == lastSpineIndex && splElementIndex < lastSpineElementFence)) {
arrayForOne(splChunk, splElementIndex++, consumer);
@@ -651,6 +658,8 @@
@Override
public void forEachRemaining(T_CONS consumer) {
+ Objects.requireNonNull(consumer);
+
if (splSpineIndex < lastSpineIndex
|| (splSpineIndex == lastSpineIndex && splElementIndex < lastSpineElementFence)) {
int i = splElementIndex;
--- a/jdk/src/share/classes/java/util/stream/Stream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/Stream.java Mon Aug 12 09:29:06 2013 -0400
@@ -651,12 +651,13 @@
* }</pre>
*
* @param <R> the type of the result
+ * @param <A> the intermediate accumulation type of the {@code Collector}
* @param collector the {@code Collector} describing the reduction
* @return the result of the reduction
* @see #collect(Supplier, BiConsumer, BiConsumer)
* @see Collectors
*/
- <R> R collect(Collector<? super T, R> collector);
+ <R, A> R collect(Collector<? super T, A, ? extends R> collector);
/**
* Returns the minimum element of this stream according to the provided
@@ -827,6 +828,7 @@
* @return the new stream
*/
@SafeVarargs
+ @SuppressWarnings("varargs") // Creating a stream from an array is safe
public static<T> Stream<T> of(T... values) {
return Arrays.stream(values);
}
--- a/jdk/src/share/classes/java/util/stream/StreamSpliterators.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/StreamSpliterators.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package java.util.stream;
import java.util.Comparator;
+import java.util.Objects;
import java.util.Spliterator;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.BooleanSupplier;
@@ -294,6 +295,7 @@
@Override
public boolean tryAdvance(Consumer<? super P_OUT> consumer) {
+ Objects.requireNonNull(consumer);
boolean hasNext = doAdvance();
if (hasNext)
consumer.accept(buffer.get(nextToConsume));
@@ -303,6 +305,7 @@
@Override
public void forEachRemaining(Consumer<? super P_OUT> consumer) {
if (buffer == null && !finished) {
+ Objects.requireNonNull(consumer);
init();
ph.wrapAndCopyInto((Sink<P_OUT>) consumer::accept, spliterator);
@@ -350,6 +353,7 @@
@Override
public boolean tryAdvance(IntConsumer consumer) {
+ Objects.requireNonNull(consumer);
boolean hasNext = doAdvance();
if (hasNext)
consumer.accept(buffer.get(nextToConsume));
@@ -359,6 +363,7 @@
@Override
public void forEachRemaining(IntConsumer consumer) {
if (buffer == null && !finished) {
+ Objects.requireNonNull(consumer);
init();
ph.wrapAndCopyInto((Sink.OfInt) consumer::accept, spliterator);
@@ -406,6 +411,7 @@
@Override
public boolean tryAdvance(LongConsumer consumer) {
+ Objects.requireNonNull(consumer);
boolean hasNext = doAdvance();
if (hasNext)
consumer.accept(buffer.get(nextToConsume));
@@ -415,6 +421,7 @@
@Override
public void forEachRemaining(LongConsumer consumer) {
if (buffer == null && !finished) {
+ Objects.requireNonNull(consumer);
init();
ph.wrapAndCopyInto((Sink.OfLong) consumer::accept, spliterator);
@@ -462,6 +469,7 @@
@Override
public boolean tryAdvance(DoubleConsumer consumer) {
+ Objects.requireNonNull(consumer);
boolean hasNext = doAdvance();
if (hasNext)
consumer.accept(buffer.get(nextToConsume));
@@ -471,6 +479,7 @@
@Override
public void forEachRemaining(DoubleConsumer consumer) {
if (buffer == null && !finished) {
+ Objects.requireNonNull(consumer);
init();
ph.wrapAndCopyInto((Sink.OfDouble) consumer::accept, spliterator);
@@ -696,6 +705,8 @@
@Override
public boolean tryAdvance(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
if (sliceOrigin >= fence)
return false;
@@ -713,6 +724,8 @@
@Override
public void forEachRemaining(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
if (sliceOrigin >= fence)
return;
@@ -754,6 +767,8 @@
@Override
public boolean tryAdvance(T_CONS action) {
+ Objects.requireNonNull(action);
+
if (sliceOrigin >= fence)
return false;
@@ -771,6 +786,8 @@
@Override
public void forEachRemaining(T_CONS action) {
+ Objects.requireNonNull(action);
+
if (sliceOrigin >= fence)
return;
@@ -895,7 +912,8 @@
this.permits = new AtomicLong(limit >= 0 ? skip + limit : skip);
}
- UnorderedSliceSpliterator(T_SPLITR s, UnorderedSliceSpliterator parent) {
+ UnorderedSliceSpliterator(T_SPLITR s,
+ UnorderedSliceSpliterator<T, T_SPLITR> parent) {
this.s = s;
this.unlimited = parent.unlimited;
this.permits = parent.permits;
@@ -974,7 +992,7 @@
super(s, skip, limit);
}
- OfRef(Spliterator<T> s, OfRef parent) {
+ OfRef(Spliterator<T> s, OfRef<T> parent) {
super(s, parent);
}
@@ -985,6 +1003,8 @@
@Override
public boolean tryAdvance(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
while (permitStatus() != PermitStatus.NO_MORE) {
if (!s.tryAdvance(this))
return false;
@@ -999,6 +1019,8 @@
@Override
public void forEachRemaining(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
ArrayBuffer.OfRef<T> sb = null;
PermitStatus permitStatus;
while ((permitStatus = permitStatus()) != PermitStatus.NO_MORE) {
@@ -1051,6 +1073,8 @@
@Override
public boolean tryAdvance(T_CONS action) {
+ Objects.requireNonNull(action);
+
while (permitStatus() != PermitStatus.NO_MORE) {
if (!s.tryAdvance((T_CONS) this))
return false;
@@ -1066,6 +1090,8 @@
@Override
public void forEachRemaining(T_CONS action) {
+ Objects.requireNonNull(action);
+
T_BUFF sb = null;
PermitStatus permitStatus;
while ((permitStatus = permitStatus()) != PermitStatus.NO_MORE) {
@@ -1237,6 +1263,8 @@
@Override
public boolean tryAdvance(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
action.accept(s.get());
return true;
}
@@ -1260,6 +1288,8 @@
@Override
public boolean tryAdvance(IntConsumer action) {
+ Objects.requireNonNull(action);
+
action.accept(s.getAsInt());
return true;
}
@@ -1283,6 +1313,8 @@
@Override
public boolean tryAdvance(LongConsumer action) {
+ Objects.requireNonNull(action);
+
action.accept(s.getAsLong());
return true;
}
@@ -1306,6 +1338,8 @@
@Override
public boolean tryAdvance(DoubleConsumer action) {
+ Objects.requireNonNull(action);
+
action.accept(s.getAsDouble());
return true;
}
--- a/jdk/src/share/classes/java/util/stream/Streams.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/Streams.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package java.util.stream;
import java.util.Comparator;
+import java.util.Objects;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.function.DoubleConsumer;
@@ -80,6 +81,8 @@
@Override
public boolean tryAdvance(IntConsumer consumer) {
+ Objects.requireNonNull(consumer);
+
final int i = from;
if (i < upTo) {
from++;
@@ -96,6 +99,8 @@
@Override
public void forEachRemaining(IntConsumer consumer) {
+ Objects.requireNonNull(consumer);
+
int i = from;
final int hUpTo = upTo;
int hLast = last;
@@ -199,6 +204,8 @@
@Override
public boolean tryAdvance(LongConsumer consumer) {
+ Objects.requireNonNull(consumer);
+
final long i = from;
if (i < upTo) {
from++;
@@ -215,6 +222,8 @@
@Override
public void forEachRemaining(LongConsumer consumer) {
+ Objects.requireNonNull(consumer);
+
long i = from;
final long hUpTo = upTo;
int hLast = last;
@@ -388,6 +397,8 @@
@Override
public boolean tryAdvance(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -400,6 +411,8 @@
@Override
public void forEachRemaining(Consumer<? super T> action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -475,6 +488,8 @@
@Override
public boolean tryAdvance(IntConsumer action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -487,6 +502,8 @@
@Override
public void forEachRemaining(IntConsumer action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -562,6 +579,8 @@
@Override
public boolean tryAdvance(LongConsumer action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -574,6 +593,8 @@
@Override
public void forEachRemaining(LongConsumer action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -649,6 +670,8 @@
@Override
public boolean tryAdvance(DoubleConsumer action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -661,6 +684,8 @@
@Override
public void forEachRemaining(DoubleConsumer action) {
+ Objects.requireNonNull(action);
+
if (count == -2) {
action.accept(first);
count = -1;
@@ -681,11 +706,9 @@
this.aSpliterator = aSpliterator;
this.bSpliterator = bSpliterator;
beforeSplit = true;
- // The spliterator is unsized before splitting if a and b are
- // sized and the sum of the estimates overflows
- unsized = aSpliterator.hasCharacteristics(SIZED)
- && aSpliterator.hasCharacteristics(SIZED)
- && aSpliterator.estimateSize() + bSpliterator.estimateSize() < 0;
+ // The spliterator is known to be unsized before splitting if the
+ // sum of the estimates overflows.
+ unsized = aSpliterator.estimateSize() + bSpliterator.estimateSize() < 0;
}
@Override
--- a/jdk/src/share/classes/java/util/stream/package-info.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/stream/package-info.java Mon Aug 12 09:29:06 2013 -0400
@@ -547,7 +547,7 @@
* List<String> l = new ArrayList(Arrays.asList("one", "two"));
* Stream<String> sl = l.stream();
* l.add("three");
- * String s = sl.collect(toStringJoiner(" ")).toString();
+ * String s = sl.collect(joining(" "));
* }</pre>
* First a list is created consisting of two strings: "one"; and "two". Then a stream is created from that list.
* Next the list is modified by adding a third string: "three". Finally the elements of the stream are collected
@@ -557,7 +557,7 @@
* <pre>{@code
* List<String> l = new ArrayList(Arrays.asList("one", "two"));
* Stream<String> sl = l.stream();
- * String s = sl.peek(s -> l.add("BAD LAMBDA")).collect(toStringJoiner(" ")).toString();
+ * String s = sl.peek(s -> l.add("BAD LAMBDA")).collect(joining(" "));
* }</pre>
* then a {@code ConcurrentModificationException} will be thrown since the {@code peek} operation will attempt
* to add the string "BAD LAMBDA" to the list after the terminal operation has commenced.
--- a/jdk/src/share/classes/java/util/zip/ZipConstants.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/zip/ZipConstants.java Mon Aug 12 09:29:06 2013 -0400
@@ -71,10 +71,17 @@
/*
* Extra field header ID
*/
- static final int EXTID_ZIP64 = 0x0001; // Zip64
- static final int EXTID_NTFS = 0x000a; // NTFS
- static final int EXTID_UNIX = 0x000d; // UNIX
- static final int EXTID_EXTT = 0x5455; // Info-ZIP Extended Timestamp
+ static final int EXTID_ZIP64 = 0x0001; // Zip64
+ static final int EXTID_NTFS = 0x000a; // NTFS
+ static final int EXTID_UNIX = 0x000d; // UNIX
+ static final int EXTID_EXTT = 0x5455; // Info-ZIP Extended Timestamp
+
+ /*
+ * EXTT timestamp flags
+ */
+ static final int EXTT_FLAG_LMT = 0x1; // LastModifiedTime
+ static final int EXTT_FLAG_LAT = 0x2; // LastAccessTime
+ static final int EXTT_FLAT_CT = 0x4; // CreationTime
/*
* Central directory (CEN) header field offsets
--- a/jdk/src/share/classes/java/util/zip/ZipEntry.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/zip/ZipEntry.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -25,6 +25,11 @@
package java.util.zip;
+import static java.util.zip.ZipUtils.*;
+import java.nio.file.attribute.FileTime;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+
/**
* This class is used to represent a ZIP file entry.
*
@@ -32,8 +37,12 @@
*/
public
class ZipEntry implements ZipConstants, Cloneable {
+
String name; // entry name
- long mtime = -1; // last modification time
+ long time = -1; // last modification time
+ FileTime mtime; // last modification time, from extra field data
+ FileTime atime; // last access time, from extra field data
+ FileTime ctime; // creation time, from extra field data
long crc = -1; // crc-32 of entry data
long size = -1; // uncompressed size of entry data
long csize = -1; // compressed size of entry data
@@ -55,15 +64,15 @@
/**
* Creates a new zip entry with the specified name.
*
- * @param name the entry name
- * @exception NullPointerException if the entry name is null
- * @exception IllegalArgumentException if the entry name is longer than
- * 0xFFFF bytes
+ * @param name
+ * The entry name
+ *
+ * @throws NullPointerException if the entry name is null
+ * @throws IllegalArgumentException if the entry name is longer than
+ * 0xFFFF bytes
*/
public ZipEntry(String name) {
- if (name == null) {
- throw new NullPointerException();
- }
+ Objects.requireNonNull(name, "name");
if (name.length() > 0xFFFF) {
throw new IllegalArgumentException("entry name too long");
}
@@ -73,11 +82,19 @@
/**
* Creates a new zip entry with fields taken from the specified
* zip entry.
- * @param e a zip Entry object
+ *
+ * @param e
+ * A zip Entry object
+ *
+ * @throws NullPointerException if the entry object is null
*/
public ZipEntry(ZipEntry e) {
+ Objects.requireNonNull(e, "entry");
name = e.name;
+ time = e.time;
mtime = e.mtime;
+ atime = e.atime;
+ ctime = e.ctime;
crc = e.crc;
size = e.size;
csize = e.csize;
@@ -103,33 +120,178 @@
/**
* Sets the last modification time of the entry.
*
- * @param time the last modification time of the entry in milliseconds since the epoch
+ * <p> If the entry is output to a ZIP file or ZIP file formatted
+ * output stream the last modification time set by this method will
+ * be stored into the {@code date and time fields} of the zip file
+ * entry and encoded in standard {@code MS-DOS date and time format}.
+ * The {@link java.util.TimeZone#getDefault() default TimeZone} is
+ * used to convert the epoch time to the MS-DOS data and time.
+ *
+ * @param time
+ * The last modification time of the entry in milliseconds
+ * since the epoch
+ *
* @see #getTime()
+ * @see #getLastModifiedTime()
*/
public void setTime(long time) {
+ this.time = time;
+ this.mtime = null;
+ }
+
+ /**
+ * Returns the last modification time of the entry.
+ *
+ * <p> If the entry is read from a ZIP file or ZIP file formatted
+ * input stream, this is the last modification time from the {@code
+ * date and time fields} of the zip file entry. The
+ * {@link java.util.TimeZone#getDefault() default TimeZone} is used
+ * to convert the standard MS-DOS formatted date and time to the
+ * epoch time.
+ *
+ * @return The last modification time of the entry in milliseconds
+ * since the epoch, or -1 if not specified
+ *
+ * @see #setTime(long)
+ * @see #setLastModifiedTime(FileTime)
+ */
+ public long getTime() {
+ return time;
+ }
+
+ /**
+ * Sets the last modification time of the entry.
+ *
+ * <p> When output to a ZIP file or ZIP file formatted output stream
+ * the last modification time set by this method will be stored into
+ * zip file entry's {@code date and time fields} in {@code standard
+ * MS-DOS date and time format}), and the extended timestamp fields
+ * in {@code optional extra data} in UTC time.
+ *
+ * @param time
+ * The last modification time of the entry
+ * @return This zip entry
+ *
+ * @throws NullPointerException if the {@code time} is null
+ *
+ * @see #getLastModifiedTime()
+ * @since 1.8
+ */
+ public ZipEntry setLastModifiedTime(FileTime time) {
+ Objects.requireNonNull(name, "time");
this.mtime = time;
+ this.time = time.to(TimeUnit.MILLISECONDS);
+ return this;
}
/**
* Returns the last modification time of the entry.
- * <p> The last modificatin time may come from zip entry's extensible
- * data field {@code NTFS} or {@code Info-ZIP Extended Timestamp}, if
- * the entry is read from {@link ZipInputStream} or {@link ZipFile}.
+ *
+ * <p> If the entry is read from a ZIP file or ZIP file formatted
+ * input stream, this is the last modification time from the zip
+ * file entry's {@code optional extra data} if the extended timestamp
+ * fields are present. Otherwise the last modification time is read
+ * from the entry's {@code date and time fields}, the {@link
+ * java.util.TimeZone#getDefault() default TimeZone} is used to convert
+ * the standard MS-DOS formatted date and time to the epoch time.
+ *
+ * @return The last modification time of the entry, null if not specified
+ *
+ * @see #setLastModifiedTime(FileTime)
+ * @since 1.8
+ */
+ public FileTime getLastModifiedTime() {
+ if (mtime != null)
+ return mtime;
+ if (time == -1)
+ return null;
+ return FileTime.from(time, TimeUnit.MILLISECONDS);
+ }
+
+ /**
+ * Sets the last access time of the entry.
+ *
+ * <p> If set, the last access time will be stored into the extended
+ * timestamp fields of entry's {@code optional extra data}, when output
+ * to a ZIP file or ZIP file formatted stream.
+ *
+ * @param time
+ * The last access time of the entry
+ * @return This zip entry
+ *
+ * @throws NullPointerException if the {@code time} is null
+ *
+ * @see #getLastAccessTime()
+ * @since 1.8
+ */
+ public ZipEntry setLastAccessTime(FileTime time) {
+ Objects.requireNonNull(name, "time");
+ this.atime = time;
+ return this;
+ }
+
+ /**
+ * Returns the last access time of the entry.
*
- * @return the last modification time of the entry, or -1 if not specified
- * @see #setTime(long)
+ * <p> The last access time is from the extended timestamp fields
+ * of entry's {@code optional extra data} when read from a ZIP file
+ * or ZIP file formatted stream.
+ *
+ * @return The last access time of the entry, null if not specified
+
+ * @see #setLastAccessTime(long)
+ * @since 1.8
*/
- public long getTime() {
- return mtime;
+ public FileTime getLastAccessTime() {
+ return atime;
+ }
+
+ /**
+ * Sets the creation time of the entry.
+ *
+ * <p> If set, the creation time will be stored into the extended
+ * timestamp fields of entry's {@code optional extra data}, when
+ * output to a ZIP file or ZIP file formatted stream.
+ *
+ * @param time
+ * The creation time of the entry
+ * @return This zip entry
+ *
+ * @throws NullPointerException if the {@code time} is null
+ *
+ * @see #getCreationTime()
+ * @since 1.8
+ */
+ public ZipEntry setCreationTime(FileTime time) {
+ Objects.requireNonNull(name, "time");
+ this.ctime = time;
+ return this;
+ }
+
+ /**
+ * Returns the creation time of the entry.
+ *
+ * <p> The creation time is from the extended timestamp fields of
+ * entry's {@code optional extra data} when read from a ZIP file
+ * or ZIP file formatted stream.
+ *
+ * @return the creation time of the entry, null if not specified
+ * @see #setCreationTime(FileTime)
+ * @since 1.8
+ */
+ public FileTime getCreationTime() {
+ return ctime;
}
/**
* Sets the uncompressed size of the entry data.
+ *
* @param size the uncompressed size in bytes
- * @exception IllegalArgumentException if the specified size is less
- * than 0, is greater than 0xFFFFFFFF when
- * <a href="package-summary.html#zip64">ZIP64 format</a> is not supported,
- * or is less than 0 when ZIP64 is supported
+ *
+ * @throws IllegalArgumentException if the specified size is less
+ * than 0, is greater than 0xFFFFFFFF when
+ * <a href="package-summary.html#zip64">ZIP64 format</a> is not supported,
+ * or is less than 0 when ZIP64 is supported
* @see #getSize()
*/
public void setSize(long size) {
@@ -140,7 +302,8 @@
}
/**
- * Returns the uncompressed size of the entry data, or -1 if not known.
+ * Returns the uncompressed size of the entry data.
+ *
* @return the uncompressed size of the entry data, or -1 if not known
* @see #setSize(long)
*/
@@ -149,9 +312,11 @@
}
/**
- * Returns the size of the compressed entry data, or -1 if not known.
- * In the case of a stored entry, the compressed size will be the same
+ * Returns the size of the compressed entry data.
+ *
+ * <p> In the case of a stored entry, the compressed size will be the same
* as the uncompressed size of the entry.
+ *
* @return the size of the compressed entry data, or -1 if not known
* @see #setCompressedSize(long)
*/
@@ -161,7 +326,9 @@
/**
* Sets the size of the compressed entry data.
+ *
* @param csize the compressed size to set to
+ *
* @see #getCompressedSize()
*/
public void setCompressedSize(long csize) {
@@ -170,9 +337,11 @@
/**
* Sets the CRC-32 checksum of the uncompressed entry data.
+ *
* @param crc the CRC-32 value
- * @exception IllegalArgumentException if the specified CRC-32 value is
- * less than 0 or greater than 0xFFFFFFFF
+ *
+ * @throws IllegalArgumentException if the specified CRC-32 value is
+ * less than 0 or greater than 0xFFFFFFFF
* @see #getCrc()
*/
public void setCrc(long crc) {
@@ -183,10 +352,11 @@
}
/**
- * Returns the CRC-32 checksum of the uncompressed entry data, or -1 if
- * not known.
+ * Returns the CRC-32 checksum of the uncompressed entry data.
+ *
* @return the CRC-32 checksum of the uncompressed entry data, or -1 if
* not known
+ *
* @see #setCrc(long)
*/
public long getCrc() {
@@ -195,9 +365,11 @@
/**
* Sets the compression method for the entry.
+ *
* @param method the compression method, either STORED or DEFLATED
- * @exception IllegalArgumentException if the specified compression
- * method is invalid
+ *
+ * @throws IllegalArgumentException if the specified compression
+ * method is invalid
* @see #getMethod()
*/
public void setMethod(int method) {
@@ -208,7 +380,8 @@
}
/**
- * Returns the compression method of the entry, or -1 if not specified.
+ * Returns the compression method of the entry.
+ *
* @return the compression method of the entry, or -1 if not specified
* @see #setMethod(int)
*/
@@ -218,21 +391,104 @@
/**
* Sets the optional extra field data for the entry.
- * @param extra the extra field data bytes
- * @exception IllegalArgumentException if the length of the specified
- * extra field data is greater than 0xFFFF bytes
+ *
+ * <p> Invoking this method may change this entry's last modification
+ * time, last access time and creation time, if the {@code extra} field
+ * data includes the extensible timestamp fields, such as {@code NTFS tag
+ * 0x0001} or {@code Info-ZIP Extended Timestamp}, as specified in
+ * <a href="http://www.info-zip.org/doc/appnote-19970311-iz.zip">Info-ZIP
+ * Application Note 970311</a>.
+ *
+ * @param extra
+ * The extra field data bytes
+ *
+ * @throws IllegalArgumentException if the length of the specified
+ * extra field data is greater than 0xFFFF bytes
+ *
* @see #getExtra()
*/
public void setExtra(byte[] extra) {
- if (extra != null && extra.length > 0xFFFF) {
- throw new IllegalArgumentException("invalid extra field length");
+ setExtra0(extra, false);
+ }
+
+ /**
+ * Sets the optional extra field data for the entry.
+ *
+ * @param extra
+ * the extra field data bytes
+ * @param doZIP64
+ * if true, set size and csize from ZIP64 fields if present
+ */
+ void setExtra0(byte[] extra, boolean doZIP64) {
+ if (extra != null) {
+ if (extra.length > 0xFFFF) {
+ throw new IllegalArgumentException("invalid extra field length");
+ }
+ // extra fields are in "HeaderID(2)DataSize(2)Data... format
+ int off = 0;
+ int len = extra.length;
+ while (off + 4 < len) {
+ int tag = get16(extra, off);
+ int sz = get16(extra, off + 2);
+ off += 4;
+ if (off + sz > len) // invalid data
+ break;
+ switch (tag) {
+ case EXTID_ZIP64:
+ if (doZIP64) {
+ // LOC extra zip64 entry MUST include BOTH original
+ // and compressed file size fields.
+ // If invalid zip64 extra fields, simply skip. Even
+ // it's rare, it's possible the entry size happens to
+ // be the magic value and it "accidently" has some
+ // bytes in extra match the id.
+ if (sz >= 16) {
+ size = get64(extra, off);
+ csize = get64(extra, off + 8);
+ }
+ }
+ break;
+ case EXTID_NTFS:
+ int pos = off + 4; // reserved 4 bytes
+ if (get16(extra, pos) != 0x0001 || get16(extra, pos + 2) != 24)
+ break;
+ mtime = winTimeToFileTime(get64(extra, pos + 4));
+ atime = winTimeToFileTime(get64(extra, pos + 12));
+ ctime = winTimeToFileTime(get64(extra, pos + 20));
+ break;
+ case EXTID_EXTT:
+ int flag = Byte.toUnsignedInt(extra[off]);
+ int sz0 = 1;
+ // The CEN-header extra field contains the modification
+ // time only, or no timestamp at all. 'sz' is used to
+ // flag its presence or absence. But if mtime is present
+ // in LOC it must be present in CEN as well.
+ if ((flag & 0x1) != 0 && (sz0 + 4) <= sz) {
+ mtime = unixTimeToFileTime(get32(extra, off + sz0));
+ sz0 += 4;
+ }
+ if ((flag & 0x2) != 0 && (sz0 + 4) <= sz) {
+ atime = unixTimeToFileTime(get32(extra, off + sz0));
+ sz0 += 4;
+ }
+ if ((flag & 0x4) != 0 && (sz0 + 4) <= sz) {
+ ctime = unixTimeToFileTime(get32(extra, off + sz0));
+ sz0 += 4;
+ }
+ break;
+ default:
+ }
+ off += sz;
+ }
}
this.extra = extra;
}
/**
- * Returns the extra field data for the entry, or null if none.
+ * Returns the extra field data for the entry.
+ *
* @return the extra field data for the entry, or null if none
+ *
* @see #setExtra(byte[])
*/
public byte[] getExtra() {
@@ -255,8 +511,10 @@
}
/**
- * Returns the comment string for the entry, or null if none.
+ * Returns the comment string for the entry.
+ *
* @return the comment string for the entry, or null if none
+ *
* @see #setComment(String)
*/
public String getComment() {
--- a/jdk/src/share/classes/java/util/zip/ZipFile.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/zip/ZipFile.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -567,44 +567,12 @@
e.name = zc.toString(bname, bname.length);
}
}
+ e.time = dosToJavaTime(getEntryTime(jzentry));
e.crc = getEntryCrc(jzentry);
e.size = getEntrySize(jzentry);
- e. csize = getEntryCSize(jzentry);
+ e.csize = getEntryCSize(jzentry);
e.method = getEntryMethod(jzentry);
- e.extra = getEntryBytes(jzentry, JZENTRY_EXTRA);
- if (e.extra != null) {
- byte[] extra = e.extra;
- int len = e.extra.length;
- int off = 0;
- while (off + 4 < len) {
- int pos = off;
- int tag = get16(extra, pos);
- int sz = get16(extra, pos + 2);
- pos += 4;
- if (pos + sz > len) // invalid data
- break;
- switch (tag) {
- case EXTID_NTFS:
- pos += 4; // reserved 4 bytes
- if (get16(extra, pos) != 0x0001 || get16(extra, pos + 2) != 24)
- break;
- e.mtime = winToJavaTime(get64(extra, pos + 4));
- break;
- case EXTID_EXTT:
- int flag = Byte.toUnsignedInt(extra[pos++]);
- if ((flag & 0x1) != 0) {
- e.mtime = unixToJavaTime(get32(extra, pos));
- pos += 4;
- }
- break;
- default: // unknown tag
- }
- off += (sz + 4);
- }
- }
- if (e.mtime == -1) {
- e.mtime = dosToJavaTime(getEntryTime(jzentry));
- }
+ e.setExtra0(getEntryBytes(jzentry, JZENTRY_EXTRA), false);
byte[] bcomm = getEntryBytes(jzentry, JZENTRY_COMMENT);
if (bcomm == null) {
e.comment = null;
--- a/jdk/src/share/classes/java/util/zip/ZipInputStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/zip/ZipInputStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -288,9 +288,9 @@
int len = get16(tmpbuf, LOCNAM);
int blen = b.length;
if (len > blen) {
- do
+ do {
blen = blen * 2;
- while (len > blen);
+ } while (len > blen);
b = new byte[blen];
}
readFully(b, 0, len);
@@ -303,7 +303,7 @@
throw new ZipException("encrypted ZIP entry not supported");
}
e.method = get16(tmpbuf, LOCHOW);
- e.mtime = dosToJavaTime(get32(tmpbuf, LOCTIM));
+ e.time = dosToJavaTime(get32(tmpbuf, LOCTIM));
if ((flag & 8) == 8) {
/* "Data Descriptor" present */
if (e.method != DEFLATED) {
@@ -319,49 +319,7 @@
if (len > 0) {
byte[] extra = new byte[len];
readFully(extra, 0, len);
- e.setExtra(extra);
- // extra fields are in "HeaderID(2)DataSize(2)Data... format
- int off = 0;
- while (off + 4 < len) {
- int pos = off;
- int tag = get16(extra, pos);
- int sz = get16(extra, pos + 2);
- pos += 4;
- if (pos + sz > len) // invalid data
- break;
- switch (tag) {
- case EXTID_ZIP64 :
- // LOC extra zip64 entry MUST include BOTH original and
- // compressed file size fields.
- //
- // If invalid zip64 extra fields, simply skip. Even it's
- // rare, it's possible the entry size happens to be
- // the magic value and it "accidently" has some bytes
- // in extra match the id.
- if (sz >= 16 && (pos + sz) <= len ) {
- e.size = get64(extra, pos);
- e.csize = get64(extra, pos + 8);
- }
- break;
- case EXTID_NTFS:
- pos += 4; // reserved 4 bytes
- if (get16(extra, pos) != 0x0001 || get16(extra, pos + 2) != 24)
- break;
- // override the loc field, NTFS time has 'microsecond' granularity
- e.mtime = winToJavaTime(get64(extra, pos + 4));
- break;
- case EXTID_EXTT:
- int flag = Byte.toUnsignedInt(extra[pos++]);
- if ((flag & 0x1) != 0) {
- e.mtime = unixToJavaTime(get32(extra, pos));
- pos += 4;
- }
- break;
- default: // unknown tag
- }
- off += (sz + 4);
- }
-
+ e.setExtra0(extra, true);
}
return e;
}
--- a/jdk/src/share/classes/java/util/zip/ZipOutputStream.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/zip/ZipOutputStream.java Mon Aug 12 09:29:06 2013 -0400
@@ -59,8 +59,9 @@
"jdk.util.zip.inhibitZip64", "false")));
private static class XEntry {
- public final ZipEntry entry;
- public final long offset;
+ final ZipEntry entry;
+ final long offset;
+ long dostime; // last modification time in msdos format
public XEntry(ZipEntry entry, long offset) {
this.entry = entry;
this.offset = offset;
@@ -191,7 +192,9 @@
if (current != null) {
closeEntry(); // close previous entry
}
- if (e.mtime == -1) {
+ if (e.time == -1) {
+ // by default, do NOT use extended timestamps in extra
+ // data, for now.
e.setTime(System.currentTimeMillis());
}
if (e.method == -1) {
@@ -384,25 +387,20 @@
ZipEntry e = xentry.entry;
int flag = e.flag;
boolean hasZip64 = false;
- int elen = (e.extra != null) ? e.extra.length : 0;
- int eoff = 0;
- boolean foundEXTT = false; // if EXTT already present
- // do nothing.
- while (eoff + 4 < elen) {
- int tag = get16(e.extra, eoff);
- int sz = get16(e.extra, eoff + 2);
- if (tag == EXTID_EXTT) {
- foundEXTT = true;
- }
- eoff += (4 + sz);
- }
+ int elen = getExtraLen(e.extra);
+
+ // keep a copy of dostime for writeCEN(), otherwise the tz
+ // sensitive local time entries in loc and cen might be
+ // different if the default tz get changed during writeLOC()
+ // and writeCEN()
+ xentry.dostime = javaToDosTime(e.time);
+
writeInt(LOCSIG); // LOC header signature
if ((flag & 8) == 8) {
writeShort(version(e)); // version needed to extract
writeShort(flag); // general purpose bit flag
writeShort(e.method); // compression method
- writeInt(javaToDosTime(e.mtime)); // last modification time
-
+ writeInt(xentry.dostime); // last modification time
// store size, uncompressed size, and crc-32 in data descriptor
// immediately following compressed entry data
writeInt(0);
@@ -417,7 +415,7 @@
}
writeShort(flag); // general purpose bit flag
writeShort(e.method); // compression method
- writeInt(javaToDosTime(e.mtime)); // last modification time
+ writeInt(xentry.dostime); // last modification time
writeInt(e.crc); // crc-32
if (hasZip64) {
writeInt(ZIP64_MAGICVAL);
@@ -430,8 +428,23 @@
}
byte[] nameBytes = zc.getBytes(e.name);
writeShort(nameBytes.length);
- if (!foundEXTT)
- elen += 9; // use Info-ZIP's ext time in extra
+
+ int elenEXTT = 0; // info-zip extended timestamp
+ int flagEXTT = 0;
+ if (e.mtime != null) {
+ elenEXTT += 4;
+ flagEXTT |= EXTT_FLAG_LMT;
+ }
+ if (e.atime != null) {
+ elenEXTT += 4;
+ flagEXTT |= EXTT_FLAG_LAT;
+ }
+ if (e.ctime != null) {
+ elenEXTT += 4;
+ flagEXTT |= EXTT_FLAT_CT;
+ }
+ if (flagEXTT != 0)
+ elen += (elenEXTT + 5); // headid(2) + size(2) + flag(1) + data
writeShort(elen);
writeBytes(nameBytes, 0, nameBytes.length);
if (hasZip64) {
@@ -440,15 +453,18 @@
writeLong(e.size);
writeLong(e.csize);
}
- if (!foundEXTT) {
+ if (flagEXTT != 0) {
writeShort(EXTID_EXTT);
- writeShort(5); // size for the folowing data block
- writeByte(0x1); // flags byte, mtime only
- writeInt(javaToUnixTime(e.mtime));
+ writeShort(elenEXTT + 1); // flag + data
+ writeByte(flagEXTT);
+ if (e.mtime != null)
+ writeInt(fileTimeToUnixTime(e.mtime));
+ if (e.atime != null)
+ writeInt(fileTimeToUnixTime(e.atime));
+ if (e.ctime != null)
+ writeInt(fileTimeToUnixTime(e.ctime));
}
- if (e.extra != null) {
- writeBytes(e.extra, 0, e.extra.length);
- }
+ writeExtra(e.extra);
locoff = written;
}
@@ -506,31 +522,35 @@
}
writeShort(flag); // general purpose bit flag
writeShort(e.method); // compression method
- writeInt(javaToDosTime(e.mtime)); // last modification time
+ // use the copy in xentry, which has been converted
+ // from e.time in writeLOC()
+ writeInt(xentry.dostime); // last modification time
writeInt(e.crc); // crc-32
writeInt(csize); // compressed size
writeInt(size); // uncompressed size
byte[] nameBytes = zc.getBytes(e.name);
writeShort(nameBytes.length);
- int elen = (e.extra != null) ? e.extra.length : 0;
- int eoff = 0;
- boolean foundEXTT = false; // if EXTT already present
- // do nothing.
- while (eoff + 4 < elen) {
- int tag = get16(e.extra, eoff);
- int sz = get16(e.extra, eoff + 2);
- if (tag == EXTID_EXTT) {
- foundEXTT = true;
- }
- eoff += (4 + sz);
+ int elen = getExtraLen(e.extra);
+ if (hasZip64) {
+ elen += (elenZIP64 + 4);// + headid(2) + datasize(2)
}
- if (hasZip64) {
- // + headid(2) + datasize(2)
- elen += (elenZIP64 + 4);
+ // cen info-zip extended timestamp only outputs mtime
+ // but set the flag for a/ctime, if present in loc
+ int flagEXTT = 0;
+ if (e.mtime != null) {
+ elen += 4; // + mtime(4)
+ flagEXTT |= EXTT_FLAG_LMT;
}
- if (!foundEXTT)
- elen += 9; // Info-ZIP's Extended Timestamp
+ if (e.atime != null) {
+ flagEXTT |= EXTT_FLAG_LAT;
+ }
+ if (e.ctime != null) {
+ flagEXTT |= EXTT_FLAT_CT;
+ }
+ if (flagEXTT != 0) {
+ elen += 5; // headid + sz + flag
+ }
writeShort(elen);
byte[] commentBytes;
if (e.comment != null) {
@@ -545,6 +565,8 @@
writeInt(0); // external file attributes (unused)
writeInt(offset); // relative offset of local header
writeBytes(nameBytes, 0, nameBytes.length);
+
+ // take care of EXTID_ZIP64 and EXTID_EXTT
if (hasZip64) {
writeShort(ZIP64_EXTID);// Zip64 extra
writeShort(elenZIP64);
@@ -555,15 +577,18 @@
if (offset == ZIP64_MAGICVAL)
writeLong(xentry.offset);
}
- if (!foundEXTT) {
+ if (flagEXTT != 0) {
writeShort(EXTID_EXTT);
- writeShort(5);
- writeByte(0x1); // flags byte
- writeInt(javaToUnixTime(e.mtime));
+ if (e.mtime != null) {
+ writeShort(5); // flag + mtime
+ writeByte(flagEXTT);
+ writeInt(fileTimeToUnixTime(e.mtime));
+ } else {
+ writeShort(1); // flag only
+ writeByte(flagEXTT);
+ }
}
- if (e.extra != null) {
- writeBytes(e.extra, 0, e.extra.length);
- }
+ writeExtra(e.extra);
if (commentBytes != null) {
writeBytes(commentBytes, 0, Math.min(commentBytes.length, 0xffff));
}
@@ -627,6 +652,47 @@
}
/*
+ * Returns the length of extra data without EXTT and ZIP64.
+ */
+ private int getExtraLen(byte[] extra) {
+ if (extra == null)
+ return 0;
+ int skipped = 0;
+ int len = extra.length;
+ int off = 0;
+ while (off + 4 <= len) {
+ int tag = get16(extra, off);
+ int sz = get16(extra, off + 2);
+ if (tag == EXTID_EXTT || tag == EXTID_ZIP64) {
+ skipped += (sz + 4);
+ }
+ off += (sz + 4);
+ }
+ return len - skipped;
+ }
+
+ /*
+ * Writes extra data without EXTT and ZIP64.
+ *
+ * Extra timestamp and ZIP64 data is handled/output separately
+ * in writeLOC and writeCEN.
+ */
+ private void writeExtra(byte[] extra) throws IOException {
+ if (extra != null) {
+ int len = extra.length;
+ int off = 0;
+ while (off + 4 <= len) {
+ int tag = get16(extra, off);
+ int sz = get16(extra, off + 2);
+ if (tag != EXTID_EXTT && tag != EXTID_ZIP64) {
+ writeBytes(extra, off, sz + 4);
+ }
+ off += (sz + 4);
+ }
+ }
+ }
+
+ /*
* Writes a 8-bit byte to the output stream.
*/
private void writeByte(int v) throws IOException {
--- a/jdk/src/share/classes/java/util/zip/ZipUtils.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/java/util/zip/ZipUtils.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,42 +25,45 @@
package java.util.zip;
+import java.nio.file.attribute.FileTime;
import java.util.Date;
import java.util.concurrent.TimeUnit;
+import static java.util.zip.ZipConstants.*;
+import static java.util.zip.ZipConstants64.*;
+
class ZipUtils {
// used to adjust values between Windows and java epoch
private static final long WINDOWS_EPOCH_IN_MICROSECONDS = -11644473600000000L;
/**
- * Converts Windows time (in microseconds, UTC/GMT) time to Java time.
+ * Converts Windows time (in microseconds, UTC/GMT) time to FileTime.
*/
- public static final long winToJavaTime(long wtime) {
- return TimeUnit.MILLISECONDS.convert(
- wtime / 10 + WINDOWS_EPOCH_IN_MICROSECONDS, TimeUnit.MICROSECONDS);
+ public static final FileTime winTimeToFileTime(long wtime) {
+ return FileTime.from(wtime / 10 + WINDOWS_EPOCH_IN_MICROSECONDS,
+ TimeUnit.MICROSECONDS);
}
/**
- * Converts Java time to Windows time.
+ * Converts FileTime to Windows time.
*/
- public static final long javaToWinTime(long time) {
- return (TimeUnit.MICROSECONDS.convert(time, TimeUnit.MILLISECONDS)
- - WINDOWS_EPOCH_IN_MICROSECONDS) * 10;
+ public static final long fileTimeToWinTime(FileTime ftime) {
+ return (ftime.to(TimeUnit.MICROSECONDS) - WINDOWS_EPOCH_IN_MICROSECONDS) * 10;
}
/**
- * Converts "standard Unix time"(in seconds, UTC/GMT) to Java time
+ * Converts "standard Unix time"(in seconds, UTC/GMT) to FileTime
*/
- public static final long unixToJavaTime(long utime) {
- return TimeUnit.MILLISECONDS.convert(utime, TimeUnit.SECONDS);
+ public static final FileTime unixTimeToFileTime(long utime) {
+ return FileTime.from(utime, TimeUnit.SECONDS);
}
/**
- * Converts Java time to "standard Unix time".
+ * Converts FileTime to "standard Unix time".
*/
- public static final long javaToUnixTime(long time) {
- return TimeUnit.SECONDS.convert(time, TimeUnit.MILLISECONDS);
+ public static final long fileTimeToUnixTime(FileTime ftime) {
+ return ftime.to(TimeUnit.SECONDS);
}
/**
@@ -92,7 +95,6 @@
d.getSeconds() >> 1;
}
-
/**
* Fetches unsigned 16-bit value from byte array at specified offset.
* The bytes are assumed to be in Intel (little-endian) byte order.
@@ -116,5 +118,4 @@
public static final long get64(byte b[], int off) {
return get32(b, off) | (get32(b, off+4) << 32);
}
-
}
--- a/jdk/src/share/classes/javax/accessibility/Accessible.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/Accessible.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -45,6 +45,7 @@
* of an object that implements Accessible, and that subclass
* is not Accessible, the developer should override the
* getAccessibleContext method to return null.
+ * @return the AccessibleContext associated with this object
*/
public AccessibleContext getAccessibleContext();
}
--- a/jdk/src/share/classes/javax/accessibility/AccessibleBundle.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleBundle.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -53,6 +53,9 @@
private final String defaultResourceBundleName
= "com.sun.accessibility.internal.resources.accessibility";
+ /**
+ * Construct an {@code AccessibleBundle}.
+ */
public AccessibleBundle() {
}
--- a/jdk/src/share/classes/javax/accessibility/AccessibleExtendedTable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleExtendedTable.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -60,7 +60,7 @@
*/
public int getAccessibleColumn(int index);
- /*
+ /**
* Returns the index at a row and column in the table.
*
* @param r zero-based row of the table
--- a/jdk/src/share/classes/javax/accessibility/AccessibleRelationSet.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleRelationSet.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -163,6 +163,7 @@
/**
* Returns the number of relations in the relation set.
+ * @return the number of relations in the relation set
*/
public int size() {
if (relations == null) {
--- a/jdk/src/share/classes/javax/accessibility/AccessibleTable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleTable.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -90,6 +90,8 @@
* Returns the number of rows occupied by the Accessible at
* a specified row and column in the table.
*
+ * @param r zero-based row of the table
+ * @param c zero-based column of the table
* @return the number of rows occupied by the Accessible at a
* given specified (row, column)
*/
@@ -99,6 +101,8 @@
* Returns the number of columns occupied by the Accessible at
* a specified row and column in the table.
*
+ * @param r zero-based row of the table
+ * @param c zero-based column of the table
* @return the number of columns occupied by the Accessible at a
* given specified row and column
*/
--- a/jdk/src/share/classes/javax/accessibility/AccessibleTableModelChange.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleTableModelChange.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -71,8 +71,8 @@
public static final int DELETE = -1;
/**
- * Returns the type of event
- *
+ * Returns the type of event.
+ * @return the type of event
* @see #INSERT
* @see #UPDATE
* @see #DELETE
@@ -81,21 +81,25 @@
/**
* Returns the first row that changed.
+ * @return the first row that changed
*/
public int getFirstRow();
/**
* Returns the last row that changed.
+ * @return the last row that changed
*/
public int getLastRow();
/**
* Returns the first column that changed.
+ * @return the first column that changed
*/
public int getFirstColumn();
/**
* Returns the last column that changed.
+ * @return the last column that changed
*/
public int getLastColumn();
}
--- a/jdk/src/share/classes/javax/accessibility/AccessibleTextSequence.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleTextSequence.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -49,7 +49,7 @@
*/
public class AccessibleTextSequence {
- /* The start index of the text sequence */
+ /** The start index of the text sequence */
public int startIndex;
/** The end index of the text sequence */
--- a/jdk/src/share/classes/javax/accessibility/AccessibleValue.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/accessibility/AccessibleValue.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -60,6 +60,7 @@
/**
* Set the value of this object as a Number.
*
+ * @param n the number to use for the value
* @return True if the value was set; else False
* @see #getCurrentAccessibleValue
*/
--- a/jdk/src/share/classes/javax/management/relation/RelationNotification.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/management/relation/RelationNotification.java Mon Aug 12 09:29:06 2013 -0400
@@ -260,7 +260,7 @@
super(notifType, sourceObj, sequence, timeStamp, message);
- if (!isValidBasic(notifType,sourceObj,id,typeName) || !isValidCreate(notifType)) {
+ if (!isValidBasicStrict(notifType,sourceObj,id,typeName) || !isValidCreate(notifType)) {
throw new IllegalArgumentException("Invalid parameter.");
}
@@ -310,7 +310,7 @@
super(notifType, sourceObj, sequence, timeStamp, message);
- if (!isValidBasic(notifType,sourceObj,id,typeName) || !isValidUpdate(notifType,name,newValue,oldValue)) {
+ if (!isValidBasicStrict(notifType,sourceObj,id,typeName) || !isValidUpdate(notifType,name,newValue,oldValue)) {
throw new IllegalArgumentException("Invalid parameter.");
}
@@ -457,14 +457,26 @@
// - no role old value (for role update)
// - no role new value (for role update)
+ // Despite the fact, that validation in constructor of RelationNotification prohibit
+ // creation of the class instance with null sourceObj its possible to set it to null later
+ // by public setSource() method.
+ // So we should relax validation rules to preserve serialization behavior compatibility.
+
+ private boolean isValidBasicStrict(String notifType, Object sourceObj, String id, String typeName){
+ if (sourceObj == null) {
+ return false;
+ }
+ return isValidBasic(notifType,sourceObj,id,typeName);
+ }
+
private boolean isValidBasic(String notifType, Object sourceObj, String id, String typeName){
- if (notifType == null || sourceObj == null ||
- id == null || typeName == null) {
+ if (notifType == null || id == null || typeName == null) {
return false;
}
- if (!(sourceObj instanceof RelationService) &&
- !(sourceObj instanceof ObjectName)) {
+ if (sourceObj != null && (
+ !(sourceObj instanceof RelationService) &&
+ !(sourceObj instanceof ObjectName))) {
return false;
}
--- a/jdk/src/share/classes/javax/sound/midi/MetaMessage.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MetaMessage.java Mon Aug 12 09:29:06 2013 -0400
@@ -149,7 +149,7 @@
* @param data the data bytes in the MIDI message
* @param length the number of bytes in the <code>data</code>
* byte array
- * @throws <code>InvalidMidiDataException</code> if the
+ * @throws InvalidMidiDataException if the
* parameter values do not specify a valid MIDI meta message
*/
public void setMessage(int type, byte[] data, int length) throws InvalidMidiDataException {
--- a/jdk/src/share/classes/javax/sound/midi/MidiDevice.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiDevice.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -86,13 +86,13 @@
* To detect if a MidiDevice represents a hardware MIDI port, the
* following programming technique can be used:
*
- * <pre>
+ * <pre>{@code
* MidiDevice device = ...;
* if ( ! (device instanceof Sequencer) && ! (device instanceof Synthesizer)) {
* // we're now sure that device represents a MIDI port
* // ...
* }
- * </pre>
+ * }</pre>
*
* <p>
* A <code>MidiDevice</code> includes a <code>{@link MidiDevice.Info}</code> object
--- a/jdk/src/share/classes/javax/sound/midi/MidiDeviceReceiver.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiDeviceReceiver.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -33,7 +33,9 @@
* @since 1.7
*/
public interface MidiDeviceReceiver extends Receiver {
- /** Obtains a MidiDevice object which is an owner of this Receiver.
+ /**
+ * Obtains a MidiDevice object which is an owner of this Receiver.
+ * @return a MidiDevice object which is an owner of this Receiver
*/
public MidiDevice getMidiDevice();
}
--- a/jdk/src/share/classes/javax/sound/midi/MidiDeviceTransmitter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiDeviceTransmitter.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -35,7 +35,9 @@
*/
public interface MidiDeviceTransmitter extends Transmitter {
- /** Obtains a MidiDevice object which is an owner of this Transmitter.
+ /**
+ * Obtains a MidiDevice object which is an owner of this Transmitter.
+ * @return a MidiDevice object which is an owner of this Transmitter
*/
public MidiDevice getMidiDevice();
}
--- a/jdk/src/share/classes/javax/sound/midi/MidiFileFormat.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiFileFormat.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -50,6 +50,7 @@
* be used in implementations:
*
* <table border=1>
+ <caption>MIDI File Format Properties</caption>
* <tr>
* <th>Property key</th>
* <th>Value type</th>
--- a/jdk/src/share/classes/javax/sound/midi/MidiMessage.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiMessage.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -55,7 +55,7 @@
* processing MIDI data that originated outside Java Sound and now
* is encoded as signed bytes, the bytes can
* can be converted to integers using this conversion:
- * <center><code>int i = (int)(byte & 0xFF)</code></center>
+ * <center>{@code int i = (int)(byte & 0xFF)}</center>
* <p>
* If you simply need to pass a known MIDI byte value as a method parameter,
* it can be expressed directly as an integer, using (for example) decimal or
@@ -118,6 +118,10 @@
* method is called by concrete subclasses, which should
* ensure that the data array specifies a complete, valid MIDI
* message.
+ *
+ * @param data the data bytes in the MIDI message
+ * @param length the number of bytes in the data byte array
+ * @throws InvalidMidiDataException if the parameter values do not specify a valid MIDI meta message
*/
protected void setMessage(byte[] data, int length) throws InvalidMidiDataException {
if (length < 0 || (length > 0 && length > data.length)) {
--- a/jdk/src/share/classes/javax/sound/midi/MidiSystem.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/MidiSystem.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -80,6 +80,7 @@
* consider them:
*
* <table border=0>
+ * <caption>MIDI System Property Keys</caption>
* <tr>
* <th>Property Key</th>
* <th>Interface</th>
@@ -425,6 +426,8 @@
* it is used to identify the default sequencer.
* For details, refer to the {@link MidiSystem class description}.
*
+ * @param connected whether or not the returned {@code Sequencer}
+ * is connected to the default {@code Synthesizer}
* @return the default sequencer
* @throws MidiUnavailableException if the sequencer is not
* available due to resource restrictions,
--- a/jdk/src/share/classes/javax/sound/midi/ShortMessage.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/ShortMessage.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -283,7 +283,7 @@
/**
* Sets the parameters for a MIDI message that takes no data bytes.
* @param status the MIDI status byte
- * @throws <code>InvalidMidiDataException</code> if <code>status</code> does not
+ * @throws InvalidMidiDataException if <code>status</code> does not
* specify a valid MIDI status byte for a message that requires no data bytes.
* @see #setMessage(int, int, int)
* @see #setMessage(int, int, int, int)
@@ -307,7 +307,7 @@
* @param status the MIDI status byte
* @param data1 the first data byte
* @param data2 the second data byte
- * @throws <code>InvalidMidiDataException</code> if the
+ * @throws InvalidMidiDataException if the
* the status byte, or all data bytes belonging to the message, do
* not specify a valid MIDI message.
* @see #setMessage(int, int, int, int)
@@ -357,7 +357,7 @@
* @param channel the channel associated with the message
* @param data1 the first data byte
* @param data2 the second data byte
- * @throws <code>InvalidMidiDataException</code> if the
+ * @throws InvalidMidiDataException if the
* status byte or all data bytes belonging to the message, do
* not specify a valid MIDI message
*
@@ -397,6 +397,7 @@
* Obtains the MIDI command associated with this event. This method
* assumes that the event is a MIDI channel message; if not, the return
* value will not be meaningful.
+ * @return the MIDI command associated with this event
* @see #setMessage(int, int, int, int)
*/
public int getCommand() {
@@ -450,7 +451,7 @@
* status byte value.
* @param status status byte value, which must represent a short MIDI message
* @return data length in bytes (0, 1, or 2)
- * @throws <code>InvalidMidiDataException</code> if the
+ * @throws InvalidMidiDataException if the
* <code>status</code> argument does not represent the status byte for any
* short message
*/
--- a/jdk/src/share/classes/javax/sound/midi/Synthesizer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/Synthesizer.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -170,7 +170,7 @@
* already had been), <code>false</code> if the instrument could not be
* loaded (for example, if the synthesizer has insufficient
* memory to load it)
- * @throws <code>IllegalArgumentException</code> if this
+ * @throws IllegalArgumentException if this
* <code>Synthesizer</code> doesn't support the specified instrument's
* soundbank
* @see #unloadInstrument
@@ -186,7 +186,7 @@
/**
* Unloads a particular instrument.
* @param instrument instrument to unload
- * @throws <code>IllegalArgumentException</code> if this
+ * @throws IllegalArgumentException if this
* <code>Synthesizer</code> doesn't support the specified instrument's
* soundbank
* @see #loadInstrument
@@ -214,10 +214,10 @@
* of the old instrument, it should be loaded into the synthesizer
* @return <code>true</code> if the instrument succeessfully remapped,
* <code>false</code> if feature is not implemented by synthesizer
- * @throws <code>IllegalArgumentException</code> if instrument
+ * @throws IllegalArgumentException if instrument
* <code>from</code> or instrument <code>to</code> aren't supported by
* synthesizer or if instrument <code>to</code> is not loaded
- * @throws <code>NullPointerException</code> if <code>from</code> or
+ * @throws NullPointerException if <code>from</code> or
* <code>to</code> parameters have null value
* @see #loadInstrument
* @see #loadInstruments
--- a/jdk/src/share/classes/javax/sound/midi/SysexMessage.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/SysexMessage.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -204,6 +204,7 @@
* @param data the system exclusive message data
* @param length the length of the valid message data in
* the array
+ * @throws InvalidMidiDataException if the status byte is invalid for a sysex message
*/
public void setMessage(int status, byte[] data, int length) throws InvalidMidiDataException {
if ( (status != 0xF0) && (status != 0xF7) ) {
--- a/jdk/src/share/classes/javax/sound/midi/Track.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/midi/Track.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -211,10 +211,11 @@
/**
* Obtains the event at the specified index.
* @param index the location of the desired event in the event vector
- * @throws <code>ArrayIndexOutOfBoundsException</code> if the
+ * @throws ArrayIndexOutOfBoundsException if the
* specified index is negative or not less than the current size of
* this track.
* @see #size
+ * @return the event at the specified index
*/
public MidiEvent get(int index) throws ArrayIndexOutOfBoundsException {
try {
--- a/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -57,6 +57,7 @@
* be used in implementations:
*
* <table border=1>
+ * <caption>Audio File Format Property Keys</caption>
* <tr>
* <th>Property key</th>
* <th>Value type</th>
--- a/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -85,6 +85,7 @@
* service providers should use, if applicable:
*
* <table border=0>
+ * <caption>Audio Format Property Keys</caption>
* <tr>
* <th>Property key</th>
* <th>Value type</th>
--- a/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -75,6 +75,7 @@
* consider them:
*
* <table border=0>
+ * <caption>Audio System Property Keys</caption>
* <tr>
* <th>Property Key</th>
* <th>Interface</th>
--- a/jdk/src/share/classes/javax/sound/sampled/BooleanControl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/sampled/BooleanControl.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -125,6 +125,7 @@
/**
* Obtains the label for the specified state.
+ * @param state the state whose label will be returned
* @return the label for the specified state, such as "true" or "on"
* for <code>true</code>, or "false" or "off" for <code>false</code>.
*/
--- a/jdk/src/share/classes/javax/sound/sampled/Mixer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/sampled/Mixer.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -133,6 +133,8 @@
* <code>DataLine</code>.
*
* @param info describes the desired line
+ * @return a line that is available for use and that matches the description
+ * in the specified {@code Line.Info} object
* @throws LineUnavailableException if a matching line
* is not available due to resource restrictions
* @throws IllegalArgumentException if this mixer does
--- a/jdk/src/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/sound/sampled/spi/FormatConversionProvider.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -116,6 +116,7 @@
* given a particular source format.
* If no target format encodings are supported for this source format,
* an array of length 0 is returned.
+ * @param sourceFormat format of the incoming data
* @return array of supported target format encodings.
*/
public abstract AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat);
@@ -146,6 +147,8 @@
* supported by the format converter
* If no target formats with the specified encoding are supported
* for this source format, an array of length 0 is returned.
+ * @param targetEncoding desired encoding of the stream after processing
+ * @param sourceFormat format of the incoming data
* @return array of supported target formats.
*/
public abstract AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat);
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java Mon Aug 12 09:29:06 2013 -0400
@@ -1149,9 +1149,10 @@
int index = filters.indexOf(f);
if (index >= 0) {
if(getFileFilter() == f) {
- if (isAcceptAllFileFilterUsed()) {
+ FileFilter aaff = getAcceptAllFileFilter();
+ if (isAcceptAllFileFilterUsed() && (aaff != f)) {
// choose default filter if it is used
- setFileFilter(getAcceptAllFileFilter());
+ setFileFilter(aaff);
}
else if (index > 0) {
// choose the first filter, because it is not removed
--- a/jdk/src/share/classes/javax/swing/SwingWorker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/swing/SwingWorker.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -405,6 +405,7 @@
*
*/
@SafeVarargs
+ @SuppressWarnings("varargs") // Passing chunks to add is safe
protected final void publish(V... chunks) {
synchronized (this) {
if (doProcess == null) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java Mon Aug 12 09:29:06 2013 -0400
@@ -344,7 +344,8 @@
configureRenderer(cellContext);
while (!done && paintingEnumerator.hasMoreElements()) {
path = (TreePath)paintingEnumerator.nextElement();
- if (path != null) {
+ bounds = getPathBounds(tree, path);
+ if ((path != null) && (bounds != null)) {
isLeaf = treeModel.isLeaf(path.getLastPathComponent());
if (isLeaf) {
isExpanded = hasBeenExpanded = false;
@@ -353,7 +354,6 @@
isExpanded = treeState.getExpandedState(path);
hasBeenExpanded = tree.hasBeenExpanded(path);
}
- bounds = getPathBounds(tree, path);
rowBounds.y = bounds.y;
rowBounds.height = bounds.height;
paintRow(renderer, dtcr, context, cellContext, g,
@@ -383,7 +383,8 @@
paintingEnumerator = treeState.getVisiblePathsFrom(initialPath);
while (!done && paintingEnumerator.hasMoreElements()) {
path = (TreePath)paintingEnumerator.nextElement();
- if (path != null) {
+ bounds = getPathBounds(tree, path);
+ if ((path != null) && (bounds != null)) {
isLeaf = treeModel.isLeaf(path.getLastPathComponent());
if (isLeaf) {
isExpanded = hasBeenExpanded = false;
@@ -392,7 +393,6 @@
isExpanded = treeState.getExpandedState(path);
hasBeenExpanded = tree.hasBeenExpanded(path);
}
- bounds = getPathBounds(tree, path);
// See if the vertical line to the parent has been drawn.
parentPath = path.getParentPath();
if (parentPath != null) {
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheCanonicalizer.java Mon Aug 12 09:29:06 2013 -0400
@@ -75,7 +75,10 @@
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
@@ -90,7 +93,10 @@
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
--- a/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheTransform.java Mon Aug 12 09:29:06 2013 -0400
@@ -76,7 +76,10 @@
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
@@ -91,7 +94,10 @@
throw new ClassCastException
("context must be of type DOMCryptoContext");
}
- if (parent == null || !(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
+ if (parent == null) {
+ throw new NullPointerException();
+ }
+ if (!(parent instanceof javax.xml.crypto.dom.DOMStructure)) {
throw new ClassCastException("parent must be of type DOMStructure");
}
transformElem = (Element)
--- a/jdk/src/share/classes/sun/font/TrueTypeFont.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java Mon Aug 12 09:29:06 2013 -0400
@@ -547,6 +547,17 @@
throw new FontFormatException("bad table, tag="+table.tag);
}
}
+
+ if (getDirectoryEntry(headTag) == null) {
+ throw new FontFormatException("missing head table");
+ }
+ if (getDirectoryEntry(maxpTag) == null) {
+ throw new FontFormatException("missing maxp table");
+ }
+ if (getDirectoryEntry(hmtxTag) != null
+ && getDirectoryEntry(hheaTag) == null) {
+ throw new FontFormatException("missing hhea table");
+ }
initNames();
} catch (Exception e) {
if (FontUtilities.isLogging()) {
--- a/jdk/src/share/classes/sun/invoke/anon/ConstantPoolPatch.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/invoke/anon/ConstantPoolPatch.java Mon Aug 12 09:29:06 2013 -0400
@@ -418,7 +418,7 @@
private static final Map<Class<?>, Byte> CONSTANT_VALUE_CLASS_TAG
= new IdentityHashMap<Class<?>, Byte>();
- private static final Class[] CONSTANT_VALUE_CLASS = new Class[16];
+ private static final Class<?>[] CONSTANT_VALUE_CLASS = new Class<?>[16];
static {
Object[][] values = {
{Integer.class, CONSTANT_Integer},
--- a/jdk/src/share/classes/sun/net/www/protocol/http/AuthCacheValue.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/AuthCacheValue.java Mon Aug 12 09:29:06 2013 -0400
@@ -37,6 +37,8 @@
public abstract class AuthCacheValue implements Serializable {
+ static final long serialVersionUID = 735249334068211611L;
+
public enum Type {
Proxy,
Server
--- a/jdk/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java Mon Aug 12 09:29:06 2013 -0400
@@ -51,6 +51,8 @@
public abstract class AuthenticationInfo extends AuthCacheValue implements Cloneable {
+ static final long serialVersionUID = -2588378268010453259L;
+
// Constants saying what kind of authroization this is. This determines
// the namespace in the hash table lookup.
public static final char SERVER_AUTHENTICATION = 's';
--- a/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/nio/cs/ext/ExtendedCharsets.java Mon Aug 12 09:29:06 2013 -0400
@@ -1031,6 +1031,24 @@
"ebcdic-s-871+euro"
});
+ charset("IBM290", "IBM290",
+ new String[] {
+ "cp290",
+ "ibm290",
+ "ibm-290",
+ "csIBM290",
+ "EBCDIC-JP-kana",
+ "290"
+ });
+
+ charset("x-IBM300", "IBM300",
+ new String[] {
+ "cp300",
+ "ibm300",
+ "ibm-300",
+ "300"
+ });
+
// Macintosh MacOS/Apple char encodingd
--- a/jdk/src/share/classes/sun/print/PSPrinterJob.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/print/PSPrinterJob.java Mon Aug 12 09:29:06 2013 -0400
@@ -59,6 +59,8 @@
import javax.print.StreamPrintService;
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.PrintServiceAttributeSet;
+import javax.print.attribute.standard.PrinterName;
import javax.print.attribute.standard.Chromaticity;
import javax.print.attribute.standard.Copies;
import javax.print.attribute.standard.Destination;
@@ -766,8 +768,9 @@
}
}
if (mDestType == RasterPrinterJob.PRINTER) {
- if (getPrintService() != null) {
- mDestination = getPrintService().getName();
+ PrintService pServ = getPrintService();
+ if (pServ != null) {
+ mDestination = pServ.getName();
}
PrinterSpooler spooler = new PrinterSpooler();
java.security.AccessController.doPrivileged(spooler);
--- a/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java Mon Aug 12 09:29:06 2013 -0400
@@ -88,6 +88,7 @@
* @param selectAnnotationClasses an array of annotation types to select when parsing
*/
@SafeVarargs
+ @SuppressWarnings("varargs") // selectAnnotationClasses is used safely
static Map<Class<? extends Annotation>, Annotation> parseSelectAnnotations(
byte[] rawAnnotations,
ConstantPool constPool,
--- a/jdk/src/share/classes/sun/rmi/runtime/Log.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/runtime/Log.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -61,6 +61,7 @@
* @author Laird Dornin
* @since 1.4
*/
+@SuppressWarnings("deprecation")
public abstract class Log {
/** Logger re-definition of old RMI log values */
--- a/jdk/src/share/classes/sun/rmi/server/ActivatableRef.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/server/ActivatableRef.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -41,6 +41,7 @@
import java.rmi.server.RemoteRef;
import java.rmi.server.RemoteStub;
+@SuppressWarnings("deprecation")
public class ActivatableRef implements RemoteRef {
private static final long serialVersionUID = 7579060052569229166L;
--- a/jdk/src/share/classes/sun/rmi/server/Dispatcher.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/server/Dispatcher.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -31,6 +31,7 @@
* The Dispatcher interface allows the transport to make
* the upcall to the server side remote reference.
*/
+@SuppressWarnings("deprecation")
public interface Dispatcher {
/**
--- a/jdk/src/share/classes/sun/rmi/server/LoaderHandler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/server/LoaderHandler.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -67,6 +67,7 @@
* @author Peter Jones
* @author Laird Dornin
*/
+@SuppressWarnings("deprecation")
public final class LoaderHandler {
/** RMI class loader log level */
--- a/jdk/src/share/classes/sun/rmi/server/UnicastRef.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/server/UnicastRef.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -49,7 +49,8 @@
* NOTE: There is a JDK-internal dependency on the existence of this
* class's getLiveRef method (as it is inherited by UnicastRef2) in
* the implementation of javax.management.remote.rmi.RMIConnector.
- **/
+ */
+@SuppressWarnings("deprecation")
public class UnicastRef implements RemoteRef {
/**
--- a/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -67,6 +67,7 @@
* @author Roger Riggs
* @author Peter Jones
*/
+@SuppressWarnings("deprecation")
public class UnicastServerRef extends UnicastRef
implements ServerRef, Dispatcher
{
--- a/jdk/src/share/classes/sun/rmi/server/Util.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/server/Util.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -64,6 +64,7 @@
* A utility class with static methods for creating stubs/proxies and
* skeletons for remote objects.
*/
+@SuppressWarnings("deprecation")
public final class Util {
/** "server" package log level */
--- a/jdk/src/share/classes/sun/rmi/transport/DGCImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/DGCImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -59,6 +59,7 @@
*
* @author Ann Wollrath
*/
+@SuppressWarnings("deprecation")
final class DGCImpl implements DGC {
/* dgc system log */
--- a/jdk/src/share/classes/sun/rmi/transport/StreamRemoteCall.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/StreamRemoteCall.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -45,6 +45,7 @@
*
* @author Ann Wollrath
*/
+@SuppressWarnings("deprecation")
public class StreamRemoteCall implements RemoteCall {
private ConnectionInputStream in = null;
private ConnectionOutputStream out = null;
--- a/jdk/src/share/classes/sun/rmi/transport/Transport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/Transport.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -47,6 +47,7 @@
*
* @author Ann Wollrath
*/
+@SuppressWarnings("deprecation")
public abstract class Transport {
/** "transport" package log level */
--- a/jdk/src/share/classes/sun/rmi/transport/proxy/RMIMasterSocketFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/proxy/RMIMasterSocketFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -44,6 +44,7 @@
* connect to the same host will automatically use the same
* mechanism.
*/
+@SuppressWarnings("deprecation")
public class RMIMasterSocketFactory extends RMISocketFactory {
/** "proxy" package log level */
--- a/jdk/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -43,6 +43,7 @@
*
* @author Peter Jones
*/
+@SuppressWarnings("deprecation")
final class ConnectionMultiplexer {
/** "multiplex" log level */
--- a/jdk/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -84,6 +84,7 @@
* @author Ann Wollrath
* @author Peter Jones
*/
+@SuppressWarnings("deprecation")
public class TCPTransport extends Transport {
/* tcp package log */
--- a/jdk/src/share/classes/sun/security/ec/ECDSASignature.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/ec/ECDSASignature.java Mon Aug 12 09:29:06 2013 -0400
@@ -323,6 +323,7 @@
// set parameter, not supported. See JCA doc
@Override
+ @Deprecated
protected void engineSetParameter(String param, Object value)
throws InvalidParameterException {
throw new UnsupportedOperationException("setParameter() not supported");
@@ -330,6 +331,7 @@
// get parameter, not supported. See JCA doc
@Override
+ @Deprecated
protected Object engineGetParameter(String param)
throws InvalidParameterException {
throw new UnsupportedOperationException("getParameter() not supported");
--- a/jdk/src/share/classes/sun/security/krb5/Credentials.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/krb5/Credentials.java Mon Aug 12 09:29:06 2013 -0400
@@ -62,7 +62,9 @@
private static CredentialsCache cache;
static boolean alreadyLoaded = false;
private static boolean alreadyTried = false;
- private static native Credentials acquireDefaultNativeCreds();
+
+ // Read native ticket with session key type in the given list
+ private static native Credentials acquireDefaultNativeCreds(int[] eTypes);
public Credentials(Ticket new_ticket,
PrincipalName new_client,
@@ -373,6 +375,8 @@
// It assumes that the GSS call has
// the privilege to access the default cache file.
+ // This method is only called on Windows and Mac OS X, the native
+ // acquireDefaultNativeCreds is also available on these platforms.
public static synchronized Credentials acquireDefaultCreds() {
Credentials result = null;
@@ -416,10 +420,15 @@
}
if (alreadyLoaded) {
// There is some native code
- if (DEBUG)
- System.out.println(">> Acquire default native Credentials");
- result = acquireDefaultNativeCreds();
- // only TGT with DES key will be returned by native method
+ if (DEBUG) {
+ System.out.println(">> Acquire default native Credentials");
+ }
+ try {
+ result = acquireDefaultNativeCreds(
+ EType.getDefaults("default_tkt_enctypes"));
+ } catch (KrbException ke) {
+ // when there is no default_tkt_enctypes.
+ }
}
}
return result;
--- a/jdk/src/share/classes/sun/security/pkcs11/P11TlsPrfGenerator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11TlsPrfGenerator.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -96,10 +96,15 @@
}
}
- // SecretKeySpec does not allow zero length keys, so we define our own class.
+ // SecretKeySpec does not allow zero length keys, so we define our
+ // own class.
+ //
+ // As an anonymous class cannot make any guarantees about serialization
+ // compatibility, it is nonsensical for an anonymous class to define a
+ // serialVersionUID. Suppress warnings relative to missing serialVersionUID
+ // field in the anonymous subclass of serializable SecretKey.
+ @SuppressWarnings("serial")
private static final SecretKey NULL_KEY = new SecretKey() {
- private static final long serialVersionUID = -8090049519656411362L;
-
public byte[] getEncoded() {
return new byte[0];
}
--- a/jdk/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/pkcs12/PKCS12KeyStore.java Mon Aug 12 09:29:06 2013 -0400
@@ -775,7 +775,7 @@
}
}
if (params != null) {
- if (algorithm.equals(pbes2_OID)) {
+ if (algorithm.equals((Object)pbes2_OID)) {
algParams = AlgorithmParameters.getInstance("PBES2");
} else {
algParams = AlgorithmParameters.getInstance("PBE");
@@ -912,7 +912,7 @@
private static String mapPBEParamsToAlgorithm(ObjectIdentifier algorithm,
AlgorithmParameters algParams) throws NoSuchAlgorithmException {
// Check for PBES2 algorithms
- if (algorithm.equals(pbes2_OID) && algParams != null) {
+ if (algorithm.equals((Object)pbes2_OID) && algParams != null) {
return algParams.toString();
}
return algorithm.toString();
@@ -1921,7 +1921,7 @@
}
safeContentsData = safeContents.getData();
- } else if (contentType.equals(ContentInfo.ENCRYPTED_DATA_OID)) {
+ } else if (contentType.equals((Object)ContentInfo.ENCRYPTED_DATA_OID)) {
if (password == null) {
continue;
}
--- a/jdk/src/share/classes/sun/security/provider/DSAPublicKey.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/provider/DSAPublicKey.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -37,6 +37,7 @@
import sun.security.x509.X509Key;
import sun.security.x509.AlgIdDSA;
+import sun.security.util.BitArray;
import sun.security.util.Debug;
import sun.security.util.DerValue;
import sun.security.util.DerInputStream;
@@ -88,8 +89,9 @@
algid = new AlgIdDSA(p, q, g);
try {
- key = new DerValue(DerValue.tag_Integer,
+ byte[] keyArray = new DerValue(DerValue.tag_Integer,
y.toByteArray()).toByteArray();
+ setKey(new BitArray(keyArray.length*8, keyArray));
encode();
} catch (IOException e) {
throw new InvalidKeyException("could not DER encode y: " +
@@ -142,7 +144,7 @@
protected void parseKeyBits() throws InvalidKeyException {
try {
- DerInputStream in = new DerInputStream(key);
+ DerInputStream in = new DerInputStream(getKey().toByteArray());
y = in.getBigInteger();
} catch (IOException e) {
throw new InvalidKeyException("Invalid key: y value\n" +
--- a/jdk/src/share/classes/sun/security/rsa/RSAPublicKeyImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/rsa/RSAPublicKeyImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -67,9 +67,10 @@
DerOutputStream out = new DerOutputStream();
out.putInteger(n);
out.putInteger(e);
- DerValue val =
- new DerValue(DerValue.tag_Sequence, out.toByteArray());
- key = val.toByteArray();
+ byte[] keyArray =
+ new DerValue(DerValue.tag_Sequence,
+ out.toByteArray()).toByteArray();
+ setKey(new BitArray(keyArray.length*8, keyArray));
} catch (IOException exc) {
// should never occur
throw new InvalidKeyException(exc);
@@ -104,7 +105,7 @@
*/
protected void parseKeyBits() throws InvalidKeyException {
try {
- DerInputStream in = new DerInputStream(key);
+ DerInputStream in = new DerInputStream(getKey().toByteArray());
DerValue derValue = in.getDerValue();
if (derValue.tag != DerValue.tag_Sequence) {
throw new IOException("Not a SEQUENCE");
--- a/jdk/src/share/classes/sun/security/rsa/RSASignature.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/rsa/RSASignature.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -244,12 +244,14 @@
}
// set parameter, not supported. See JCA doc
+ @Deprecated
protected void engineSetParameter(String param, Object value)
throws InvalidParameterException {
throw new UnsupportedOperationException("setParameter() not supported");
}
// get parameter, not supported. See JCA doc
+ @Deprecated
protected Object engineGetParameter(String param)
throws InvalidParameterException {
throw new UnsupportedOperationException("getParameter() not supported");
--- a/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -169,7 +169,7 @@
/*
* Drives the protocol state machine.
*/
- private int connectionState;
+ private volatile int connectionState;
/*
* Flag indicating if the next record we receive MUST be a Finished
@@ -1467,7 +1467,7 @@
*/
@Override
public boolean isClosed() {
- return getConnectionState() == cs_APP_CLOSED;
+ return connectionState == cs_APP_CLOSED;
}
/**
--- a/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/tools/jarsigner/Main.java Mon Aug 12 09:29:06 2013 -0400
@@ -291,7 +291,8 @@
String flags = args[n];
String modifier = null;
- if (flags.charAt(0) == '-') {
+
+ if (flags.startsWith("-")) {
int pos = flags.indexOf(':');
if (pos > 0) {
modifier = flags.substring(pos+1);
@@ -299,7 +300,14 @@
}
}
- if (collator.compare(flags, "-keystore") == 0) {
+ if (!flags.startsWith("-")) {
+ if (jarfile == null) {
+ jarfile = flags;
+ } else {
+ alias = flags;
+ ckaliases.add(alias);
+ }
+ } else if (collator.compare(flags, "-keystore") == 0) {
if (++n == args.length) usageNoArg();
keystore = args[n];
} else if (collator.compare(flags, "-storepass") ==0) {
@@ -380,18 +388,9 @@
collator.compare(flags, "-help") == 0) {
fullusage();
} else {
- if (!flags.startsWith("-")) {
- if (jarfile == null) {
- jarfile = flags;
- } else {
- alias = flags;
- ckaliases.add(alias);
- }
- } else {
- System.err.println(
- rb.getString("Illegal.option.") + flags);
- usage();
- }
+ System.err.println(
+ rb.getString("Illegal.option.") + flags);
+ usage();
}
}
--- a/jdk/src/share/classes/sun/security/x509/AlgIdDSA.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/x509/AlgIdDSA.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -96,7 +96,7 @@
* Default constructor. The OID and parameters must be
* deserialized before this algorithm ID is used.
*/
- // XXX deprecated for general use
+ @Deprecated
public AlgIdDSA () {}
AlgIdDSA (DerValue val) throws IOException
--- a/jdk/src/share/classes/sun/security/x509/X509Key.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/security/x509/X509Key.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -79,6 +79,7 @@
* Added to keep the byte[] key form consistent with the BitArray
* form. Can de deleted when byte[] key is deleted.
*/
+ @Deprecated
private int unusedBits = 0;
/* BitArray form of key */
--- a/jdk/src/share/classes/sun/swing/AccumulativeRunnable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/swing/AccumulativeRunnable.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -121,6 +121,7 @@
* @param args the arguments to accumulate
*/
@SafeVarargs
+ @SuppressWarnings("varargs") // Copying args is safe
public final synchronized void add(T... args) {
boolean isSubmitted = true;
if (arguments == null) {
--- a/jdk/src/share/classes/sun/swing/JLightweightFrame.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/swing/JLightweightFrame.java Mon Aug 12 09:29:06 2013 -0400
@@ -29,12 +29,18 @@
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
+import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
+import java.awt.event.ComponentListener;
+import java.awt.event.ContainerEvent;
+import java.awt.event.ContainerListener;
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferInt;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
import java.security.AccessController;
import javax.swing.JLayeredPane;
@@ -80,6 +86,8 @@
private boolean copyBufferEnabled;
private int[] copyBuffer;
+ private PropertyChangeListener layoutSizeListener;
+
/**
* Constructs a new, initially invisible {@code JLightweightFrame}
* instance.
@@ -94,6 +102,23 @@
if (getGraphicsConfiguration().isTranslucencyCapable()) {
setBackground(new Color(0, 0, 0, 0));
}
+
+ layoutSizeListener = new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent e) {
+ Dimension d = (Dimension)e.getNewValue();
+
+ if ("preferredSize".equals(e.getPropertyName())) {
+ content.preferredSizeChanged(d.width, d.height);
+
+ } else if ("maximumSize".equals(e.getPropertyName())) {
+ content.maximumSizeChanged(d.width, d.height);
+
+ } else if ("minimumSize".equals(e.getPropertyName())) {
+ content.minimumSizeChanged(d.width, d.height);
+ }
+ }
+ };
}
/**
@@ -104,10 +129,23 @@
*
* @param content the {@link LightweightContent} instance
*/
- public void setContent(LightweightContent content) {
+ public void setContent(final LightweightContent content) {
+ if (content == null) {
+ System.err.println("JLightweightFrame.setContent: content may not be null!");
+ return;
+ }
this.content = content;
this.component = content.getComponent();
+ Dimension d = this.component.getPreferredSize();
+ content.preferredSizeChanged(d.width, d.height);
+
+ d = this.component.getMaximumSize();
+ content.maximumSizeChanged(d.width, d.height);
+
+ d = this.component.getMinimumSize();
+ content.minimumSizeChanged(d.width, d.height);
+
initInterior();
}
@@ -202,6 +240,25 @@
contentPane.setLayout(new BorderLayout());
contentPane.add(component);
setContentPane(contentPane);
+
+ contentPane.addContainerListener(new ContainerListener() {
+ @Override
+ public void componentAdded(ContainerEvent e) {
+ Component c = JLightweightFrame.this.component;
+ if (e.getChild() == c) {
+ c.addPropertyChangeListener("preferredSize", layoutSizeListener);
+ c.addPropertyChangeListener("maximumSize", layoutSizeListener);
+ c.addPropertyChangeListener("minimumSize", layoutSizeListener);
+ }
+ }
+ @Override
+ public void componentRemoved(ContainerEvent e) {
+ Component c = JLightweightFrame.this.component;
+ if (e.getChild() == c) {
+ c.removePropertyChangeListener(layoutSizeListener);
+ }
+ }
+ });
}
@SuppressWarnings("deprecation")
--- a/jdk/src/share/classes/sun/swing/LightweightContent.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/swing/LightweightContent.java Mon Aug 12 09:29:06 2013 -0400
@@ -161,4 +161,22 @@
* application that the frame has ungrabbed focus.
*/
public void focusUngrabbed();
+
+ /**
+ * {@code JLightweightFrame} calls this method to notify the client
+ * application that the content preferred size has changed.
+ */
+ public void preferredSizeChanged(int width, int height);
+
+ /**
+ * {@code JLightweightFrame} calls this method to notify the client
+ * application that the content maximum size has changed.
+ */
+ public void maximumSizeChanged(int width, int height);
+
+ /**
+ * {@code JLightweightFrame} calls this method to notify the client
+ * application that the content minimum size has changed.
+ */
+ public void minimumSizeChanged(int width, int height);
}
--- a/jdk/src/share/classes/sun/text/resources/FormatData.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/text/resources/FormatData.java Mon Aug 12 09:29:06 2013 -0400
@@ -858,6 +858,9 @@
}
},
{ "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" },
+
+ // Workaround for islamic-umalqura name support (JDK-8015986)
+ { "calendarname.islamic-umalqura", "Islamic Umm al-Qura Calendar" },
};
}
}
--- a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar.java Mon Aug 12 09:29:06 2013 -0400
@@ -264,6 +264,10 @@
}
},
{ "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" },
+
+ // Workaround for islamic-umalqura name support (JDK-8015986)
+ { "calendarname.islamic-umalqura",
+ "\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a\u060c \u0623\u0645 \u0627\u0644\u0642\u0631\u0649" },
};
}
}
--- a/jdk/src/share/classes/sun/tools/asm/Assembler.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/tools/asm/Assembler.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -91,9 +91,9 @@
add(new Instruction(where, opc, flagNoCovered));
}
- static Vector SourceClassList = new Vector();
+ static Vector<String> SourceClassList = new Vector<>();
- static Vector TmpCovTable = new Vector();
+ static Vector<String> TmpCovTable = new Vector<>();
static int[] JcovClassCountArray = new int[CT_LAST_KIND + 1];
@@ -177,8 +177,8 @@
case opc_lookupswitch: {
SwitchData sw = (SwitchData)inst.value;
optimize(env, sw.defaultLabel);
- for (Enumeration e = sw.tab.elements() ; e.hasMoreElements();) {
- optimize(env, (Label)e.nextElement());
+ for (Enumeration<Label> e = sw.tab.elements() ; e.hasMoreElements();) {
+ optimize(env, e.nextElement());
}
return;
}
@@ -186,8 +186,8 @@
case opc_try: {
TryData td = (TryData)inst.value;
td.getEndLabel().pc = NEEDED;
- for (Enumeration e = td.catches.elements() ; e.hasMoreElements();) {
- CatchData cd = (CatchData)e.nextElement();
+ for (Enumeration<CatchData> e = td.catches.elements() ; e.hasMoreElements();) {
+ CatchData cd = e.nextElement();
optimize(env, cd.getLabel());
}
break;
@@ -237,9 +237,11 @@
// Collect constants for arguments only
// if a local variable table is generated
if ((field != null) && env.debug_vars()) {
- if (field.getArguments() != null) {
- for (Enumeration e = field.getArguments().elements() ; e.hasMoreElements() ;) {
- MemberDefinition f = (MemberDefinition)e.nextElement();
+ @SuppressWarnings("unchecked")
+ Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+ if (v != null) {
+ for (Enumeration<MemberDefinition> e = v.elements() ; e.hasMoreElements() ;) {
+ MemberDefinition f = e.nextElement();
tab.put(f.getName().toString());
tab.put(f.getType().getTypeSignature());
}
@@ -355,16 +357,16 @@
case opc_lookupswitch: {
SwitchData sw = (SwitchData)inst.value;
balance(sw.defaultLabel, depth);
- for (Enumeration e = sw.tab.elements() ; e.hasMoreElements();) {
- balance((Label)e.nextElement(), depth);
+ for (Enumeration<Label> e = sw.tab.elements() ; e.hasMoreElements();) {
+ balance(e.nextElement(), depth);
}
return;
}
case opc_try: {
TryData td = (TryData)inst.value;
- for (Enumeration e = td.catches.elements() ; e.hasMoreElements();) {
- CatchData cd = (CatchData)e.nextElement();
+ for (Enumeration<CatchData> e = td.catches.elements() ; e.hasMoreElements();) {
+ CatchData cd = e.nextElement();
balance(cd.getLabel(), depth + 1);
}
break;
@@ -383,9 +385,10 @@
if ((field != null) && field.getArguments() != null) {
int sum = 0;
- Vector v = field.getArguments();
- for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
- MemberDefinition f = ((MemberDefinition)e.nextElement());
+ @SuppressWarnings("unchecked")
+ Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+ for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
+ MemberDefinition f = e.nextElement();
sum += f.getType().stackSize();
}
maxvar = sum;
@@ -441,8 +444,8 @@
if (inst.opc == opc_try) {
TryData td = (TryData)inst.value;
writeExceptions(env, out, tab, inst.next, td.getEndLabel());
- for (Enumeration e = td.catches.elements() ; e.hasMoreElements();) {
- CatchData cd = (CatchData)e.nextElement();
+ for (Enumeration<CatchData> e = td.catches.elements() ; e.hasMoreElements();) {
+ CatchData cd = e.nextElement();
//System.out.println("EXCEPTION: " + env.getSource() + ", pc=" + inst.pc + ", end=" + td.getEndLabel().pc + ", hdl=" + cd.getLabel().pc + ", tp=" + cd.getType());
out.writeShort(inst.pc);
out.writeShort(td.getEndLabel().pc);
@@ -463,11 +466,12 @@
* Write the coverage table
*/
public void writeCoverageTable(Environment env, ClassDefinition c, DataOutputStream out, ConstantPool tab, long whereField) throws IOException {
- Vector TableLot = new Vector(); /* Coverage table */
+ Vector<Cover> TableLot = new Vector<>(); /* Coverage table */
boolean begseg = false;
boolean begmeth = false;
+ @SuppressWarnings("deprecation")
long whereClass = ((SourceClass)c).getWhere();
- Vector whereTry = new Vector();
+ Vector<Long> whereTry = new Vector<>();
int numberTry = 0;
int count = 0;
@@ -484,8 +488,8 @@
}
if (!begseg && !inst.flagNoCovered ) {
boolean findTry = false;
- for (Enumeration e = whereTry.elements(); e.hasMoreElements();) {
- if ( ((Long)(e.nextElement())).longValue() == inst.where) {
+ for (Enumeration<Long> e = whereTry.elements(); e.hasMoreElements();) {
+ if (e.nextElement().longValue() == inst.where) {
findTry = true;
break;
}
@@ -546,7 +550,7 @@
}
case opc_try: {
- whereTry.addElement(new Long(inst.where));
+ whereTry.addElement(Long.valueOf(inst.where));
begseg = false;
break;
}
@@ -569,8 +573,8 @@
}
case opc_lookupswitch: {
SwitchData sw = (SwitchData)inst.value;
- for (Enumeration e = sw.sortedKeys(); e.hasMoreElements() ; ) {
- Integer v = (Integer)e.nextElement();
+ for (Enumeration<Integer> e = sw.sortedKeys(); e.hasMoreElements() ; ) {
+ Integer v = e.nextElement();
TableLot.addElement(new Cover(CT_CASE, sw.whereCase(v), inst.pc));
count++;
}
@@ -591,7 +595,7 @@
out.writeShort(count);
for (int i = 0; i < count; i++) {
- Lot = (Cover)TableLot.elementAt(i);
+ Lot = TableLot.elementAt(i);
ln = (Lot.Addr >> WHEREOFFSETBITS);
pos = (Lot.Addr << (64 - WHEREOFFSETBITS)) >> (64 - WHEREOFFSETBITS);
out.writeShort(Lot.NumCommand);
@@ -646,6 +650,7 @@
*/
public void GenVecJCov(Environment env, ClassDefinition c, long Time) {
+ @SuppressWarnings("deprecation")
String SourceFile = ((SourceClass)c).getAbsoluteName();
TmpCovTable.addElement(createClassJcovElement(env, c));
@@ -667,6 +672,7 @@
* generate file of coverage data
*/
+@SuppressWarnings("deprecation") // for JCovd.readLine() calls
public void GenJCov(Environment env) {
try {
@@ -686,14 +692,14 @@
while((CurrLine = JCovd.readLine()) != null ) {
if ( CurrLine.startsWith(JcovClassLine) ) {
first = true;
- for(Enumeration e = SourceClassList.elements(); e.hasMoreElements();) {
+ for(Enumeration<String> e = SourceClassList.elements(); e.hasMoreElements();) {
String clsName = CurrLine.substring(JcovClassLine.length());
int idx = clsName.indexOf(' ');
if (idx != -1) {
clsName = clsName.substring(0, idx);
}
- Class = (String)e.nextElement();
+ Class = e.nextElement();
if ( Class.compareTo(clsName) == 0) {
first = false;
break;
@@ -708,7 +714,7 @@
}
PrintStream CovFile = new PrintStream(new DataOutputStream(new FileOutputStream(outFile)));
CovFile.println(JcovMagicLine);
- for(Enumeration e = TmpCovTable.elements(); e.hasMoreElements();) {
+ for(Enumeration<String> e = TmpCovTable.elements(); e.hasMoreElements();) {
CovFile.println(e.nextElement());
}
CovFile.close();
@@ -821,16 +827,16 @@
case opc_lookupswitch: {
SwitchData sw = (SwitchData)inst.value;
flowFields(env, sw.defaultLabel, locals);
- for (Enumeration e = sw.tab.elements() ; e.hasMoreElements();) {
- flowFields(env, (Label)e.nextElement(), locals);
+ for (Enumeration<Label> e = sw.tab.elements() ; e.hasMoreElements();) {
+ flowFields(env, e.nextElement(), locals);
}
return;
}
case opc_try: {
- Vector catches = ((TryData)inst.value).catches;
- for (Enumeration e = catches.elements(); e.hasMoreElements();) {
- CatchData cd = (CatchData)e.nextElement();
+ Vector<CatchData> catches = ((TryData)inst.value).catches;
+ for (Enumeration<CatchData> e = catches.elements(); e.hasMoreElements();) {
+ CatchData cd = e.nextElement();
flowFields(env, cd.getLabel(), locals);
}
break;
@@ -851,9 +857,10 @@
// Initialize arguments
if ((field != null) && (field.getArguments() != null)) {
int reg = 0;
- Vector v = field.getArguments();
- for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
- MemberDefinition f = ((MemberDefinition)e.nextElement());
+ @SuppressWarnings("unchecked")
+ Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+ for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
+ MemberDefinition f = e.nextElement();
locals[reg] = f;
reg += f.getType().stackSize();
}
@@ -867,9 +874,10 @@
locals[i] = null;
if ((field != null) && (field.getArguments() != null)) {
int reg = 0;
- Vector v = field.getArguments();
- for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
- MemberDefinition f = ((MemberDefinition)e.nextElement());
+ @SuppressWarnings("unchecked")
+ Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+ for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
+ MemberDefinition f = e.nextElement();
locals[reg] = f;
lvtab.define(f, reg, 0, maxpc);
reg += f.getType().stackSize();
--- a/jdk/src/share/classes/sun/tools/asm/ConstantPool.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/tools/asm/ConstantPool.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -42,20 +42,20 @@
*/
public final
class ConstantPool implements RuntimeConstants {
- Hashtable hash = new Hashtable(101);
+ Hashtable<Object,ConstantPoolData> hash = new Hashtable<>(101);
/**
* Find an entry, may return 0
*/
public int index(Object obj) {
- return ((ConstantPoolData)hash.get(obj)).index;
+ return hash.get(obj).index;
}
/**
* Add an entry
*/
public void put(Object obj) {
- ConstantPoolData data = (ConstantPoolData)hash.get(obj);
+ ConstantPoolData data = hash.get(obj);
if (data == null) {
if (obj instanceof String) {
data = new StringConstantData(this, (String)obj);
@@ -87,8 +87,8 @@
// Make a list of all the constant pool items
for (int n = 0 ; n < 5 ; n++) {
int first = count;
- for (Enumeration e = hash.elements() ; e.hasMoreElements() ;) {
- ConstantPoolData data = (ConstantPoolData)e.nextElement();
+ for (Enumeration<ConstantPoolData> e = hash.elements() ; e.hasMoreElements() ;) {
+ ConstantPoolData data = e.nextElement();
if (data.order() == n) {
keys[count] = sortKey(data);
list[count++] = data;
--- a/jdk/src/share/classes/sun/tools/asm/Instruction.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/tools/asm/Instruction.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -274,9 +274,9 @@
case opc_lookupswitch: {
SwitchData sw = (SwitchData)value;
sw.defaultLabel = sw.defaultLabel.getDestination();
- for (Enumeration e = sw.tab.keys() ; e.hasMoreElements() ; ) {
- Integer k = (Integer)e.nextElement();
- Label lbl = (Label)sw.tab.get(k);
+ for (Enumeration<Integer> e = sw.tab.keys() ; e.hasMoreElements() ; ) {
+ Integer k = e.nextElement();
+ Label lbl = sw.tab.get(k);
sw.tab.put(k, lbl.getDestination());
}
@@ -389,8 +389,8 @@
return;
case opc_try:
- for (Enumeration e = ((TryData)value).catches.elements() ; e.hasMoreElements() ;) {
- CatchData cd = (CatchData)e.nextElement();
+ for (Enumeration<CatchData> e = ((TryData)value).catches.elements() ; e.hasMoreElements() ;) {
+ CatchData cd = e.nextElement();
if (cd.getType() != null) {
tab.put(cd.getType());
}
@@ -641,6 +641,7 @@
/**
* Generate code
*/
+ @SuppressWarnings("fallthrough")
void write(DataOutputStream out, ConstantPool tab) throws IOException {
switch (opc) {
case opc_try: case opc_label: case opc_dead:
@@ -770,8 +771,8 @@
}
out.writeInt(sw.defaultLabel.pc - pc);
out.writeInt(sw.tab.size());
- for (Enumeration e = sw.sortedKeys(); e.hasMoreElements() ; ) {
- Integer v = (Integer)e.nextElement();
+ for (Enumeration<Integer> e = sw.sortedKeys(); e.hasMoreElements() ; ) {
+ Integer v = e.nextElement();
out.writeInt(v.intValue());
out.writeInt(sw.get(v).pc - pc);
}
--- a/jdk/src/share/classes/sun/tools/asm/SwitchData.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/tools/asm/SwitchData.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -39,23 +39,23 @@
class SwitchData {
int minValue, maxValue;
Label defaultLabel = new Label();
- Hashtable tab = new Hashtable();
+ Hashtable<Integer,Label> tab = new Hashtable<>();
// JCOV
- Hashtable whereCaseTab = null;
+ Hashtable<Integer,Long> whereCaseTab = null;
// end JCOV
/**
* Get a label
*/
public Label get(int n) {
- return (Label)tab.get(new Integer(n));
+ return tab.get(n);
}
/**
* Get a label
*/
public Label get(Integer n) {
- return (Label)tab.get(n);
+ return tab.get(n);
}
/**
@@ -73,7 +73,7 @@
maxValue = n;
}
}
- tab.put(new Integer(n), lbl);
+ tab.put(Integer.valueOf(n), lbl);
}
/**
@@ -86,33 +86,35 @@
/**
* Return the keys of this enumaration sorted in ascending order
*/
- public synchronized Enumeration sortedKeys() {
+ public synchronized Enumeration<Integer> sortedKeys() {
return new SwitchDataEnumeration(tab);
}
// JCOV
public void initTableCase() {
- whereCaseTab = new Hashtable();
+ whereCaseTab = new Hashtable<Integer,Long>();
}
public void addTableCase(int index, long where) {
if (whereCaseTab != null)
- whereCaseTab.put(new Integer(index), new Long(where));
+ whereCaseTab.put(Integer.valueOf(index), Long.valueOf(where));
}
+ // this puts String key into Hashtable<Integer,Long>
+ @SuppressWarnings("unchecked")
public void addTableDefault(long where) {
if (whereCaseTab != null)
- whereCaseTab.put("default", new Long(where));
+ ((Hashtable)whereCaseTab).put("default", Long.valueOf(where));
}
public long whereCase(Object key) {
- Long i = (Long) whereCaseTab.get(key);
- return (i == null) ? 0 : i.longValue();
+ Long i = whereCaseTab.get(key);
+ return (i == null) ? 0L : i.longValue();
}
public boolean getDefault() {
- return (whereCase("default") != 0);
+ return (whereCase("default") != 0L);
}
// end JCOV
}
-class SwitchDataEnumeration implements Enumeration {
+class SwitchDataEnumeration implements Enumeration<Integer> {
private Integer table[];
private int current_index = 0;
@@ -121,11 +123,11 @@
* hash table will be an Integer, with the value being a label. The
* enumeration returns the keys in sorted order.
*/
- SwitchDataEnumeration(Hashtable tab) {
+ SwitchDataEnumeration(Hashtable<Integer,Label> tab) {
table = new Integer[tab.size()];
int i = 0;
- for (Enumeration e = tab.keys() ; e.hasMoreElements() ; ) {
- table[i++] = (Integer)e.nextElement();
+ for (Enumeration<Integer> e = tab.keys() ; e.hasMoreElements() ; ) {
+ table[i++] = e.nextElement();
}
Arrays.sort(table);
current_index = 0;
@@ -141,7 +143,7 @@
/**
* Return the next key.
*/
- public Object nextElement() {
+ public Integer nextElement() {
return table[current_index++];
}
}
--- a/jdk/src/share/classes/sun/tools/asm/TryData.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/tools/asm/TryData.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -35,7 +35,7 @@
*/
public final
class TryData {
- Vector catches = new Vector();
+ Vector<CatchData> catches = new Vector<>();
Label endLabel = new Label();
/**
@@ -51,7 +51,7 @@
* Get a label
*/
public CatchData getCatch(int n) {
- return (CatchData)catches.elementAt(n);
+ return catches.elementAt(n);
}
/**
--- a/jdk/src/share/classes/sun/tools/jar/JarException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/classes/sun/tools/jar/JarException.java Mon Aug 12 09:29:06 2013 -0400
@@ -29,6 +29,9 @@
public
class JarException extends IOException {
+
+ static final long serialVersionUID = -4351820108009811497L;
+
public JarException() {
super();
}
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/com/sun/demo/scripting/jconsole/ScriptShellPanel.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -54,7 +54,7 @@
* jconsole's script console.
*/
-class ScriptShellPanel extends JPanel {
+public class ScriptShellPanel extends JPanel {
private static final long serialVersionUID = 4116273141148726319L;
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/resources/jconsole.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/resources/jconsole.js Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -77,12 +77,37 @@
function jcontext() {
return plugin.getContext();
}
-jcontext.docString = "returns JConsoleContext for the current jconsole plugin"
+jcontext.docString = "returns JConsoleContext for the current jconsole plugin";
function mbeanConnection() {
return jcontext().getMBeanServerConnection();
}
-mbeanConnection.docString = "returns current MBeanServer connection"
+mbeanConnection.docString = "returns current MBeanServer connection";
+
+// check if there is a build in sync function, define one if missing
+if (typeof sync === "undefined") {
+ var sync = function(func, obj) {
+ if (arguments.length < 1 || arguments.length > 2 ) {
+ throw "sync(function [,object]) parameter count mismatch";
+ }
+
+ var syncobj = (arguments.length == 2 ? obj : this);
+
+ if (!syncobj._syncLock) {
+ syncobj._syncLock = new Lock();
+ }
+
+ return function() {
+ syncobj._syncLock.lock();
+ try {
+ func.apply(null, arguments);
+ } finally {
+ syncobj._syncLock.unlock();
+ }
+ };
+ };
+ sync.docString = "synchronize a function, optionally on an object";
+}
/**
* Prints one liner help message for each function exposed here
@@ -188,22 +213,12 @@
// wraps a script array as java.lang.Object[]
function objectArray(array) {
- var len = array.length;
- var res = java.lang.reflect.Array.newInstance(java.lang.Object, len);
- for (var i = 0; i < array.length; i++) {
- res[i] = array[i];
- }
- return res;
+ return Java.to(array, "java.lang.Object[]");
}
// wraps a script (string) array as java.lang.String[]
function stringArray(array) {
- var len = array.length;
- var res = java.lang.reflect.Array.newInstance(java.lang.String, len);
- for (var i = 0; i < array.length; i++) {
- res[i] = String(array[i]);
- }
- return res;
+ return Java.to(array, "java.lang.String[]");
}
// script array to Java List
@@ -286,16 +301,18 @@
* will be of type FutureTask. When you need value, call 'get' on it.
*/
function mbean(objName, async) {
+ var index;
+
objName = objectName(objName);
var info = mbeanInfo(objName);
var attrs = info.attributes;
var attrMap = new Object;
- for (var index in attrs) {
+ for (index in attrs) {
attrMap[attrs[index].name] = attrs[index];
}
var opers = info.operations;
var operMap = new Object;
- for (var index in opers) {
+ for (index in opers) {
operMap[opers[index].name] = opers[index];
}
@@ -318,21 +335,30 @@
} else {
return getMBeanAttribute(objName, name);
}
- } else if (isOperation(name)) {
+ } else {
+ return undefined;
+ }
+ },
+ __call__: function(name) {
+ if (isOperation(name)) {
var oper = operMap[name];
- return function() {
- var params = objectArray(arguments);
- var sigs = oper.signature;
- var sigNames = new Array(sigs.length);
- for (var index in sigs) {
- sigNames[index] = sigs[index].getType();
- }
- if (async) {
- return invokeMBean.future(objName, name,
- params, sigNames);
- } else {
- return invokeMBean(objName, name, params, sigNames);
- }
+
+ var params = [];
+ for (var j = 1; j < arguments.length; j++) {
+ params[j-1]= arguments[j];
+ }
+
+ var sigs = oper.signature;
+
+ var sigNames = new Array(sigs.length);
+ for (var index in sigs) {
+ sigNames[index] = sigs[index].getType();
+ }
+
+ if (async) {
+ return invokeMBean.future(objName, name, params, sigNames);
+ } else {
+ return invokeMBean(objName, name, params, sigNames);
}
} else {
return undefined;
@@ -520,7 +546,7 @@
} finally {
lock.unlock();
}
-}
+};
/**
* Causes current thread to sleep for specified
@@ -534,8 +560,7 @@
sleep.docString = "wrapper for java.lang.Thread.sleep method";
/**
- * Schedules a task to be executed once in
- * every N milliseconds specified.
+ * Schedules a task to be executed once in N milliseconds specified.
*
* @param callback function or expression to evaluate
* @param interval in milliseconds to sleep
@@ -549,15 +574,15 @@
// start a new thread that sleeps given time
// and calls callback in an infinite loop
return (function() {
- while (true) {
+ try {
sleep(interval);
- callback();
- }
+ } catch (x) { }
+ callback();
}).daemon();
}
-setTimeout.docString = "calls given callback once after specified interval"
+setTimeout.docString = "calls given callback once after specified interval";
-/**
+/**
* Cancels a timeout set earlier.
* @param tid timeout ID returned from setTimeout
*/
@@ -565,6 +590,45 @@
// we just interrupt the timer thread
tid.interrupt();
}
+clearTimeout.docString = "interrupt a setTimeout timer";
+
+/**
+ * Schedules a task to be executed once in
+ * every N milliseconds specified.
+ *
+ * @param callback function or expression to evaluate
+ * @param interval in milliseconds to sleep
+ * @return timeout ID (which is nothing but Thread instance)
+ */
+function setInterval(callback, interval) {
+ if (! (callback instanceof Function)) {
+ callback = new Function(callback);
+ }
+
+ // start a new thread that sleeps given time
+ // and calls callback in an infinite loop
+ return (function() {
+ while (true) {
+ try {
+ sleep(interval);
+ } catch (x) {
+ break;
+ }
+ callback();
+ }
+ }).daemon();
+}
+setInterval.docString = "calls given callback every specified interval";
+
+/**
+ * Cancels a timeout set earlier.
+ * @param tid timeout ID returned from setTimeout
+ */
+function clearInterval(tid) {
+ // we just interrupt the timer thread
+ tid.interrupt();
+}
+clearInterval.docString = "interrupt a setInterval timer";
/**
* Simple access to thread local storage.
@@ -680,7 +744,7 @@
if (msg === undefined) msg = "undefined";
if (msg === null) msg = "null";
if (title == undefined) title = msg;
- if (msgType == undefined) type = JOptionPane.INFORMATION_MESSAGE;
+ if (msgType == undefined) msgType = JOptionPane.INFORMATION_MESSAGE;
JOptionPane.showMessageDialog(window, msg, title, msgType);
}
if (isEventThread()) {
@@ -800,7 +864,7 @@
* Clear the screen
*/
function clear() {
- (function() { window.clear(false) }).invokeLater();
+ (function() { window.clear(false); }).invokeLater();
}
clear.docString = "clears interactive console screen";
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/invoke.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/invoke.js Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -53,6 +53,6 @@
*
*/
function resetPeakThreadCount() {
- return invokeMBean("java.lang:type=Threading", "resetPeakThreadCount", [], "");
+ return invokeMBean("java.lang:type=Threading", "resetPeakThreadCount", [], {});
}
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/jstack.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/jstack.js Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,16 +43,16 @@
* threads.'jstack' function which can be called once or periodically
* from a timer thread (calling it periodically would slow down the target
* application). To call this once, just call 'jstack()' in script
- * console prompt. To call jtop in a timer thread, you can use
+ * console prompt. To call jstack in a timer thread, you can use
*
- * var t = setTimeout(function () { jstack(print); }, 5000);
+ * var t = setInterval(function () { jstack(print); }, 5000);
*
* The above call prints threads in sorted order for every 5 seconds.
* The print output goes to OS console window from which jconsole was
* started. The timer can be cancelled later by clearTimeout() function
* as shown below:
*
- * clearTimeout(t);
+ * clearInterval(t);
*/
@@ -87,7 +87,7 @@
var tmbean = newPlatformMXBeanProxy(
"java.lang:type=Threading",
- java.lang.management.ThreadMXBean);
+ java.lang.management.ThreadMXBean.class);
var tids = tmbean.allThreadIds;
var tinfos = tmbean["getThreadInfo(long[],int)"](tids, maxFrames);
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/jtop.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/jtop.js Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,14 +45,14 @@
* To call this once, just call 'jtop()' in script console prompt.
* To call jtop in a timer thread, you can use
*
- * var t = setTimeout(function () { jtop(print); }, 2000);
+ * var t = setInterval(function () { jtop(print); }, 2000);
*
* The above call prints threads in sorted order for every 2 seconds.
* The print output goes to OS console window from which jconsole was
* started. The timer can be cancelled later by clearTimeout() function
* as shown below:
- *
- * clearTimeout(t);
+ *
+ * clearInterval(t);
*/
/**
@@ -62,10 +62,10 @@
function getThreadList() {
var tmbean = newPlatformMXBeanProxy(
"java.lang:type=Threading",
- java.lang.management.ThreadMXBean);
+ java.lang.management.ThreadMXBean.class);
if (!tmbean.isThreadCpuTimeSupported()) {
- return;
+ return java.util.Collections.EMPTY_LIST;
}
tmbean.setThreadCpuTimeEnabled(true);
--- a/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/sysprops.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/demo/scripting/jconsole-plugin/src/scripts/sysprops.js Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,16 +43,16 @@
* properties.'sysprops' function which can be called once or periodically
* from a timer thread (calling it periodically would slow down the target
* application). To call this once, just call 'sysprops()' in script
- * console prompt. To call jtop in a timer thread, you can use
+ * console prompt. To call sysprops in a timer thread, you can use
*
- * var t = setTimeout(function () { sysprops(print); }, 5000);
+ * var t = setInterval(function () { sysprops(print); }, 5000);
*
* The above call prints threads in sorted order for every 5 seconds.
* The print output goes to OS console window from which jconsole was
* started. The timer can be cancelled later by clearTimeout() function
* as shown below:
*
- * clearTimeout(t);
+ * clearInterval(t);
*/
@@ -62,7 +62,7 @@
function getSystemProps() {
var runtimeBean = newPlatformMXBeanProxy(
"java.lang:type=Runtime",
- java.lang.management.RuntimeMXBean);
+ java.lang.management.RuntimeMXBean.class);
return runtimeBean.systemProperties;
}
--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c Mon Aug 12 09:29:06 2013 -0400
@@ -106,7 +106,7 @@
/******************** StreamBuffer definition ************************/
typedef struct streamBufferStruct {
- jobject stream; // ImageInputStream or ImageOutputStream
+ jweak ioRef; // weak reference to a provider of I/O routines
jbyteArray hstreamBuffer; // Handle to a Java buffer for the stream
JOCTET *buf; // Pinned buffer pointer */
size_t bufferOffset; // holds offset between unpin and the next pin
@@ -125,6 +125,15 @@
*/
#define STREAMBUF_SIZE 4096
+#define GET_IO_REF(io_name) \
+ do { \
+ if ((*env)->IsSameObject(env, sb->ioRef, NULL) || \
+ ((io_name) = (*env)->NewLocalRef(env, sb->ioRef)) == NULL) \
+ { \
+ cinfo->err->error_exit((j_common_ptr) cinfo); \
+ } \
+ } while (0) \
+
/*
* Used to signal that no data need be restored from an unpin to a pin.
* I.e. the buffer is empty.
@@ -159,7 +168,7 @@
}
- sb->stream = NULL;
+ sb->ioRef = NULL;
sb->buf = NULL;
@@ -191,9 +200,9 @@
* All other state is reset.
*/
static void resetStreamBuffer(JNIEnv *env, streamBufferPtr sb) {
- if (sb->stream != NULL) {
- (*env)->DeleteGlobalRef(env, sb->stream);
- sb->stream = NULL;
+ if (sb->ioRef != NULL) {
+ (*env)->DeleteWeakGlobalRef(env, sb->ioRef);
+ sb->ioRef = NULL;
}
unpinStreamBuffer(env, sb, NULL);
sb->bufferOffset = NO_DATA;
@@ -571,7 +580,7 @@
static void imageio_set_stream(JNIEnv *env,
j_common_ptr cinfo,
imageIODataPtr data,
- jobject stream){
+ jobject io){
streamBufferPtr sb;
sun_jpeg_error_ptr jerr;
@@ -579,13 +588,13 @@
resetStreamBuffer(env, sb); // Removes any old stream
- /* Now we need a new global reference for the stream */
- if (stream != NULL) { // Fix for 4411955
- sb->stream = (*env)->NewGlobalRef(env, stream);
- if (sb->stream == NULL) {
+ /* Now we need a new weak global reference for the I/O provider */
+ if (io != NULL) { // Fix for 4411955
+ sb->ioRef = (*env)->NewWeakGlobalRef(env, io);
+ if (sb->ioRef == NULL) {
JNU_ThrowByName(env,
"java/lang/OutOfMemoryError",
- "Setting Stream");
+ "Setting I/O provider");
return;
}
}
@@ -895,6 +904,7 @@
streamBufferPtr sb = &data->streamBuf;
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
int ret;
+ jobject input = NULL;
/* This is where input suspends */
if (sb->suspendable) {
@@ -920,9 +930,11 @@
* Now fill a complete buffer, or as much of one as the stream
* will give us if we are near the end.
*/
+ GET_IO_REF(input);
+
RELEASE_ARRAYS(env, data, src->next_input_byte);
ret = (*env)->CallIntMethod(env,
- sb->stream,
+ input,
JPEGImageReader_readInputDataID,
sb->hstreamBuffer, 0,
sb->bufferLength);
@@ -982,6 +994,7 @@
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
jint ret;
size_t offset, buflen;
+ jobject input = NULL;
/*
* The original (jpegdecoder.c) had code here that called
@@ -1003,6 +1016,9 @@
if (src->next_input_byte > sb->buf) {
memcpy(sb->buf, src->next_input_byte, offset);
}
+
+ GET_IO_REF(input);
+
RELEASE_ARRAYS(env, data, src->next_input_byte);
buflen = sb->bufferLength - offset;
if (buflen <= 0) {
@@ -1012,7 +1028,7 @@
return;
}
- ret = (*env)->CallIntMethod(env, sb->stream,
+ ret = (*env)->CallIntMethod(env, input,
JPEGImageReader_readInputDataID,
sb->hstreamBuffer,
offset, buflen);
@@ -1075,6 +1091,7 @@
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
jlong ret;
jobject reader;
+ jobject input = NULL;
if (num_bytes < 0) {
return;
@@ -1104,9 +1121,11 @@
return;
}
+ GET_IO_REF(input);
+
RELEASE_ARRAYS(env, data, src->next_input_byte);
ret = (*env)->CallLongMethod(env,
- sb->stream,
+ input,
JPEGImageReader_skipInputBytesID,
(jlong) num_bytes);
if ((*env)->ExceptionOccurred(env)
@@ -2285,11 +2304,14 @@
imageIODataPtr data = (imageIODataPtr) cinfo->client_data;
streamBufferPtr sb = &data->streamBuf;
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
+ jobject output = NULL;
+
+ GET_IO_REF(output);
RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte));
(*env)->CallVoidMethod(env,
- sb->stream,
+ output,
JPEGImageWriter_writeOutputDataID,
sb->hstreamBuffer,
0,
@@ -2322,11 +2344,16 @@
/* find out how much needs to be written */
/* this conversion from size_t to jint is safe, because the lenght of the buffer is limited by jint */
jint datacount = (jint)(sb->bufferLength - dest->free_in_buffer);
+
if (datacount != 0) {
+ jobject output = NULL;
+
+ GET_IO_REF(output);
+
RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte));
(*env)->CallVoidMethod(env,
- sb->stream,
+ output,
JPEGImageWriter_writeOutputDataID,
sb->hstreamBuffer,
0,
--- a/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c Mon Aug 12 09:29:06 2013 -0400
@@ -2606,38 +2606,37 @@
#define ERR_BAD_IMAGE_LAYOUT (-2)
-#define CHECK_DST_ARRAY(start_offset, elements_per_pixel) \
- do { \
- int offset = (start_offset); \
- int lastScanOffset; \
- \
- if (!SAFE_TO_MULT(rasterP->scanlineStride, \
- (rasterP->height - 1))) \
- { \
- return ERR_BAD_IMAGE_LAYOUT; \
- } \
- lastScanOffset = rasterP->scanlineStride * \
- (rasterP->height - 1); \
- \
- if (!SAFE_TO_ADD(offset, lastScanOffset)) { \
- return ERR_BAD_IMAGE_LAYOUT; \
- } \
- lastScanOffset += offset; \
- \
- if (!SAFE_TO_MULT((elements_per_pixel), rasterP->width)) { \
- return ERR_BAD_IMAGE_LAYOUT; \
- } \
- offset = (elements_per_pixel) * rasterP->width; \
- \
- if (!SAFE_TO_ADD(offset, lastScanOffset)) { \
- return ERR_BAD_IMAGE_LAYOUT; \
- } \
- lastScanOffset += offset; \
- \
- if (dataArrayLength < lastScanOffset) { \
- return ERR_BAD_IMAGE_LAYOUT; \
- } \
- } while(0); \
+#define CHECK_DST_ARRAY(start_offset, elements_per_scan, elements_per_pixel) \
+ do { \
+ int offset = (start_offset); \
+ int lastScanOffset; \
+ \
+ if (!SAFE_TO_MULT((elements_per_scan), \
+ (rasterP->height - 1))) \
+ { \
+ return ERR_BAD_IMAGE_LAYOUT; \
+ } \
+ lastScanOffset = (elements_per_scan) * (rasterP->height - 1); \
+ \
+ if (!SAFE_TO_ADD(offset, lastScanOffset)) { \
+ return ERR_BAD_IMAGE_LAYOUT; \
+ } \
+ lastScanOffset += offset; \
+ \
+ if (!SAFE_TO_MULT((elements_per_pixel), rasterP->width)) { \
+ return ERR_BAD_IMAGE_LAYOUT; \
+ } \
+ offset = (elements_per_pixel) * rasterP->width; \
+ \
+ if (!SAFE_TO_ADD(offset, lastScanOffset)) { \
+ return ERR_BAD_IMAGE_LAYOUT; \
+ } \
+ lastScanOffset += offset; \
+ \
+ if (dataArrayLength < lastScanOffset) { \
+ return ERR_BAD_IMAGE_LAYOUT; \
+ } \
+ } while(0); \
static int
storeImageArray(JNIEnv *env, BufImageS_t *srcP, BufImageS_t *dstP,
@@ -2665,39 +2664,33 @@
if (hintP->packing == BYTE_INTERLEAVED) {
/* Write it back to the destination */
- CHECK_DST_ARRAY(hintP->channelOffset, hintP->numChans);
+ if (rasterP->dataType != BYTE_DATA_TYPE) {
+ /* We are working with a raster which was marked
+ as a byte interleaved due to performance reasons.
+ So, we have to convert the length of the data
+ array to bytes as well.
+ */
+ if (!SAFE_TO_MULT(rasterP->dataSize, dataArrayLength)) {
+ return ERR_BAD_IMAGE_LAYOUT;
+ }
+ dataArrayLength *= rasterP->dataSize;
+ }
+
+ CHECK_DST_ARRAY(hintP->dataOffset, hintP->sStride, hintP->numChans);
cmDataP = (unsigned char *) mlib_ImageGetData(mlibImP);
mStride = mlib_ImageGetStride(mlibImP);
dataP = (unsigned char *)(*env)->GetPrimitiveArrayCritical(env,
rasterP->jdata, NULL);
if (dataP == NULL) return 0;
- cDataP = dataP + hintP->channelOffset;
+ cDataP = dataP + hintP->dataOffset;
for (y=0; y < rasterP->height;
- y++, cmDataP += mStride, cDataP += rasterP->scanlineStride)
+ y++, cmDataP += mStride, cDataP += hintP->sStride)
{
memcpy(cDataP, cmDataP, rasterP->width*hintP->numChans);
}
(*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, dataP,
JNI_ABORT);
}
- else if (hintP->packing == SHORT_INTERLEAVED) {
- /* Write it back to the destination */
- unsigned short *sdataP, *sDataP;
- unsigned short *smDataP = (unsigned short *)mlib_ImageGetData(mlibImP);
- CHECK_DST_ARRAY(hintP->channelOffset, hintP->numChans);
- mStride = mlib_ImageGetStride(mlibImP);
- sdataP = (unsigned short *)(*env)->GetPrimitiveArrayCritical(env,
- rasterP->jdata, NULL);
- if (sdataP == NULL) return -1;
- sDataP = sdataP + hintP->channelOffset;
- for (y=0; y < rasterP->height;
- y++, smDataP += mStride, sDataP += rasterP->scanlineStride)
- {
- memcpy(sDataP, smDataP, rasterP->width*hintP->numChans);
- }
- (*env)->ReleasePrimitiveArrayCritical(env, rasterP->jdata, sdataP,
- JNI_ABORT);
- }
else if (dstP->cmodel.cmType == DIRECT_CM_TYPE) {
/* Just need to move bits */
if (mlibImP->type == MLIB_BYTE) {
@@ -3499,7 +3492,7 @@
}
dataArrayLength = (*env)->GetArrayLength(env, jOutDataP);
- CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
+ CHECK_DST_ARRAY(rasterP->chanOffsets[0], rasterP->scanlineStride, 1);
outDataP = (*env)->GetPrimitiveArrayCritical(env, jOutDataP, 0);
if (outDataP == NULL) {
@@ -3575,7 +3568,7 @@
}
dataArrayLength = (*env)->GetArrayLength(env, jOutDataP);
- CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
+ CHECK_DST_ARRAY(rasterP->chanOffsets[0], rasterP->scanlineStride, 1);
outDataP = (*env)->GetPrimitiveArrayCritical(env, jOutDataP, 0);
if (outDataP == NULL) {
@@ -3651,7 +3644,7 @@
}
dataArrayLength = (*env)->GetArrayLength(env, jOutDataP);
- CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
+ CHECK_DST_ARRAY(rasterP->chanOffsets[0], rasterP->scanlineStride, 1);
outDataP = (*env)->GetPrimitiveArrayCritical(env, jOutDataP, 0);
if (outDataP == NULL) {
@@ -3730,7 +3723,7 @@
}
dataArrayLength = (*env)->GetArrayLength(env, jOutDataP);
- CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
+ CHECK_DST_ARRAY(rasterP->chanOffsets[0], rasterP->scanlineStride, 1);
outDataP = (*env)->GetPrimitiveArrayCritical(env, jOutDataP, 0);
if (outDataP == NULL) {
@@ -3827,7 +3820,7 @@
return -1;
}
dataArrayLength = (*env)->GetArrayLength(env, jOutDataP);
- CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
+ CHECK_DST_ARRAY(rasterP->chanOffsets[0], rasterP->scanlineStride, 1);
outDataP = (*env)->GetPrimitiveArrayCritical(env, jOutDataP, 0);
if (outDataP == NULL) {
@@ -3925,7 +3918,7 @@
}
dataArrayLength = (*env)->GetArrayLength(env, jOutDataP);
- CHECK_DST_ARRAY(rasterP->chanOffsets[0], 1);
+ CHECK_DST_ARRAY(rasterP->chanOffsets[0], rasterP->scanlineStride, 1);
outDataP = (*env)->GetPrimitiveArrayCritical(env, jOutDataP, 0);
if (outDataP == NULL) {
--- a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp Mon Aug 12 09:29:06 2013 -0400
@@ -66,6 +66,16 @@
le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount);
le_int32 i;
+ if (combiningClasses == NULL || indices == NULL) {
+ if (combiningClasses != NULL) {
+ LE_DELETE_ARRAY(combiningClasses);
+ }
+ if (indices != NULL) {
+ LE_DELETE_ARRAY(indices);
+ }
+ return;
+ }
+
for (i = 0; i < charCount; i += 1) {
combiningClasses[i] = classTable->getGlyphClass(classTable, (LEGlyphID) inChars[i], success);
indices[i] = i;
--- a/jdk/src/share/native/sun/security/krb5/nativeccache.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/native/sun/security/krb5/nativeccache.c Mon Aug 12 09:29:06 2013 -0400
@@ -264,13 +264,21 @@
}
+int isIn(krb5_enctype e, int n, jint* etypes)
+{
+ int i;
+ for (i=0; i<n; i++) {
+ if (e == etypes[i]) return 1;
+ }
+ return 0;
+}
/*
* Class: sun_security_krb5_Credentials
* Method: acquireDefaultNativeCreds
- * Signature: ()Lsun/security/krb5/Credentials;
+ * Signature: ([I])Lsun/security/krb5/Credentials;
*/
JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativeCreds
-(JNIEnv *env, jclass krbcredsClass)
+(JNIEnv *env, jclass krbcredsClass, jintArray jetypes)
{
jobject krbCreds = NULL;
krb5_error_code err = 0;
@@ -280,6 +288,9 @@
krb5_flags flags = 0;
krb5_context kcontext = NULL;
+ int netypes;
+ jint *etypes = NULL;
+
/* Initialize the Kerberos 5 context */
err = krb5_init_context (&kcontext);
@@ -295,6 +306,9 @@
err = krb5_cc_start_seq_get (kcontext, ccache, &cursor);
}
+ netypes = (*env)->GetArrayLength(env, jetypes);
+ etypes = (jint *) (*env)->GetIntArrayElements(env, jetypes, NULL);
+
if (!err) {
while ((err = krb5_cc_next_cred (kcontext, ccache, &cursor, &creds)) == 0) {
char *serverName = NULL;
@@ -305,7 +319,8 @@
}
if (!err) {
- if (strncmp (serverName, "krbtgt", strlen("krbtgt")) == 0) {
+ if (strncmp (serverName, "krbtgt", sizeof("krbtgt")-1) == 0 &&
+ isIn(creds.keyblock.enctype, netypes, etypes)) {
jobject ticket, clientPrincipal, targetPrincipal, encryptionKey;
jobject ticketFlags, startTime, endTime;
jobject authTime, renewTillTime, hostAddresses;
@@ -321,7 +336,7 @@
targetPrincipal = BuildClientPrincipal(env, kcontext, creds.server);
if (targetPrincipal == NULL) goto cleanup;
- // Build a com.ibm.security.krb5.Ticket
+ // Build a sun/security/krb5/internal/Ticket
ticket = BuildTicket(env, &creds.ticket);
if (ticket == NULL) goto cleanup;
@@ -353,7 +368,7 @@
krbcredsConstructor = (*env)->GetMethodID(env, krbcredsClass, "<init>",
"(Lsun/security/krb5/internal/Ticket;Lsun/security/krb5/PrincipalName;Lsun/security/krb5/PrincipalName;Lsun/security/krb5/EncryptionKey;Lsun/security/krb5/internal/TicketFlags;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/KerberosTime;Lsun/security/krb5/internal/HostAddresses;)V");
if (krbcredsConstructor == 0) {
- printf("Couldn't find com.ibm.security.krb5.Credentials constructor\n");
+ printf("Couldn't find sun.security.krb5.internal.Ticket constructor\n");
break;
}
}
@@ -409,6 +424,10 @@
printiferr (err, "while finishing ticket retrieval");
}
+ if (etypes != NULL) {
+ (*env)->ReleaseIntArrayElements(env, jetypes, etypes, 0);
+ }
+
krb5_free_context (kcontext);
return krbCreds;
}
--- a/jdk/src/share/sample/scripting/scriptpad/README.txt Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/sample/scripting/scriptpad/README.txt Mon Aug 12 09:29:06 2013 -0400
@@ -108,7 +108,7 @@
java -Dcom.sun.management.jmxremote.port=1090 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
- -jar $JDK_HOME/demo/jfc/Java2D/Java2Demo.jar
+ -jar $JDK_HOME/demo/jfc/Font2DTest/Font2DTest.jar
(2) Start scriptpad and click on "Tools->JMX Connect" menu.
In the prompt, enter "localhost:1090" to connect to the above
--- a/jdk/src/share/sample/scripting/scriptpad/src/resources/conc.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/sample/scripting/scriptpad/src/resources/conc.js Mon Aug 12 09:29:06 2013 -0400
@@ -221,7 +221,7 @@
* @return timeout ID (which is nothing but Thread instance)
*/
function setTimeout(callback, interval) {
- if (! (callback instanceof Function) && typeof callback !== "function") {
+ if (! (callback instanceof Function)) {
callback = new Function(callback);
}
@@ -255,7 +255,7 @@
* @return timeout ID (which is nothing but Thread instance)
*/
function setInterval(callback, interval) {
- if (! (callback instanceof Function) && typeof callback !== "function") {
+ if (! (callback instanceof Function)) {
callback = new Function(callback);
}
--- a/jdk/src/share/sample/scripting/scriptpad/src/resources/mm.js Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/share/sample/scripting/scriptpad/src/resources/mm.js Mon Aug 12 09:29:06 2013 -0400
@@ -159,22 +159,12 @@
// wraps a script array as java.lang.Object[]
function objectArray(array) {
- var len = array.length;
- var res = java.lang.reflect.Array.newInstance(java.lang.Object, len);
- for (var i = 0; i < array.length; i++) {
- res[i] = array[i];
- }
- return res;
+ return Java.to(array, "java.lang.Object[]");
}
// wraps a script (string) array as java.lang.String[]
function stringArray(array) {
- var len = array.length;
- var res = java.lang.reflect.Array.newInstance(java.lang.String, len);
- for (var i = 0; i < array.length; i++) {
- res[i] = String(array[i]);
- }
- return res;
+ return Java.to(array, "java.lang.String[]");
}
// script array to Java List
@@ -284,26 +274,35 @@
__get__: function (name) {
if (isAttribute(name)) {
if (async) {
- return getMBeanAttribute.future(objName, name);
+ return getMBeanAttribute.future(objName, name);
} else {
- return getMBeanAttribute(objName, name);
+ return getMBeanAttribute(objName, name);
}
- } else if (isOperation(name)) {
+ } else {
+ return undefined;
+ }
+ },
+ __call__: function(name) {
+ if (isOperation(name)) {
var oper = operMap[name];
- return function() {
- var params = objectArray(arguments);
- var sigs = oper.signature;
- var sigNames = new Array(sigs.length);
- for (var index in sigs) {
- sigNames[index] = sigs[index].getType();
- }
- if (async) {
- return invokeMBean.future(objName, name,
- params, sigNames);
- } else {
- return invokeMBean(objName, name, params, sigNames);
- }
- };
+
+ var params = [];
+ for (var j = 1; j < arguments.length; j++) {
+ params[j-1]= arguments[j];
+ }
+
+ var sigs = oper.signature;
+
+ var sigNames = new Array(sigs.length);
+ for (var index in sigs) {
+ sigNames[index] = sigs[index].getType();
+ }
+
+ if (async) {
+ return invokeMBean.future(objName, name, params, sigNames);
+ } else {
+ return invokeMBean(objName, name, params, sigNames);
+ }
} else {
return undefined;
}
--- a/jdk/src/solaris/classes/sun/print/IPPPrintService.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/solaris/classes/sun/print/IPPPrintService.java Mon Aug 12 09:29:06 2013 -0400
@@ -1099,6 +1099,15 @@
if (category == PrinterName.class) {
return (T)(new PrinterName(printer, null));
+ } else if (category == PrinterInfo.class) {
+ PrinterInfo pInfo = new PrinterInfo(printer, null);
+ AttributeClass ac = (getAttMap != null) ?
+ (AttributeClass)getAttMap.get(pInfo.getName())
+ : null;
+ if (ac != null) {
+ return (T)(new PrinterInfo(ac.getStringValue(), null));
+ }
+ return (T)pInfo;
} else if (category == QueuedJobCount.class) {
QueuedJobCount qjc = new QueuedJobCount(0);
AttributeClass ac = (getAttMap != null) ?
@@ -1566,7 +1575,24 @@
}
}
+ String getDest() {
+ return printer;
+ }
+
public String getName() {
+ /*
+ * Mac is using printer-info IPP attribute for its human-readable printer
+ * name and is also the identifier used in NSPrintInfo:setPrinter.
+ */
+ if (UnixPrintServiceLookup.isMac()) {
+ PrintServiceAttributeSet psaSet = this.getAttributes();
+ if (psaSet != null) {
+ PrinterInfo pName = (PrinterInfo)psaSet.get(PrinterInfo.class);
+ if (pName != null) {
+ return pName.toString();
+ }
+ }
+ }
return printer;
}
--- a/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/solaris/classes/sun/print/UnixPrintJob.java Mon Aug 12 09:29:06 2013 -0400
@@ -65,6 +65,7 @@
import javax.print.attribute.PrintJobAttributeSet;
import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.PrintServiceAttributeSet;
import javax.print.attribute.standard.Copies;
import javax.print.attribute.standard.Destination;
import javax.print.attribute.standard.DocumentName;
@@ -76,6 +77,7 @@
import javax.print.attribute.standard.MediaSize;
import javax.print.attribute.standard.MediaSizeName;
import javax.print.attribute.standard.OrientationRequested;
+import javax.print.attribute.standard.PrinterName;
import javax.print.attribute.standard.RequestingUserName;
import javax.print.attribute.standard.NumberUp;
import javax.print.attribute.standard.Sides;
@@ -120,6 +122,9 @@
UnixPrintJob(PrintService service) {
this.service = service;
mDestination = service.getName();
+ if (UnixPrintServiceLookup.isMac()) {
+ mDestination = ((IPPPrintService)service).getDest();
+ }
mDestType = UnixPrintJob.DESTPRINTER;
}
--- a/jdk/src/solaris/native/java/lang/java_props_md.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/solaris/native/java/lang/java_props_md.c Mon Aug 12 09:29:06 2013 -0400
@@ -361,6 +361,25 @@
*std_encoding = "Big5-HKSCS-2001";
}
#endif
+#ifdef MACOSX
+ /*
+ * For the case on MacOS X where encoding is set to US-ASCII, but we
+ * don't have any encoding hints from LANG/LC_ALL/LC_CTYPE, use UTF-8
+ * instead.
+ *
+ * The contents of ASCII files will still be read and displayed
+ * correctly, but so will files containing UTF-8 characters beyond the
+ * standard ASCII range.
+ *
+ * Specifically, this allows apps launched by double-clicking a .jar
+ * file to correctly read UTF-8 files using the default encoding (see
+ * 8011194).
+ */
+ if (strcmp(p,"US-ASCII") == 0 && getenv("LANG") == NULL &&
+ getenv("LC_ALL") == NULL && getenv("LC_CTYPE") == NULL) {
+ *std_encoding = "UTF-8";
+ }
+#endif
}
free(temp);
--- a/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Mon Aug 12 09:29:06 2013 -0400
@@ -926,6 +926,11 @@
*shmExt = canUseShmExt = CANT_USE_MITSHM;
*shmPixmaps = canUseShmExtPixmaps = CANT_USE_MITSHM;
+ if (awt_display == (Display *)NULL) {
+ AWT_NOFLUSH_UNLOCK();
+ return;
+ }
+
/**
* XShmQueryExtension returns False in remote server case.
* Unfortunately it also returns True in ssh case, so
--- a/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/solaris/native/sun/java2d/x11/XRBackendNative.c Mon Aug 12 09:29:06 2013 -0400
@@ -112,6 +112,25 @@
#define PKGINFO_LINE_LEN_MAX 256
#define PKGINFO_LINE_CNT_MAX 50
+/*
+ * X protocol uses (u_int16)length to specify the length in 4 bytes quantities
+ * of the whole request. Both XRenderFillRectangles() and XFillRectangles()
+ * have provisions to fragment into several requests if the number of rectangles
+ * plus the current x request does not fit into 65535*4 bytes. While
+ * XRenderCreateLinearGradient() and XRenderCreateRadialGradient() have
+ * provisions to gracefully degrade if the resulting request would exceed
+ * 65535*4 bytes.
+ *
+ * Below, we define a cap of 65535*4 bytes for the maximum X request payload
+ * allowed for Non-(XRenderFillRectangles() or XFillRectangles()) API calls,
+ * just to be conservative. This is offset by the size of our maximum x*Req
+ * type in this compilation unit, which is xRenderCreateRadiaGradientReq.
+ *
+ * Note that sizeof(xRenderCreateRadiaGradientReq) = 36
+ */
+#define MAX_PAYLOAD (262140u - 36u)
+#define MAXUINT (0xffffffffu)
+
static jboolean IsXRenderAvailable(jboolean verbose) {
void *xrenderlib;
@@ -267,13 +286,19 @@
char *maskData;
XImage* defaultImg;
jfieldID maskImgID;
- jlong fmt8 =
- ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardA8));
- jlong fmt32 =
- ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardARGB32));
+ jlong fmt8;
+ jlong fmt32;
+
jfieldID a8ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_A8", "J");
jfieldID argb32ID = (*env)->GetStaticFieldID(env, cls, "FMTPTR_ARGB32", "J");
+ if (awt_display == (Display *)NULL) {
+ return;
+ }
+
+ fmt8 = ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardA8));
+ fmt32 = ptr_to_jlong(XRenderFindStandardFormat(awt_display, PictStandardARGB32));
+
(*env)->SetStaticLongField(env, cls, a8ID, fmt8);
(*env)->SetStaticLongField(env, cls, argb32ID, fmt32);
@@ -404,6 +429,10 @@
if (rectCnt <= 256) {
xRects = &sRects[0];
} else {
+ if (MAXUINT / sizeof(XRectangle) < (unsigned)rectCnt) {
+ /* rectCnt too big, integer overflow */
+ return;
+ }
xRects = (XRectangle *) malloc(sizeof(XRectangle) * rectCnt);
if (xRects == NULL) {
return;
@@ -460,6 +489,12 @@
XFixed *stops;
XLinearGradient grad;
+ if (MAX_PAYLOAD / (sizeof(XRenderColor) + sizeof(XFixed))
+ < (unsigned)numStops) {
+ /* numStops too big, payload overflow */
+ return -1;
+ }
+
if ((pixels = (jshort *)
(*env)->GetPrimitiveArrayCritical(env, pixelsArray, NULL)) == NULL) {
return -1;
@@ -480,6 +515,18 @@
colors = (XRenderColor *) malloc(numStops * sizeof(XRenderColor));
stops = (XFixed *) malloc(numStops * sizeof(XFixed));
+ if (colors == NULL || stops == NULL) {
+ if (colors != NULL) {
+ free(colors);
+ }
+ if (stops != NULL) {
+ free(stops);
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, pixelsArray, pixels, JNI_ABORT);
+ (*env)->ReleasePrimitiveArrayCritical(env, fractionsArray, fractions, JNI_ABORT);
+ return -1;
+ }
+
for (i=0; i < numStops; i++) {
stops[i] = XDoubleToFixed(fractions[i]);
colors[i].alpha = pixels[i*4 + 0];
@@ -527,6 +574,11 @@
XFixed *stops;
XRadialGradient grad;
+ if (MAX_PAYLOAD / (sizeof(XRenderColor) + sizeof(XFixed))
+ < (unsigned)numStops) {
+ /* numStops too big, payload overflow */
+ return -1;
+ }
if ((pixels =
(jshort *)(*env)->GetPrimitiveArrayCritical(env, pixelsArray, NULL)) == NULL) {
@@ -550,6 +602,18 @@
colors = (XRenderColor *) malloc(numStops * sizeof(XRenderColor));
stops = (XFixed *) malloc(numStops * sizeof(XFixed));
+ if (colors == NULL || stops == NULL) {
+ if (colors != NULL) {
+ free(colors);
+ }
+ if (stops != NULL) {
+ free(stops);
+ }
+ (*env)->ReleasePrimitiveArrayCritical(env, pixelsArray, pixels, JNI_ABORT);
+ (*env)->ReleasePrimitiveArrayCritical(env, fractionsArray, fractions, JNI_ABORT);
+ return -1;
+ }
+
for (i=0; i < numStops; i++) {
stops[i] = XDoubleToFixed(fractions[i]);
colors[i].alpha = pixels[i*4 + 0];
@@ -708,6 +772,12 @@
unsigned char *pixelData;
int i;
+ if (MAX_PAYLOAD / (sizeof(XGlyphInfo) + sizeof(Glyph))
+ < (unsigned)glyphCnt) {
+ /* glyphCnt too big, payload overflow */
+ return;
+ }
+
XGlyphInfo *xginfo = (XGlyphInfo *) malloc(sizeof(XGlyphInfo) * glyphCnt);
Glyph *gid = (Glyph *) malloc(sizeof(Glyph) * glyphCnt);
@@ -770,6 +840,11 @@
Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative
(JNIEnv *env, jclass cls, jint glyphSet, jintArray gidArray, jint glyphCnt) {
+ if (MAX_PAYLOAD / sizeof(Glyph) < (unsigned)glyphCnt) {
+ /* glyphCnt too big, payload overflow */
+ return;
+ }
+
/* The glyph ids are 32 bit but may be stored in a 64 bit long on
* a 64 bit architecture. So optimise the 32 bit case to avoid
* extra stack or heap allocations by directly referencing the
@@ -840,6 +915,15 @@
unsigned int sids[256];
int charCnt = 0;
+ if ((MAX_PAYLOAD / sizeof(XGlyphElt32) < (unsigned)eltCnt)
+ || (MAX_PAYLOAD / sizeof(unsigned int) < (unsigned)glyphCnt)
+ || ((MAX_PAYLOAD - sizeof(XGlyphElt32)*(unsigned)eltCnt) /
+ sizeof(unsigned int) < (unsigned)glyphCnt))
+ {
+ /* (eltCnt, glyphCnt) too big, payload overflow */
+ return;
+ }
+
if (eltCnt <= 24) {
xelts = &selts[0];
}else {
@@ -938,6 +1022,11 @@
if (rectCnt <= 256) {
xRects = &sRects[0];
} else {
+ if (MAXUINT / sizeof(XRectangle) < (unsigned)rectCnt) {
+ /* rectCnt too big, integer overflow */
+ return;
+ }
+
xRects = (XRectangle *) malloc(sizeof(XRectangle) * rectCnt);
if (xRects == NULL) {
return;
--- a/jdk/src/windows/classes/java/lang/ProcessImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/classes/java/lang/ProcessImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -491,8 +491,10 @@
/**
* Create a process using the win32 function CreateProcess.
+ * The method is synchronized due to MS kb315939 problem.
+ * All native handles should restore the inherit flag at the end of call.
*
- * @param cmdstr the Windows commandline
+ * @param cmdstr the Windows command line
* @param envblock NUL-separated, double-NUL-terminated list of
* environment strings in VAR=VALUE form
* @param dir the working directory of the process, or null if
@@ -508,7 +510,7 @@
* @param redirectErrorStream redirectErrorStream attribute
* @return the native subprocess HANDLE returned by CreateProcess
*/
- private static native long create(String cmdstr,
+ private static synchronized native long create(String cmdstr,
String envblock,
String dir,
long[] stdHandles,
--- a/jdk/src/windows/classes/sun/print/Win32PrintService.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/classes/sun/print/Win32PrintService.java Mon Aug 12 09:29:06 2013 -0400
@@ -445,7 +445,7 @@
initMedia();
- if ((mediaSizeNames == null) && (mediaSizeNames.length == 0)) {
+ if ((mediaSizeNames == null) || (mediaSizeNames.length == 0)) {
return null;
}
--- a/jdk/src/windows/native/java/io/io_util_md.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/native/java/io/io_util_md.c Mon Aug 12 09:29:06 2013 -0400
@@ -251,12 +251,6 @@
free(pathbuf);
if (h == INVALID_HANDLE_VALUE) {
- int error = GetLastError();
- if (error == ERROR_TOO_MANY_OPEN_FILES) {
- JNU_ThrowByName(env, JNU_JAVAIOPKG "IOException",
- "Too many open files");
- return -1;
- }
throwFileNotFoundException(env, path);
return -1;
}
--- a/jdk/src/windows/native/java/lang/ProcessImpl_md.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/native/java/lang/ProcessImpl_md.c Mon Aug 12 09:29:06 2013 -0400
@@ -113,6 +113,233 @@
CloseHandle(handle);
}
+static BOOL hasInheritFlag(HANDLE handle)
+{
+ DWORD mask;
+ if (GetHandleInformation(handle, &mask)) {
+ return mask & HANDLE_FLAG_INHERIT;
+ }
+ return FALSE;
+}
+
+#define HANDLE_STORAGE_SIZE 6
+#define OFFSET_READ 0
+#define OFFSET_WRITE 1
+//long signed version of INVALID_HANDLE_VALUE
+#define JAVA_INVALID_HANDLE_VALUE ((jlong) -1)
+#define OPPOSITE_END(offset) (offset==OFFSET_READ ? OFFSET_WRITE : OFFSET_READ)
+
+/* Pipe holder structure */
+typedef struct _STDHOLDER {
+ HANDLE pipe[2];
+ int offset;
+} STDHOLDER;
+
+/* Responsible for correct initialization of the [pHolder] structure
+ (that is used for handles recycling) if needs,
+ and appropriate setup of IOE handle [phStd] for child process based
+ on created pipe or Java handle. */
+static BOOL initHolder(
+ JNIEnv *env,
+ jlong *pjhandles, /* IN OUT - the handle form Java,
+ that can be a file, console or undefined */
+ STDHOLDER *pHolder, /* OUT - initialized structure that holds pipe
+ handles */
+ HANDLE *phStd /* OUT - initialized handle for child process */
+) {
+ /* Here we test the value from Java against invalid
+ handle value. We are not using INVALID_HANDLE_VALUE macro
+ due to double signed/unsigned and 32/64bit ambiguity.
+ Otherwise it will be easy to get the wrong
+ value 0x00000000FFFFFFFF
+ instead 0xFFFFFFFFFFFFFFFF. */
+ if (*pjhandles != JAVA_INVALID_HANDLE_VALUE) {
+ /* Java file or console redirection */
+ *phStd = (HANDLE) *pjhandles;
+ /* Here we set the related Java stream (Process.getXXXXStream())
+ to [ProcessBuilder.NullXXXXStream.INSTANCE] value.
+ The initial Java handle [*pjhandles] will be closed in
+ ANY case. It is not a handle leak. */
+ *pjhandles = JAVA_INVALID_HANDLE_VALUE;
+ } else {
+ /* Creation of parent-child pipe */
+ if (!CreatePipe(
+ &pHolder->pipe[OFFSET_READ],
+ &pHolder->pipe[OFFSET_WRITE],
+ NULL, /* we would like to inherit
+ default process access,
+ instead of 'Everybody' access */
+ PIPE_SIZE))
+ {
+ win32Error(env, L"CreatePipe");
+ return FALSE;
+ } else {
+ /* [thisProcessEnd] has no the inherit flag because
+ the [lpPipeAttributes] param of [CreatePipe]
+ had the NULL value. */
+ HANDLE thisProcessEnd = pHolder->pipe[OPPOSITE_END(pHolder->offset)];
+ *phStd = pHolder->pipe[pHolder->offset];
+ *pjhandles = (jlong) thisProcessEnd;
+ }
+ }
+ /* Pipe handle will be closed in the [releaseHolder] call,
+ file handle will be closed in Java.
+ The long-live handle need to restore the inherit flag,
+ we do it later in the [prepareIOEHandleState] call. */
+ SetHandleInformation(
+ *phStd,
+ HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
+ return TRUE;
+}
+
+/* Smart recycling of pipe handles in [pHolder]. For the failed
+ create process attempts, both ends of pipe need to be released.
+ The [complete] has the [TRUE] value in the failed attempt. */
+static void releaseHolder(BOOL complete, STDHOLDER *pHolder) {
+ closeSafely(pHolder->pipe[pHolder->offset]);
+ if (complete) {
+ /* Error occur, close this process pipe end */
+ closeSafely(pHolder->pipe[OPPOSITE_END(pHolder->offset)]);
+ }
+}
+
+/* Stores and drops the inherit flag of handles that should not
+ be shared with the child process by default, but can hold the
+ inherit flag due to MS process birth specific. */
+static void prepareIOEHandleState(
+ HANDLE *stdIOE,
+ BOOL *inherit)
+{
+ int i;
+ for (i = 0; i < HANDLE_STORAGE_SIZE; ++i) {
+ HANDLE hstd = stdIOE[i];
+ if (INVALID_HANDLE_VALUE != hstd && hasInheritFlag(hstd)) {
+ /* FALSE by default */
+ inherit[i] = TRUE;
+ /* Java does not need implicit inheritance for IOE handles,
+ so we drop inherit flag that probably was installed by
+ previous CreateProcess call that launched current process.
+ We will return the handle state back after CreateProcess call.
+ By clearing inherit flag we prevent "greedy grandchild" birth.
+ The explicit inheritance for child process IOE handles is
+ implemented in the [initHolder] call. */
+ SetHandleInformation(hstd, HANDLE_FLAG_INHERIT, 0);
+ }
+ }
+}
+
+/* Restores the inheritance flag of handles from stored values. */
+static void restoreIOEHandleState(
+ const HANDLE *stdIOE,
+ const BOOL *inherit)
+{
+ /* The set of current process standard IOE handles and
+ the set of child process IOE handles can intersect.
+ To restore the inherit flag right, we use backward
+ array iteration. */
+ int i;
+ for (i = HANDLE_STORAGE_SIZE - 1; i >= 0; --i)
+ if (INVALID_HANDLE_VALUE != stdIOE[i]) {
+ /* Restore inherit flag for any case.
+ The handle can be changed by explicit inheritance.*/
+ SetHandleInformation(stdIOE[i],
+ HANDLE_FLAG_INHERIT,
+ inherit[i] ? HANDLE_FLAG_INHERIT : 0);
+ }
+}
+
+/* Please, read about the MS inheritance problem
+ http://support.microsoft.com/kb/315939
+ and critical section/synchronized block solution. */
+static jlong processCreate(
+ JNIEnv *env,
+ const jchar *pcmd,
+ const jchar *penvBlock,
+ const jchar *pdir,
+ jlong *handles,
+ jboolean redirectErrorStream)
+{
+ jlong ret = 0L;
+ STARTUPINFOW si = {sizeof(si)};
+
+ /* Handles for which the inheritance flag must be restored. */
+ HANDLE stdIOE[HANDLE_STORAGE_SIZE] = {
+ /* Current process standard IOE handles: JDK-7147084 */
+ INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE,
+ /* Child process IOE handles: JDK-6921885 */
+ (HANDLE)handles[0], (HANDLE)handles[1], (HANDLE)handles[2]};
+ BOOL inherit[HANDLE_STORAGE_SIZE] = {
+ FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE};
+
+ {
+ /* Extraction of current process standard IOE handles */
+ DWORD idsIOE[3] = {STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE};
+ int i;
+ for (i = 0; i < 3; ++i)
+ /* Should not be closed by CloseHandle! */
+ stdIOE[i] = GetStdHandle(idsIOE[i]);
+ }
+
+ prepareIOEHandleState(stdIOE, inherit);
+ {
+ /* Input */
+ STDHOLDER holderIn = {{INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}, OFFSET_READ};
+ if (initHolder(env, &handles[0], &holderIn, &si.hStdInput)) {
+
+ /* Output */
+ STDHOLDER holderOut = {{INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}, OFFSET_WRITE};
+ if (initHolder(env, &handles[1], &holderOut, &si.hStdOutput)) {
+
+ /* Error */
+ STDHOLDER holderErr = {{INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE}, OFFSET_WRITE};
+ BOOL success;
+ if (redirectErrorStream) {
+ si.hStdError = si.hStdOutput;
+ /* Here we set the error stream to [ProcessBuilder.NullInputStream.INSTANCE]
+ value. That is in accordance with Java Doc for the redirection case.
+ The Java file for the [ handles[2] ] will be closed in ANY case. It is not
+ a handle leak. */
+ handles[2] = JAVA_INVALID_HANDLE_VALUE;
+ success = TRUE;
+ } else {
+ success = initHolder(env, &handles[2], &holderErr, &si.hStdError);
+ }
+
+ if (success) {
+ PROCESS_INFORMATION pi;
+ DWORD processFlag = CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT;
+
+ si.dwFlags = STARTF_USESTDHANDLES;
+ if (!CreateProcessW(
+ NULL, /* executable name */
+ (LPWSTR)pcmd, /* command line */
+ NULL, /* process security attribute */
+ NULL, /* thread security attribute */
+ TRUE, /* inherits system handles */
+ processFlag, /* selected based on exe type */
+ (LPVOID)penvBlock,/* environment block */
+ (LPCWSTR)pdir, /* change to the new current directory */
+ &si, /* (in) startup information */
+ &pi)) /* (out) process information */
+ {
+ win32Error(env, L"CreateProcess");
+ } else {
+ closeSafely(pi.hThread);
+ ret = (jlong)pi.hProcess;
+ }
+ }
+ releaseHolder(ret == 0, &holderErr);
+ releaseHolder(ret == 0, &holderOut);
+ }
+ releaseHolder(ret == 0, &holderIn);
+ }
+ }
+ restoreIOEHandleState(stdIOE, inherit);
+
+ return ret;
+}
+
JNIEXPORT jlong JNICALL
Java_java_lang_ProcessImpl_create(JNIEnv *env, jclass ignored,
jstring cmd,
@@ -121,138 +348,35 @@
jlongArray stdHandles,
jboolean redirectErrorStream)
{
- HANDLE inRead = INVALID_HANDLE_VALUE;
- HANDLE inWrite = INVALID_HANDLE_VALUE;
- HANDLE outRead = INVALID_HANDLE_VALUE;
- HANDLE outWrite = INVALID_HANDLE_VALUE;
- HANDLE errRead = INVALID_HANDLE_VALUE;
- HANDLE errWrite = INVALID_HANDLE_VALUE;
- SECURITY_ATTRIBUTES sa;
- PROCESS_INFORMATION pi;
- STARTUPINFOW si;
- const jchar* pcmd = NULL;
- const jchar* pdir = NULL;
- const jchar* penvBlock = NULL;
- jlong *handles = NULL;
jlong ret = 0;
- DWORD processFlag;
-
- assert(cmd != NULL);
- pcmd = (*env)->GetStringChars(env, cmd, NULL);
- if (pcmd == NULL) goto Catch;
-
- if (dir != 0) {
- pdir = (*env)->GetStringChars(env, dir, NULL);
- if (pdir == NULL) goto Catch;
- }
- if (envBlock != NULL) {
- penvBlock = ((*env)->GetStringChars(env, envBlock, NULL));
- if (penvBlock == NULL) goto Catch;
- }
- assert(stdHandles != NULL);
- handles = (*env)->GetLongArrayElements(env, stdHandles, NULL);
- if (handles == NULL) goto Catch;
-
- memset(&si, 0, sizeof(si));
- si.cb = sizeof(si);
- si.dwFlags = STARTF_USESTDHANDLES;
-
- sa.nLength = sizeof(sa);
- sa.lpSecurityDescriptor = 0;
- sa.bInheritHandle = TRUE;
-
- if (handles[0] != (jlong) -1) {
- si.hStdInput = (HANDLE) handles[0];
- handles[0] = (jlong) -1;
- } else {
- if (! CreatePipe(&inRead, &inWrite, &sa, PIPE_SIZE)) {
- win32Error(env, L"CreatePipe");
- goto Catch;
- }
- si.hStdInput = inRead;
- SetHandleInformation(inWrite, HANDLE_FLAG_INHERIT, 0);
- handles[0] = (jlong) inWrite;
- }
- SetHandleInformation(si.hStdInput,
- HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT);
-
- if (handles[1] != (jlong) -1) {
- si.hStdOutput = (HANDLE) handles[1];
- handles[1] = (jlong) -1;
- } else {
- if (! CreatePipe(&outRead, &outWrite, &sa, PIPE_SIZE)) {
- win32Error(env, L"CreatePipe");
- goto Catch;
+ if (cmd != NULL && stdHandles != NULL) {
+ const jchar *pcmd = (*env)->GetStringChars(env, cmd, NULL);
+ if (pcmd != NULL) {
+ const jchar *penvBlock = (envBlock != NULL)
+ ? (*env)->GetStringChars(env, envBlock, NULL)
+ : NULL;
+ const jchar *pdir = (dir != NULL)
+ ? (*env)->GetStringChars(env, dir, NULL)
+ : NULL;
+ jlong *handles = (*env)->GetLongArrayElements(env, stdHandles, NULL);
+ if (handles != NULL) {
+ ret = processCreate(
+ env,
+ pcmd,
+ penvBlock,
+ pdir,
+ handles,
+ redirectErrorStream);
+ (*env)->ReleaseLongArrayElements(env, stdHandles, handles, 0);
+ }
+ if (pdir != NULL)
+ (*env)->ReleaseStringChars(env, dir, pdir);
+ if (penvBlock != NULL)
+ (*env)->ReleaseStringChars(env, envBlock, penvBlock);
+ (*env)->ReleaseStringChars(env, cmd, pcmd);
}
- si.hStdOutput = outWrite;
- SetHandleInformation(outRead, HANDLE_FLAG_INHERIT, 0);
- handles[1] = (jlong) outRead;
}
- SetHandleInformation(si.hStdOutput,
- HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT);
-
- if (redirectErrorStream) {
- si.hStdError = si.hStdOutput;
- handles[2] = (jlong) -1;
- } else if (handles[2] != (jlong) -1) {
- si.hStdError = (HANDLE) handles[2];
- handles[2] = (jlong) -1;
- } else {
- if (! CreatePipe(&errRead, &errWrite, &sa, PIPE_SIZE)) {
- win32Error(env, L"CreatePipe");
- goto Catch;
- }
- si.hStdError = errWrite;
- SetHandleInformation(errRead, HANDLE_FLAG_INHERIT, 0);
- handles[2] = (jlong) errRead;
- }
- SetHandleInformation(si.hStdError,
- HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT);
-
- processFlag = CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT;
- ret = CreateProcessW(0, /* executable name */
- (LPWSTR)pcmd, /* command line */
- 0, /* process security attribute */
- 0, /* thread security attribute */
- TRUE, /* inherits system handles */
- processFlag, /* selected based on exe type */
- (LPVOID)penvBlock,/* environment block */
- (LPCWSTR)pdir, /* change to the new current directory */
- &si, /* (in) startup information */
- &pi); /* (out) process information */
- if (!ret) {
- win32Error(env, L"CreateProcess");
- goto Catch;
- }
-
- CloseHandle(pi.hThread);
- ret = (jlong)pi.hProcess;
-
- Finally:
- /* Always clean up the child's side of the pipes */
- closeSafely(inRead);
- closeSafely(outWrite);
- closeSafely(errWrite);
-
- if (pcmd != NULL)
- (*env)->ReleaseStringChars(env, cmd, pcmd);
- if (pdir != NULL)
- (*env)->ReleaseStringChars(env, dir, pdir);
- if (penvBlock != NULL)
- (*env)->ReleaseStringChars(env, envBlock, penvBlock);
- if (handles != NULL)
- (*env)->ReleaseLongArrayElements(env, stdHandles, handles, 0);
return ret;
-
- Catch:
- /* Clean up the parent's side of the pipes in case of failure only */
- closeSafely(inWrite);
- closeSafely(outRead);
- closeSafely(errRead);
- goto Finally;
}
JNIEXPORT jint JNICALL
--- a/jdk/src/windows/native/java/lang/java_props_md.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/native/java/lang/java_props_md.c Mon Aug 12 09:29:06 2013 -0400
@@ -443,6 +443,7 @@
case 0: sprops.os_name = "Windows Vista"; break;
case 1: sprops.os_name = "Windows 7"; break;
case 2: sprops.os_name = "Windows 8"; break;
+ case 3: sprops.os_name = "Windows 8.1"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
} else {
@@ -450,6 +451,7 @@
case 0: sprops.os_name = "Windows Server 2008"; break;
case 1: sprops.os_name = "Windows Server 2008 R2"; break;
case 2: sprops.os_name = "Windows Server 2012"; break;
+ case 3: sprops.os_name = "Windows Server 2012 R2"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
}
--- a/jdk/src/windows/native/sun/security/krb5/NativeCreds.c Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/native/sun/security/krb5/NativeCreds.c Mon Aug 12 09:29:06 2013 -0400
@@ -367,11 +367,12 @@
/*
* Class: sun_security_krb5_Credentials
* Method: acquireDefaultNativeCreds
- * Signature: ()Lsun/security/krb5/Credentials;
+ * Signature: ([I])Lsun/security/krb5/Credentials;
*/
JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativeCreds(
JNIEnv *env,
- jclass krbcredsClass) {
+ jclass krbcredsClass,
+ jintArray jetypes) {
KERB_QUERY_TKT_CACHE_REQUEST CacheRequest;
PKERB_RETRIEVE_TKT_RESPONSE TktCacheResponse = NULL;
@@ -387,9 +388,12 @@
jobject ticketFlags, startTime, endTime, krbCreds = NULL;
jobject authTime, renewTillTime, hostAddresses = NULL;
KERB_EXTERNAL_TICKET *msticket;
- int ignore_cache = 0;
+ int found_in_cache = 0;
FILETIME Now, EndTime, LocalEndTime;
+ int i, netypes;
+ jint *etypes = NULL;
+
while (TRUE) {
if (krbcredsConstructor == 0) {
@@ -456,31 +460,33 @@
// got the native MS TGT
msticket = &(TktCacheResponse->Ticket);
+ netypes = (*env)->GetArrayLength(env, jetypes);
+ etypes = (jint *) (*env)->GetIntArrayElements(env, jetypes, NULL);
+
// check TGT validity
- switch (msticket->SessionKey.KeyType) {
- case KERB_ETYPE_DES_CBC_CRC:
- case KERB_ETYPE_DES_CBC_MD5:
- case KERB_ETYPE_NULL:
- case KERB_ETYPE_RC4_HMAC_NT:
- GetSystemTimeAsFileTime(&Now);
- EndTime.dwLowDateTime = msticket->EndTime.LowPart;
- EndTime.dwHighDateTime = msticket->EndTime.HighPart;
- FileTimeToLocalFileTime(&EndTime, &LocalEndTime);
- if (CompareFileTime(&Now, &LocalEndTime) >= 0) {
- ignore_cache = 1;
- }
- if (msticket->TicketFlags & KERB_TICKET_FLAGS_invalid) {
- ignore_cache = 1;
- }
- break;
- case KERB_ETYPE_RC4_MD4:
- default:
- // not supported
- ignore_cache = 1;
- break;
+ if (native_debug) {
+ printf("LSA: TICKET SessionKey KeyType is %d\n", msticket->SessionKey.KeyType);
}
- if (ignore_cache) {
+ if ((msticket->TicketFlags & KERB_TICKET_FLAGS_invalid) == 0) {
+ GetSystemTimeAsFileTime(&Now);
+ EndTime.dwLowDateTime = msticket->EndTime.LowPart;
+ EndTime.dwHighDateTime = msticket->EndTime.HighPart;
+ FileTimeToLocalFileTime(&EndTime, &LocalEndTime);
+ if (CompareFileTime(&Now, &LocalEndTime) < 0) {
+ for (i=0; i<netypes; i++) {
+ if (etypes[i] == msticket->SessionKey.KeyType) {
+ found_in_cache = 1;
+ if (native_debug) {
+ printf("LSA: Valid etype found: %d\n", etypes[i]);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ if (!found_in_cache) {
if (native_debug) {
printf("LSA: MS TGT in cache is invalid/not supported; request new ticket\n");
}
@@ -494,34 +500,41 @@
}
pTicketRequest->MessageType = KerbRetrieveEncodedTicketMessage;
- pTicketRequest->EncryptionType = KERB_ETYPE_DES_CBC_MD5;
pTicketRequest->CacheOptions = KERB_RETRIEVE_TICKET_DONT_USE_CACHE;
- Status = LsaCallAuthenticationPackage(
- LogonHandle,
- PackageId,
- pTicketRequest,
- requestSize,
- &pTicketResponse,
- &responseSize,
- &SubStatus
- );
+ for (i=0; i<netypes; i++) {
+ pTicketRequest->EncryptionType = etypes[i];
+ Status = LsaCallAuthenticationPackage(
+ LogonHandle,
+ PackageId,
+ pTicketRequest,
+ requestSize,
+ &pTicketResponse,
+ &responseSize,
+ &SubStatus
+ );
- if (native_debug) {
- printf("LSA: Response size is %d\n", responseSize);
- }
+ if (native_debug) {
+ printf("LSA: Response size is %d for %d\n", responseSize, etypes[i]);
+ }
- if (!LSA_SUCCESS(Status) || !LSA_SUCCESS(SubStatus)) {
- if (!LSA_SUCCESS(Status)) {
- ShowNTError("LsaCallAuthenticationPackage", Status);
- } else {
- ShowNTError("Protocol status", SubStatus);
+ if (!LSA_SUCCESS(Status) || !LSA_SUCCESS(SubStatus)) {
+ if (!LSA_SUCCESS(Status)) {
+ ShowNTError("LsaCallAuthenticationPackage", Status);
+ } else {
+ ShowNTError("Protocol status", SubStatus);
+ }
+ continue;
}
+
+ // got the native MS Kerberos TGT
+ msticket = &(pTicketResponse->Ticket);
break;
}
+ }
- // got the native MS Kerberos TGT
- msticket = &(pTicketResponse->Ticket);
+ if (etypes != NULL) {
+ (*env)->ReleaseIntArrayElements(env, jetypes, etypes, 0);
}
/*
@@ -644,7 +657,7 @@
hostAddresses);
break;
- } // end of WHILE
+ } // end of WHILE. This WHILE will never loop.
// clean up resources
if (TktCacheResponse != NULL) {
--- a/jdk/src/windows/resource/java.manifest Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/src/windows/resource/java.manifest Mon Aug 12 09:29:06 2013 -0400
@@ -44,8 +44,14 @@
<!-- Indicate this JDK version is Windows 7 compatible -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application>
</compatibility>
--- a/jdk/test/ProblemList.txt Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/ProblemList.txt Mon Aug 12 09:29:06 2013 -0400
@@ -138,6 +138,9 @@
java/lang/instrument/RedefineBigClass.sh linux-x64
java/lang/instrument/RetransformBigClass.sh linux-x64
+# 8021230
+java/lang/ThreadLocal/ThreadLocalSupplierTest.java generic-all
+
############################################################################
@@ -332,8 +335,6 @@
# Tests take too long, on sparcs see 7143279
tools/pack200/CommandLineTests.java solaris-all, macosx-all
tools/pack200/Pack200Test.java solaris-all, macosx-all
-# 8015666
-tools/pack200/TimeStamp.java generic-all
# 8007410
tools/launcher/FXLauncherTest.java linux-all
@@ -367,9 +368,6 @@
# Filed 6772009
java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java generic-all
-# 8020435
-java/util/concurrent/CompletableFuture/Basic.java generic-all
-
# 7041639, Solaris DSA keypair generation bug
java/util/TimeZone/TimeZoneDatePermissionCheck.sh solaris-all
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Graphics2D/DrawString/DrawRotatedString.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,81 @@
+/*
+ * 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.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+/**
+ * @test
+ * @bug 7190349
+ * @summary Verifies that we get correct direction, when draw rotated string.
+ * @author Sergey Bylokhov
+ * @run main/othervm DrawRotatedString
+ */
+public final class DrawRotatedString {
+
+ private static final int SIZE = 500;
+
+ public static void main(final String[] args) throws IOException {
+ BufferedImage bi = createBufferedImage(true);
+ verify(bi);
+ bi = createBufferedImage(false);
+ verify(bi);
+ System.out.println("Passed");
+ }
+
+ private static void verify(BufferedImage bi) throws IOException {
+ for (int i = 0; i < SIZE; ++i) {
+ for (int j = 0; j < 99; ++j) {
+ //Text should not appear before 100
+ if (bi.getRGB(i, j) != Color.RED.getRGB()) {
+ ImageIO.write(bi, "png", new File("image.png"));
+ throw new RuntimeException("Failed: wrong text location");
+ }
+ }
+ }
+ }
+
+ private static BufferedImage createBufferedImage(final boolean aa) {
+ final BufferedImage bi = new BufferedImage(SIZE, SIZE,
+ BufferedImage.TYPE_INT_RGB);
+ final Graphics2D bg = bi.createGraphics();
+ bg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ aa ? RenderingHints.VALUE_ANTIALIAS_ON
+ : RenderingHints.VALUE_ANTIALIAS_OFF);
+ bg.setColor(Color.RED);
+ bg.fillRect(0, 0, SIZE, SIZE);
+ bg.translate(100, 100);
+ bg.rotate(Math.toRadians(90));
+ bg.setColor(Color.BLACK);
+ bg.setFont(bg.getFont().deriveFont(20.0f));
+ bg.drawString("MMMMMMMMMMMMMMMM", 0, 0);
+ bg.dispose();
+ return bi;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Graphics2D/IncorrectTextSize/IncorrectTextSize.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,77 @@
+/*
+ * 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.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+/**
+ * @test
+ * @bug 8013569
+ * @author Sergey Bylokhov
+ */
+public final class IncorrectTextSize {
+
+ static final int scale = 2;
+ static final int width = 1200;
+ static final int height = 100;
+ static BufferedImage bi = new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_ARGB);
+ static final String TEXT = "The quick brown fox jumps over the lazy dog"
+ + "The quick brown fox jumps over the lazy dog";
+
+ public static void main(final String[] args) throws IOException {
+ for (int point = 5; point < 11; ++point) {
+ Graphics2D g2d = bi.createGraphics();
+ g2d.setFont(new Font(Font.DIALOG, Font.PLAIN, point));
+ g2d.scale(scale, scale);
+ g2d.setColor(Color.WHITE);
+ g2d.fillRect(0, 0, width, height);
+ g2d.setColor(Color.green);
+ g2d.drawString(TEXT, 0, 20);
+ int length = g2d.getFontMetrics().stringWidth(TEXT);
+ if (length < 0) {
+ throw new RuntimeException("Negative length");
+ }
+ for (int i = (length + 1) * scale; i < width; ++i) {
+ for (int j = 0; j < height; ++j) {
+ if (bi.getRGB(i, j) != Color.white.getRGB()) {
+ g2d.drawLine(length, 0, length, height);
+ ImageIO.write(bi, "png", new File("image.png"));
+ System.out.println("length = " + length);
+ System.err.println("Wrong color at x=" + i + ",y=" + j);
+ System.err.println("Color is:" + new Color(bi.getRGB(i,
+ j)));
+ throw new RuntimeException("Test failed.");
+ }
+ }
+ }
+ g2d.dispose();
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ProcessBuilder/InheritIOEHandle.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,147 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 7147084
+ * @run main/othervm InheritIOEHandle
+ * @summary inherit IOE handles and MS CreateProcess limitations (kb315939)
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class InheritIOEHandle {
+ private static enum APP {
+ B, C;
+ }
+ private static File stopC = new File(".\\StopC.txt");
+ private static String SIGNAL = "After call child process";
+ private static String JAVA_EXE = System.getProperty("java.home")
+ + File.separator + "bin"
+ + File.separator + "java";
+
+ private static String[] getCommandArray(String processName) {
+ String[] cmdArray = {
+ JAVA_EXE,
+ "-cp",
+ System.getProperty("java.class.path"),
+ InheritIOEHandle.class.getName(),
+ processName
+ };
+ return cmdArray;
+ }
+
+ public static void main(String[] args) throws Exception {
+ if (!System.getProperty("os.name").startsWith("Windows")) {
+ return;
+ }
+
+ if (args.length > 0) {
+ APP app = APP.valueOf(args[0]);
+ switch (app) {
+ case B:
+ performB();
+ break;
+ case C:
+ performC();
+ break;
+ }
+ return;
+ }
+ performA();
+ }
+
+ private static void performA() {
+ try {
+ stopC.delete();
+
+ ProcessBuilder builder = new ProcessBuilder(
+ getCommandArray(APP.B.name()));
+ builder.redirectErrorStream(true);
+
+ Process process = builder.start();
+
+ process.getOutputStream().close();
+ process.getErrorStream().close();
+
+ try (BufferedReader in = new BufferedReader( new InputStreamReader(
+ process.getInputStream(), "utf-8")))
+ {
+ String result;
+ while ((result = in.readLine()) != null) {
+ if (!SIGNAL.equals(result)) {
+ throw new Error("Catastrophe in process B! Bad output.");
+ }
+ }
+ }
+
+ // If JDK-7147084 is not fixed that point is unreachable.
+
+ // write signal file
+ stopC.createNewFile();
+
+ System.err.println("Read stream finished.");
+ } catch (IOException ex) {
+ throw new Error("Catastrophe in process A!", ex);
+ }
+ }
+
+ private static void performB() {
+ try {
+ ProcessBuilder builder = new ProcessBuilder(
+ getCommandArray(APP.C.name()));
+
+ Process process = builder.start();
+
+ process.getInputStream().close();
+ process.getOutputStream().close();
+ process.getErrorStream().close();
+
+ System.out.println(SIGNAL);
+
+ // JDK-7147084 subject:
+ // Process C inherits the [System.out] handle and
+ // handle close in B does not finalize the streaming for A.
+ // (handle reference count > 1).
+ } catch (IOException ex) {
+ throw new Error("Catastrophe in process B!", ex);
+ }
+ }
+
+ private static void performC() {
+ // If JDK-7147084 is not fixed the loop is 5min long.
+ for (int i = 0; i < 5*60; ++i) {
+ try {
+ Thread.sleep(1000);
+ // check for sucess
+ if (stopC.exists())
+ break;
+ } catch (InterruptedException ex) {
+ // that is ok. Longer sleep - better effect.
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/ProcessBuilder/SiblingIOEHandle.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,205 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 6921885
+ * @run main/othervm SiblingIOEHandle
+ * @summary inherit IOE handles and MS CreateProcess limitations (kb315939)
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
+
+public class SiblingIOEHandle {
+ private static enum APP {
+ B, C;
+ }
+ private static File stopC = new File(".\\StopCs.txt");
+ private static String SIGNAL = "B child reported.";
+ private static String JAVA_EXE = System.getProperty("java.home")
+ + File.separator + "bin"
+ + File.separator + "java";
+
+ private static String[] getCommandArray(String processName) {
+ String[] cmdArray = {
+ JAVA_EXE,
+ "-cp",
+ System.getProperty("java.class.path"),
+ SiblingIOEHandle.class.getName(),
+ processName
+ };
+ return cmdArray;
+ }
+
+ public static void main(String[] args) {
+ if (!System.getProperty("os.name").startsWith("Windows")) {
+ return;
+ }
+
+ if (args.length > 0) {
+ APP app = APP.valueOf(args[0]);
+ switch (app) {
+ case B:
+ performB();
+ break;
+ case C:
+ performC();
+ break;
+ }
+ return;
+ }
+ performA(true);
+ performA(false);
+ }
+
+ static boolean procClaunched = false;
+
+ private static void waitAbit() {
+ try {
+ Thread.sleep(0);
+ } catch (InterruptedException ex) {
+ // that was long enough
+ }
+ }
+ private static boolean waitBarrier(CyclicBarrier barrier) {
+ while (true) try {
+ barrier.await();
+ return true;
+ } catch (InterruptedException ex) {
+ continue;
+ } catch (BrokenBarrierException ex) {
+ ex.printStackTrace();
+ return false;
+ }
+ }
+
+ private static void performA(boolean fileOut) {
+ try {
+ stopC.delete();
+ ProcessBuilder builderB = new ProcessBuilder(
+ getCommandArray(APP.B.name()));
+
+ File outB = null;
+ if (fileOut) {
+ outB = new File("outB.txt");
+ builderB.redirectOutput(outB);
+ }
+ builderB.redirectErrorStream(true);
+
+ final CyclicBarrier barrier = new CyclicBarrier(2);
+ Thread procCRunner = new Thread(new Runnable() {
+ @Override public void run() {
+ try {
+ if (waitBarrier(barrier)) {
+ waitAbit();
+ // Run process C next to B ASAP to make an attempt
+ // to capture the B-process IOE handles in C process.
+ Runtime.getRuntime().exec(getCommandArray(APP.C.name()));
+ procClaunched = true;
+ }
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
+ });
+ procCRunner.start();
+
+
+ if (!waitBarrier(barrier)) {
+ throw new Error("Catastrophe in process A! Synchronization failed.");
+ }
+ // Run process B first.
+ Process processB = builderB.start();
+
+ while (true) try {
+ procCRunner.join();
+ break;
+ } catch (InterruptedException ex) {
+ continue;
+ }
+
+ if (!procClaunched) {
+ throw new Error("Catastrophe in process A! C was not launched.");
+ }
+
+ processB.getOutputStream().close();
+ processB.getErrorStream().close();
+
+ if (fileOut) {
+ try {
+ processB.waitFor();
+ } catch (InterruptedException ex) {
+ throw new Error("Catastrophe in process B! B hung up.");
+ }
+ System.err.println("Trying to delete [outB.txt].");
+ if (!outB.delete()) {
+ throw new Error("Greedy brother C deadlock! File share.");
+ }
+ System.err.println("Succeeded in delete [outB.txt].");
+ } else {
+ System.err.println("Read stream start.");
+ try (BufferedReader in = new BufferedReader( new InputStreamReader(
+ processB.getInputStream(), "utf-8")))
+ {
+ String result;
+ while ((result = in.readLine()) != null) {
+ if (!SIGNAL.equals(result)) {
+ throw new Error("Catastrophe in process B! Bad output.");
+ }
+ }
+ }
+ System.err.println("Read stream finished.");
+ }
+ // If JDK-6921885 is not fixed that point is unreachable.
+ // Test timeout exception.
+
+ // write signal file to stop C process.
+ stopC.createNewFile();
+ } catch (IOException ex) {
+ throw new Error("Catastrophe in process A!", ex);
+ }
+ }
+
+ private static void performB() {
+ System.out.println(SIGNAL);
+ }
+
+ private static void performC() {
+ // If JDK-7147084 is not fixed the loop is 5min long.
+ for (int i = 0; i < 5*60; ++i) {
+ try {
+ Thread.sleep(1000);
+ // check for sucess
+ if (stopC.exists())
+ break;
+ } catch (InterruptedException ex) {
+ // that is ok. Longer sleep - better effect.
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/System/MacEncoding/ExpectedEncoding.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Check that the value of file.encoding and sun.jnu.encoding match the expected
+ * values passed in on the command-line.
+ */
+public class ExpectedEncoding {
+ public static void main(String[] args) {
+ boolean failed = false;
+ if (args.length != 2) {
+ System.out.println("Usage:");
+ System.out.println("$ java ExpectedEncoding <expected file.encoding> <expected sun.jnu.encoding>");
+ System.out.println("$ use \"skip\" to skip checking property's value");
+ System.exit(1);
+ }
+ String expectFileEnc = args[0];
+ String expectSunJnuEnc = args[1];
+
+ String fileEnc = System.getProperty("file.encoding");
+ String jnuEnc = System.getProperty("sun.jnu.encoding");
+
+ if ("skip".equals(expectFileEnc)) {
+ System.err.println("Expected file.encoding is \"skip\", ignoring");
+ } else {
+ System.err.println("Expected file.encoding: " + expectFileEnc);
+ System.err.println("Actual file.encoding: " + fileEnc);
+ if (fileEnc == null || !fileEnc.equals(expectFileEnc)) {
+ failed = true;
+ }
+ }
+ if ("skip".equals(expectSunJnuEnc)) {
+ System.err.println("Expected sun.jnu.encoding is \"skip\", ignoring");
+ } else {
+ if (jnuEnc == null || !jnuEnc.equals(expectSunJnuEnc)) {
+ System.err.println("Expected sun.jnu.encoding: " + expectSunJnuEnc);
+ System.err.println("Actual sun.jnu.encoding: " + jnuEnc);
+ failed = true;
+ }
+ }
+
+ if (failed) {
+ throw new RuntimeException("Test Failed");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/System/MacEncoding/MacJNUEncoding.sh Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+
+# @test
+# @bug 8003228
+# @summary Test the value of sun.jnu.encoding on Mac
+# @author Brent Christian
+#
+# @run shell MacJNUEncoding.sh
+
+# Only run test on Mac
+OS=`uname -s`
+case "$OS" in
+ Darwin ) ;;
+ * )
+ exit 0
+ ;;
+esac
+
+if [ "${TESTJAVA}" = "" ]
+then
+ echo "TESTJAVA not set. Test cannot execute. Failed."
+ exit 1
+fi
+
+if [ "${COMPILEJAVA}" = "" ]; then
+ COMPILEJAVA="${TESTJAVA}"
+fi
+
+
+if [ "${TESTSRC}" = "" ]
+then
+ echo "TESTSRC not set. Test cannot execute. Failed."
+ exit 1
+fi
+
+if [ "${TESTCLASSES}" = "" ]
+then
+ echo "TESTCLASSES not set. Test cannot execute. Failed."
+ exit 1
+fi
+
+JAVAC="${COMPILEJAVA}"/bin/javac
+JAVA="${TESTJAVA}"/bin/java
+
+echo "Building test classes..."
+"$JAVAC" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d "${TESTCLASSES}" "${TESTSRC}"/ExpectedEncoding.java
+
+echo ""
+echo "Running test for C locale"
+export LANG=C
+export LC_ALL=C
+"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding US-ASCII UTF-8
+result1=$?
+
+echo ""
+echo "Running test for en_US.UTF-8 locale"
+export LANG=en_US.UTF-8
+export LC_ALL=en_US.UTF-8
+"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding UTF-8 UTF-8
+result2=$?
+
+echo ""
+echo "Cleanup"
+rm ${TESTCLASSES}/ExpectedEncoding.class
+
+if [ ${result1} -ne 0 ] ; then
+ echo "Test failed for C locale"
+ echo " LANG=\"${LANG}\""
+ echo " LC_ALL=\"${LC_ALL}\""
+ exit ${result1}
+fi
+if [ ${result2} -ne 0 ] ; then
+ echo "Test failed for en_US.UTF-8 locale"
+ echo " LANG=\"${LANG}\""
+ echo " LC_ALL=\"${LC_ALL}\""
+ exit ${result2}
+fi
+exit 0
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/System/MacEncoding/TestFileEncoding.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,168 @@
+/*
+ * 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.*;
+
+/*
+ * @test
+ * @bug 8011194
+ * @summary Test value of file.encoding for corresponding value of LANG, etc
+ * @library ../../../../tools/launcher/ ../
+ * @build TestHelper TestFileEncoding ExpectedEncoding
+ * @run main TestFileEncoding UTF-8
+ * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding
+ * @run main TestFileEncoding UTF-8 en_US.UTF-8
+ * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding en_US.UTF-8
+ * @run main TestFileEncoding US-ASCII C
+ * @run main/othervm -Dfile.encoding=MyEncoding -DuserEncoding=MyEncoding TestFileEncoding MyEncoding C
+ * @author Brent Christian
+ */
+
+/**
+ * Setup the environment and run a sub-test to check the expected value of
+ * file.encoding, based on the value(s) of encoding-related environment vars
+ * (LANG, LC_ALL, LC_CTYPE).
+ *
+ * The first argument (required) is the expected value of the
+ * file.encoding System property.
+ * The second argument (optional) is the value to set to the LANG/etc env vars.
+ */
+public class TestFileEncoding {
+ private static final String TEST_NAME = "ExpectedEncoding";
+
+ private String expectedEncoding; // Expected value for file.encoding
+ private String langVar = null; // Value to set for LANG, etc
+
+ private static Set<String> envToRm = new HashSet<>(3);
+ static {
+ // Take these vars out of the test's run environment, possibly adding
+ // our own value back in.
+ envToRm.add("LANG");
+ envToRm.add("LC_ALL");
+ envToRm.add("LC_CTYPE");
+ }
+
+ public TestFileEncoding(String expectedEncoding) {
+ this.expectedEncoding = expectedEncoding;
+ }
+
+ public TestFileEncoding(String expectedEncoding, String langVar) {
+ this.expectedEncoding = expectedEncoding;
+ this.langVar = langVar;
+ }
+
+ /*
+ * Launch ExpectedEncoding with the given parameters, check for the
+ * expected file.encoding.
+ */
+ private void run() {
+ String testClasses = System.getProperty("test.classes");
+
+ // Pick up VM opts
+ String vmOptsStr = System.getProperty("test.vm.opts");
+ System.out.println("test.vm.opts: " + vmOptsStr);
+ String[] vmOpts = new String[0];
+ if (vmOptsStr != null && !"".equals(vmOptsStr)) {
+ vmOpts = vmOptsStr.split(" ");
+ System.out.println("found vm options:");
+ for (String opt : vmOpts) {
+ System.out.println(" <" + opt + ">");
+ }
+ }
+
+ // Build java cmd
+ LinkedList<String> cmdList = new LinkedList<>();
+ cmdList.add(TestHelper.javaCmd);
+ for (String vmOpt : vmOpts) {
+ if (vmOpt != null && !vmOpt.equals("")) {
+ cmdList.add(vmOpt);
+ }
+ }
+
+ // See if the user specified a file.encoding that we should pass through
+ String userEncoding = System.getProperty("userEncoding");
+ if (userEncoding != null) {
+ cmdList.add("-Dfile.encoding="+userEncoding);
+ }
+
+ cmdList.add("-cp");
+ cmdList.add(testClasses);
+ cmdList.add(TEST_NAME);
+ cmdList.add(expectedEncoding);
+ cmdList.add("skip"); // ignore sun.jnu.encoding for this test
+
+ String cmdArray[] = new String[cmdList.size()];
+ cmdList.toArray(cmdArray);
+
+ // Run the test(s)
+ if (langVar == null) {
+ System.out.println("TestFileEncoding: Running with no envvars set");
+ TestHelper.TestResult tr = TestHelper.doExec(null, envToRm,
+ cmdArray);
+ checkResult(tr);
+ } else {
+ runWithEnvVar("LANG", cmdArray);
+ runWithEnvVar("LC_ALL", cmdArray);
+ runWithEnvVar("LC_CTYPE", cmdArray);
+ }
+ }
+
+ /*
+ * Run the test, setting the environment named by envVarName to the value
+ * in langVar.
+ */
+ private void runWithEnvVar(String envVarName, String[] cmdArray) {
+ Map<String, String> envToAdd = new HashMap<>(1);
+ TestHelper.TestResult tr = null;
+
+ System.out.println("TestFileEncoding: Running with " + envVarName + "=" + langVar);
+ envToAdd.put(envVarName, langVar);
+ tr = TestHelper.doExec(envToAdd, envToRm, cmdArray);
+ checkResult(tr);
+ }
+
+ private void checkResult(TestHelper.TestResult tr) {
+ System.out.println(tr);
+ if (!tr.isOK()) {
+ throw new RuntimeException("TEST FAILED: !tr.isOK()");
+ }
+ }
+
+ public static void main(String[] args) {
+ TestFileEncoding cfe = null;
+ if (!TestHelper.isMacOSX) {
+ System.out.println("Test is currently only for Mac OS X - pass.");
+ return;
+ }
+ if (args.length == 1) {
+ cfe = new TestFileEncoding(args[0]);
+ } else if (args.length == 2) {
+ cfe = new TestFileEncoding(args[0], args[1]);
+ } else {
+ System.out.println("Usage: TestFileEncoding <expected file.encoding>");
+ System.out.println(" TestFileEncoding <expected file.encoding> <value for LANG/etc env var>");
+ return;
+ }
+ cfe.run();
+ }
+}
--- a/jdk/test/java/lang/System/MacJNUEncoding/ExpectedEncoding.java Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.
- */
-
-/**
- * Check that the value of file.encoding and sun.jnu.encoding match the expected
- * values passed in on the command-line.
- */
-public class ExpectedEncoding {
- public static void main(String[] args) {
- boolean failed = false;
- if (args.length != 2) {
- System.out.println("Usage:");
- System.out.println("$ java ExpectedEncoding <expected file.encoding> <expected sun.jnu.encoding>");
- System.exit(1);
- }
- String expectFileEnc = args[0];
- String expectSunJnuEnc = args[1];
-
- String fileEnc = System.getProperty("file.encoding");
- String jnuEnc = System.getProperty("sun.jnu.encoding");
-
- if (fileEnc == null || !fileEnc.equals(expectFileEnc)) {
- System.err.println("Expected file.encoding: " + expectFileEnc);
- System.err.println("Actual file.encoding: " + fileEnc);
- failed = true;
- }
- if (jnuEnc == null || !jnuEnc.equals(expectSunJnuEnc)) {
- System.err.println("Expected sun.jnu.encoding: " + expectSunJnuEnc);
- System.err.println("Actual sun.jnu.encoding: " + jnuEnc);
- failed = true;
- }
- if (failed) {
- throw new RuntimeException("Test Failed");
- }
- }
-}
--- a/jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-
-# @test
-# @bug 8003228
-# @summary Test the value of sun.jnu.encoding on Mac
-# @author Brent Christian
-#
-# @run shell MacJNUEncoding.sh
-
-# Only run test on Mac
-OS=`uname -s`
-case "$OS" in
- Darwin ) ;;
- * )
- exit 0
- ;;
-esac
-
-if [ "${TESTJAVA}" = "" ]
-then
- echo "TESTJAVA not set. Test cannot execute. Failed."
- exit 1
-fi
-
-if [ "${COMPILEJAVA}" = "" ]; then
- COMPILEJAVA="${TESTJAVA}"
-fi
-
-
-if [ "${TESTSRC}" = "" ]
-then
- echo "TESTSRC not set. Test cannot execute. Failed."
- exit 1
-fi
-
-if [ "${TESTCLASSES}" = "" ]
-then
- echo "TESTCLASSES not set. Test cannot execute. Failed."
- exit 1
-fi
-
-JAVAC="${COMPILEJAVA}"/bin/javac
-JAVA="${TESTJAVA}"/bin/java
-
-echo "Building test classes..."
-"$JAVAC" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d "${TESTCLASSES}" "${TESTSRC}"/ExpectedEncoding.java
-
-echo ""
-echo "Running test for C locale"
-export LANG=C
-export LC_ALL=C
-"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding US-ASCII UTF-8
-result1=$?
-
-echo ""
-echo "Running test for en_US.UTF-8 locale"
-export LANG=en_US.UTF-8
-export LC_ALL=en_US.UTF-8
-"${JAVA}" ${TESTVMOPTS} -classpath "${TESTCLASSES}" ExpectedEncoding UTF-8 UTF-8
-result2=$?
-
-echo ""
-echo "Cleanup"
-rm ${TESTCLASSES}/ExpectedEncoding.class
-
-if [ ${result1} -ne 0 ] ; then
- echo "Test failed for C locale"
- echo " LANG=\"${LANG}\""
- echo " LC_ALL=\"${LC_ALL}\""
- exit ${result1}
-fi
-if [ ${result2} -ne 0 ] ; then
- echo "Test failed for en_US.UTF-8 locale"
- echo " LANG=\"${LANG}\""
- echo " LC_ALL=\"${LC_ALL}\""
- exit ${result2}
-fi
-exit 0
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/reflect/DefaultStaticTest/DefaultStaticInvokeTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,307 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @summary Test locating and invoking default/static method that defined
+ * in interfaces and/or in inheritance
+ * @bug 7184826
+ * @build helper.Mod helper.Declared DefaultStaticTestData
+ * @run testng DefaultStaticInvokeTest
+ * @author Yong Lu
+ */
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotNull;
+import org.testng.annotations.Test;
+
+import static helper.Mod.*;
+import static helper.Declared.*;
+import helper.Mod;
+
+public class DefaultStaticInvokeTest {
+
+ @Test(dataProvider = "testCasesAll",
+ dataProviderClass = DefaultStaticTestData.class)
+ public void testGetMethods(String testTarget, Object param)
+ throws Exception {
+ // test the methods retrieved by getMethods()
+ testMethods(ALL_METHODS, testTarget, param);
+ }
+
+ @Test(dataProvider = "testCasesAll",
+ dataProviderClass = DefaultStaticTestData.class)
+ public void testGetDeclaredMethods(String testTarget, Object param)
+ throws Exception {
+ // test the methods retrieved by getDeclaredMethods()
+ testMethods(DECLARED_ONLY, testTarget, param);
+ }
+
+ @Test(dataProvider = "testCasesAll",
+ dataProviderClass = DefaultStaticTestData.class)
+ public void testMethodInvoke(String testTarget, Object param)
+ throws Exception {
+ Class<?> typeUnderTest = Class.forName(testTarget);
+ MethodDesc[] expectedMethods = typeUnderTest.getAnnotationsByType(MethodDesc.class);
+
+ // test the method retrieved by Class.getMethod(String, Object[])
+ for (MethodDesc toTest : expectedMethods) {
+ String name = toTest.name();
+ Method m = getTestMethod(typeUnderTest, name, param);
+ testThisMethod(toTest, m, typeUnderTest, param);
+ }
+ }
+
+ @Test(dataProvider = "testCasesAll",
+ dataProviderClass = DefaultStaticTestData.class)
+ public void testMethodHandleInvoke(String testTarget, Object param)
+ throws Throwable {
+ Class<?> typeUnderTest = Class.forName(testTarget);
+ MethodDesc[] expectedMethods = typeUnderTest.getAnnotationsByType(MethodDesc.class);
+
+ for (MethodDesc toTest : expectedMethods) {
+ String mName = toTest.name();
+ Mod mod = toTest.mod();
+ if (mod != STATIC && typeUnderTest.isInterface()) {
+ return;
+ }
+
+ String result = null;
+ String expectedReturn = toTest.retval();
+
+ MethodHandle methodHandle = getTestMH(typeUnderTest, mName, param);
+ if (mName.equals("staticMethod")) {
+ result = (param == null)
+ ? (String) methodHandle.invoke()
+ : (String) methodHandle.invoke(param);
+ } else {
+ result = (param == null)
+ ? (String) methodHandle.invoke(typeUnderTest.newInstance())
+ : (String) methodHandle.invoke(typeUnderTest.newInstance(), param);
+ }
+
+ assertEquals(result, expectedReturn);
+ }
+
+ }
+
+ @Test(dataProvider = "testClasses",
+ dataProviderClass = DefaultStaticTestData.class)
+ public void testIAE(String testTarget, Object param)
+ throws ClassNotFoundException {
+
+ Class<?> typeUnderTest = Class.forName(testTarget);
+ MethodDesc[] expectedMethods = typeUnderTest.getAnnotationsByType(MethodDesc.class);
+
+ for (MethodDesc toTest : expectedMethods) {
+ String mName = toTest.name();
+ Mod mod = toTest.mod();
+ if (mod != STATIC && typeUnderTest.isInterface()) {
+ return;
+ }
+ Exception caught = null;
+ try {
+ getTestMH(typeUnderTest, mName, param, true);
+ } catch (Exception e) {
+ caught = e;
+ }
+ assertTrue(caught != null);
+ assertEquals(caught.getClass(), IllegalAccessException.class);
+ }
+ }
+ private static final String[] OBJECT_METHOD_NAMES = {
+ "equals",
+ "hashCode",
+ "getClass",
+ "notify",
+ "notifyAll",
+ "toString",
+ "wait",
+ "wait",
+ "wait",};
+ private static final String LAMBDA_METHOD_NAMES = "lambda$";
+ private static final HashSet<String> OBJECT_NAMES = new HashSet<>(Arrays.asList(OBJECT_METHOD_NAMES));
+ private static final boolean DECLARED_ONLY = true;
+ private static final boolean ALL_METHODS = false;
+
+ private void testMethods(boolean declaredOnly, String testTarget, Object param)
+ throws Exception {
+ Class<?> typeUnderTest = Class.forName(testTarget);
+ Method[] methods = declaredOnly
+ ? typeUnderTest.getDeclaredMethods()
+ : typeUnderTest.getMethods();
+
+ MethodDesc[] baseExpectedMethods = typeUnderTest.getAnnotationsByType(MethodDesc.class);
+ MethodDesc[] expectedMethods;
+
+ // If only declared filter out non-declared from expected result
+ if (declaredOnly) {
+ int nonDeclared = 0;
+ for (MethodDesc desc : baseExpectedMethods) {
+ if (desc.declared() == NO) {
+ nonDeclared++;
+ }
+ }
+ expectedMethods = new MethodDesc[baseExpectedMethods.length - nonDeclared];
+ int i = 0;
+ for (MethodDesc desc : baseExpectedMethods) {
+ if (desc.declared() == YES) {
+ expectedMethods[i++] = desc;
+ }
+ }
+ } else {
+ expectedMethods = baseExpectedMethods;
+ }
+
+ HashMap<String, Method> myMethods = new HashMap<>(methods.length);
+ for (Method m : methods) {
+ String mName = m.getName();
+ // don't add Object methods and method created from lambda expression
+ if ((!OBJECT_NAMES.contains(mName)) && (!mName.contains(LAMBDA_METHOD_NAMES))) {
+ myMethods.put(mName, m);
+ }
+ }
+ assertEquals(expectedMethods.length, myMethods.size());
+
+ for (MethodDesc toTest : expectedMethods) {
+
+ String name = toTest.name();
+ Method candidate = myMethods.get(name);
+
+ assertNotNull(candidate);
+ myMethods.remove(name);
+
+ testThisMethod(toTest, candidate, typeUnderTest, param);
+
+ }
+
+ // Should be no methods left since we remove all we expect to see
+ assertTrue(myMethods.isEmpty());
+ }
+
+ private void testThisMethod(MethodDesc toTest, Method method,
+ Class<?> typeUnderTest, Object param) throws Exception {
+ // Test modifiers, and invoke
+ Mod mod = toTest.mod();
+ String expectedReturn = toTest.retval();
+ switch (mod) {
+ case STATIC:
+ //assert candidate is static
+ assertTrue(Modifier.isStatic(method.getModifiers()));
+ assertFalse(method.isDefault());
+
+ // Test invoke it
+ assertEquals(tryInvoke(method, null, param), expectedReturn);
+ break;
+ case DEFAULT:
+ // if typeUnderTest is a class then instantiate and invoke
+ if (!typeUnderTest.isInterface()) {
+ assertEquals(tryInvoke(
+ method,
+ typeUnderTest,
+ param),
+ expectedReturn);
+ }
+
+ //assert candidate is default
+ assertFalse(Modifier.isStatic(method.getModifiers()));
+ assertTrue(method.isDefault());
+ break;
+ case REGULAR:
+ // if typeUnderTest must be a class
+ assertEquals(tryInvoke(
+ method,
+ typeUnderTest,
+ param),
+ expectedReturn);
+
+ //assert candidate is neither default nor static
+ assertFalse(Modifier.isStatic(method.getModifiers()));
+ assertFalse(method.isDefault());
+ break;
+ case ABSTRACT:
+ //assert candidate is neither default nor static
+ assertFalse(Modifier.isStatic(method.getModifiers()));
+ assertFalse(method.isDefault());
+ break;
+ default:
+ assertFalse(true); //this should never happen
+ break;
+ }
+
+ }
+
+ private Object tryInvoke(Method m, Class<?> receiverType, Object param)
+ throws Exception {
+ Object receiver = receiverType == null ? null : receiverType.newInstance();
+ Object result = null;
+ if (param == null) {
+ result = m.invoke(receiver);
+ } else {
+ result = m.invoke(receiver, param);
+ }
+ return result;
+ }
+
+ private Method getTestMethod(Class clazz, String methodName, Object param)
+ throws NoSuchMethodException {
+ Class[] paramsType = (param != null)
+ ? new Class[]{Object.class}
+ : new Class[]{};
+ return clazz.getMethod(methodName, paramsType);
+ }
+
+ private MethodHandle getTestMH(Class clazz, String methodName, Object param)
+ throws Exception {
+ return getTestMH(clazz, methodName, param, false);
+ }
+
+ private MethodHandle getTestMH(Class clazz, String methodName,
+ Object param, boolean isNegativeTest)
+ throws Exception {
+ MethodType mType = (param != null)
+ ? MethodType.genericMethodType(1)
+ : MethodType.methodType(String.class);
+ MethodHandles.Lookup lookup = MethodHandles.lookup();
+ if (!isNegativeTest) {
+ return methodName.equals("staticMethod")
+ ? lookup.findStatic(clazz, methodName, mType)
+ : lookup.findVirtual(clazz, methodName, mType);
+ } else {
+ return methodName.equals("staticMethod")
+ ? lookup.findVirtual(clazz, methodName, mType)
+ : lookup.findStatic(clazz, methodName, mType);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/reflect/DefaultStaticTest/DefaultStaticTestData.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,401 @@
+/*
+ * 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.
+ */
+
+/*
+ * Test Data used for testing default/static method
+ *
+ * @author Yong Lu
+ */
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.testng.annotations.DataProvider;
+import org.testng.collections.Lists;
+
+import static helper.Mod.*;
+import static helper.Declared.*;
+import helper.Mod;
+import helper.Declared;
+import java.lang.annotation.Repeatable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = YES)
+interface TestIF1 {
+
+ default String defaultMethod() {
+ return "TestIF1.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass1 implements TestIF1 {
+}
+
+@MethodDesc(name = "staticMethod", retval = "TestIF2.staticMethod", mod = STATIC, declared = YES)
+interface TestIF2 {
+
+ static String staticMethod() {
+ return "TestIF2.staticMethod";
+ }
+}
+
+@MethodDesc(name = "method", retval = "TestIF2.staticMethod", mod = REGULAR, declared = YES)
+class TestClass2 implements TestIF2 {
+
+ public String method() {
+ return TestIF2.staticMethod();
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF3.defaultMethod", mod = DEFAULT, declared = YES)
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = YES)
+interface TestIF3 {
+
+ String method();
+
+ default String defaultMethod() {
+ return "TestIF3.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF3.defaultMethod", mod = DEFAULT, declared = NO)
+@MethodDesc(name = "method", retval = "TestClass3.method", mod = REGULAR, declared = YES)
+class TestClass3 implements TestIF3 {
+
+ public String method() {
+ return "TestClass3.method";
+ }
+}
+
+@MethodDesc(name = "staticMethod", retval = "TestIF4.staticMethod", mod = STATIC, declared = YES)
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = YES)
+interface TestIF4 {
+
+ String method();
+
+ static String staticMethod() {
+ return "TestIF4.staticMethod";
+ }
+}
+
+@MethodDesc(name = "method", retval = "TestClass4.method", mod = REGULAR, declared = YES)
+class TestClass4 implements TestIF4 {
+
+ public String method() {
+ return "TestClass4.method";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF5.defaultMethod", mod = DEFAULT, declared = YES)
+@MethodDesc(name = "staticMethod", retval = "TestIF5.staticMethod", mod = STATIC, declared = YES)
+interface TestIF5 {
+
+ default String defaultMethod() {
+ return "TestIF5.defaultMethod";
+ }
+
+ static String staticMethod() {
+ return "TestIF5.staticMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF5.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass5 implements TestIF5 {
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF6.defaultMethod", mod = DEFAULT, declared = YES)
+@MethodDesc(name = "staticMethod", retval = "TestIF6.staticMethod", mod = STATIC, declared = YES)
+@MethodDesc(name = "method", retval = "", mod = ABSTRACT, declared = YES)
+interface TestIF6 {
+
+ String method();
+
+ default String defaultMethod() {
+ return "TestIF6.defaultMethod";
+ }
+
+ static String staticMethod() {
+ return "TestIF6.staticMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF6.defaultMethod", mod = DEFAULT, declared = NO)
+@MethodDesc(name = "method", retval = "TestClass6.method", mod = REGULAR, declared = YES)
+class TestClass6 implements TestIF6 {
+
+ public String method() {
+ return "TestClass6.method";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF7.TestClass7", mod = DEFAULT, declared = YES)
+interface TestIF7<T> {
+
+ default T defaultMethod(T t) {
+ return t;
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF7.TestClass7", mod = DEFAULT, declared = NO)
+class TestClass7<T> implements TestIF7<T> {
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF8.TestClass8", mod = DEFAULT, declared = YES)
+interface TestIF8<E> {
+
+ default <E> E defaultMethod(E e) {
+ return e;
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF8.TestClass8", mod = DEFAULT, declared = NO)
+class TestClass8<T> implements TestIF8<T> {
+};
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF9.defaultMethod", mod = DEFAULT, declared = YES)
+interface TestIF9 extends TestIF1 {
+
+ default String defaultMethod() {
+ return "TestIF9.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF9.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass9 implements TestIF9 {
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF9.defaultMethod", mod = DEFAULT, declared = NO)
+@MethodDesc(name = "method", retval = "TestIF9.defaultMethod", mod = REGULAR, declared = YES)
+class TestClass91 implements TestIF9, TestIF1 {
+
+ public String method() {
+ return defaultMethod();
+ }
+}
+
+@MethodDesc(name = "staticMethod", retval = "TestIF10.staticMethod", mod = STATIC, declared = YES)
+interface TestIF10 extends TestIF2 {
+
+ static String staticMethod() {
+
+ return "TestIF10.staticMethod";
+ }
+}
+
+@MethodDesc(name = "staticMethod", retval = "TestIF11.staticMethod", mod = STATIC, declared = YES)
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = NO)
+interface TestIF11 extends TestIF1 {
+
+ static String staticMethod() {
+ return "TestIF11.staticMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass11 implements TestIF11 {
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF12.defaultMethod", mod = DEFAULT, declared = YES)
+@MethodDesc(name = "staticMethod", retval = "TestIF2.staticMethod", mod = STATIC, declared = NO)
+interface TestIF12 extends TestIF2 {
+
+ default String defaultMethod() {
+ return "TestIF12.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF12.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass12 implements TestIF12 {
+}
+
+//Diamond Case
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = NO)
+interface TestIF1A extends TestIF1 {
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = NO)
+interface TestIF1B extends TestIF1 {
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF1.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass13 implements TestIF1A, TestIF1B {
+}
+
+//Diamond Override Case
+@MethodDesc(name = "defaultMethod", retval = "TestIF1C.defaultMethod", mod = DEFAULT, declared = YES)
+interface TestIF1C extends TestIF1 {
+
+ default String defaultMethod() {
+ return "TestIF1C.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF1D.defaultMethod", mod = DEFAULT, declared = YES)
+interface TestIF1D extends TestIF1 {
+
+ default String defaultMethod() {
+ return "TestIF1D.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestClass14.defaultMethod", mod = REGULAR, declared = YES)
+class TestClass14 implements TestIF1C, TestIF1D {
+
+ public String defaultMethod() {
+ return "TestClass14.defaultMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "", mod = ABSTRACT, declared = YES)
+interface TestIF15 extends TestIF1 {
+
+ String defaultMethod();
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestClass15.defaultMethod", mod = REGULAR, declared = YES)
+class TestClass15 implements TestIF15 {
+
+ public String defaultMethod() {
+ return "TestClass15.defaultMethod";
+ }
+}
+
+interface FuncInterface<T> {
+
+ String test(T t);
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF16.defaultMethod", mod = DEFAULT, declared = YES)
+interface TestIF16 {
+
+ default String defaultMethod() {
+ FuncInterface<Object> fi = o -> o.toString();
+ Object o = "TestIF16.defaultMethod";
+ return fi.test(o);
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF16.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass16 implements TestIF16 {
+};
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF17.defaultMethod", mod = DEFAULT, declared = YES)
+@MethodDesc(name = "staticMethod", retval = "TestIF17.staticMethod", mod = STATIC, declared = YES)
+interface TestIF17 {
+
+ default String defaultMethod() {
+ return staticMethod().replace("staticMethod", "defaultMethod");
+ }
+
+ public static String staticMethod() {
+ return "TestIF17.staticMethod";
+ }
+}
+
+@MethodDesc(name = "defaultMethod", retval = "TestIF17.defaultMethod", mod = DEFAULT, declared = NO)
+class TestClass17 implements TestIF17 {
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(MethodDescs.class)
+@interface MethodDesc {
+ String name();
+ String retval();
+ Mod mod();
+ Declared declared();
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface MethodDescs {
+ MethodDesc[] value();
+}
+
+public class DefaultStaticTestData {
+
+ /**
+ * Test data for DefaultStaticInvokeTest The format of inner array is: First
+ * data is the name of the class under test Second data used in test as the
+ * arguments used for the method call.
+ */
+ @DataProvider
+ static Object[][] testClasses() {
+ return new Object[][]{
+ {"TestClass1", null},
+ //{"TestClass2", null}, @ignore due to JDK-8009411
+ {"TestClass3", null},
+ //{"TestClass4", null}, @ignore due to JDK-8009411
+ //{"TestClass5", null}, @ignore due to JDK-8009411
+ //{"TestClass6", null}, @ignore due to JDK-8009411
+ {"TestClass7", "TestIF7.TestClass7"},
+ {"TestClass8", "TestIF8.TestClass8"},
+ {"TestClass9", null},
+ {"TestClass91", null},
+ //{"TestClass11", null}, @ignore due to JDK-8009411
+ //{"TestClass12", null}, @ignore due to JDK-8009411
+ {"TestClass13", null},
+ {"TestClass14", null},
+ {"TestClass15", null},
+ {"TestClass16", null}
+ //{"TestClass17", null} @ignore due to JDK-8009411
+ };
+ }
+
+ /**
+ * Test data for DefaultStaticInvokeTest The format of inner array is: First
+ * data is the name of the interface under test Second data used in test as
+ * the arguments used for the method call.
+ */
+ @DataProvider
+ static Object[][] testInterfaces() {
+ return new Object[][]{
+ {"TestIF1", null},
+ {"TestIF2", null},
+ {"TestIF3", null},
+ {"TestIF4", null},
+ {"TestIF5", null},
+ {"TestIF6", null},
+ {"TestIF7", "TestIF7.TestClass7"},
+ {"TestIF8", "TestIF8.TestClass8"},
+ {"TestIF9", null},
+ {"TestIF10", null},
+ {"TestIF11", null},
+ {"TestIF12", null},
+ {"TestIF1A", null},
+ {"TestIF1B", null},
+ {"TestIF1C", null},
+ {"TestIF1D", null},
+ {"TestIF15", null},
+ {"TestIF16", null},
+ {"TestIF17", null},};
+ }
+
+ @DataProvider
+ static Object[][] testCasesAll() {
+ List<Object[]> result = Lists.newArrayList();
+ result.addAll(Arrays.asList(testClasses()));
+ result.addAll(Arrays.asList(testInterfaces()));
+ return result.toArray(new Object[result.size()][]);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/reflect/DefaultStaticTest/helper/Declared.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+/*
+ * Helper class used for testing default/static method
+ *
+ * @author Yong Lu
+ */
+
+package helper;
+
+public enum Declared {
+ YES,
+ NO
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/reflect/DefaultStaticTest/helper/Mod.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+/*
+ * Helper class used for testing default/static method
+ *
+ * @author Yong Lu
+ */
+
+package helper;
+
+public enum Mod {
+ DEFAULT,
+ STATIC,
+ REGULAR,
+ ABSTRACT
+}
--- a/jdk/test/java/lang/reflect/Method/DefaultMethodModeling.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/lang/reflect/Method/DefaultMethodModeling.java Mon Aug 12 09:29:06 2013 -0400
@@ -43,7 +43,7 @@
SuperIwithDefault.class, SuperIwithDefaultChild.class,
Base.class, Combo1.class, Combo2.class,
SonSuperIwithDefault.class, DaughterSuperIwithDefault.class, GrandchildSuperIwithDefault.class, D.class,
- B.class, C.class
+ B.class, C.class, B1.class, D1.class
};
for(Class<?> clazz : classes) {
@@ -202,6 +202,17 @@
public void quux(){}
}
+class D1 implements SonSuperIwithDefault, DaughterSuperIwithDefault {
+ @ExpectedModel(declaringClass=D1.class)
+ public void foo(){}
+
+ @ExpectedModel(declaringClass=D1.class)
+ public void baz(){}
+
+ @ExpectedModel(declaringClass=D1.class)
+ public void quux(){}
+}
+
// -=-=-=-
// What does re-abstraction look like?
@@ -222,3 +233,21 @@
@ExpectedModel(declaringClass=C.class)
public void bar(){}
}
+
+abstract class A1 implements SonSuperIwithDefault {
+ @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=A1.class)
+ public abstract void baz();
+
+ @ExpectedModel(modifiers=PUBLIC|ABSTRACT, declaringClass=A1.class)
+ public abstract void foo();
+}
+
+class B1 extends A1 {
+ @ExpectedModel(declaringClass=B1.class)
+ @Override
+ public void foo(){;}
+
+ @ExpectedModel(declaringClass=B1.class)
+ @Override
+ public void baz(){}
+}
--- a/jdk/test/java/lang/reflect/Method/IsDefaultTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/lang/reflect/Method/IsDefaultTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -42,6 +42,12 @@
classList.add(TestType2.class);
classList.add(TestType3.class);
classList.add(TestType4.class);
+ classList.add(TestType2.nestedTestType2.class);
+ classList.add(TestType5.class);
+ classList.add(TestType5.nestedTestType5.class);
+ classList.add(TestType6.class);
+ classList.add(TestType6.nestedTestType6.class);
+ classList.add(TestType7.class);
for(Class<?> clazz: classList) {
for(Method method: clazz.getDeclaredMethods()) {
@@ -78,11 +84,22 @@
@ExpectedIsDefault(true)
default void bar() {}; // Default method
+
+ @ExpectedIsDefault(true)
+ default void bar(int i) {}; // Default method
+
+ @ExpectedIsDefault(true)
+ default void bar(String i) {}; // Default method
}
class TestType2 {
@ExpectedIsDefault(false)
void bar() {};
+
+ interface nestedTestType2 {
+ @ExpectedIsDefault(true)
+ default void nestedBar() {};
+ }
}
class TestType3 implements TestType1 {
@@ -92,6 +109,10 @@
@ExpectedIsDefault(false)
@Override
public void bar() {};
+
+ @ExpectedIsDefault(false)
+ @Override
+ public void bar(int i) {};
}
@interface TestType4 {
@@ -102,6 +123,51 @@
String anotherValue() default "";
}
+interface TestType5 {
+ @ExpectedIsDefault(false)
+ abstract void aFoo();
+
+ @ExpectedIsDefault(false)
+ static void sFoo() {};
+
+ @ExpectedIsDefault(true)
+ public default void pBar() {};
+
+ @ExpectedIsDefault(true)
+ public default String sBar() {return "";};
+
+ interface nestedTestType5{
+ @ExpectedIsDefault(false)
+ void nestedFoo();
+
+ @ExpectedIsDefault(true)
+ default void nestedBar() {};
+ }
+}
+
+class TestType6{
+ interface nestedTestType6 {
+ @ExpectedIsDefault(true)
+ default void nestedBar() {};
+
+ @ExpectedIsDefault(false)
+ void nestedFoo();
+ }
+
+ @ExpectedIsDefault(false)
+ void foo(nestedTestType6 n) {}
+}
+
+class TestType7 implements TestType6.nestedTestType6 {
+
+ @ExpectedIsDefault(false)
+ public void nestedFoo() {}
+
+ @ExpectedIsDefault(false)
+ @Override
+ public void nestedBar() {};
+}
+
@Retention(RetentionPolicy.RUNTIME)
@interface ExpectedIsDefault {
boolean value();
--- a/jdk/test/java/math/BigDecimal/CompareToTests.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/math/BigDecimal/CompareToTests.java Mon Aug 12 09:29:06 2013 -0400
@@ -53,12 +53,29 @@
{valueOf(5,-1), valueOf(2), ONE},
// Boundary and near boundary values
- {valueOf(Long.MAX_VALUE), valueOf(Long.MAX_VALUE), ZERO},
- {valueOf(Long.MAX_VALUE-1), valueOf(Long.MAX_VALUE), MINUS_ONE},
- {valueOf(Long.MIN_VALUE), valueOf(Long.MAX_VALUE), MINUS_ONE},
- {valueOf(Long.MIN_VALUE+1), valueOf(Long.MAX_VALUE), MINUS_ONE},
- {valueOf(Long.MIN_VALUE), valueOf(Long.MIN_VALUE), ZERO},
- {valueOf(Long.MIN_VALUE+1), valueOf(Long.MAX_VALUE), ONE},
+ {valueOf(Long.MAX_VALUE), valueOf(Long.MAX_VALUE), ZERO},
+ {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE},
+
+ {valueOf(Long.MAX_VALUE-1), valueOf(Long.MAX_VALUE), MINUS_ONE},
+ {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE},
+
+ {valueOf(Long.MIN_VALUE), valueOf(Long.MAX_VALUE), MINUS_ONE},
+ {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MAX_VALUE), ONE},
+
+ {valueOf(Long.MIN_VALUE+1), valueOf(Long.MAX_VALUE), MINUS_ONE},
+ {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MAX_VALUE), ZERO},
+
+ {valueOf(Long.MAX_VALUE), valueOf(Long.MIN_VALUE), ONE},
+ {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE},
+
+ {valueOf(Long.MAX_VALUE-1), valueOf(Long.MIN_VALUE), ONE},
+ {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MIN_VALUE), ONE},
+
+ {valueOf(Long.MIN_VALUE), valueOf(Long.MIN_VALUE), ZERO},
+ {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE},
+
+ {valueOf(Long.MIN_VALUE+1), valueOf(Long.MIN_VALUE), ONE},
+ {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MIN_VALUE), ONE},
};
for (BigDecimal[] testCase : testCases) {
@@ -69,8 +86,6 @@
int expected = testCase[2].intValue();
failures += compareToTest(a, b, expected);
- failures += compareToTest(a_negate, b, -1);
- failures += compareToTest(a, b_negate, 1);
failures += compareToTest(a_negate, b_negate, -expected);
}
@@ -81,11 +96,11 @@
private static int compareToTest(BigDecimal a, BigDecimal b, int expected) {
int result = a.compareTo(b);
int failed = (result==expected) ? 0 : 1;
- if (result == 1) {
+ if (failed == 1) {
System.err.println("(" + a + ").compareTo(" + b + ") => " + result +
"\n\tExpected " + expected);
}
- return result;
+ return failed;
}
public static void main(String argv[]) {
--- a/jdk/test/java/math/BigInteger/CompareToTests.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/math/BigInteger/CompareToTests.java Mon Aug 12 09:29:06 2013 -0400
@@ -24,20 +24,23 @@
/*
* @test
* @bug 6473768
- * @summary Tests of BigDecimal.compareTo
+ * @summary Tests of BigInteger.compareTo
* @author Joseph D. Darcy
*/
import java.math.*;
-import static java.math.BigDecimal.*;
+import static java.math.BigInteger.*;
public class CompareToTests {
private static int compareToTests() {
int failures = 0;
- final BigDecimal MINUS_ONE = BigDecimal.ONE.negate();
+ final BigInteger MINUS_ONE = BigInteger.ONE.negate();
+ final BigInteger TWO_POW_126 = ONE.shiftLeft(126);
+ final BigInteger TWO_POW_127 = ONE.shiftLeft(127);
+ final BigInteger TWO_POW_128 = ONE.shiftLeft(128);
// First operand, second operand, expected compareTo result
- BigDecimal [][] testCases = {
+ BigInteger [][] testCases = {
// Basics
{valueOf(0), valueOf(0), ZERO},
{valueOf(0), valueOf(1), MINUS_ONE},
@@ -45,32 +48,56 @@
{valueOf(2), valueOf(1), ONE},
{valueOf(10), valueOf(10), ZERO},
- // Significands would compare differently than scaled value
- {valueOf(2,1), valueOf(2), MINUS_ONE},
- {valueOf(2,-1), valueOf(2), ONE},
- {valueOf(1,1), valueOf(2), MINUS_ONE},
- {valueOf(1,-1), valueOf(2), ONE},
- {valueOf(5,-1), valueOf(2), ONE},
+ // Various relative lengths of internal mag array.
+ {TWO_POW_127, TWO_POW_127, ZERO},
+ {TWO_POW_127.negate(), TWO_POW_127, MINUS_ONE},
+
+ {TWO_POW_128.or(TWO_POW_126), TWO_POW_128, ONE},
+ {TWO_POW_128.or(TWO_POW_126), TWO_POW_128.negate(), ONE},
+
+ {TWO_POW_128, TWO_POW_128.or(TWO_POW_126), MINUS_ONE},
+ {TWO_POW_128.negate(), TWO_POW_128.or(TWO_POW_126), MINUS_ONE},
+
+ {TWO_POW_127, TWO_POW_128, MINUS_ONE},
+ {TWO_POW_127.negate(), TWO_POW_128, MINUS_ONE},
+
+ {TWO_POW_128, TWO_POW_127, ONE},
+ {TWO_POW_128.negate(), TWO_POW_127, MINUS_ONE},
+
+ // Long boundary and near boundary values
+ {valueOf(Long.MAX_VALUE), valueOf(Long.MAX_VALUE), ZERO},
+ {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE},
- // Boundary and near boundary values
- {valueOf(Long.MAX_VALUE), valueOf(Long.MAX_VALUE), ZERO},
- {valueOf(Long.MAX_VALUE-1), valueOf(Long.MAX_VALUE), MINUS_ONE},
- {valueOf(Long.MIN_VALUE), valueOf(Long.MAX_VALUE), MINUS_ONE},
- {valueOf(Long.MIN_VALUE+1), valueOf(Long.MAX_VALUE), MINUS_ONE},
- {valueOf(Long.MIN_VALUE), valueOf(Long.MIN_VALUE), ZERO},
- {valueOf(Long.MIN_VALUE+1), valueOf(Long.MAX_VALUE), ONE},
+ {valueOf(Long.MAX_VALUE-1), valueOf(Long.MAX_VALUE), MINUS_ONE},
+ {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE},
+
+ {valueOf(Long.MIN_VALUE), valueOf(Long.MAX_VALUE), MINUS_ONE},
+ {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MAX_VALUE), ONE},
+
+ {valueOf(Long.MIN_VALUE+1), valueOf(Long.MAX_VALUE), MINUS_ONE},
+ {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MAX_VALUE), ZERO},
+
+ {valueOf(Long.MAX_VALUE), valueOf(Long.MIN_VALUE), ONE},
+ {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE},
+
+ {valueOf(Long.MAX_VALUE-1), valueOf(Long.MIN_VALUE), ONE},
+ {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MIN_VALUE), ONE},
+
+ {valueOf(Long.MIN_VALUE), valueOf(Long.MIN_VALUE), ZERO},
+ {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE},
+
+ {valueOf(Long.MIN_VALUE+1), valueOf(Long.MIN_VALUE), ONE},
+ {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MIN_VALUE), ONE},
};
- for (BigDecimal[] testCase : testCases) {
- BigDecimal a = testCase[0];
- BigDecimal a_negate = a.negate();
- BigDecimal b = testCase[1];
- BigDecimal b_negate = b.negate();
+ for (BigInteger[] testCase : testCases) {
+ BigInteger a = testCase[0];
+ BigInteger a_negate = a.negate();
+ BigInteger b = testCase[1];
+ BigInteger b_negate = b.negate();
int expected = testCase[2].intValue();
failures += compareToTest(a, b, expected);
- failures += compareToTest(a_negate, b, -1);
- failures += compareToTest(a, b_negate, 1);
failures += compareToTest(a_negate, b_negate, -expected);
}
@@ -78,14 +105,14 @@
return failures;
}
- private static int compareToTest(BigDecimal a, BigDecimal b, int expected) {
+ private static int compareToTest(BigInteger a, BigInteger b, int expected) {
int result = a.compareTo(b);
int failed = (result==expected) ? 0 : 1;
- if (result == 1) {
+ if (failed == 1) {
System.err.println("(" + a + ").compareTo(" + b + ") => " + result +
"\n\tExpected " + expected);
}
- return result;
+ return failed;
}
public static void main(String argv[]) {
--- a/jdk/test/java/net/NetworkInterface/IndexTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/net/NetworkInterface/IndexTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -27,7 +27,10 @@
*/
import java.net.*;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.Enumeration;
+import static java.lang.System.out;
public class IndexTest {
public static void main(String[] args) throws Exception {
@@ -39,12 +42,17 @@
if (index >= 0) {
NetworkInterface nif2 = NetworkInterface.getByIndex(index);
if (! nif.equals(nif2)) {
+ out.printf("%nExpected interfaces to be the same, but got:%n");
+ displayInterfaceInformation(nif);
+ displayInterfaceInformation(nif2);
throw new RuntimeException("both interfaces should be equal");
}
}
}
try {
nif = NetworkInterface.getByIndex(-1);
+ out.printf("%ngetByIndex(-1) should have thrown, but instead returned:%n");
+ displayInterfaceInformation(nif);
throw new RuntimeException("Should have thrown IllegalArgumentException");
} catch (IllegalArgumentException e) {
// OK
@@ -52,7 +60,29 @@
// In all likelyhood, this interface should not exist.
nif = NetworkInterface.getByIndex(Integer.MAX_VALUE - 1);
if (nif != null) {
+ out.printf("%ngetByIndex(MAX_VALUE - 1), expected null, got:%n");
+ displayInterfaceInformation(nif);
throw new RuntimeException("getByIndex() should have returned null");
}
}
+
+ static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
+ out.printf("Display name: %s%n", netint.getDisplayName());
+ out.printf("Name: %s%n", netint.getName());
+ Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
+
+ for (InetAddress inetAddress : Collections.list(inetAddresses))
+ out.printf("InetAddress: %s%n", inetAddress);
+
+ out.printf("Up? %s%n", netint.isUp());
+ out.printf("Loopback? %s%n", netint.isLoopback());
+ out.printf("PointToPoint? %s%n", netint.isPointToPoint());
+ out.printf("Supports multicast? %s%n", netint.supportsMulticast());
+ out.printf("Virtual? %s%n", netint.isVirtual());
+ out.printf("Hardware address: %s%n",
+ Arrays.toString(netint.getHardwareAddress()));
+ out.printf("MTU: %s%n", netint.getMTU());
+ out.printf("Index: %s%n", netint.getIndex());
+ out.printf("%n");
+ }
}
--- a/jdk/test/java/nio/file/Files/BytesAndLines.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/nio/file/Files/BytesAndLines.java Mon Aug 12 09:29:06 2013 -0400
@@ -22,7 +22,7 @@
*/
/* @test
- * @bug 7006126
+ * @bug 7006126 8020669
* @summary Unit test for methods for Files readAllBytes, readAllLines and
* and write methods.
*/
@@ -82,6 +82,16 @@
write(file, lines, Charset.defaultCharset(), opts);
throw new RuntimeException("NullPointerException expected");
} catch (NullPointerException ignore) { }
+
+ // read from procfs
+ if (System.getProperty("os.name").equals("Linux")) {
+ // Refer to the Linux proc(5) man page for details about /proc/self/stat file
+ // procfs reports it to be zero sized, even though data can be read from it
+ String statFile = "/proc/self/stat";
+ Path pathStat = Paths.get(statFile);
+ byte[] data = Files.readAllBytes(pathStat);
+ assertTrue(data.length > 0, "Files.readAllBytes('" + statFile + "') failed to read");
+ }
}
@@ -174,6 +184,16 @@
throw new RuntimeException("NullPointerException expected");
} catch (NullPointerException ignore) { }
+ // read from procfs
+ if (System.getProperty("os.name").equals("Linux")) {
+ // Refer to the Linux proc(5) man page for details about /proc/self/status file
+ // procfs reports this file to be zero sized, even though data can be read from it
+ String statusFile = "/proc/self/status";
+ Path pathStatus = Paths.get(statusFile);
+ lines = Files.readAllLines(pathStatus, US_ASCII);
+ assertTrue(lines.size() > 0, "Files.readAllLines('" + pathStatus + "') failed to read");
+ }
+
} finally {
delete(tmpfile);
}
@@ -242,7 +262,6 @@
} finally {
delete(tmpfile);
}
-
}
static void assertTrue(boolean expr, String errmsg) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/Security/AddProvider.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8001319
+ * @summary check that SecurityPermission insertProvider permission is enforced
+ * correctly
+ * @run main/othervm/policy=AddProvider.policy.1 AddProvider 1
+ * @run main/othervm/policy=AddProvider.policy.2 AddProvider 2
+ * @run main/othervm/policy=AddProvider.policy.3 AddProvider 3
+ */
+import java.security.Provider;
+import java.security.Security;
+
+public class AddProvider {
+
+ public static void main(String[] args) throws Exception {
+ boolean legacy = args[0].equals("2");
+ Security.addProvider(new TestProvider("Test1"));
+ Security.insertProviderAt(new TestProvider("Test2"), 1);
+ try {
+ Security.addProvider(new TestProvider("Test3"));
+ if (legacy) {
+ throw new Exception("Expected SecurityException");
+ }
+ } catch (SecurityException se) {
+ if (!legacy) {
+ throw se;
+ }
+ }
+ }
+
+ private static class TestProvider extends Provider {
+ TestProvider(String name) {
+ super(name, 0.0, "Not for use in production systems!");
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/Security/AddProvider.policy.1 Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,7 @@
+grant codeBase "file:${{java.ext.dirs}}/*" {
+ permission java.security.AllPermission;
+};
+
+grant {
+ permission java.security.SecurityPermission "insertProvider";
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/Security/AddProvider.policy.2 Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,8 @@
+grant codeBase "file:${{java.ext.dirs}}/*" {
+ permission java.security.AllPermission;
+};
+
+grant {
+ permission java.security.SecurityPermission "insertProvider.Test1";
+ permission java.security.SecurityPermission "insertProvider.Test2";
+};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/Security/AddProvider.policy.3 Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,7 @@
+grant codeBase "file:${{java.ext.dirs}}/*" {
+ permission java.security.AllPermission;
+};
+
+grant {
+ permission java.security.SecurityPermission "insertProvider.*";
+};
--- a/jdk/test/java/time/tck/java/time/format/TCKFormatStyle.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/time/tck/java/time/format/TCKFormatStyle.java Mon Aug 12 09:29:06 2013 -0400
@@ -64,6 +64,7 @@
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.FormatStyle;
import java.time.temporal.Temporal;
+import java.util.Locale;
import static org.testng.Assert.assertEquals;
@@ -108,6 +109,7 @@
public void test_formatStyle(Temporal temporal, FormatStyle style, String formattedStr) {
DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
DateTimeFormatter formatter = builder.appendLocalized(style, style).appendLiteral(" ").appendZoneOrOffsetId().toFormatter();
+ formatter = formatter.withLocale(Locale.US);
assertEquals(formatter.format(temporal), formattedStr);
}
}
--- a/jdk/test/java/time/test/java/time/format/TestNonIsoFormatter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/time/test/java/time/format/TestNonIsoFormatter.java Mon Aug 12 09:29:06 2013 -0400
@@ -110,7 +110,7 @@
// Chronology, Locale, Chronology Name
{ ISO8601, Locale.ENGLISH, "ISO" }, // No data in CLDR; Use Id.
{ BUDDHIST, Locale.ENGLISH, "Buddhist Calendar" },
- { HIJRAH, Locale.ENGLISH, "Hijrah-umalqura" }, // No data in CLDR; Use Id.
+ { HIJRAH, Locale.ENGLISH, "Islamic Umm al-Qura Calendar" }, // JDK-8015986
{ JAPANESE, Locale.ENGLISH, "Japanese Calendar" },
{ MINGUO, Locale.ENGLISH, "Minguo Calendar" },
@@ -121,6 +121,10 @@
{ ISO8601, thTH, "ISO" }, // No data in CLDR; Use Id.
{ JAPANESE, thTH, "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" },
{ BUDDHIST, thTH, "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" },
+
+ { HIJRAH, ARABIC, "\u0644\u062a\u0642\u0648\u064a\u0645 "
+ + "\u0627\u0644\u0647\u062c\u0631\u064a\u060c "
+ + "\u0623\u0645 \u0627\u0644\u0642\u0631\u0649" }, // JDK-8015986
};
}
--- a/jdk/test/java/util/Formatter/Basic-X.java.template Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/Formatter/Basic-X.java.template Mon Aug 12 09:29:06 2013 -0400
@@ -1319,10 +1319,8 @@
Math.nextDown(DoubleConsts.MIN_NORMAL));
test("%.1a", "0x1.0p-1022",
Math.nextDown(DoubleConsts.MIN_NORMAL));
- test("%.11a", "0x1.ffffffffffep-1023",
- Double.parseDouble("0x0.fffffffffffp-1022"));
- test("%.1a", "0x1.0p-1022",
- Double.parseDouble("0x0.fffffffffffp-1022"));
+ test("%.11a", "0x1.ffffffffffep-1023", 0x0.fffffffffffp-1022);
+ test("%.1a", "0x1.0p-1022", 0x0.fffffffffffp-1022);
test("%.30a", "0x0.000000000000100000000000000000p-1022", Double.MIN_VALUE);
test("%.13a", "0x0.0000000000001p-1022", Double.MIN_VALUE);
test("%.11a", "0x1.00000000000p-1074", Double.MIN_VALUE);
@@ -1336,19 +1334,50 @@
test("%.13a", "0x1.fffffffffffffp1023", Double.MAX_VALUE);
test("%.11a", "0x1.00000000000p1024", Double.MAX_VALUE);
test("%.1a", "0x1.0p1024", Double.MAX_VALUE);
- test("%.11a", "0x1.18000000000p0", Double.parseDouble("0x1.18p0"));
- test("%.1a", "0x1.2p0", Double.parseDouble("0x1.18p0"));
+ test("%.11a", "0x1.18000000000p0", 0x1.18p0);
+ test("%.1a", "0x1.2p0", 0x1.18p0);
+
+ test("%.11a", "0x1.18000000000p0", 0x1.180000000001p0);
+ test("%.1a", "0x1.2p0", 0x1.180000000001p0);
+ test("%.11a", "0x1.28000000000p0", 0x1.28p0);
+ test("%.1a", "0x1.2p0", 0x1.28p0);
+
+ test("%.11a", "0x1.28000000000p0", 0x1.280000000001p0);
+ test("%.1a", "0x1.3p0", 0x1.280000000001p0);
+
+ test("%a", "0x0.123p-1022", 0x0.123p-1022);
+ test("%1.3a", "0x1.230p-1026", 0x0.123p-1022);
+ test("%1.12a", "0x1.230000000000p-1026", 0x0.123p-1022);
+ test("%1.15a", "0x0.123000000000000p-1022", 0x0.123p-1022);
+ test("%1.5a", "0x1.00000p-1074", 0x0.0000000000001p-1022);
+ test("%1.7a", "0x1.0000000p-1022", 0x0.fffffffffffffp-1022);
- test("%.11a", "0x1.18000000000p0",
- Double.parseDouble("0x1.180000000001p0"));
- test("%.1a", "0x1.2p0",
- Double.parseDouble("0x1.180000000001p0"));
- test("%.11a", "0x1.28000000000p0", Double.parseDouble("0x1.28p0"));
- test("%.1a", "0x1.2p0", Double.parseDouble("0x1.28p0"));
+ test("%1.6a", "0x1.230000p-1026", 0x0.123000057p-1022);
+ test("%1.7a", "0x1.2300005p-1026", 0x0.123000057p-1022);
+ test("%1.8a", "0x1.23000057p-1026", 0x0.123000057p-1022);
+ test("%1.9a", "0x1.230000570p-1026", 0x0.123000057p-1022);
+
+ test("%1.6a", "0x1.230000p-1026", 0x0.123000058p-1022);
+ test("%1.7a", "0x1.2300006p-1026", 0x0.123000058p-1022);
+ test("%1.8a", "0x1.23000058p-1026", 0x0.123000058p-1022);
+ test("%1.9a", "0x1.230000580p-1026", 0x0.123000058p-1022);
- test("%.11a", "0x1.28000000000p0",
- Double.parseDouble("0x1.280000000001p0"));
- test("%.1a", "0x1.3p0", Double.parseDouble("0x1.280000000001p0"));
+ test("%1.6a", "0x1.230000p-1026", 0x0.123000059p-1022);
+ test("%1.7a", "0x1.2300006p-1026", 0x0.123000059p-1022);
+ test("%1.8a", "0x1.23000059p-1026", 0x0.123000059p-1022);
+ test("%1.9a", "0x1.230000590p-1026", 0x0.123000059p-1022);
+
+ test("%1.4a", "0x1.0000p-1022", Math.nextDown(Double.MIN_NORMAL));
+
+ test("%a", "0x1.fffffffffffffp1023", Double.MAX_VALUE);
+ test("%1.1a", "0x1.0p1024", Double.MAX_VALUE);
+ test("%1.2a", "0x1.00p1024", Double.MAX_VALUE);
+ test("%1.6a", "0x1.000000p1024", Double.MAX_VALUE);
+ test("%1.9a", "0x1.000000000p1024", Double.MAX_VALUE);
+ test("%1.11a", "0x1.00000000000p1024", Double.MAX_VALUE);
+ test("%1.12a", "0x1.000000000000p1024", Double.MAX_VALUE);
+ test("%1.13a", "0x1.fffffffffffffp1023", Double.MAX_VALUE);
+
#end[double]
//---------------------------------------------------------------------
--- a/jdk/test/java/util/Formatter/Basic.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/Formatter/Basic.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,7 +25,7 @@
* @summary Unit test for formatter
* @bug 4906370 4962433 4973103 4989961 5005818 5031150 4970931 4989491 5002937
* 5005104 5007745 5061412 5055180 5066788 5088703 6317248 6318369 6320122
- * 6344623 6369500 6534606 6282094 6286592 6476425 5063507 6469160
+ * 6344623 6369500 6534606 6282094 6286592 6476425 5063507 6469160 6476168
*
* @run shell/timeout=240 Basic.sh
*/
--- a/jdk/test/java/util/Formatter/BasicDouble.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/Formatter/BasicDouble.java Mon Aug 12 09:29:06 2013 -0400
@@ -1319,10 +1319,8 @@
Math.nextDown(DoubleConsts.MIN_NORMAL));
test("%.1a", "0x1.0p-1022",
Math.nextDown(DoubleConsts.MIN_NORMAL));
- test("%.11a", "0x1.ffffffffffep-1023",
- Double.parseDouble("0x0.fffffffffffp-1022"));
- test("%.1a", "0x1.0p-1022",
- Double.parseDouble("0x0.fffffffffffp-1022"));
+ test("%.11a", "0x1.ffffffffffep-1023", 0x0.fffffffffffp-1022);
+ test("%.1a", "0x1.0p-1022", 0x0.fffffffffffp-1022);
test("%.30a", "0x0.000000000000100000000000000000p-1022", Double.MIN_VALUE);
test("%.13a", "0x0.0000000000001p-1022", Double.MIN_VALUE);
test("%.11a", "0x1.00000000000p-1074", Double.MIN_VALUE);
@@ -1336,19 +1334,50 @@
test("%.13a", "0x1.fffffffffffffp1023", Double.MAX_VALUE);
test("%.11a", "0x1.00000000000p1024", Double.MAX_VALUE);
test("%.1a", "0x1.0p1024", Double.MAX_VALUE);
- test("%.11a", "0x1.18000000000p0", Double.parseDouble("0x1.18p0"));
- test("%.1a", "0x1.2p0", Double.parseDouble("0x1.18p0"));
-
- test("%.11a", "0x1.18000000000p0",
- Double.parseDouble("0x1.180000000001p0"));
- test("%.1a", "0x1.2p0",
- Double.parseDouble("0x1.180000000001p0"));
- test("%.11a", "0x1.28000000000p0", Double.parseDouble("0x1.28p0"));
- test("%.1a", "0x1.2p0", Double.parseDouble("0x1.28p0"));
-
- test("%.11a", "0x1.28000000000p0",
- Double.parseDouble("0x1.280000000001p0"));
- test("%.1a", "0x1.3p0", Double.parseDouble("0x1.280000000001p0"));
+ test("%.11a", "0x1.18000000000p0", 0x1.18p0);
+ test("%.1a", "0x1.2p0", 0x1.18p0);
+
+ test("%.11a", "0x1.18000000000p0", 0x1.180000000001p0);
+ test("%.1a", "0x1.2p0", 0x1.180000000001p0);
+ test("%.11a", "0x1.28000000000p0", 0x1.28p0);
+ test("%.1a", "0x1.2p0", 0x1.28p0);
+
+ test("%.11a", "0x1.28000000000p0", 0x1.280000000001p0);
+ test("%.1a", "0x1.3p0", 0x1.280000000001p0);
+
+ test("%a", "0x0.123p-1022", 0x0.123p-1022);
+ test("%1.3a", "0x1.230p-1026", 0x0.123p-1022);
+ test("%1.12a", "0x1.230000000000p-1026", 0x0.123p-1022);
+ test("%1.15a", "0x0.123000000000000p-1022", 0x0.123p-1022);
+ test("%1.5a", "0x1.00000p-1074", 0x0.0000000000001p-1022);
+ test("%1.7a", "0x1.0000000p-1022", 0x0.fffffffffffffp-1022);
+
+ test("%1.6a", "0x1.230000p-1026", 0x0.123000057p-1022);
+ test("%1.7a", "0x1.2300005p-1026", 0x0.123000057p-1022);
+ test("%1.8a", "0x1.23000057p-1026", 0x0.123000057p-1022);
+ test("%1.9a", "0x1.230000570p-1026", 0x0.123000057p-1022);
+
+ test("%1.6a", "0x1.230000p-1026", 0x0.123000058p-1022);
+ test("%1.7a", "0x1.2300006p-1026", 0x0.123000058p-1022);
+ test("%1.8a", "0x1.23000058p-1026", 0x0.123000058p-1022);
+ test("%1.9a", "0x1.230000580p-1026", 0x0.123000058p-1022);
+
+ test("%1.6a", "0x1.230000p-1026", 0x0.123000059p-1022);
+ test("%1.7a", "0x1.2300006p-1026", 0x0.123000059p-1022);
+ test("%1.8a", "0x1.23000059p-1026", 0x0.123000059p-1022);
+ test("%1.9a", "0x1.230000590p-1026", 0x0.123000059p-1022);
+
+ test("%1.4a", "0x1.0000p-1022", Math.nextDown(Double.MIN_NORMAL));
+
+ test("%a", "0x1.fffffffffffffp1023", Double.MAX_VALUE);
+ test("%1.1a", "0x1.0p1024", Double.MAX_VALUE);
+ test("%1.2a", "0x1.00p1024", Double.MAX_VALUE);
+ test("%1.6a", "0x1.000000p1024", Double.MAX_VALUE);
+ test("%1.9a", "0x1.000000000p1024", Double.MAX_VALUE);
+ test("%1.11a", "0x1.00000000000p1024", Double.MAX_VALUE);
+ test("%1.12a", "0x1.000000000000p1024", Double.MAX_VALUE);
+ test("%1.13a", "0x1.fffffffffffffp1023", Double.MAX_VALUE);
+
//---------------------------------------------------------------------
--- a/jdk/test/java/util/Random/RandomStreamTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/Random/RandomStreamTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,23 +25,22 @@
import org.testng.annotations.Test;
import java.security.SecureRandom;
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
+
import java.util.Random;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ExecutorService;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
-import java.util.stream.IntStream;
-import java.util.stream.LongStream;
-import java.util.stream.DoubleStream;
+import java.util.concurrent.TimeoutException;
+import java.util.function.Supplier;
import java.util.stream.Stream;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
+import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.toSet;
+import static org.testng.Assert.*;
/**
* @test
@@ -147,111 +146,43 @@
}
@Test
- public void testThreadLocalIntStream() throws InterruptedException {
- final ExecutorService e = Executors.newFixedThreadPool(10);
- final ThreadLocalRandom tlr = ThreadLocalRandom.current();
-
- final class RandomTask implements Runnable {
- int[] randoms;
-
- @Override
- public void run() {
- randoms = tlr.ints().limit(SIZE).toArray();
- }
- }
- final RandomTask[] tasks = new RandomTask[10];
- for (int i=0; i < tasks.length; i++) {
- tasks[i] = new RandomTask();
- }
- for (int i=0; i < tasks.length; i++) {
- e.submit(tasks[i]);
- }
- e.shutdown();
- e.awaitTermination(3, TimeUnit.SECONDS);
- for (int i=1; i < tasks.length; i++) {
- assertFalse(Arrays.equals(tasks[0].randoms, tasks[i].randoms));
- }
+ public void testThreadLocalIntStream() throws InterruptedException, ExecutionException, TimeoutException {
+ ThreadLocalRandom tlr = ThreadLocalRandom.current();
+ testRandomResultSupplierConcurrently(() -> tlr.ints().limit(SIZE).boxed().collect(toList()));
}
@Test
- public void testThreadLocalLongStream() throws InterruptedException {
- final ExecutorService e = Executors.newFixedThreadPool(10);
- final ThreadLocalRandom tlr = ThreadLocalRandom.current();
-
- final class RandomTask implements Runnable {
- long[] randoms;
+ public void testThreadLocalLongStream() throws InterruptedException, ExecutionException, TimeoutException {
+ ThreadLocalRandom tlr = ThreadLocalRandom.current();
+ testRandomResultSupplierConcurrently(() -> tlr.longs().limit(SIZE).boxed().collect(toList()));
+ }
- @Override
- public void run() {
- randoms = tlr.longs().limit(SIZE).toArray();
- }
- }
- final RandomTask[] tasks = new RandomTask[10];
- for (int i=0; i < tasks.length; i++) {
- tasks[i] = new RandomTask();
- }
- for (int i=0; i < tasks.length; i++) {
- e.submit(tasks[i]);
- }
- e.shutdown();
- e.awaitTermination(3, TimeUnit.SECONDS);
- for (int i=1; i < tasks.length; i++) {
- assertFalse(Arrays.equals(tasks[0].randoms, tasks[i].randoms));
- }
+ @Test
+ public void testThreadLocalDoubleStream() throws InterruptedException, ExecutionException, TimeoutException {
+ ThreadLocalRandom tlr = ThreadLocalRandom.current();
+ testRandomResultSupplierConcurrently(() -> tlr.doubles().limit(SIZE).boxed().collect(toList()));
}
@Test
- public void testThreadLocalDoubleStream() throws InterruptedException {
- final ExecutorService e = Executors.newFixedThreadPool(10);
- final ThreadLocalRandom tlr = ThreadLocalRandom.current();
-
- final class RandomTask implements Runnable {
- double[] randoms;
-
- @Override
- public void run() {
- randoms = tlr.doubles().limit(SIZE).toArray();
- }
- }
- final RandomTask[] tasks = new RandomTask[10];
- for (int i=0; i < tasks.length; i++) {
- tasks[i] = new RandomTask();
- }
- for (int i=0; i < tasks.length; i++) {
- e.submit(tasks[i]);
- }
- e.shutdown();
- e.awaitTermination(3, TimeUnit.SECONDS);
- for (int i=1; i < tasks.length; i++) {
- assertFalse(Arrays.equals(tasks[0].randoms, tasks[i].randoms));
- }
+ public void testThreadLocalGaussianStream() throws InterruptedException, ExecutionException, TimeoutException {
+ ThreadLocalRandom tlr = ThreadLocalRandom.current();
+ testRandomResultSupplierConcurrently(() -> tlr.gaussians().limit(SIZE).boxed().collect(toList()));
}
- @Test
- public void testThreadLocalGaussianStream() throws InterruptedException {
- final ExecutorService e = Executors.newFixedThreadPool(10);
- final ThreadLocalRandom tlr = ThreadLocalRandom.current();
-
- final class RandomTask implements Runnable {
- double[] randoms;
+ <T> void testRandomResultSupplierConcurrently(Supplier<T> s) throws InterruptedException, ExecutionException, TimeoutException {
+ // Produce 10 completable future tasks
+ final int tasks = 10;
+ List<CompletableFuture<T>> cfs = Stream.generate(() -> CompletableFuture.supplyAsync(s)).
+ limit(tasks).collect(toList());
- @Override
- public void run() {
- randoms = tlr.gaussians().limit(SIZE).toArray();
- }
- }
- final RandomTask[] tasks = new RandomTask[10];
- for (int i=0; i < tasks.length; i++) {
- tasks[i] = new RandomTask();
- }
- for (int i=0; i < tasks.length; i++) {
- e.submit(tasks[i]);
- }
- e.shutdown();
- e.awaitTermination(3, TimeUnit.SECONDS);
- for (int i=1; i < tasks.length; i++) {
- assertFalse(Arrays.equals(tasks[0].randoms, tasks[i].randoms));
- }
+ // Wait for all tasks to complete
+ // Timeout is beyond reasonable doubt that completion should
+ // have occurred unless there is an issue
+ CompletableFuture<Void> all = CompletableFuture.allOf(cfs.stream().toArray(CompletableFuture[]::new));
+ all.get(1, TimeUnit.MINUTES);
+
+ // Count the distinct results, which should equal the number of tasks
+ long rc = cfs.stream().map(CompletableFuture::join).distinct().count();
+ assertEquals(rc, tasks);
}
-
}
--- a/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/Spliterator/SpliteratorCharacteristics.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 8020156 8020009
+ * @bug 8020156 8020009 8022326
* @run testng SpliteratorCharacteristics
*/
@@ -32,80 +32,134 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
import java.util.Spliterator;
import java.util.TreeMap;
import java.util.TreeSet;
+import java.util.concurrent.ConcurrentSkipListMap;
+import java.util.concurrent.ConcurrentSkipListSet;
import static org.testng.Assert.*;
@Test
public class SpliteratorCharacteristics {
- public void testTreeMap() {
- TreeMap<Integer, String> tm = new TreeMap<>();
- tm.put(1, "4");
- tm.put(2, "3");
- tm.put(3, "2");
- tm.put(4, "1");
+ // TreeMap
- assertCharacteristics(tm.keySet(),
- Spliterator.SIZED | Spliterator.DISTINCT |
- Spliterator.SORTED | Spliterator.ORDERED);
- assertNullComparator(tm.keySet());
-
- assertCharacteristics(tm.values(),
- Spliterator.SIZED | Spliterator.ORDERED);
- assertISEComparator(tm.values());
-
- assertCharacteristics(tm.entrySet(),
- Spliterator.SIZED | Spliterator.DISTINCT |
- Spliterator.SORTED | Spliterator.ORDERED);
- assertNotNullComparator(tm.entrySet());
+ public void testTreeMap() {
+ assertSortedMapCharacteristics(new TreeMap<>(),
+ Spliterator.SIZED | Spliterator.DISTINCT |
+ Spliterator.SORTED | Spliterator.ORDERED);
}
public void testTreeMapWithComparator() {
- TreeMap<Integer, String> tm = new TreeMap<>(Comparator.<Integer>reverseOrder());
- tm.put(1, "4");
- tm.put(2, "3");
- tm.put(3, "2");
- tm.put(4, "1");
-
- assertCharacteristics(tm.keySet(),
- Spliterator.SIZED | Spliterator.DISTINCT |
- Spliterator.SORTED | Spliterator.ORDERED);
- assertNotNullComparator(tm.keySet());
-
- assertCharacteristics(tm.values(),
- Spliterator.SIZED | Spliterator.ORDERED);
- assertISEComparator(tm.values());
-
- assertCharacteristics(tm.entrySet(),
- Spliterator.SIZED | Spliterator.DISTINCT |
- Spliterator.SORTED | Spliterator.ORDERED);
- assertNotNullComparator(tm.entrySet());
+ assertSortedMapCharacteristics(new TreeMap<>(Comparator.reverseOrder()),
+ Spliterator.SIZED | Spliterator.DISTINCT |
+ Spliterator.SORTED | Spliterator.ORDERED);
}
- public void testTreeSet() {
- TreeSet<Integer> ts = new TreeSet<>();
- ts.addAll(Arrays.asList(1, 2, 3, 4));
+
+ // TreeSet
- assertCharacteristics(ts,
- Spliterator.SIZED | Spliterator.DISTINCT |
- Spliterator.SORTED | Spliterator.ORDERED);
- assertNullComparator(ts);
+ public void testTreeSet() {
+ assertSortedSetCharacteristics(new TreeSet<>(),
+ Spliterator.SIZED | Spliterator.DISTINCT |
+ Spliterator.SORTED | Spliterator.ORDERED);
}
public void testTreeSetWithComparator() {
- TreeSet<Integer> ts = new TreeSet<>(Comparator.reverseOrder());
- ts.addAll(Arrays.asList(1, 2, 3, 4));
+ assertSortedSetCharacteristics(new TreeSet<>(Comparator.reverseOrder()),
+ Spliterator.SIZED | Spliterator.DISTINCT |
+ Spliterator.SORTED | Spliterator.ORDERED);
+ }
+
+
+ // ConcurrentSkipListMap
+
+ public void testConcurrentSkipListMap() {
+ assertSortedMapCharacteristics(new ConcurrentSkipListMap<>(),
+ Spliterator.CONCURRENT | Spliterator.NONNULL |
+ Spliterator.DISTINCT | Spliterator.SORTED |
+ Spliterator.ORDERED);
+ }
- assertCharacteristics(ts,
- Spliterator.SIZED | Spliterator.DISTINCT |
- Spliterator.SORTED | Spliterator.ORDERED);
- assertNotNullComparator(ts);
+ public void testConcurrentSkipListMapWithComparator() {
+ assertSortedMapCharacteristics(new ConcurrentSkipListMap<>(Comparator.<Integer>reverseOrder()),
+ Spliterator.CONCURRENT | Spliterator.NONNULL |
+ Spliterator.DISTINCT | Spliterator.SORTED |
+ Spliterator.ORDERED);
+ }
+
+
+ // ConcurrentSkipListSet
+
+ public void testConcurrentSkipListSet() {
+ assertSortedSetCharacteristics(new ConcurrentSkipListSet<>(),
+ Spliterator.CONCURRENT | Spliterator.NONNULL |
+ Spliterator.DISTINCT | Spliterator.SORTED |
+ Spliterator.ORDERED);
+ }
+
+ public void testConcurrentSkipListSetWithComparator() {
+ assertSortedSetCharacteristics(new ConcurrentSkipListSet<>(Comparator.reverseOrder()),
+ Spliterator.CONCURRENT | Spliterator.NONNULL |
+ Spliterator.DISTINCT | Spliterator.SORTED |
+ Spliterator.ORDERED);
}
+ //
+
+ void assertSortedMapCharacteristics(SortedMap<Integer, String> m, int keyCharacteristics) {
+ initMap(m);
+
+ boolean hasComparator = m.comparator() != null;
+
+ Set<Integer> keys = m.keySet();
+ assertCharacteristics(keys, keyCharacteristics);
+ if (hasComparator) {
+ assertNotNullComparator(keys);
+ }
+ else {
+ assertNullComparator(keys);
+ }
+
+ assertCharacteristics(m.values(),
+ keyCharacteristics & ~(Spliterator.DISTINCT | Spliterator.SORTED));
+ assertISEComparator(m.values());
+
+ assertCharacteristics(m.entrySet(), keyCharacteristics);
+ assertNotNullComparator(m.entrySet());
+ }
+
+ void assertSortedSetCharacteristics(SortedSet<Integer> s, int keyCharacteristics) {
+ initSet(s);
+
+ boolean hasComparator = s.comparator() != null;
+
+ assertCharacteristics(s, keyCharacteristics);
+ if (hasComparator) {
+ assertNotNullComparator(s);
+ }
+ else {
+ assertNullComparator(s);
+ }
+ }
+
+ void initMap(Map<Integer, String> m) {
+ m.put(1, "4");
+ m.put(2, "3");
+ m.put(3, "2");
+ m.put(4, "1");
+ }
+
+ void initSet(Set<Integer> s) {
+ s.addAll(Arrays.asList(1, 2, 3, 4));
+ }
+
void assertCharacteristics(Collection<?> c, int expectedCharacteristics) {
assertCharacteristics(c.spliterator(), expectedCharacteristics);
}
--- a/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
* @test
* @summary Spliterator traversing and splitting tests
* @run testng SpliteratorTraversingAndSplittingTest
+ * @bug 8020016
*/
import org.testng.annotations.DataProvider;
@@ -386,11 +387,23 @@
db.addCollection(CopyOnWriteArraySet::new);
- if (size == 1) {
+ if (size == 0) {
+ db.addCollection(c -> Collections.<Integer>emptySet());
+ db.addList(c -> Collections.<Integer>emptyList());
+ }
+ else if (size == 1) {
db.addCollection(c -> Collections.singleton(exp.get(0)));
db.addCollection(c -> Collections.singletonList(exp.get(0)));
}
+ {
+ Integer[] ai = new Integer[size];
+ Arrays.fill(ai, 1);
+ db.add(String.format("Collections.nCopies(%d, 1)", exp.size()),
+ Arrays.asList(ai),
+ () -> Collections.nCopies(exp.size(), 1).spliterator());
+ }
+
// Collections.synchronized/unmodifiable/checked wrappers
db.addCollection(Collections::unmodifiableCollection);
db.addCollection(c -> Collections.unmodifiableSet(new HashSet<>(c)));
@@ -454,6 +467,13 @@
db.addMap(ConcurrentHashMap::new);
db.addMap(ConcurrentSkipListMap::new);
+
+ if (size == 0) {
+ db.addMap(m -> Collections.<Integer, Integer>emptyMap());
+ }
+ else if (size == 1) {
+ db.addMap(m -> Collections.singletonMap(exp.get(0), exp.get(0)));
+ }
}
return spliteratorDataProvider = data.toArray(new Object[0][]);
--- a/jdk/test/java/util/StringJoiner/MergeTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/StringJoiner/MergeTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 8017231
+ * @bug 8017231 8020977
* @summary test StringJoiner::merge
* @run testng MergeTest
*/
@@ -121,4 +121,13 @@
sj.merge(other);
assertEquals(sj.toString(), "{a,b,c,d:e:f}");
}
-}
\ No newline at end of file
+
+ public void testMergeSelf() {
+ final StringJoiner sj = new StringJoiner(",", "[", "]").add("a").add("b");
+ assertEquals(sj.merge(sj).toString(), "[a,b,a,b]");
+ assertEquals(sj.merge(sj).toString(), "[a,b,a,b,a,b,a,b]");
+
+ final StringJoiner sj2 = new StringJoiner(",").add("c").add("d");
+ assertEquals(sj2.merge(sj2).toString(), "c,d,c,d");
+ }
+}
--- a/jdk/test/java/util/concurrent/CompletableFuture/Basic.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/concurrent/CompletableFuture/Basic.java Mon Aug 12 09:29:06 2013 -0400
@@ -34,6 +34,8 @@
/*
* @test
* @bug 8005696
+ * @run main Basic
+ * @run main/othervm -Djava.util.concurrent.ForkJoinPool.common.parallelism=0 Basic
* @summary Basic tests for CompletableFuture
* @author Chris Hegarty
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/jar/JarInputStream/ExtraFileInMetaInf.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8021788
+ * @summary JarInputStream doesn't provide certificates for some file under META-INF
+ */
+
+import java.util.jar.*;
+import java.io.*;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+public class ExtraFileInMetaInf {
+ public static void main(String args[]) throws Exception {
+
+ // Create a zip file with 2 entries
+ try (ZipOutputStream zos =
+ new ZipOutputStream(new FileOutputStream("x.jar"))) {
+ zos.putNextEntry(new ZipEntry("META-INF/SUB/file"));
+ zos.write(new byte[10]);
+ zos.putNextEntry(new ZipEntry("x"));
+ zos.write(new byte[10]);
+ zos.close();
+ }
+
+ // Sign it
+ new File("ks").delete();
+ sun.security.tools.keytool.Main.main(
+ ("-keystore ks -storepass changeit -keypass changeit " +
+ "-alias a -dname CN=A -genkeypair").split(" "));
+ sun.security.tools.jarsigner.Main.main(
+ "-keystore ks -storepass changeit x.jar a".split(" "));
+
+ // Check if the entries are signed
+ try (JarInputStream jis =
+ new JarInputStream(new FileInputStream("x.jar"))) {
+ JarEntry je;
+ while ((je = jis.getNextJarEntry()) != null) {
+ String name = je.toString();
+ if (name.equals("META-INF/SUB/file") || name.equals("x")) {
+ while (jis.read(new byte[1000]) >= 0);
+ if (je.getCertificates() == null) {
+ throw new Exception(name + " not signed");
+ }
+ }
+ }
+ }
+ }
+}
--- a/jdk/test/java/util/stream/bootlib/java/util/stream/SpliteratorTestHelper.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/stream/bootlib/java/util/stream/SpliteratorTestHelper.java Mon Aug 12 09:29:06 2013 -0400
@@ -22,6 +22,8 @@
*/
package java.util.stream;
+import org.testng.annotations.Test;
+
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collection;
@@ -154,6 +156,7 @@
Collection<T> exp = Collections.unmodifiableList(fromForEach);
+ testNullPointerException(supplier);
testForEach(exp, supplier, boxingAdapter, asserter);
testTryAdvance(exp, supplier, boxingAdapter, asserter);
testMixedTryAdvanceForEach(exp, supplier, boxingAdapter, asserter);
@@ -166,6 +169,31 @@
//
+ private static <T, S extends Spliterator<T>> void testNullPointerException(Supplier<S> s) {
+ S sp = s.get();
+ // Have to check instances and use casts to avoid tripwire messages and
+ // directly test the primitive methods
+ if (sp instanceof Spliterator.OfInt) {
+ Spliterator.OfInt psp = (Spliterator.OfInt) sp;
+ executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((IntConsumer) null));
+ executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((IntConsumer) null));
+ }
+ else if (sp instanceof Spliterator.OfLong) {
+ Spliterator.OfLong psp = (Spliterator.OfLong) sp;
+ executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((LongConsumer) null));
+ executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((LongConsumer) null));
+ }
+ else if (sp instanceof Spliterator.OfDouble) {
+ Spliterator.OfDouble psp = (Spliterator.OfDouble) sp;
+ executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((DoubleConsumer) null));
+ executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((DoubleConsumer) null));
+ }
+ else {
+ executeAndCatch(NullPointerException.class, () -> sp.forEachRemaining(null));
+ executeAndCatch(NullPointerException.class, () -> sp.tryAdvance(null));
+ }
+ }
+
private static <T, S extends Spliterator<T>> void testForEach(
Collection<T> exp,
Supplier<S> supplier,
@@ -573,6 +601,23 @@
}
}
+ private static void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
+ Exception caught = null;
+ try {
+ r.run();
+ }
+ catch (Exception e) {
+ caught = e;
+ }
+
+ assertNotNull(caught,
+ String.format("No Exception was thrown, expected an Exception of %s to be thrown",
+ expected.getName()));
+ assertTrue(expected.isInstance(caught),
+ String.format("Exception thrown %s not an instance of %s",
+ caught.getClass().getName(), expected.getName()));
+ }
+
static<U> void mixedTraverseAndSplit(Consumer<U> b, Spliterator<U> splTop) {
Spliterator<U> spl1, spl2, spl3;
splTop.tryAdvance(b);
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/FillableStringTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/FillableStringTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -40,17 +40,17 @@
}
public void testStringBuilder() {
- String s = generate().collect(Collectors.toStringBuilder()).toString();
+ String s = generate().collect(Collectors.joining());
assertEquals(s, "THREEFOURFIVE");
}
public void testStringBuffer() {
- String s = generate().collect(Collectors.toStringBuilder()).toString();
+ String s = generate().collect(Collectors.joining());
assertEquals(s, "THREEFOURFIVE");
}
public void testStringJoiner() {
- String s = generate().collect(Collectors.toStringJoiner("-")).toString();
+ String s = generate().collect(Collectors.joining("-"));
assertEquals(s, "THREE-FOUR-FIVE");
}
}
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ConcatOpTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ConcatOpTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -22,6 +22,8 @@
*/
package org.openjdk.tests.java.util.stream;
+import java.util.Spliterator;
+import java.util.stream.BaseStream;
import java.util.stream.OpTestCase;
import java.util.stream.StreamTestDataProvider;
@@ -34,16 +36,107 @@
import java.util.stream.TestData;
import static java.util.stream.LambdaTestHelpers.*;
+import static org.testng.Assert.assertEquals;
+/**
+ * @test
+ * @bug 8021863
+ */
public class ConcatOpTest extends OpTestCase {
// Sanity to make sure all type of stream source works
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
- public void testOpsSequential(String name, TestData.OfRef<Integer> data) {
+ public void testOps(String name, TestData.OfRef<Integer> data) {
exerciseOpsInt(data,
s -> Stream.concat(s, data.stream()),
s -> IntStream.concat(s, data.stream().mapToInt(Integer::intValue)),
s -> LongStream.concat(s, data.stream().mapToLong(Integer::longValue)),
s -> DoubleStream.concat(s, data.stream().mapToDouble(Integer::doubleValue)));
}
+
+ public void testSize() {
+ assertSized(Stream.concat(
+ LongStream.range(0, Long.MAX_VALUE / 2).boxed(),
+ LongStream.range(0, Long.MAX_VALUE / 2).boxed()));
+
+ assertUnsized(Stream.concat(
+ LongStream.range(0, Long.MAX_VALUE).boxed(),
+ LongStream.range(0, Long.MAX_VALUE).boxed()));
+
+ assertUnsized(Stream.concat(
+ LongStream.range(0, Long.MAX_VALUE).boxed(),
+ Stream.iterate(0, i -> i + 1)));
+
+ assertUnsized(Stream.concat(
+ Stream.iterate(0, i -> i + 1),
+ LongStream.range(0, Long.MAX_VALUE).boxed()));
+ }
+
+ public void testLongSize() {
+ assertSized(LongStream.concat(
+ LongStream.range(0, Long.MAX_VALUE / 2),
+ LongStream.range(0, Long.MAX_VALUE / 2)));
+
+ assertUnsized(LongStream.concat(
+ LongStream.range(0, Long.MAX_VALUE),
+ LongStream.range(0, Long.MAX_VALUE)));
+
+ assertUnsized(LongStream.concat(
+ LongStream.range(0, Long.MAX_VALUE),
+ LongStream.iterate(0, i -> i + 1)));
+
+ assertUnsized(LongStream.concat(
+ LongStream.iterate(0, i -> i + 1),
+ LongStream.range(0, Long.MAX_VALUE)));
+ }
+
+ public void testIntSize() {
+ assertSized(IntStream.concat(
+ IntStream.range(0, Integer.MAX_VALUE),
+ IntStream.range(0, Integer.MAX_VALUE)));
+
+ assertUnsized(IntStream.concat(
+ LongStream.range(0, Long.MAX_VALUE).mapToInt(i -> (int) i),
+ LongStream.range(0, Long.MAX_VALUE).mapToInt(i -> (int) i)));
+
+ assertUnsized(IntStream.concat(
+ LongStream.range(0, Long.MAX_VALUE).mapToInt(i -> (int) i),
+ IntStream.iterate(0, i -> i + 1)));
+
+ assertUnsized(IntStream.concat(
+ IntStream.iterate(0, i -> i + 1),
+ LongStream.range(0, Long.MAX_VALUE).mapToInt(i -> (int) i)));
+ }
+
+ public void testDoubleSize() {
+ assertSized(DoubleStream.concat(
+ IntStream.range(0, Integer.MAX_VALUE).mapToDouble(i -> i),
+ IntStream.range(0, Integer.MAX_VALUE).mapToDouble(i -> i)));
+
+ assertUnsized(DoubleStream.concat(
+ LongStream.range(0, Long.MAX_VALUE).mapToDouble(i -> i),
+ LongStream.range(0, Long.MAX_VALUE).mapToDouble(i -> i)));
+
+ assertUnsized(DoubleStream.concat(
+ LongStream.range(0, Long.MAX_VALUE).mapToDouble(i -> i),
+ DoubleStream.iterate(0, i -> i + 1)));
+
+ assertUnsized(DoubleStream.concat(
+ DoubleStream.iterate(0, i -> i + 1),
+ LongStream.range(0, Long.MAX_VALUE).mapToDouble(i -> i)));
+ }
+
+ void assertUnsized(BaseStream<?, ?> s) {
+ Spliterator<?> sp = s.spliterator();
+
+ assertFalse(sp.hasCharacteristics(Spliterator.SIZED | Spliterator.SUBSIZED));
+ assertEquals(sp.estimateSize(), Long.MAX_VALUE);
+ }
+
+ void assertSized(BaseStream<?, ?> s) {
+ Spliterator<?> sp = s.spliterator();
+
+ assertTrue(sp.hasCharacteristics(Spliterator.SIZED | Spliterator.SUBSIZED));
+ assertTrue(sp.estimateSize() < Long.MAX_VALUE);
+ }
}
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/GroupByOpTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/GroupByOpTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -36,7 +36,6 @@
import java.util.stream.LambdaTestHelpers;
import java.util.stream.OpTestCase;
import java.util.stream.Stream;
-import java.util.stream.StreamOpFlagTestHelper;
import java.util.stream.StreamTestDataProvider;
import java.util.stream.TestData;
@@ -59,13 +58,14 @@
public class GroupByOpTest extends OpTestCase {
public void testBypassCollect() {
- Collector<Integer, Map<Boolean, List<Integer>>> collector
- = Collectors.groupingBy(LambdaTestHelpers.forPredicate(pEven, true, false));
+ @SuppressWarnings("unchecked")
+ Collector<Integer, Map<Boolean, List<Integer>>, Map<Boolean, List<Integer>>> collector
+ = (Collector<Integer, Map<Boolean, List<Integer>>, Map<Boolean, List<Integer>>>) Collectors.groupingBy(LambdaTestHelpers.forPredicate(pEven, true, false));
- Map<Boolean, List<Integer>> m = collector.resultSupplier().get();
+ Map<Boolean, List<Integer>> m = collector.supplier().get();
int[] ints = countTo(10).stream().mapToInt(e -> (int) e).toArray();
for (int i : ints)
- m = collector.accumulator().apply(m, i);
+ collector.accumulator().accept(m, i);
assertEquals(2, m.keySet().size());
for(Collection<Integer> group : m.values()) {
@@ -130,7 +130,7 @@
// - Total number of values equals size of data
for (MapperData<Integer, ?> md : getMapperData(data)) {
- Collector<Integer, Map<Object, List<Integer>>> tab = Collectors.groupingBy(md.m);
+ Collector<Integer, ?, Map<Object, List<Integer>>> tab = Collectors.groupingBy(md.m);
Map<Object, List<Integer>> result =
withData(data)
.terminal(s -> s, s -> s.collect(tab))
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SummaryStatisticsTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/SummaryStatisticsTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -43,9 +43,9 @@
public class SummaryStatisticsTest extends OpTestCase {
public void testIntStatistics() {
List<IntSummaryStatistics> instances = new ArrayList<>();
- instances.add(countTo(1000).stream().collect(Collectors.toIntSummaryStatistics(i -> i)));
+ instances.add(countTo(1000).stream().collect(Collectors.summarizingInt(i -> i)));
instances.add(countTo(1000).stream().mapToInt(i -> i).summaryStatistics());
- instances.add(countTo(1000).parallelStream().collect(Collectors.toIntSummaryStatistics(i -> i)));
+ instances.add(countTo(1000).parallelStream().collect(Collectors.summarizingInt(i -> i)));
instances.add(countTo(1000).parallelStream().mapToInt(i -> i).summaryStatistics());
for (IntSummaryStatistics stats : instances) {
@@ -58,9 +58,9 @@
public void testLongStatistics() {
List<LongSummaryStatistics> instances = new ArrayList<>();
- instances.add(countTo(1000).stream().collect(Collectors.toLongSummaryStatistics(i -> i)));
+ instances.add(countTo(1000).stream().collect(Collectors.summarizingLong(i -> i)));
instances.add(countTo(1000).stream().mapToLong(i -> i).summaryStatistics());
- instances.add(countTo(1000).parallelStream().collect(Collectors.toLongSummaryStatistics(i -> i)));
+ instances.add(countTo(1000).parallelStream().collect(Collectors.summarizingLong(i -> i)));
instances.add(countTo(1000).parallelStream().mapToLong(i -> i).summaryStatistics());
for (LongSummaryStatistics stats : instances) {
@@ -73,9 +73,9 @@
public void testDoubleStatistics() {
List<DoubleSummaryStatistics> instances = new ArrayList<>();
- instances.add(countTo(1000).stream().collect(Collectors.toDoubleSummaryStatistics(i -> i)));
+ instances.add(countTo(1000).stream().collect(Collectors.summarizingDouble(i -> i)));
instances.add(countTo(1000).stream().mapToDouble(i -> i).summaryStatistics());
- instances.add(countTo(1000).parallelStream().collect(Collectors.toDoubleSummaryStatistics(i -> i)));
+ instances.add(countTo(1000).parallelStream().collect(Collectors.summarizingDouble(i -> i)));
instances.add(countTo(1000).parallelStream().mapToDouble(i -> i).summaryStatistics());
for (DoubleSummaryStatistics stats : instances) {
--- a/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/TabulatorsTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/stream/test/org/openjdk/tests/java/util/stream/TabulatorsTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,13 +23,17 @@
package org.openjdk.tests.java.util.stream;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
+import java.util.Set;
+import java.util.StringJoiner;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
@@ -53,7 +57,10 @@
import static java.util.stream.Collectors.partitioningBy;
import static java.util.stream.Collectors.reducing;
import static java.util.stream.Collectors.toCollection;
+import static java.util.stream.Collectors.toConcurrentMap;
import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.toMap;
+import static java.util.stream.Collectors.toSet;
import static java.util.stream.LambdaTestHelpers.assertContents;
import static java.util.stream.LambdaTestHelpers.assertContentsUnordered;
import static java.util.stream.LambdaTestHelpers.mDoubler;
@@ -65,16 +72,6 @@
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public class TabulatorsTest extends OpTestCase {
- // There are 8 versions of groupingBy:
- // groupingBy: { map supplier, not } x { downstream collector, not } x { concurrent, not }
- // There are 2 versions of partition: { map supplier, not }
- // There are 4 versions of toMap
- // mappedTo(function, mapSupplier?, mergeFunction?)
- // Each variety needs at least one test
- // Plus a variety of multi-level tests (groupBy(..., partition), partition(..., groupBy))
- // Plus negative tests for mapping to null
- // Each test should be matched by a nest of asserters (see TabulationAssertion...)
-
private static abstract class TabulationAssertion<T, U> {
abstract void assertValue(U value,
@@ -101,7 +98,7 @@
boolean ordered) throws ReflectiveOperationException {
if (!clazz.isAssignableFrom(map.getClass()))
fail(String.format("Class mismatch in GroupedMapAssertion: %s, %s", clazz, map.getClass()));
- assertContentsUnordered(map.keySet(), source.get().map(classifier).collect(Collectors.toSet()));
+ assertContentsUnordered(map.keySet(), source.get().map(classifier).collect(toSet()));
for (Map.Entry<K, ? extends V> entry : map.entrySet()) {
K key = entry.getKey();
downstream.assertValue(entry.getValue(),
@@ -111,6 +108,39 @@
}
}
+ static class ToMapAssertion<T, K, V, M extends Map<K,V>> extends TabulationAssertion<T, M> {
+ private final Class<? extends Map> clazz;
+ private final Function<T, K> keyFn;
+ private final Function<T, V> valueFn;
+ private final BinaryOperator<V> mergeFn;
+
+ ToMapAssertion(Function<T, K> keyFn,
+ Function<T, V> valueFn,
+ BinaryOperator<V> mergeFn,
+ Class<? extends Map> clazz) {
+ this.clazz = clazz;
+ this.keyFn = keyFn;
+ this.valueFn = valueFn;
+ this.mergeFn = mergeFn;
+ }
+
+ @Override
+ void assertValue(M map, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException {
+ Set<K> uniqueKeys = source.get().map(keyFn).collect(toSet());
+ assertTrue(clazz.isAssignableFrom(map.getClass()));
+ assertEquals(uniqueKeys, map.keySet());
+ source.get().forEach(t -> {
+ K key = keyFn.apply(t);
+ V v = source.get()
+ .filter(e -> key.equals(keyFn.apply(e)))
+ .map(valueFn)
+ .reduce(mergeFn)
+ .get();
+ assertEquals(map.get(key), v);
+ });
+ }
+ }
+
static class PartitionAssertion<T, D> extends TabulationAssertion<T, Map<Boolean,D>> {
private final Predicate<T> predicate;
private final TabulationAssertion<T,D> downstream;
@@ -204,7 +234,7 @@
private <T> ResultAsserter<T> mapTabulationAsserter(boolean ordered) {
return (act, exp, ord, par) -> {
- if (par & (!ordered || !ord)) {
+ if (par && (!ordered || !ord)) {
TabulatorsTest.nestedMapEqualityAssertion(act, exp);
}
else {
@@ -215,7 +245,7 @@
private<T, M extends Map>
void exerciseMapTabulation(TestData<T, Stream<T>> data,
- Collector<T, ? extends M> collector,
+ Collector<T, ?, ? extends M> collector,
TabulationAssertion<T, M> assertion)
throws ReflectiveOperationException {
boolean ordered = !collector.characteristics().contains(Collector.Characteristics.UNORDERED);
@@ -248,6 +278,172 @@
assertEquals(o1, o2);
}
+ private<T, R> void assertCollect(TestData.OfRef<T> data,
+ Collector<T, ?, R> collector,
+ Function<Stream<T>, R> streamReduction) {
+ R check = streamReduction.apply(data.stream());
+ withData(data).terminal(s -> s.collect(collector)).expectedResult(check).exercise();
+ }
+
+ @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+ public void testReduce(String name, TestData.OfRef<Integer> data) throws ReflectiveOperationException {
+ assertCollect(data, Collectors.reducing(0, Integer::sum),
+ s -> s.reduce(0, Integer::sum));
+ assertCollect(data, Collectors.reducing(Integer.MAX_VALUE, Integer::min),
+ s -> s.min(Integer::compare).orElse(Integer.MAX_VALUE));
+ assertCollect(data, Collectors.reducing(Integer.MIN_VALUE, Integer::max),
+ s -> s.max(Integer::compare).orElse(Integer.MIN_VALUE));
+
+ assertCollect(data, Collectors.reducing(Integer::sum),
+ s -> s.reduce(Integer::sum));
+ assertCollect(data, Collectors.minBy(Comparator.naturalOrder()),
+ s -> s.min(Integer::compare));
+ assertCollect(data, Collectors.maxBy(Comparator.naturalOrder()),
+ s -> s.max(Integer::compare));
+
+ assertCollect(data, Collectors.reducing(0, x -> x*2, Integer::sum),
+ s -> s.map(x -> x*2).reduce(0, Integer::sum));
+
+ assertCollect(data, Collectors.summingLong(x -> x * 2L),
+ s -> s.map(x -> x*2L).reduce(0L, Long::sum));
+ assertCollect(data, Collectors.summingInt(x -> x * 2),
+ s -> s.map(x -> x*2).reduce(0, Integer::sum));
+ assertCollect(data, Collectors.summingDouble(x -> x * 2.0d),
+ s -> s.map(x -> x * 2.0d).reduce(0.0d, Double::sum));
+
+ assertCollect(data, Collectors.averagingInt(x -> x * 2),
+ s -> s.mapToInt(x -> x * 2).average().orElse(0));
+ assertCollect(data, Collectors.averagingLong(x -> x * 2),
+ s -> s.mapToLong(x -> x * 2).average().orElse(0));
+ assertCollect(data, Collectors.averagingDouble(x -> x * 2),
+ s -> s.mapToDouble(x -> x * 2).average().orElse(0));
+
+ // Test explicit Collector.of
+ Collector<Integer, long[], Double> avg2xint = Collector.of(() -> new long[2],
+ (a, b) -> {
+ a[0] += b * 2;
+ a[1]++;
+ },
+ (a, b) -> {
+ a[0] += b[0];
+ a[1] += b[1];
+ return a;
+ },
+ a -> a[1] == 0 ? 0.0d : (double) a[0] / a[1]);
+ assertCollect(data, avg2xint,
+ s -> s.mapToInt(x -> x * 2).average().orElse(0));
+ }
+
+ @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+ public void testJoin(String name, TestData.OfRef<Integer> data) throws ReflectiveOperationException {
+ withData(data)
+ .terminal(s -> s.map(Object::toString).collect(Collectors.joining()))
+ .expectedResult(join(data, ""))
+ .exercise();
+
+ Collector<String, StringBuilder, String> likeJoining = Collector.of(StringBuilder::new, StringBuilder::append, (sb1, sb2) -> sb1.append(sb2.toString()), StringBuilder::toString);
+ withData(data)
+ .terminal(s -> s.map(Object::toString).collect(likeJoining))
+ .expectedResult(join(data, ""))
+ .exercise();
+
+ withData(data)
+ .terminal(s -> s.map(Object::toString).collect(Collectors.joining(",")))
+ .expectedResult(join(data, ","))
+ .exercise();
+
+ withData(data)
+ .terminal(s -> s.map(Object::toString).collect(Collectors.joining(",", "[", "]")))
+ .expectedResult("[" + join(data, ",") + "]")
+ .exercise();
+
+ withData(data)
+ .terminal(s -> s.map(Object::toString)
+ .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append)
+ .toString())
+ .expectedResult(join(data, ""))
+ .exercise();
+
+ withData(data)
+ .terminal(s -> s.map(Object::toString)
+ .collect(() -> new StringJoiner(","),
+ (sj, cs) -> sj.add(cs),
+ (j1, j2) -> j1.merge(j2))
+ .toString())
+ .expectedResult(join(data, ","))
+ .exercise();
+
+ withData(data)
+ .terminal(s -> s.map(Object::toString)
+ .collect(() -> new StringJoiner(",", "[", "]"),
+ (sj, cs) -> sj.add(cs),
+ (j1, j2) -> j1.merge(j2))
+ .toString())
+ .expectedResult("[" + join(data, ",") + "]")
+ .exercise();
+ }
+
+ private<T> String join(TestData.OfRef<T> data, String delim) {
+ StringBuilder sb = new StringBuilder();
+ boolean first = true;
+ for (T i : data) {
+ if (!first)
+ sb.append(delim);
+ sb.append(i.toString());
+ first = false;
+ }
+ return sb.toString();
+ }
+
+ @Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
+ public void testSimpleToMap(String name, TestData.OfRef<Integer> data) throws ReflectiveOperationException {
+ Function<Integer, Integer> keyFn = i -> i * 2;
+ Function<Integer, Integer> valueFn = i -> i * 4;
+
+ List<Integer> dataAsList = Arrays.asList(data.stream().toArray(Integer[]::new));
+ Set<Integer> dataAsSet = new HashSet<>(dataAsList);
+
+ BinaryOperator<Integer> sum = Integer::sum;
+ for (BinaryOperator<Integer> op : Arrays.asList((u, v) -> u,
+ (u, v) -> v,
+ sum)) {
+ try {
+ exerciseMapTabulation(data, toMap(keyFn, valueFn),
+ new ToMapAssertion<>(keyFn, valueFn, op, HashMap.class));
+ if (dataAsList.size() != dataAsSet.size())
+ fail("Expected ISE on input with duplicates");
+ }
+ catch (IllegalStateException e) {
+ if (dataAsList.size() == dataAsSet.size())
+ fail("Expected no ISE on input without duplicates");
+ }
+
+ exerciseMapTabulation(data, toMap(keyFn, valueFn, op),
+ new ToMapAssertion<>(keyFn, valueFn, op, HashMap.class));
+
+ exerciseMapTabulation(data, toMap(keyFn, valueFn, op, TreeMap::new),
+ new ToMapAssertion<>(keyFn, valueFn, op, TreeMap.class));
+ }
+
+ // For concurrent maps, only use commutative merge functions
+ try {
+ exerciseMapTabulation(data, toConcurrentMap(keyFn, valueFn),
+ new ToMapAssertion<>(keyFn, valueFn, sum, ConcurrentHashMap.class));
+ if (dataAsList.size() != dataAsSet.size())
+ fail("Expected ISE on input with duplicates");
+ }
+ catch (IllegalStateException e) {
+ if (dataAsList.size() == dataAsSet.size())
+ fail("Expected no ISE on input without duplicates");
+ }
+
+ exerciseMapTabulation(data, toConcurrentMap(keyFn, valueFn, sum),
+ new ToMapAssertion<>(keyFn, valueFn, sum, ConcurrentHashMap.class));
+
+ exerciseMapTabulation(data, toConcurrentMap(keyFn, valueFn, sum, ConcurrentSkipListMap::new),
+ new ToMapAssertion<>(keyFn, valueFn, sum, ConcurrentSkipListMap.class));
+ }
+
@Test(dataProvider = "StreamTestData<Integer>", dataProviderClass = StreamTestDataProvider.class)
public void testSimpleGroupBy(String name, TestData.OfRef<Integer> data) throws ReflectiveOperationException {
Function<Integer, Integer> classifier = i -> i % 3;
--- a/jdk/test/java/util/zip/TestExtraTime.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/java/util/zip/TestExtraTime.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,14 +23,19 @@
/**
* @test
- * @bug 4759491 6303183 7012868
+ * @bug 4759491 6303183 7012868 8015666
* @summary Test ZOS and ZIS timestamp in extra field correctly
*/
import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.FileTime;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
@@ -41,14 +46,32 @@
File src = new File(System.getProperty("test.src", "."), "TestExtraTime.java");
if (src.exists()) {
- long mtime = src.lastModified();
- test(mtime, null);
- test(10, null); // ms-dos 1980 epoch problem
- test(mtime, TimeZone.getTimeZone("Asia/Shanghai"));
+ long time = src.lastModified();
+ FileTime mtime = FileTime.from(time, TimeUnit.MILLISECONDS);
+ FileTime atime = FileTime.from(time + 300000, TimeUnit.MILLISECONDS);
+ FileTime ctime = FileTime.from(time - 300000, TimeUnit.MILLISECONDS);
+ TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
+
+ test(mtime, null, null, null);
+ // ms-dos 1980 epoch problem
+ test(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null);
+ // non-default tz
+ test(mtime, null, null, tz);
+
+ test(mtime, atime, null, null);
+ test(mtime, null, ctime, null);
+ test(mtime, atime, ctime, null);
+
+ test(mtime, atime, null, tz);
+ test(mtime, null, ctime, tz);
+ test(mtime, atime, ctime, tz);
}
}
- private static void test(long mtime, TimeZone tz) throws Throwable {
+ static void test(FileTime mtime, FileTime atime, FileTime ctime,
+ TimeZone tz) throws Throwable {
+ System.out.printf("--------------------%nTesting: [%s]/[%s]/[%s]%n",
+ mtime, atime, ctime);
TimeZone tz0 = TimeZone.getDefault();
if (tz != null) {
TimeZone.setDefault(tz);
@@ -57,23 +80,55 @@
ZipOutputStream zos = new ZipOutputStream(baos);
ZipEntry ze = new ZipEntry("TestExtreTime.java");
- ze.setTime(mtime);
+ ze.setLastModifiedTime(mtime);
+ if (atime != null)
+ ze.setLastAccessTime(atime);
+ if (ctime != null)
+ ze.setCreationTime(ctime);
zos.putNextEntry(ze);
zos.write(new byte[] { 1,2 ,3, 4});
zos.close();
if (tz != null) {
TimeZone.setDefault(tz0);
}
+ // ZipInputStream
ZipInputStream zis = new ZipInputStream(
new ByteArrayInputStream(baos.toByteArray()));
ze = zis.getNextEntry();
zis.close();
+ check(mtime, atime, ctime, ze);
- System.out.printf("%tc => %tc%n", mtime, ze.getTime());
+ // ZipFile
+ Path zpath = Paths.get(System.getProperty("test.dir", "."),
+ "TestExtraTimp.zip");
+ Files.copy(new ByteArrayInputStream(baos.toByteArray()), zpath);
+ ZipFile zf = new ZipFile(zpath.toFile());
+ ze = zf.getEntry("TestExtreTime.java");
+ // ZipFile read entry from cen, which does not have a/ctime,
+ // for now.
+ check(mtime, null, null, ze);
+ zf.close();
+ Files.delete(zpath);
+ }
- if (TimeUnit.MILLISECONDS.toSeconds(mtime) !=
- TimeUnit.MILLISECONDS.toSeconds(ze.getTime()))
- throw new RuntimeException("Timestamp storing failed!");
-
+ static void check(FileTime mtime, FileTime atime, FileTime ctime,
+ ZipEntry ze) {
+ /*
+ System.out.printf(" mtime [%tc]: [%tc]/[%tc]%n",
+ mtime.to(TimeUnit.MILLISECONDS),
+ ze.getTime(),
+ ze.getLastModifiedTime().to(TimeUnit.MILLISECONDS));
+ */
+ if (mtime.to(TimeUnit.SECONDS) !=
+ ze.getLastModifiedTime().to(TimeUnit.SECONDS))
+ throw new RuntimeException("Timestamp: storing mtime failed!");
+ if (atime != null &&
+ atime.to(TimeUnit.SECONDS) !=
+ ze.getLastAccessTime().to(TimeUnit.SECONDS))
+ throw new RuntimeException("Timestamp: storing atime failed!");
+ if (ctime != null &&
+ ctime.to(TimeUnit.SECONDS) !=
+ ze.getCreationTime().to(TimeUnit.SECONDS))
+ throw new RuntimeException("Timestamp: storing ctime failed!");
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/JpegWriterLeakTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,125 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8020983
+ * @summary Test verifies that jpeg writer instances are collected
+ * even if destroy() or reset() methods is not invoked.
+ *
+ * @run main JpegWriterLeakTest
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Random;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+public class JpegWriterLeakTest {
+
+ public static void main(String[] args) {
+ final ReferenceQueue<ImageWriter> queue = new ReferenceQueue<>();
+ final ArrayList<Reference<? extends ImageWriter>> refs = new ArrayList<>();
+
+ int count = 2;
+
+ do {
+ ImageWriter writer =
+ ImageIO.getImageWritersByFormatName("jpeg").next();
+
+ final WeakReference<? extends ImageWriter> ref =
+ new WeakReference<>(writer, queue);
+
+ refs.add(ref);
+
+
+ try {
+ final ImageOutputStream os =
+ ImageIO.createImageOutputStream(new ByteArrayOutputStream());
+ writer.setOutput(os);
+
+ writer.write(getImage());
+
+
+ // NB: dispose() or reset() workarounds the problem.
+ } catch (IOException e) {
+ } finally {
+ writer = null;
+ }
+ count--;
+ } while (count > 0);
+
+
+ System.out.println("Wait for GC...");
+
+ final long testTimeOut = 60000L;
+
+ final long startTime = System.currentTimeMillis();
+
+ while (!refs.isEmpty()) {
+ // check for the test timeout
+ final long now = System.currentTimeMillis();
+
+ if (now - startTime > testTimeOut) {
+ System.out.println();
+ throw new RuntimeException("Test FAILED.");
+ }
+
+ System.gc();
+
+ try {
+ System.out.print(".");
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ };
+
+ Reference<? extends ImageWriter> r = queue.poll();
+ if (r != null) {
+ System.out.println("Got reference: " + r);
+ refs.remove(r);
+ }
+ }
+ System.out.println("Test PASSED.");
+ }
+
+ private static BufferedImage getImage() {
+ int width = 2500;
+ int height = new Random().nextInt(2500) + 1;
+ BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+
+ Graphics2D g = image.createGraphics();
+ g.setColor(Color.blue);
+ g.fillRect(0, 0, width, height);
+
+ return image;
+ }
+}
--- a/jdk/test/javax/print/DialogMargins.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/javax/print/DialogMargins.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,11 +25,12 @@
/**
* @test
- * @bug 4485755 6361370 6448717 5080051 6939417
+ * @bug 4485755 6361370 6448717 5080051 6939417 8016343
* @summary dialog doesn't have way to specify margins
* for 6361370, verify exception for offline printer in Windows
* for 6448717, faster display of print dialog
* for 6500903, verify status of printer if accepting jobs or not
+ * for 8016343, verify printing to non-default printer
* @author prr
* @run main/manual DialogMargins
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/8015300/Test8015300.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,119 @@
+/*
+ * 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 com.sun.java.swing.plaf.windows.WindowsComboBoxUI.WindowsComboBoxEditor;
+import java.awt.Toolkit;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import javax.swing.ComboBoxEditor;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JTextField;
+import javax.swing.UIManager;
+import sun.awt.SunToolkit;
+
+import static javax.swing.SwingUtilities.invokeAndWait;
+import static javax.swing.SwingUtilities.windowForComponent;
+import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
+
+/*
+ * @test
+ * @bug 8015300
+ * @summary Tests that editable combobox select all text
+ * @author Sergey Malenkov
+ */
+
+public class Test8015300 {
+ private static final SunToolkit STK = (SunToolkit) Toolkit.getDefaultToolkit();
+ private static final String[] ITEMS = {
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
+ "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
+
+ private static JComboBox<String> combo;
+
+ public static void main(String[] args) throws Exception {
+ UIManager.LookAndFeelInfo[] array = UIManager.getInstalledLookAndFeels();
+ for (UIManager.LookAndFeelInfo info : array) {
+ UIManager.setLookAndFeel(info.getClassName());
+ System.err.println("L&F: " + info.getName());
+ invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ combo = new JComboBox<>(ITEMS);
+ combo.addItemListener(new ItemListener() {
+ @Override
+ public void itemStateChanged(ItemEvent event) {
+ if (ItemEvent.SELECTED == event.getStateChange() && combo.isEditable()) {
+ ComboBoxEditor editor = combo.getEditor();
+ Object component = editor.getEditorComponent();
+ if (component instanceof JTextField) {
+ JTextField text = (JTextField) component;
+ boolean selected = null != text.getSelectedText();
+
+ StringBuilder sb = new StringBuilder();
+ sb.append(" - ").append(combo.getSelectedIndex());
+ sb.append(": ").append(event.getItem());
+ if (selected) {
+ sb.append("; selected");
+ }
+ System.err.println(sb);
+ if ((editor instanceof WindowsComboBoxEditor) == (null == text.getSelectedText())) {
+ throw new Error("unexpected state of text selection");
+ }
+ }
+ }
+ }
+ });
+ JFrame frame = new JFrame(getClass().getSimpleName());
+ frame.add(combo);
+ frame.pack();
+ frame.setLocationRelativeTo(null);
+ frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ frame.setVisible(true);
+ }
+ });
+ for (int i = 0; i < ITEMS.length; ++i) {
+ select(i, true);
+ select(1, false);
+ }
+ invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ windowForComponent(combo).dispose();
+ }
+ });
+ }
+ }
+
+ private static void select(final int index, final boolean editable) throws Exception {
+ invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ combo.setEditable(editable);
+ combo.setSelectedIndex(index);
+ }
+ });
+ STK.realSync();
+ Thread.sleep(50L);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/synth/Test8015926.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8015926
+ * @summary Tests that there are no NPE during painting
+ * @author Sergey Malenkov
+ */
+
+import javax.swing.JFrame;
+import javax.swing.JTree;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.event.TreeModelEvent;
+import javax.swing.event.TreeModelListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+
+import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
+
+public class Test8015926 implements TreeModelListener, Runnable, Thread.UncaughtExceptionHandler {
+
+ public static void main(String[] args) throws Exception {
+ UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
+ SwingUtilities.invokeAndWait(new Test8015926());
+ Thread.sleep(1000L);
+ }
+
+ private JTree tree;
+
+ @Override
+ public void treeStructureChanged(TreeModelEvent event) {
+ }
+
+ @Override
+ public void treeNodesRemoved(TreeModelEvent event) {
+ }
+
+ @Override
+ public void treeNodesInserted(TreeModelEvent event) {
+ this.tree.expandPath(event.getTreePath());
+ }
+
+ @Override
+ public void treeNodesChanged(TreeModelEvent event) {
+ }
+
+ @Override
+ public void run() {
+ Thread.currentThread().setUncaughtExceptionHandler(this);
+
+ DefaultMutableTreeNode root = new DefaultMutableTreeNode();
+ DefaultMutableTreeNode child = new DefaultMutableTreeNode("Child");
+ DefaultTreeModel model = new DefaultTreeModel(root);
+
+ this.tree = new JTree();
+ this.tree.setModel(model);
+
+ JFrame frame = new JFrame(getClass().getSimpleName());
+ frame.add(this.tree);
+
+ model.addTreeModelListener(this); // frame is not visible yet
+ model.insertNodeInto(child, root, root.getChildCount());
+ model.removeNodeFromParent(child);
+
+ frame.setSize(640, 480);
+ frame.setLocationRelativeTo(null);
+ frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
+ frame.setVisible(true);
+ }
+
+ @Override
+ public void uncaughtException(Thread thread, Throwable exception) {
+ exception.printStackTrace();
+ System.exit(1);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/TransformService/NullParent.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8022120
+ * @summary check that the init and marshalParams methods throw
+ * NullPointerException when the parent parameter is null
+ */
+
+import javax.xml.crypto.dsig.CanonicalizationMethod;
+import javax.xml.crypto.dsig.Transform;
+import javax.xml.crypto.dsig.TransformService;
+
+public class NullParent {
+
+ public static void main(String[] args) throws Exception {
+ String[] transforms = new String[]
+ { Transform.BASE64, Transform.ENVELOPED, Transform.XPATH,
+ Transform.XPATH2, Transform.XSLT,
+ CanonicalizationMethod.EXCLUSIVE,
+ CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS,
+ CanonicalizationMethod.INCLUSIVE,
+ CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS };
+
+ for (String transform : transforms) {
+ System.out.println("Testing " + transform);
+ TransformService ts = TransformService.getInstance(transform,
+ "DOM");
+ try {
+ ts.init(null, null);
+ throw new Exception("init must throw NullPointerException " +
+ "when the parent parameter is null");
+ } catch (NullPointerException npe) { }
+ try {
+ ts.marshalParams(null, null);
+ throw new Exception("marshalParams must throw " +
+ "NullPointerException when the parent " +
+ "parameter is null");
+ } catch (NullPointerException npe) { }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/parsers/8022548/JDK8022548.xml Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<?xml-stylesheet type="text/xsl" href="../resources/style/pagex.xsl"?>
+
+<my:doc xmlns:my="http://www.jenitennison.com/" xmlns="http://www.w3.org/1999/xhtml">
+
+ <p>
+ These pages are all about XSLT, an XML-based language for translating one set of XML into another set of XML, or into HTML. Of course, there are all sorts of <my:link href="#links">other pages</my:link> around that cover XSLT. Jeni's XSLT Pages, though, are dedicated to helping people understand and make the most of using XSLT.
+</p>
+ <p>
+ My warmest thanks to all those people who post interesting problems on <my:link href="http://www.mulberytech.com/xsl/xsl-list/">XSL-List</my:link>, and especially to those of you that have encouraged me to set up this site through your kind emails.
+</p>
+
+</my:doc>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/parsers/8022548/JDK8022548.xsl Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,618 @@
+<?xml version="1.0" encoding='UTF-8'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns:my="http://www.jenitennison.com/"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:html="http://www.w3.org/1999/xhtml"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:dcq="http://purl.org/dc/qualifiers/1.0/"
+ xmlns:vcf="http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-03.txt"
+ xmlns:msxsl="urn:schemas-microsoft-com:xslt"
+ exclude-result-prefixes="rdf dc dcq my html vcf msxsl">
+
+<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ cdata-section-elements="script"
+ indent="no"
+ method="xml"
+ encoding='UTF-8'/>
+
+<xsl:param name="dynamic" select="'true'" />
+<xsl:param name="base" select="'/'" />
+
+<xsl:variable name="supports-document" select="function-available('document')" />
+<xsl:variable name="supports-keys" select="function-available('key')" />
+
+<xsl:variable name="default-title" select='"Jeni's XML Site"' />
+
+<xsl:template match="my:doc">
+ <xsl:variable name="metadata" select="/*/rdf:RDF" />
+ <xsl:variable name="uri" select="$metadata/rdf:Description[1]/@about" />
+ <html>
+ <head>
+ <title>
+ <xsl:call-template name="get-metadata">
+ <xsl:with-param name="what" select="'title'" />
+ <xsl:with-param name="about" select="$uri" />
+ </xsl:call-template>
+ </title>
+ <xsl:call-template name="get-metadata">
+ <xsl:with-param name="what" select="'link'" />
+ <xsl:with-param name="about" select="$uri" />
+ </xsl:call-template>
+ <link rel="alternate" type="text/xml" href="{$uri}" />
+ <xsl:call-template name="get-metadata">
+ <xsl:with-param name="what" select="'rights'" />
+ <xsl:with-param name="about" select="$uri" />
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:if test="$dynamic = 'false'">
+ <p id="xml-link">
+ Try the <a href="{$uri}">XML version</a> of this page.
+ If you have problems with it, consult the
+ <a href="/compatibility.html">compatibility page</a>.
+ </p>
+ </xsl:if>
+ <xsl:apply-templates />
+ <xsl:apply-templates select="." mode="colophon" />
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template match="html:h1">
+ <h1>
+ <xsl:apply-templates />
+ <xsl:call-template name="insert-navigation" />
+ </h1>
+</xsl:template>
+
+<xsl:template name="insert-navigation">
+ <xsl:variable name="metadata" select="/*/rdf:RDF" />
+ <xsl:variable name="uri" select="$metadata/rdf:Description[1]/@about" />
+ <xsl:if test="$uri != concat($base, 'index.xml')">
+ <span id="link-top">
+ <a class="img">
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="$dynamic = 'true'">/index.xml</xsl:when>
+
+ <xsl:otherwise>/index.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <img src="{$base}resources/icons/top.gif" width="29" height="29" />
+ </a>
+ </span>
+ <span id="link-up">
+ <a class="img">
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <xsl:when test="contains($uri, 'index.xml')">
+ <xsl:choose>
+ <xsl:when test="$dynamic = 'true'">../index.xml</xsl:when>
+ <xsl:otherwise>../index.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$dynamic = 'true'">index.xml</xsl:when>
+ <xsl:otherwise>index.html</xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <img src="{$base}resources/icons/up.gif" width="29" height="29" />
+ </a>
+ </span>
+</xsl:if>
+</xsl:template>
+
+
+<xsl:template match="rdf:RDF" />
+
+<xsl:template name="get-metadata">
+ <xsl:param name="what" />
+ <xsl:param name="about" select="/*/rdf:RDF/rdf:Description/@about" />
+ <xsl:variable name="metadata" select="/*/rdf:RDF" />
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="contains($what, '::')">
+ <xsl:value-of select="substring-before($what, '::')" />
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$what" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="mode">
+ <xsl:choose>
+ <xsl:when test="contains($what, '::')">
+ <xsl:value-of select="substring-after($what, '::')" />
+ </xsl:when>
+ <xsl:otherwise />
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:apply-templates select="$metadata/rdf:Description[@about = $about or
+ (@aboutEachPrefix != '' and starts-with($about, @aboutEachPrefix))]/*[local-name() = $type]">
+ <xsl:with-param name="mode" select="$mode" />
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="rdf:Description/*">
+ <xsl:param name="mode" />
+ <xsl:choose>
+ <xsl:when test="@rdf:resource != ''">
+ <xsl:call-template name="get-metadata">
+ <xsl:with-param name="about" select="@rdf:resource" />
+ <xsl:with-param name="what" select="$mode" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$mode = '' and @rdf:value != ''">
+ <xsl:value-of select="@rdf:value" />
+ </xsl:when>
+ <xsl:when test="$mode = '' and *">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="." mode="get-metadata">
+ <xsl:with-param name="mode" select="$mode" />
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="html:link" mode="get-metadata">
+ <link>
+ <xsl:copy-of select="@*" />
+ </link>
+</xsl:template>
+
+<xsl:template match="dc:rights" mode="get-metadata">
+ <xsl:comment>
+ <xsl:value-of select="." />
+ </xsl:comment>
+</xsl:template>
+
+<xsl:template match="dc:date" mode="get-metadata">
+ <xsl:param name="mode" select="''" />
+ <xsl:if test="$mode = @dcq:dateType">
+ <xsl:value-of select="@rdf:value" />
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="vcf:vCard" mode="get-metadata">
+ <xsl:param name="mode" select="''" />
+ <xsl:choose>
+ <xsl:when test="$mode = 'mailto-link'">
+ <xsl:call-template name="link">
+ <xsl:with-param name="link">
+ <xsl:choose>
+ <xsl:when test="vcf:email[contains(@email.type, 'PREF')]">
+ <xsl:value-of select="vcf:email[contains(@email.type, 'PREF')]" />
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="vcf:email[1]" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="value">
+ <xsl:apply-templates select="vcf:n" mode="full" />
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$mode = 'name'">
+ <xsl:apply-templates select="vcf:n" mode="full" />
+ </xsl:when>
+ <xsl:otherwise />
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="vcf:n" mode="full">
+ <xsl:if test="vcf:prefix">
+ <xsl:value-of select="vcf:prefix" /><xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="../vcf:nickname">
+ <xsl:value-of select="../vcf:nickname" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="vcf:given" />
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="vcf:family" />
+</xsl:template>
+
+<xsl:template match="html:*">
+ <xsl:element name="{local-name()}">
+ <xsl:copy-of select="@*" />
+ <xsl:apply-templates />
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="my:vars">
+ <dl>
+ <xsl:apply-templates />
+ </dl>
+</xsl:template>
+
+<xsl:template match="my:var">
+ <dt id="{translate(my:name, ' ', '-')}">
+ <xsl:text/>$<xsl:value-of select="my:name" />
+ <xsl:choose>
+ <xsl:when test="my:value">
+ <xsl:text/> = <xsl:apply-templates select="my:value" />
+ </xsl:when>
+ <xsl:when test="my:default">
+ <xsl:text/> [= <xsl:apply-templates select="my:default" />]<xsl:text/>
+ </xsl:when>
+ </xsl:choose>
+ </dt>
+ <dd>
+ <xsl:if test="my:desc"><xsl:apply-templates select="my:desc" /></xsl:if>
+ <xsl:if test="my:option">
+ <ul>
+ <xsl:apply-templates select="my:option" />
+ </ul>
+ </xsl:if>
+ <xsl:apply-templates select="my:defn" />
+ </dd>
+</xsl:template>
+
+<xsl:template match="my:option">
+ <li><xsl:apply-templates select="my:value" />: <xsl:apply-templates select="my:desc" /></li>
+</xsl:template>
+
+<xsl:template match="my:value | my:default">
+ <xsl:choose>
+ <xsl:when test="@type">
+ <span class="{@type}">
+ <xsl:choose>
+ <xsl:when test="@type = 'string'">'<xsl:value-of select="." />'</xsl:when>
+ <xsl:when test="@type = 'rtf'">"<xsl:value-of select="." />"</xsl:when>
+ <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="." />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="my:post">
+ <div class="post">
+ <xsl:apply-templates />
+ </div>
+</xsl:template>
+
+<xsl:template match="my:response">
+ <div class="response">
+ <xsl:apply-templates />
+ </div>
+</xsl:template>
+
+<xsl:template match="my:question">
+ <div class="question">
+ <p>
+ <xsl:call-template name="insert-icon">
+ <xsl:with-param name="icon" select="'question'" />
+ <xsl:with-param name="active" select="false()" />
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="*[1]/node()" />
+ </p>
+ <xsl:apply-templates select="*[position() > 1]"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="my:example | my:defn">
+ <pre>
+ <xsl:apply-templates />
+ </pre>
+</xsl:template>
+
+<xsl:template match="my:example[parent::my:aside and ancestor::my:example]">
+ <xsl:choose>
+ <xsl:when test="$dynamic = 'true'">
+ <pre>
+ <xsl:apply-templates />
+ </pre>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="example">
+ <xsl:apply-templates />
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="my:example[parent::my:aside and not(ancestor::my:example)]">
+ <xsl:call-template name="split-and-code">
+ <xsl:with-param name="text" select="string(.)" />
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="split-and-code">
+ <xsl:param name="text" />
+ <br />
+ <xsl:choose>
+ <xsl:when test="contains($text, '
')">
+ <code><xsl:value-of select="substring-before($text, '
')" /></code>
+ <xsl:call-template name="split-and-code">
+ <xsl:with-param name="text" select="substring-after($text, '
')" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <code><xsl:value-of select="$text" /></code>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="my:aside">
+ <xsl:choose>
+ <xsl:when test="$dynamic = 'true'">
+ <span class="note"
+ ><img src="{$base}resources/icons/note.gif" height="17" width="13" border="0"
+ style="z-index: 2;"
+ onmouseover="javascript:{generate-id()}.style.visibility='visible';"
+ onmouseout="javascript:{generate-id()}.style.visibility='hidden';"
+ /><span class="popup" id="{generate-id()}"
+ onmouseover="javascript:{generate-id()}.style.visibility='visible';"
+ onmouseout="javascript:{generate-id()}.style.visibility='hidden';">
+ <xsl:apply-templates />
+ </span
+ ></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ <span class="note">[<xsl:apply-templates />]</span>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="my:quote">
+ <blockquote uri="{@href}">
+ <xsl:apply-templates />
+ </blockquote>
+ <p class="byline">
+ <xsl:text>[From </xsl:text>
+ <xsl:call-template name="link">
+ <xsl:with-param name="link" select="@href" />
+ <xsl:with-param name="value">
+ <xsl:value-of select="@href" />
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>]</xsl:text>
+ </p>
+</xsl:template>
+
+<xsl:template match="my:icon">
+ <xsl:call-template name="insert-icon">
+ <xsl:with-param name="icon" select="@name" />
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="insert-icon">
+ <xsl:param name="icon" select="'goto'" />
+ <xsl:param name="active" select="true()" />
+ <img src="{$base}resources/icons/{$icon}.gif" height="28" width="28" border="0">
+ <xsl:attribute name="src">
+ <xsl:value-of select="$base" />
+ <xsl:text>resources/icons/</xsl:text>
+ <xsl:if test="not($active)">click-</xsl:if>
+ <xsl:value-of select="$icon" />
+ <xsl:text>.gif</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="$active">
+ <xsl:attribute name="onmouseover">javascript:this.src='<xsl:value-of select="$base" />resources/icons/over-<xsl:value-of select="$icon" />.gif'</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:this.src='<xsl:value-of select="$base" />resources/icons/click-<xsl:value-of select="$icon" />.gif'</xsl:attribute>
+ <xsl:attribute name="onmouseout">javascript:this.src='<xsl:value-of select="$base" />resources/icons/<xsl:value-of select="$icon" />.gif'</xsl:attribute>
+ </xsl:if>
+ </img>
+</xsl:template>
+
+<xsl:template match="my:links">
+ <xsl:choose>
+ <xsl:when test="parent::html:dd">
+ <xsl:apply-templates select="my:link" mode="list" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="columnise">
+ <xsl:with-param name="max-height" select="3" />
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="columnise">
+ <xsl:param name="max-height" select="5" />
+ <xsl:param name="max-width" select="3" />
+ <xsl:variable name="no-items" select="count(*)" />
+ <xsl:variable name="width">
+ <xsl:choose>
+ <xsl:when test="$no-items > $max-height * $max-width">
+ <xsl:value-of select="$max-width" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="ceiling($no-items div $max-height)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="height" select="ceiling($no-items div $width)" />
+ <table>
+ <colgroup span="{$width}" />
+ <tr>
+ <xsl:for-each select="*[position() = 1 or position() mod $height = 1]">
+ <td>
+ <xsl:apply-templates select=". | following-sibling::*[position() < $height]" mode="list" />
+ </td>
+ </xsl:for-each>
+ </tr>
+ </table>
+</xsl:template>
+
+<xsl:template match="my:link" mode="list">
+ <p class="link">
+ <xsl:call-template name="link">
+ <xsl:with-param name="link" select="@href" />
+ <xsl:with-param name="value">
+ <xsl:value-of select="." />
+ </xsl:with-param>
+ <xsl:with-param name="addicon" select="true()" />
+ </xsl:call-template>
+ </p>
+</xsl:template>
+
+<xsl:template match="my:link">
+ <xsl:apply-templates select="." mode="link" />
+</xsl:template>
+
+<xsl:template match="*[@href][. != '']" mode="link">
+ <xsl:call-template name="link">
+ <xsl:with-param name="link" select="@href" />
+ <xsl:with-param name="value">
+ <xsl:apply-templates />
+ </xsl:with-param>
+ <xsl:with-param name="addicon" select="@addicon" />
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="*[@href][. = '']" mode="link">
+ <xsl:call-template name="link">
+ <xsl:with-param name="link" select="@href" />
+ <xsl:with-param name="value">
+ <xsl:value-of select="@href" />
+ </xsl:with-param>
+ <xsl:with-param name="addicon" select="@addicon" />
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="text()|@*" mode="link">
+ <xsl:call-template name="link">
+ <xsl:with-param name="link" select="." />
+ <xsl:with-param name="value">
+ <xsl:value-of select="." />
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="link">
+ <xsl:param name="link" />
+ <xsl:param name="value" />
+ <xsl:param name="addicon" select="''" />
+ <xsl:variable name="uri">
+ <xsl:call-template name="full-uri">
+ <xsl:with-param name="uri" select="$link" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="class">
+ <xsl:call-template name="uri-class">
+ <xsl:with-param name="uri" select="$uri" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$addicon">
+ <a href="{$uri}">
+ <xsl:attribute name="class">
+ <xsl:text>img </xsl:text>
+ <xsl:value-of select="$class" />
+ </xsl:attribute>
+ <xsl:call-template name="insert-icon">
+ <xsl:with-param name="icon">
+ <xsl:call-template name="icon-type">
+ <xsl:with-param name="uri" select="$uri" />
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <a href="{$uri}">
+ <xsl:if test="$class != ''">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class" />
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$value" />
+ </a>
+</xsl:template>
+
+<xsl:template name="full-uri">
+ <xsl:param name="uri" />
+ <xsl:variable name="partial-uri">
+ <xsl:choose>
+ <xsl:when test="$dynamic='false' and
+ substring($uri, string-length($uri) - 3, 4) = '.xml'">
+ <xsl:value-of select="concat(substring($uri, 1, string-length($uri) - 4), '.html')" />
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$uri" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="starts-with($partial-uri, 'www')">
+ <xsl:text>http://</xsl:text><xsl:value-of select="$partial-uri" />
+ </xsl:when>
+ <xsl:when test="contains($partial-uri, '@') and not(starts-with($partial-uri, 'mailto:'))">
+ <xsl:text>mailto:</xsl:text><xsl:value-of select="$partial-uri" />
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$partial-uri" /></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="uri-class">
+ <xsl:param name="uri" />
+ <xsl:choose>
+ <xsl:when test="starts-with($uri, 'http://') and not(starts-with($uri, $base))">offsite</xsl:when>
+ <xsl:when test="starts-with($uri, 'mailto:')">mailto</xsl:when>
+ <xsl:when test="starts-with($uri, '#')">local</xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="icon-type">
+ <xsl:param name="uri" />
+ <xsl:variable name="url">
+ <xsl:choose>
+ <xsl:when test="starts-with($uri, 'http://')"><xsl:value-of select="substring-after($uri, 'http://')" /></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$uri" /></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="(not(contains($url, '/')) and starts-with($url, 'www.')) or (contains($url, '/') and not(substring-after($url, '/')))">home</xsl:when>
+ <xsl:when test="contains($url, '@')">mail</xsl:when>
+ <xsl:otherwise>goto</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="/*" mode="colophon">
+ <xsl:variable name="metadata" select="/*/rdf:RDF" />
+ <xsl:variable name="uri" select="$metadata/rdf:Description[1]/@about" />
+ <div id="colophon">
+ <hr class="final" />
+ <p>
+ <xsl:apply-templates select="$uri" mode="link" />
+ <xsl:variable name="modified">
+ <xsl:call-template name="get-metadata">
+ <xsl:with-param name="what" select="'date::modified'" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="string($modified)">
+ <xsl:text> last modified </xsl:text>
+ <xsl:copy-of select="$modified" />
+ </xsl:if>
+ <xsl:variable name="creator">
+ <xsl:call-template name="get-metadata">
+ <xsl:with-param name="what" select="'creator::vCard::mailto-link'" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:text> by </xsl:text>
+ <xsl:choose>
+ <xsl:when test="string($creator)">
+ <xsl:copy-of select="$creator" />
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="mailto:mail@jenitennison.com" class="mailto">Jeni Tennison</a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p>
+ </div>
+</xsl:template>
+
+</xsl:stylesheet>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/parsers/8022548/TestBase.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,73 @@
+
+import java.security.Policy;
+
+/**
+ *
+ *
+ * @author huizhe.wang@oracle.com
+ */
+public class TestBase {
+ public String filePath;
+ boolean hasSM;
+ String curdir;
+ Policy origPolicy;
+
+ String testName;
+ String errMsg;
+
+ int passed = 0, failed = 0;
+
+ /**
+ * Creates a new instance of StreamReader
+ */
+ public TestBase(String name) {
+ testName = name;
+ }
+
+ //junit @Override
+ protected void setUp() {
+ if (System.getSecurityManager() != null) {
+ hasSM = true;
+ System.setSecurityManager(null);
+ }
+
+ filePath = System.getProperty("test.src");
+ if (filePath == null) {
+ //current directory
+ filePath = System.getProperty("user.dir");
+ }
+ origPolicy = Policy.getPolicy();
+
+ }
+
+ //junit @Override
+ public void tearDown() {
+ // turn off security manager and restore policy
+ System.setSecurityManager(null);
+ Policy.setPolicy(origPolicy);
+ if (hasSM) {
+ System.setSecurityManager(new SecurityManager());
+ }
+ System.out.println("\nNumber of tests passed: " + passed);
+ System.out.println("Number of tests failed: " + failed + "\n");
+
+ if (errMsg != null ) {
+ throw new RuntimeException(errMsg);
+ }
+ }
+
+ void fail(String msg) {
+ if (errMsg == null) {
+ errMsg = msg;
+ } else {
+ errMsg = errMsg + "\n" + msg;
+ }
+ failed++;
+ }
+
+ void success(String msg) {
+ passed++;
+ System.out.println(msg);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/parsers/8022548/XOMParserTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,127 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test @bug 8022548
+ * @summary test that a parser can use DTDConfiguration
+ * @run main XOMParserTest
+ */
+import com.sun.org.apache.xerces.internal.impl.Constants;
+import com.sun.org.apache.xerces.internal.parsers.*;
+import java.io.*;
+import javax.xml.transform.*;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import org.xml.sax.InputSource;
+
+/**
+ * <p>Test {@link javax.xml.transform.Transformer} for JDK-8022548: SPECJVM2008
+ * has errors introduced in 7u40-b34
+ *
+ * Test XOM is supported after jaxp 1.5 </p>
+ *
+ * @author Joe Wang <huizhe.wang@oracle.com>
+ *
+ */
+public class XOMParserTest extends TestBase {
+
+ public XOMParserTest(String name) {
+ super(name);
+ }
+
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args) {
+ XOMParserTest test = new XOMParserTest("XOM parser test");
+ test.setUp();
+ test.testTransform();
+ test.tearDown();
+ }
+
+ public final void testTransform() {
+
+ try {
+
+ String inFilename = filePath + "/JDK8022548.xml";
+ String xslFilename = filePath + "/JDK8022548.xsl";
+ String outFilename = filePath + "/JDK8022548.out";
+
+ StringWriter sw = new StringWriter();
+ // Create transformer factory
+ TransformerFactory factory = TransformerFactory.newInstance();
+ // set the translet name
+// factory.setAttribute("translet-name", "myTranslet");
+
+ // set the destination directory
+// factory.setAttribute("destination-directory", "c:\\temp");
+// factory.setAttribute("generate-translet", Boolean.TRUE);
+
+ // Use the factory to create a template containing the xsl file
+ Templates template = factory.newTemplates(new StreamSource(new FileInputStream(xslFilename)));
+ // Use the template to create a transformer
+ Transformer xformer = template.newTransformer();
+ // Prepare the input and output files
+ Source source = new StreamSource(new FileInputStream(inFilename));
+ Result result = new StreamResult(new FileOutputStream(outFilename));
+ //Result result = new StreamResult(sw);
+ // Apply the xsl file to the source file and write the result to the output file
+ xformer.transform(source, result);
+
+ /**
+ * String out = sw.toString(); if (out.indexOf("<p>") < 0 ) {
+ * fail(out); }
+ */
+ String canonicalizedFileName = outFilename + ".canonicalized";
+ canonicalize(outFilename, canonicalizedFileName);
+ } catch (Exception e) {
+ // unexpected failure
+ fail(e.getMessage());
+ }
+ }
+
+ public void canonicalize(String inName, String outName) {
+ try (//FileOutputStream outStream = new FileOutputStream(outName);
+ FileInputStream inputStream = new FileInputStream(inName);) {
+ JDK15XML1_0Parser parser = new JDK15XML1_0Parser();
+ parser.parse(new InputSource(inputStream));
+ success("test passed");
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+
+ }
+
+ class JDK15XML1_0Parser extends SAXParser {
+
+ JDK15XML1_0Parser() throws org.xml.sax.SAXException {
+
+ super(new DTDConfiguration());
+ // workaround for Java 1.5 beta 2 bugs
+ com.sun.org.apache.xerces.internal.util.SecurityManager manager =
+ new com.sun.org.apache.xerces.internal.util.SecurityManager();
+ setProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY, manager);
+
+ }
+ }
+}
--- a/jdk/test/jdk/lambda/MethodReferenceTestInstanceMethod.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/jdk/lambda/MethodReferenceTestInstanceMethod.java Mon Aug 12 09:29:06 2013 -0400
@@ -47,7 +47,7 @@
}
public void testStringBuffer() {
- String s = generate().collect(Collectors.toStringBuilder()).toString();
+ String s = generate().collect(Collectors.joining());
assertEquals(s, "THREEFOURFIVE");
}
--- a/jdk/test/jdk/lambda/separate/TestHarness.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/jdk/lambda/separate/TestHarness.java Mon Aug 12 09:29:06 2013 -0400
@@ -119,7 +119,7 @@
Class stub = new Class(specimen.getName(), cm);
String params =
- Arrays.asList(args).stream().collect(Collectors.toStringJoiner(", ")).toString();
+ Arrays.asList(args).stream().collect(Collectors.joining(", ")).toString();
ConcreteMethod sm = new ConcreteMethod(
method.getReturnType(), method.getName(),
@@ -150,7 +150,7 @@
null, Arrays.asList((Method)method));
Class cstub = new Class(specimen.getName());
- String params = Arrays.asList(args).stream().collect(Collectors.toStringJoiner(", ")).toString();
+ String params = Arrays.asList(args).stream().collect(Collectors.joining(", ")).toString();
ConcreteMethod sm = new ConcreteMethod(
"int", SourceModel.stdMethodName,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/awt/image/ImagingLib/SamePackingTypeTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8019201
+ * @summary Test verifies that medialib glue code does not throw
+ * an ImagingOpException for certain pairs of source and
+ * destination images.
+ *
+ * @run main SamePackingTypeTest
+ */
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import static java.awt.image.BufferedImage.TYPE_4BYTE_ABGR;
+import static java.awt.image.BufferedImage.TYPE_4BYTE_ABGR_PRE;
+import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
+import static java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE;
+import java.awt.image.BufferedImageOp;
+import java.awt.image.ConvolveOp;
+import java.awt.image.ImagingOpException;
+import java.awt.image.Kernel;
+import java.util.Arrays;
+
+
+public class SamePackingTypeTest {
+
+ public static void main(String[] args) {
+ BufferedImageOp op = createTestOp();
+
+ try {
+ System.out.print("Integer-based images... ");
+ doTest(op, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE);
+ System.out.println("done.");
+
+ System.out.print("Byte-based images... ");
+ doTest(op, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE);
+ System.out.println("done");
+ } catch (ImagingOpException e) {
+ throw new RuntimeException("Test FAILED", e);
+ }
+ }
+
+ private static void doTest(BufferedImageOp op, int stype, int dtype) {
+ final int size = 100;
+
+ final BufferedImage src = new BufferedImage(size, size, stype);
+ Graphics2D g = src.createGraphics();
+ g.setColor(Color.red);
+ g.fillRect(0, 0, size, size);
+ g.dispose();
+
+
+ final BufferedImage dst = new BufferedImage(size, size, dtype);
+ g = dst.createGraphics();
+ g.setColor(Color.blue);
+ g.fillRect(0, 0, size, size);
+ g.dispose();
+
+ op.filter(src, dst);
+
+ final int rgb = dst.getRGB(size - 1, size - 1);
+ System.out.printf("dst: 0x%X ", rgb);
+
+ if (rgb != 0xFFFF0000) {
+ throw new RuntimeException(String.format("Wrong color in dst: 0x%X", rgb));
+ }
+ }
+
+ private static BufferedImageOp createTestOp() {
+ final int size = 1;
+ final float v = 1f / (size * size);
+ final float[] k_data = new float[size * size];
+ Arrays.fill(k_data, v);
+
+ Kernel k = new Kernel(size, size, k_data);
+ return new ConvolveOp(k);
+ }
+}
--- a/jdk/test/sun/invoke/util/ValueConversionsTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/invoke/util/ValueConversionsTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -35,7 +35,7 @@
/* @test
* @summary unit tests for value-type conversion utilities
- * @ignore This test requires a special compilation environment to access sun.inovke.util. Run by hand.
+ * @compile -XDignore.symbol.file ValueConversionsTest.java
* @run junit/othervm test.sun.invoke.util.ValueConversionsTest
* @run junit/othervm
* -DValueConversionsTest.MAX_ARITY=255 -DValueConversionsTest.START_ARITY=250
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/collator.sh Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,76 @@
+#
+# 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.
+#
+
+# @test
+# @bug 8021789
+# @summary jarsigner parses alias as command line option (depending on locale)
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+ JAVAC_CMD=`which javac`
+ TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+ Windows_* )
+ FS="\\"
+ ;;
+ * )
+ FS="/"
+ ;;
+esac
+
+F=collator
+KS=collator.jks
+JFILE=collator.jar
+
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
+ -keystore $KS"
+JAR=$TESTJAVA${FS}bin${FS}jar
+JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit"
+
+rm $F $KS $JFILE 2> /dev/null
+
+echo 12345 > $F
+$JAR cvf $JFILE $F
+
+ERR=""
+
+$KT -alias debug -dname CN=debug -genkey -validity 300 || ERR="$ERR 1"
+
+# use "debug" as alias name
+$JARSIGNER $JFILE debug || ERR="$ERR 2"
+
+# use "" as alias name (although there will be a warning)
+$JARSIGNER -verify $JFILE "" || ERR="$ERR 3"
+
+if [ "$ERR" = "" ]; then
+ exit 0
+else
+ echo "ERR is $ERR"
+ exit 1
+fi
+
+
--- a/jdk/test/sun/util/calendar/zi/tzdata/VERSION Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/VERSION Mon Aug 12 09:29:06 2013 -0400
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2013c
+tzdata2013d
--- a/jdk/test/sun/util/calendar/zi/tzdata/africa Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/africa Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -875,12 +875,18 @@
# announced that year's Ramadan daylight-saving transitions would be
# 2012-07-20 and 2012-08-20; see
# <http://www.mmsp.gov.ma/fr/actualites.aspx?id=288>.
-#
+
+# From Andrew Paprocki (2013-07-02):
+# Morocco announced that the year's Ramadan daylight-savings
+# transitions would be 2013-07-07 and 2013-08-10; see:
+# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10
+
+# From Paul Eggert (2013-07-03):
# To estimate what the Moroccan government will do in future years,
-# transition dates for 2013 through 2021 were determined by running
+# transition dates for 2014 through 2021 were determined by running
# the following program under GNU Emacs 24.3:
#
-# (let ((islamic-year 1434))
+# (let ((islamic-year 1435))
# (while (< islamic-year 1444)
# (let ((a
# (calendar-gregorian-from-absolute
@@ -933,8 +939,8 @@
Rule Morocco 2012 max - Sep lastSun 3:00 0 -
Rule Morocco 2012 only - Jul 20 3:00 0 -
Rule Morocco 2012 only - Aug 20 2:00 1:00 S
-Rule Morocco 2013 only - Jul 9 3:00 0 -
-Rule Morocco 2013 only - Aug 8 2:00 1:00 S
+Rule Morocco 2013 only - Jul 7 3:00 0 -
+Rule Morocco 2013 only - Aug 10 2:00 1:00 S
Rule Morocco 2014 only - Jun 29 3:00 0 -
Rule Morocco 2014 only - Jul 29 2:00 1:00 S
Rule Morocco 2015 only - Jun 18 3:00 0 -
--- a/jdk/test/sun/util/calendar/zi/tzdata/antarctica Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/antarctica Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/asia Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/asia Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -1235,39 +1235,21 @@
Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D
Rule Zion 2012 only - Sep 23 2:00 0 S
-# From Ephraim Silverberg (2012-10-18):
-# Yesterday, the Interior Ministry Committee, after more than a year
-# past, approved sending the proposed June 2011 changes to the Time
-# Decree Law back to the Knesset for second and third (final) votes
-# before the upcoming elections on Jan. 22, 2013. Hence, although the
-# changes are not yet law, they are expected to be so before February 2013.
+# From Ephraim Silverberg (2013-06-27):
+# On June 23, 2013, the Israeli government approved changes to the
+# Time Decree Law. The next day, the changes passed the First Reading
+# in the Knesset. The law is expected to pass the Second and Third
+# (final) Readings by the beginning of September 2013.
#
-# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March.
-# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the
-# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day
-# later (i.e. at 02:00 the first Monday after October 2).
-# [Rosh Hashana holidays are factored in until 2100.]
-
-# From Ephraim Silverberg (2012-11-05):
-# The Knesset passed today (in second and final readings) the amendment to the
-# Time Decree Law making the changes ... law.
+# As of 2013, DST starts at 02:00 on the Friday before the last Sunday
+# in March. DST ends at 02:00 on the last Sunday of October.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D
-Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S
-Rule Zion 2027 only - Oct Mon>=3 2:00 0 S
-Rule Zion 2028 max - Oct Sun>=2 2:00 0 S
-# The following rules are commented out for now, as they break older
-# versions of zic that support only signed 32-bit timestamps, i.e.,
-# through 2038-01-19 03:14:07 UTC.
-#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S
-#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S
-#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S
-#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S
-#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S
+Rule Zion 2013 max - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Jerusalem 2:20:56 - LMT 1880
+Zone Asia/Jerusalem 2:20:54 - LMT 1880
2:20:40 - JMT 1918 # Jerusalem Mean Time?
2:00 Zion I%sT
@@ -2570,8 +2552,8 @@
Rule Syria 2007 only - Mar lastFri 0:00 1:00 S
# From Jesper Norgard (2007-10-27):
# The sister center ICARDA of my work CIMMYT is confirming that Syria DST will
-# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or
-# rather Midnight between Thursday and Friday. This does make more sence than
+# not take place 1st November at 0:00 o'clock but 1st November at 24:00 or
+# rather Midnight between Thursday and Friday. This does make more sense than
# having it between Wednesday and Thursday (two workdays in Syria) since the
# weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now
# it is implemented at midnight of the last workday before weekend...
--- a/jdk/test/sun/util/calendar/zi/tzdata/australasia Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/australasia Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -253,10 +253,16 @@
# - Macquarie Island will stay on UTC+11 for winter and therefore not
# switch back from daylight savings time when other parts of Australia do
# on 4 April.
+#
+# From Arthur David Olson (2013-05-23):
+# The 1919 transition is overspecified below so pre-2013 zics
+# will produce a binary file with an EST-type as the first 32-bit type;
+# this is required for correct handling of times before 1916 by
+# pre-2013 versions of localtime.
Zone Antarctica/Macquarie 0 - zzz 1899 Nov
10:00 - EST 1916 Oct 1 2:00
10:00 1:00 EST 1917 Feb
- 10:00 Aus EST 1919 Apr
+ 10:00 Aus EST 1919 Apr 1 0:00s
0 - zzz 1948 Mar 25
10:00 Aus EST 1967
10:00 AT EST 2010 Apr 4 3:00
@@ -1498,12 +1504,12 @@
# From Paul Eggert (2000-01-08):
# IATA SSIM (1999-09) says DST ends 0100 local time. Go with McDow.
-# From the BBC World Service (1998-10-31 11:32 UTC):
+# From the BBC World Service in
+# http://news.bbc.co.uk/2/hi/asia-pacific/205226.stm (1998-10-31 16:03 UTC):
# The Fijiian government says the main reasons for the time change is to
-# improve productivity and reduce road accidents. But correspondents say it
-# also hopes the move will boost Fiji's ability to compete with other pacific
-# islands in the effort to attract tourists to witness the dawning of the new
-# millenium.
+# improve productivity and reduce road accidents.... [T]he move is also
+# intended to boost Fiji's ability to attract tourists to witness the dawning
+# of the new millennium.
# http://www.fiji.gov.fj/press/2000_09/2000_09_13-05.shtml (2000-09-13)
# reports that Fiji has discontinued DST.
@@ -1648,7 +1654,7 @@
# Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell.
# From Eric Ulevik (1999-05-03):
-# Tonga's director of tourism, who is also secretary of the National Millenium
+# Tonga's director of tourism, who is also secretary of the National Millennium
# Committee, has a plan to get Tonga back in front.
# He has proposed a one-off move to tropical daylight saving for Tonga from
# October to March, which has won approval in principle from the Tongan
--- a/jdk/test/sun/util/calendar/zi/tzdata/backward Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/backward Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/etcetera Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/etcetera Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/europe Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/europe Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -546,7 +546,7 @@
# It seems that Paris, Monaco, Rule France, Rule Belgium all agree on
# 2:00 standard time, e.g. 3:00 local time. However there are no
# countries that use C-Eur rules in September 1945, so the only items
-# affected are apparently these ficticious zones that translates acronyms
+# affected are apparently these fictitious zones that translate acronyms
# CET and MET:
#
# Zone CET 1:00 C-Eur CE%sT
@@ -2802,9 +2802,9 @@
# Ukraine
#
-# From Igor Karpov, who works for the Ukranian Ministry of Justice,
+# From Igor Karpov, who works for the Ukrainian Ministry of Justice,
# via Garrett Wollman (2003-01-27):
-# BTW, I've found the official document on this matter. It's goverment
+# BTW, I've found the official document on this matter. It's government
# regulations number 509, May 13, 1996. In my poor translation it says:
# "Time in Ukraine is set to second timezone (Kiev time). Each last Sunday
# of March at 3am the time is changing to 4am and each last Sunday of
@@ -2838,7 +2838,7 @@
# time this year after all.
#
# From Udo Schwedt (2011-10-18):
-# As far as I understand, the recent change to the Ukranian time zone
+# As far as I understand, the recent change to the Ukrainian time zone
# (Europe/Kiev) to introduce permanent daylight saving time (similar
# to Russia) was reverted today:
#
--- a/jdk/test/sun/util/calendar/zi/tzdata/factory Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/factory Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/iso3166.tab Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/iso3166.tab Mon Aug 12 09:29:06 2013 -0400
@@ -1,39 +1,37 @@
#
# 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.
#
-# <pre>
+# ISO 3166 alpha-2 country codes
+#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
-# ISO 3166 alpha-2 country codes
#
-# From Paul Eggert (2006-09-27):
+# From Paul Eggert (2013-05-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166-1 alpha-2 country code, current as of
-# ISO 3166-1 Newsletter VI-1 (2007-09-21). See:
-# <a href="http://www.iso.org/iso/en/prods-services/iso3166ma/index.html">
-# ISO 3166 Maintenance agency (ISO 3166/MA)
-# </a>.
+# ISO 3166-1 Newsletter VI-15 (2013-05-10). See: Updates on ISO 3166
+# http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm
# 2. The usual English name for the country,
# chosen so that alphabetic sorting of subsets produces helpful lists.
# This is not the same as the English name in the ISO 3166 tables.
@@ -43,8 +41,9 @@
#
# Lines beginning with `#' are comments.
#
-# From Arthur David Olson (2011-08-17):
-# Resynchronized today with the ISO 3166 site (adding SS for South Sudan).
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs. It is not intended
+# to take or endorse any position on legal or territorial claims.
#
#country-
#code country name
@@ -77,7 +76,7 @@
BM Bermuda
BN Brunei
BO Bolivia
-BQ Bonaire Sint Eustatius & Saba
+BQ Bonaire, St Eustatius & Saba
BR Brazil
BS Bahamas
BT Bhutan
@@ -258,7 +257,7 @@
SS South Sudan
ST Sao Tome & Principe
SV El Salvador
-SX Sint Maarten
+SX St Maarten (Dutch part)
SY Syria
SZ Swaziland
TC Turks & Caicos Is
--- a/jdk/test/sun/util/calendar/zi/tzdata/leapseconds Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/leapseconds Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/northamerica Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/northamerica Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/pacificnew Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/pacificnew Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/solar87 Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/solar87 Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/solar88 Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/solar88 Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/solar89 Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/solar89 Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/southamerica Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/southamerica Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
@@ -994,7 +994,7 @@
# adopted by the same states as before.
Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S
# From Frederico A. C. Neves (2008-09-10):
-# Acording to this decree
+# According to this decree
# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm">
# http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm
# </a>
@@ -1226,7 +1226,7 @@
# http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651
# </a>
#
-# This is not yet reflected in the offical "cambio de hora" site, but
+# This is not yet reflected in the official "cambio de hora" site, but
# probably will be soon:
# <a href="http://www.horaoficial.cl/cambio.htm">
# http://www.horaoficial.cl/cambio.htm
--- a/jdk/test/sun/util/calendar/zi/tzdata/systemv Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/systemv Mon Aug 12 09:29:06 2013 -0400
@@ -1,22 +1,22 @@
#
# 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.
--- a/jdk/test/sun/util/calendar/zi/tzdata/zone.tab Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/sun/util/calendar/zi/tzdata/zone.tab Mon Aug 12 09:29:06 2013 -0400
@@ -1,41 +1,44 @@
#
# 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.
#
-# <pre>
+# TZ zone descriptions
+#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
-# TZ zone descriptions
-#
-# From Paul Eggert (1996-08-05):
+# From Paul Eggert (2013-05-27):
#
# This file contains a table with the following columns:
# 1. ISO 3166 2-character country code. See the file `iso3166.tab'.
+# This identifies a country that overlaps the zone. The country may
+# overlap other zones and the zone may overlap other countries.
# 2. Latitude and longitude of the zone's principal location
# in ISO 6709 sign-degrees-minutes-seconds format,
# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
# first latitude (+ is north), then longitude (+ is east).
+# This location need not lie within the column-1 country.
# 3. Zone name used in value of TZ environment variable.
+# Please see the 'Theory' file for how zone names are chosen.
# 4. Comments; present if and only if the country has multiple rows.
#
# Columns are separated by a single tab.
@@ -45,6 +48,10 @@
#
# Lines beginning with `#' are comments.
#
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs. It is not intended
+# to take or endorse any position on legal or territorial claims.
+#
#country-
#code coordinates TZ comments
AD +4230+00131 Europe/Andorra
@@ -239,7 +246,7 @@
ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas)
IE +5320-00615 Europe/Dublin
-IL +3146+03514 Asia/Jerusalem
+IL +314650+0351326 Asia/Jerusalem
IM +5409-00428 Europe/Isle_of_Man
IN +2232+08822 Asia/Kolkata
IO -0720+07225 Indian/Chagos
--- a/jdk/test/tools/pack200/TimeStamp.java Mon Aug 12 09:03:51 2013 -0400
+++ b/jdk/test/tools/pack200/TimeStamp.java Mon Aug 12 09:29:06 2013 -0400
@@ -88,6 +88,7 @@
unpackNative(packFile, pstFile);
verifyJar(goldenFile, pstFile);
pstFile.delete();
+ Utils.cleanup();
}
static void unpackNative(File packFile, File outFile) {
@@ -149,7 +150,6 @@
Utils.close(jf1);
Utils.close(jf2);
}
- Utils.cleanup();
if (errors > 0) {
throw new RuntimeException("FAIL:" + errors + " error(s) encounted");
}
--- a/langtools/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -222,3 +222,4 @@
ce5a90df517bdceb2739d7dd3e6764b070def802 jdk8-b98
6d85acab769eb79bc058f5640fa86a6ef096a583 jdk8-b99
82f68da70e471ee5640016e3f38c014347a5c785 jdk8-b100
+0324dbf07b0f1cc51ad9fa18976489d02d23b60d jdk8-b101
--- a/langtools/src/share/classes/com/sun/source/util/DocTrees.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/source/util/DocTrees.java Mon Aug 12 09:29:06 2013 -0400
@@ -30,7 +30,6 @@
import javax.tools.JavaCompiler.CompilationTask;
import com.sun.source.doctree.DocCommentTree;
-import com.sun.source.doctree.ReferenceTree;
import javax.tools.Diagnostic;
/**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Aug 12 09:29:06 2013 -0400
@@ -1621,6 +1621,7 @@
text = removeNonInlineHtmlTags(text);
}
text = Util.replaceTabs(configuration, text);
+ text = Util.normalizeNewlines(text);
result.addContent(new RawHtml(text));
}
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -71,7 +71,7 @@
* {@inheritDoc}
*/
protected Content codeTagOutput(Tag tag) {
- Content result = HtmlTree.CODE(new StringContent(tag.text()));
+ Content result = HtmlTree.CODE(new StringContent(Util.normalizeNewlines(tag.text())));
return result;
}
@@ -135,7 +135,7 @@
* {@inheritDoc}
*/
protected Content literalTagOutput(Tag tag) {
- Content result = new StringContent(tag.text());
+ Content result = new StringContent(Util.normalizeNewlines(tag.text()));
return result;
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java Mon Aug 12 09:29:06 2013 -0400
@@ -631,6 +631,32 @@
return result.toString();
}
+ public static String normalizeNewlines(String text) {
+ StringBuilder sb = new StringBuilder();
+ final int textLength = text.length();
+ final String NL = DocletConstants.NL;
+ int pos = 0;
+ for (int i = 0; i < textLength; i++) {
+ char ch = text.charAt(i);
+ switch (ch) {
+ case '\n':
+ sb.append(text, pos, i);
+ sb.append(NL);
+ pos = i + 1;
+ break;
+ case '\r':
+ sb.append(text, pos, i);
+ sb.append(NL);
+ if (i + 1 < textLength && text.charAt(i + 1) == '\n')
+ i++;
+ pos = i + 1;
+ break;
+ }
+ }
+ sb.append(text, pos, textLength);
+ return sb.toString();
+ }
+
/**
* The documentation for values() and valueOf() in Enums are set by the
* doclet.
--- a/langtools/src/share/classes/com/sun/tools/doclint/Checker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclint/Checker.java Mon Aug 12 09:29:06 2013 -0400
@@ -31,9 +31,11 @@
import java.net.URISyntaxException;
import java.util.Deque;
import java.util.EnumSet;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -45,6 +47,7 @@
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
import javax.tools.Diagnostic.Kind;
+import javax.tools.JavaFileObject;
import com.sun.source.doctree.AttributeTree;
import com.sun.source.doctree.AuthorTree;
@@ -88,9 +91,9 @@
public class Checker extends DocTreePathScanner<Void, Void> {
final Env env;
- Set<Element> foundParams = new HashSet<Element>();
- Set<TypeMirror> foundThrows = new HashSet<TypeMirror>();
- Set<String> foundAnchors = new HashSet<String>();
+ Set<Element> foundParams = new HashSet<>();
+ Set<TypeMirror> foundThrows = new HashSet<>();
+ Map<JavaFileObject, Set<String>> foundAnchors = new HashMap<>();
boolean foundInheritDoc = false;
boolean foundReturn = false;
@@ -129,7 +132,7 @@
Checker(Env env) {
env.getClass();
this.env = env;
- tagStack = new LinkedList<TagStackItem>();
+ tagStack = new LinkedList<>();
implicitHeaderLevel = env.implicitHeaderLevel;
}
@@ -138,10 +141,27 @@
boolean isOverridingMethod = !env.currOverriddenMethods.isEmpty();
- if (tree == null) {
- if (!isSynthetic() && !isOverridingMethod)
- reportMissing("dc.missing.comment");
- return null;
+ if (p.getLeaf() == p.getCompilationUnit()) {
+ // If p points to a compilation unit, the implied declaration is the
+ // package declaration (if any) for the compilation unit.
+ // Handle this case specially, because doc comments are only
+ // expected in package-info files.
+ JavaFileObject fo = p.getCompilationUnit().getSourceFile();
+ boolean isPkgInfo = fo.isNameCompatible("package-info", JavaFileObject.Kind.SOURCE);
+ if (tree == null) {
+ if (isPkgInfo)
+ reportMissing("dc.missing.comment");
+ return null;
+ } else {
+ if (!isPkgInfo)
+ reportReference("dc.unexpected.comment");
+ }
+ } else {
+ if (tree == null) {
+ if (!isSynthetic() && !isOverridingMethod)
+ reportMissing("dc.missing.comment");
+ return null;
+ }
}
tagStack.clear();
@@ -184,6 +204,10 @@
env.messages.report(MISSING, Kind.WARNING, env.currPath.getLeaf(), code, args);
}
+ private void reportReference(String code, Object... args) {
+ env.messages.report(REFERENCE, Kind.WARNING, env.currPath.getLeaf(), code, args);
+ }
+
@Override
public Void visitDocComment(DocCommentTree tree, Void ignore) {
super.visitDocComment(tree, ignore);
@@ -508,7 +532,7 @@
if (!validName.matcher(value).matches()) {
env.messages.error(HTML, tree, "dc.invalid.anchor", value);
}
- if (!foundAnchors.add(value)) {
+ if (!checkAnchor(value)) {
env.messages.error(HTML, tree, "dc.anchor.already.defined", value);
}
}
@@ -551,6 +575,14 @@
return super.visitAttribute(tree, ignore);
}
+ private boolean checkAnchor(String name) {
+ JavaFileObject fo = env.currPath.getCompilationUnit().getSourceFile();
+ Set<String> set = foundAnchors.get(fo);
+ if (set == null)
+ foundAnchors.put(fo, set = new HashSet<>());
+ return set.add(name);
+ }
+
// http://www.w3.org/TR/html401/types.html#type-name
private static final Pattern validName = Pattern.compile("[A-Za-z][A-Za-z0-9-_:.]*");
@@ -721,8 +753,7 @@
Element ex = env.trees.getElement(new DocTreePath(getCurrentPath(), exName));
if (ex == null) {
env.messages.error(REFERENCE, tree, "dc.ref.not.found");
- } else if (ex.asType().getKind() == TypeKind.DECLARED
- && env.types.isAssignable(ex.asType(), env.java_lang_Throwable)) {
+ } else if (isThrowable(ex.asType())) {
switch (env.currElement.getKind()) {
case CONSTRUCTOR:
case METHOD:
@@ -741,6 +772,15 @@
return scan(tree.getDescription(), ignore);
}
+ private boolean isThrowable(TypeMirror tm) {
+ switch (tm.getKind()) {
+ case DECLARED:
+ case TYPEVAR:
+ return env.types.isAssignable(tm, env.java_lang_Throwable);
+ }
+ return false;
+ }
+
private void checkThrowsDeclared(ReferenceTree tree, TypeMirror t, List<? extends TypeMirror> list) {
boolean found = false;
for (TypeMirror tl : list) {
--- a/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java Mon Aug 12 09:29:06 2013 -0400
@@ -30,7 +30,6 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
-import java.util.regex.Pattern;
import javax.lang.model.element.Name;
import javax.tools.StandardLocation;
@@ -166,8 +165,8 @@
}
void processArgs(String... args) throws BadArgs {
- javacOpts = new ArrayList<String>();
- javacFiles = new ArrayList<File>();
+ javacOpts = new ArrayList<>();
+ javacFiles = new ArrayList<>();
if (args.length == 0)
needHelp = true;
@@ -214,7 +213,7 @@
}
List<File> splitPath(String path) {
- List<File> files = new ArrayList<File>();
+ List<File> files = new ArrayList<>();
for (String f: path.split(File.pathSeparator)) {
if (f.length() > 0)
files.add(new File(f));
@@ -279,7 +278,6 @@
TaskListener tl = new TaskListener() {
@Override
public void started(TaskEvent e) {
- return;
}
@Override
--- a/langtools/src/share/classes/com/sun/tools/doclint/resources/doclint.properties Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclint/resources/doclint.properties Mon Aug 12 09:29:06 2013 -0400
@@ -67,6 +67,7 @@
dc.tag.start.unmatched = end tag missing: </{0}>
dc.tag.unknown = unknown tag: {0}
dc.text.not.allowed = text not allowed in <{0}> element
+dc.unexpected.comment=documentation comment not expected here
dc.main.ioerror=IO error: {0}
dc.main.no.files.given=No files given
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Mon Aug 12 09:29:06 2013 -0400
@@ -69,7 +69,6 @@
import com.sun.tools.javac.code.Type.ErrorType;
import com.sun.tools.javac.code.Type.UnionClassType;
import com.sun.tools.javac.code.Types;
-import com.sun.tools.javac.code.TypeTag;
import com.sun.tools.javac.code.Types.TypeRelation;
import com.sun.tools.javac.comp.Attr;
import com.sun.tools.javac.comp.AttrContext;
@@ -358,7 +357,7 @@
Log.DeferredDiagnosticHandler deferredDiagnosticHandler =
new Log.DeferredDiagnosticHandler(log);
try {
- final ClassSymbol tsym;
+ final TypeSymbol tsym;
final Name memberName;
if (ref.qualifierExpression == null) {
tsym = env.enclClass.sym;
@@ -387,7 +386,7 @@
return null;
}
} else {
- tsym = (ClassSymbol) t.tsym;
+ tsym = t.tsym;
memberName = ref.memberName;
}
}
@@ -408,15 +407,17 @@
paramTypes = lb.toList();
}
- Symbol msym = (memberName == tsym.name)
- ? findConstructor(tsym, paramTypes)
- : findMethod(tsym, memberName, paramTypes);
+ ClassSymbol sym = (ClassSymbol) types.upperBound(tsym.type).tsym;
+
+ Symbol msym = (memberName == sym.name)
+ ? findConstructor(sym, paramTypes)
+ : findMethod(sym, memberName, paramTypes);
if (paramTypes != null) {
// explicit (possibly empty) arg list given, so cannot be a field
return msym;
}
- VarSymbol vsym = (ref.paramTypes != null) ? null : findField(tsym, memberName);
+ VarSymbol vsym = (ref.paramTypes != null) ? null : findField(sym, memberName);
// prefer a field over a method with no parameters
if (vsym != null &&
(msym == null ||
@@ -789,6 +790,7 @@
case METHOD:
// System.err.println("METHOD: " + ((JCMethodDecl)tree).sym.getSimpleName());
method = (JCMethodDecl)tree;
+ env = memberEnter.getMethodEnv(method, env);
break;
case VARIABLE:
// System.err.println("FIELD: " + ((JCVariableDecl)tree).sym.getSimpleName());
@@ -800,7 +802,6 @@
try {
Assert.check(method.body == tree);
method.body = copier.copy((JCBlock)tree, (JCTree) path.getLeaf());
- env = memberEnter.getMethodEnv(method, env);
env = attribStatToTree(method.body, env, copier.leafCopy);
} finally {
method.body = (JCBlock) tree;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java Mon Aug 12 09:29:06 2013 -0400
@@ -596,7 +596,7 @@
// This method is part of the javax.lang.model API, do not use this in javac code.
public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(Class<A> annoType) {
- return JavacAnnoConstructs.getAnnotations(this, annoType);
+ return JavacAnnoConstructs.getAnnotationsByType(this, annoType);
}
// TODO: getEnclosedElements should return a javac List, fix in FilteredMemberList
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Mon Aug 12 09:29:06 2013 -0400
@@ -134,7 +134,7 @@
* @return the upper bound of the given type
*/
public Type upperBound(Type t) {
- return upperBound.visit(t);
+ return upperBound.visit(t).unannotatedType();
}
// where
private final MapVisitor<Void> upperBound = new MapVisitor<Void>() {
@@ -620,7 +620,9 @@
* (ii) perform functional interface bridge calculation.
*/
public ClassSymbol makeFunctionalInterfaceClass(Env<AttrContext> env, Name name, List<Type> targets, long cflags) {
- Assert.check(targets.nonEmpty() && isFunctionalInterface(targets.head));
+ if (targets.isEmpty() || !isFunctionalInterface(targets.head)) {
+ return null;
+ }
Symbol descSym = findDescriptorSymbol(targets.head.tsym);
Type descType = findDescriptorType(targets.head);
ClassSymbol csym = new ClassSymbol(cflags, name, env.enclClass.sym.outermostClass());
@@ -1130,9 +1132,9 @@
HashSet<UniqueType> set = new HashSet<UniqueType>();
for (Type x : interfaces(t))
- set.add(new UniqueType(x, Types.this));
+ set.add(new UniqueType(x.unannotatedType(), Types.this));
for (Type x : interfaces(s)) {
- if (!set.remove(new UniqueType(x, Types.this)))
+ if (!set.remove(new UniqueType(x.unannotatedType(), Types.this)))
return false;
}
return (set.isEmpty());
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java Mon Aug 12 09:29:06 2013 -0400
@@ -273,7 +273,7 @@
continue;
}
JCIdent left = (JCIdent)assign.lhs;
- Symbol method = rs.resolveQualifiedMethod(left.pos(),
+ Symbol method = rs.resolveQualifiedMethod(assign.rhs.pos(),
env,
a.type,
left.name,
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Mon Aug 12 09:29:06 2013 -0400
@@ -1948,6 +1948,8 @@
clazzid1 = make.at(clazz.pos).Select(make.Type(encltype),
((JCIdent) clazzid).name);
+ EndPosTable endPosTable = this.env.toplevel.endPositions;
+ endPosTable.storeEnd(clazzid1, tree.getEndPosition(endPosTable));
if (clazz.hasTag(ANNOTATED_TYPE)) {
JCAnnotatedType annoType = (JCAnnotatedType) clazz;
List<JCAnnotation> annos = annoType.annotations;
@@ -2193,7 +2195,9 @@
syms.objectType :
clazztype;
if (!inferred.isErroneous() &&
- types.isAssignable(inferred, pt().hasTag(NONE) ? polyPt : pt(), types.noWarnings)) {
+ (allowPoly && pt() == Infer.anyPoly ?
+ types.isSameType(inferred, clazztype) :
+ types.isAssignable(inferred, pt().hasTag(NONE) ? polyPt : pt(), types.noWarnings))) {
String key = types.isSameType(clazztype, inferred) ?
"diamond.redundant.args" :
"diamond.redundant.args.1";
@@ -2968,7 +2972,9 @@
//check that functional interface class is well-formed
ClassSymbol csym = types.makeFunctionalInterfaceClass(env,
names.empty, List.of(fExpr.targets.head), ABSTRACT);
- chk.checkImplementations(env.tree, csym, csym);
+ if (csym != null) {
+ chk.checkImplementations(env.tree, csym, csym);
+ }
}
}
}
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Aug 12 09:29:06 2013 -0400
@@ -2997,7 +2997,8 @@
for (Scope.Entry e = a.annotationType.type.tsym.members().elems;
e != null;
e = e.sibling)
- if (e.sym.kind == MTH && e.sym.name != names.clinit)
+ if (e.sym.kind == MTH && e.sym.name != names.clinit &&
+ (e.sym.flags() & SYNTHETIC) == 0)
members.add((MethodSymbol) e.sym);
// remove the ones that are assigned values
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -124,7 +124,16 @@
@Override
public String toString() {
- return "Env[" + info + (outer == null ? "" : ",outer=" + outer) + "]";
+ StringBuilder sb = new StringBuilder();
+ sb.append("Env[").append(info);
+// if (enclMethod != null)
+// sb.append(",enclMethod=").append(Pretty.toSimpleString(enclMethod));
+// if (enclClass != null)
+// sb.append(",enclClass=").append(Pretty.toSimpleString(enclClass));
+ if (outer != null)
+ sb.append(",outer=").append(outer);
+ sb.append("]");
+ return sb.toString();
}
public Iterator<Env<A>> iterator() {
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java Mon Aug 12 09:29:06 2013 -0400
@@ -1339,7 +1339,7 @@
/** A mapping from addresses to variable symbols.
*/
- VarSymbol[] vars;
+ JCVariableDecl[] vardecls;
/** The current class being defined.
*/
@@ -1417,13 +1417,14 @@
* to the next available sequence number and entering it under that
* index into the vars array.
*/
- void newVar(VarSymbol sym) {
- vars = ArrayUtils.ensureCapacity(vars, nextadr);
+ void newVar(JCVariableDecl varDecl) {
+ VarSymbol sym = varDecl.sym;
+ vardecls = ArrayUtils.ensureCapacity(vardecls, nextadr);
if ((sym.flags() & FINAL) == 0) {
sym.flags_field |= EFFECTIVELY_FINAL;
}
sym.adr = nextadr;
- vars[nextadr] = sym;
+ vardecls[nextadr] = varDecl;
inits.excl(nextadr);
uninits.incl(nextadr);
nextadr++;
@@ -1493,11 +1494,13 @@
/** Check that trackable variable is initialized.
*/
void checkInit(DiagnosticPosition pos, VarSymbol sym) {
+ checkInit(pos, sym, "var.might.not.have.been.initialized");
+ }
+ void checkInit(DiagnosticPosition pos, VarSymbol sym, String errkey) {
if ((sym.adr >= firstadr || sym.owner.kind != TYP) &&
trackable(sym) &&
!inits.isMember(sym.adr)) {
- log.error(pos, "var.might.not.have.been.initialized",
- sym);
+ log.error(pos, errkey, sym);
inits.incl(sym.adr);
}
}
@@ -1599,7 +1602,7 @@
if ((def.mods.flags & STATIC) != 0) {
VarSymbol sym = def.sym;
if (trackable(sym))
- newVar(sym);
+ newVar(def);
}
}
}
@@ -1619,7 +1622,7 @@
if ((def.mods.flags & STATIC) == 0) {
VarSymbol sym = def.sym;
if (trackable(sym))
- newVar(sym);
+ newVar(def);
}
}
}
@@ -1678,9 +1681,22 @@
scan(tree.body);
if (isInitialConstructor) {
- for (int i = firstadr; i < nextadr; i++)
- if (vars[i].owner == classDef.sym)
- checkInit(TreeInfo.diagEndPos(tree.body), vars[i]);
+ boolean isSynthesized = (tree.sym.flags() &
+ GENERATEDCONSTR) != 0;
+ for (int i = firstadr; i < nextadr; i++) {
+ JCVariableDecl vardecl = vardecls[i];
+ VarSymbol var = vardecl.sym;
+ if (var.owner == classDef.sym) {
+ // choose the diagnostic position based on whether
+ // the ctor is default(synthesized) or not
+ if (isSynthesized) {
+ checkInit(TreeInfo.diagnosticPositionFor(var, vardecl),
+ var, "var.not.initialized.in.default.constructor");
+ } else {
+ checkInit(TreeInfo.diagEndPos(tree.body), var);
+ }
+ }
+ }
}
List<AssignPendingExit> exits = pendingExits.toList();
pendingExits = new ListBuffer<AssignPendingExit>();
@@ -1691,7 +1707,7 @@
if (isInitialConstructor) {
inits.assign(exit.exit_inits);
for (int i = firstadr; i < nextadr; i++)
- checkInit(exit.tree.pos(), vars[i]);
+ checkInit(exit.tree.pos(), vardecls[i].sym);
}
}
} finally {
@@ -1706,7 +1722,7 @@
public void visitVarDef(JCVariableDecl tree) {
boolean track = trackable(tree.sym);
- if (track && tree.sym.owner.kind == MTH) newVar(tree.sym);
+ if (track && tree.sym.owner.kind == MTH) newVar(tree);
if (tree.init != null) {
Lint lintPrev = lint;
lint = lint.augment(tree.sym);
@@ -2239,11 +2255,11 @@
Flow.this.make = make;
startPos = tree.pos().getStartPosition();
- if (vars == null)
- vars = new VarSymbol[32];
+ if (vardecls == null)
+ vardecls = new JCVariableDecl[32];
else
- for (int i=0; i<vars.length; i++)
- vars[i] = null;
+ for (int i=0; i<vardecls.length; i++)
+ vardecls[i] = null;
firstadr = 0;
nextadr = 0;
pendingExits = new ListBuffer<AssignPendingExit>();
@@ -2255,8 +2271,8 @@
startPos = -1;
resetBits(inits, uninits, uninitsTry, initsWhenTrue,
initsWhenFalse, uninitsWhenTrue, uninitsWhenFalse);
- if (vars != null) for (int i=0; i<vars.length; i++)
- vars[i] = null;
+ if (vardecls != null) for (int i=0; i<vardecls.length; i++)
+ vardecls[i] = null;
firstadr = 0;
nextadr = 0;
pendingExits = null;
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Mon Aug 12 09:29:06 2013 -0400
@@ -1240,7 +1240,8 @@
CAPTURED(InferenceBound.UPPER) {
@Override
public boolean accepts(UndetVar t, InferenceContext inferenceContext) {
- return !inferenceContext.free(t.getBounds(InferenceBound.UPPER, InferenceBound.LOWER));
+ return t.isCaptured() &&
+ !inferenceContext.free(t.getBounds(InferenceBound.UPPER, InferenceBound.LOWER));
}
@Override
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Mon Aug 12 09:29:06 2013 -0400
@@ -2649,6 +2649,13 @@
InferenceContext inferenceContext) {
MethodResolutionPhase maxPhase = boxingAllowed ? VARARITY : BASIC;
+ if (site.hasTag(TYPEVAR)) {
+ return resolveMemberReference(pos, env, referenceTree, site.getUpperBound(),
+ name, argtypes, typeargtypes, boxingAllowed, methodCheck, inferenceContext);
+ }
+
+ site = types.capture(site);
+
ReferenceLookupHelper boundLookupHelper;
if (!name.equals(names.init)) {
//method reference
@@ -2675,24 +2682,52 @@
//merge results
Pair<Symbol, ReferenceLookupHelper> res;
- if (!lookupSuccess(unboundSym)) {
- res = new Pair<Symbol, ReferenceLookupHelper>(boundSym, boundLookupHelper);
- env.info.pendingResolutionPhase = boundEnv.info.pendingResolutionPhase;
- } else if (lookupSuccess(boundSym)) {
- res = new Pair<Symbol, ReferenceLookupHelper>(ambiguityError(boundSym, unboundSym), boundLookupHelper);
- env.info.pendingResolutionPhase = boundEnv.info.pendingResolutionPhase;
- } else {
- res = new Pair<Symbol, ReferenceLookupHelper>(unboundSym, unboundLookupHelper);
- env.info.pendingResolutionPhase = unboundEnv.info.pendingResolutionPhase;
- }
+ Symbol bestSym = choose(boundSym, unboundSym);
+ res = new Pair<Symbol, ReferenceLookupHelper>(bestSym,
+ bestSym == unboundSym ? unboundLookupHelper : boundLookupHelper);
+ env.info.pendingResolutionPhase = bestSym == unboundSym ?
+ unboundEnv.info.pendingResolutionPhase :
+ boundEnv.info.pendingResolutionPhase;
return res;
}
- //private
- boolean lookupSuccess(Symbol s) {
+ //where
+ private Symbol choose(Symbol s1, Symbol s2) {
+ if (lookupSuccess(s1) && lookupSuccess(s2)) {
+ return ambiguityError(s1, s2);
+ } else if (lookupSuccess(s1) ||
+ (canIgnore(s2) && !canIgnore(s1))) {
+ return s1;
+ } else if (lookupSuccess(s2) ||
+ (canIgnore(s1) && !canIgnore(s2))) {
+ return s2;
+ } else {
+ return s1;
+ }
+ }
+
+ private boolean lookupSuccess(Symbol s) {
return s.kind == MTH || s.kind == AMBIGUOUS;
}
+ private boolean canIgnore(Symbol s) {
+ switch (s.kind) {
+ case ABSENT_MTH:
+ return true;
+ case WRONG_MTH:
+ InapplicableSymbolError errSym =
+ (InapplicableSymbolError)s;
+ return new Template(MethodCheckDiag.ARITY_MISMATCH.regex())
+ .matches(errSym.errCandidate().snd);
+ case WRONG_MTHS:
+ InapplicableSymbolsError errSyms =
+ (InapplicableSymbolsError)s;
+ return errSyms.filterCandidates(errSyms.mapCandidates()).isEmpty();
+ default:
+ return false;
+ }
+ }
+
/**
* Helper for defining custom method-like lookup logic; a lookup helper
* provides hooks for (i) the actual lookup logic and (ii) accessing the
@@ -3504,7 +3539,9 @@
List<Type> argtypes,
List<Type> typeargtypes) {
Map<Symbol, JCDiagnostic> candidatesMap = mapCandidates();
- Map<Symbol, JCDiagnostic> filteredCandidates = filterCandidates(candidatesMap);
+ Map<Symbol, JCDiagnostic> filteredCandidates = compactMethodDiags ?
+ filterCandidates(candidatesMap) :
+ mapCandidates();
if (filteredCandidates.isEmpty()) {
filteredCandidates = candidatesMap;
}
@@ -3556,8 +3593,7 @@
Map<Symbol, JCDiagnostic> candidates = new LinkedHashMap<Symbol, JCDiagnostic>();
for (Map.Entry<Symbol, JCDiagnostic> _entry : candidatesMap.entrySet()) {
JCDiagnostic d = _entry.getValue();
- if (!compactMethodDiags ||
- !new Template(MethodCheckDiag.ARITY_MISMATCH.regex()).matches(d)) {
+ if (!new Template(MethodCheckDiag.ARITY_MISMATCH.regex()).matches(d)) {
candidates.put(_entry.getKey(), d);
}
}
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java Mon Aug 12 09:29:06 2013 -0400
@@ -674,7 +674,11 @@
if (tree.varargsElement != null)
tree.varargsElement = types.erasure(tree.varargsElement);
else
- Assert.check(tree.args.length() == argtypes.length());
+ if (tree.args.length() != argtypes.length()) {
+ log.error(tree.pos(),
+ "method.invoked.with.incorrect.number.arguments",
+ tree.args.length(), argtypes.length());
+ }
tree.args = translateArgs(tree.args, argtypes, tree.varargsElement);
tree.type = types.erasure(tree.type);
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Mon Aug 12 09:29:06 2013 -0400
@@ -1820,7 +1820,6 @@
msym.externalType(types).getParameterTypes());
if (!msym.isDynamic()) {
code.statBegin(tree.pos);
- code.markStatBegin();
}
result = m.invoke();
}
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java Mon Aug 12 09:29:06 2013 -0400
@@ -108,20 +108,38 @@
}
// Helper to getAnnotation[s]
- private static <A extends Annotation> Attribute.Compound getAttributeOnClass(ClassSymbol annotated,
- Class<A> annoType) {
+ private static <A extends Annotation> Attribute.Compound getAttributeOnClass(
+ ClassSymbol annotated,
+ final Class<A> annoType)
+ {
boolean inherited = annoType.isAnnotationPresent(Inherited.class);
Attribute.Compound result = null;
- while (annotated.name != annotated.name.table.names.java_lang_Object) {
+
+ result = getAttribute(annotated, annoType);
+ if (result != null || !inherited)
+ return result;
+
+ while ((annotated = nextSupertypeToSearch(annotated)) != null) {
result = getAttribute(annotated, annoType);
- if (result != null || !inherited)
- break;
- Type sup = annotated.getSuperclass();
- if (!sup.hasTag(CLASS) || sup.isErroneous())
- break;
- annotated = (ClassSymbol) sup.tsym;
+ if (result != null)
+ return result;
}
- return result;
+ return null; // no more supertypes to search
+ }
+
+ /**
+ * Returns the next type to search for inherited annotations or {@code null}
+ * if the next type can't be found.
+ */
+ private static ClassSymbol nextSupertypeToSearch(ClassSymbol annotated) {
+ if (annotated.name == annotated.name.table.names.java_lang_Object)
+ return null;
+
+ Type sup = annotated.getSuperclass();
+ if (!sup.hasTag(CLASS) || sup.isErroneous())
+ return null;
+
+ return (ClassSymbol) sup.tsym;
}
/**
@@ -129,8 +147,9 @@
* annotations. This is the implementation of
* Element.getAnnotations(Class).
*/
- public static <A extends Annotation> A[] getAnnotations(Symbol annotated,
- Class<A> annoType) {
+ public static <A extends Annotation> A[] getAnnotationsByType(Symbol annotated,
+ Class<A> annoType)
+ {
if (!annoType.isAnnotation())
throw new IllegalArgumentException("Not an annotation type: "
+ annoType);
@@ -153,62 +172,48 @@
}
// So we have a containing type
- String name = annoType.getName();
String annoTypeName = annoType.getSimpleName();
String containerTypeName = containerType.getSimpleName();
int directIndex = -1, containerIndex = -1;
Attribute.Compound direct = null, container = null;
- Attribute.Compound[] rawAttributes = annotated.getRawAttributes().toArray(new Attribute.Compound[0]);
-
- // Find directly present annotations
- for (int i = 0; i < rawAttributes.length; i++) {
- if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
- directIndex = i;
- direct = rawAttributes[i];
+ // Find directly (explicit or implicit) present annotations
+ int index = -1;
+ for (List<Attribute.Compound> list = annotated.getAnnotationMirrors();
+ !list.isEmpty();
+ list = list.tail) {
+ Attribute.Compound attribute = list.head;
+ index++;
+ if (attribute.type.tsym.flatName().contentEquals(annoTypeName)) {
+ directIndex = index;
+ direct = attribute;
} else if(containerTypeName != null &&
- containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
- containerIndex = i;
- container = rawAttributes[i];
+ attribute.type.tsym.flatName().contentEquals(containerTypeName)) {
+ containerIndex = index;
+ container = attribute;
}
}
// Deal with inherited annotations
- if (annotated.kind == Kinds.TYP &&
- (annotated instanceof ClassSymbol)) {
- ClassSymbol s = (ClassSymbol)annotated;
- if (direct == null && container == null) {
- direct = getAttributeOnClass(s, annoType);
- container = getAttributeOnClass(s, containerType);
-
- // both are inherited and found, put container last
- if (direct != null && container != null) {
- directIndex = 0;
- containerIndex = 1;
- } else if (direct != null) {
- directIndex = 0;
- } else {
- containerIndex = 0;
- }
- } else if (direct == null) {
- direct = getAttributeOnClass(s, annoType);
- if (direct != null)
- directIndex = containerIndex + 1;
- } else if (container == null) {
- container = getAttributeOnClass(s, containerType);
- if (container != null)
- containerIndex = directIndex + 1;
+ if (direct == null && container == null) {
+ if (annotated.kind == Kinds.TYP &&
+ (annotated instanceof ClassSymbol)) {
+ ClassSymbol s = nextSupertypeToSearch((ClassSymbol)annotated);
+ if (s != null)
+ return getAnnotationsByType(s, annoType);
}
}
// Pack them in an array
- Attribute[] contained0 = new Attribute[0];
+ Attribute[] contained0 = null;
if (container != null)
contained0 = unpackAttributes(container);
ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
- for (Attribute a : contained0)
- if (a instanceof Attribute.Compound)
- compounds = compounds.append((Attribute.Compound)a);
- Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]);
+ if (contained0 != null) {
+ for (Attribute a : contained0)
+ if (a instanceof Attribute.Compound)
+ compounds = compounds.append((Attribute.Compound)a);
+ }
+ Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[compounds.size()]);
int size = (direct == null ? 0 : 1) + contained.length;
@SuppressWarnings("unchecked") // annoType is the Class for A
@@ -298,35 +303,38 @@
}
// So we have a containing type
- String name = annoType.getName();
String annoTypeName = annoType.getSimpleName();
String containerTypeName = containerType.getSimpleName();
int directIndex = -1, containerIndex = -1;
Attribute.Compound direct = null, container = null;
- Attribute.Compound[] rawAttributes = annotated.getAnnotationMirrors().toArray(new Attribute.Compound[0]);
-
- // Find directly present annotations
- for (int i = 0; i < rawAttributes.length; i++) {
- if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
- directIndex = i;
- direct = rawAttributes[i];
+ // Find directly (explicit or implicit) present annotations
+ int index = -1;
+ for (List<? extends Attribute.Compound> list = annotated.getAnnotationMirrors();
+ !list.isEmpty();
+ list = list.tail) {
+ Attribute.Compound attribute = list.head;
+ index++;
+ if (attribute.type.tsym.flatName().contentEquals(annoTypeName)) {
+ directIndex = index;
+ direct = attribute;
} else if(containerTypeName != null &&
- containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) {
- containerIndex = i;
- container = rawAttributes[i];
+ attribute.type.tsym.flatName().contentEquals(containerTypeName)) {
+ containerIndex = index;
+ container = attribute;
}
}
// Pack them in an array
- Attribute[] contained0 = new Attribute[0];
+ Attribute[] contained0 = null;
if (container != null)
contained0 = unpackAttributes(container);
ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
- for (Attribute a : contained0) {
- if (a instanceof Attribute.Compound)
- compounds = compounds.append((Attribute.Compound)a);
+ if (contained0 != null) {
+ for (Attribute a : contained0)
+ if (a instanceof Attribute.Compound)
+ compounds = compounds.append((Attribute.Compound)a);
}
- Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]);
+ Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[compounds.size()]);
int size = (direct == null ? 0 : 1) + contained.length;
@SuppressWarnings("unchecked") // annoType is the Class for A
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java Mon Aug 12 09:29:06 2013 -0400
@@ -4053,7 +4053,7 @@
endPosMap = new HashMap<JCTree, Integer>();
}
- protected void storeEnd(JCTree tree, int endpos) {
+ public void storeEnd(JCTree tree, int endpos) {
endPosMap.put(tree, errorEndPos > endpos ? errorEndPos : endpos);
}
@@ -4091,7 +4091,7 @@
super(parser);
}
- protected void storeEnd(JCTree tree, int endpos) { /* empty */ }
+ public void storeEnd(JCTree tree, int endpos) { /* empty */ }
protected <T extends JCTree> T to(T t) {
return t;
@@ -4127,14 +4127,6 @@
}
/**
- * Store ending position for a tree, the value of which is the greater
- * of last error position and the given ending position.
- * @param tree The tree.
- * @param endpos The ending position to associate with the tree.
- */
- protected abstract void storeEnd(JCTree tree, int endpos);
-
- /**
* Store current token's ending position for a tree, the value of which
* will be the greater of last error position and the ending position of
* the current token.
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Mon Aug 12 09:29:06 2013 -0400
@@ -905,6 +905,10 @@
compiler.err.report.access=\
{0} has {1} access in {2}
+# 0: symbol, 1: set of modifier, 2: symbol
+compiler.misc.report.access=\
+ {0} has {1} access in {2}
+
compiler.err.ret.outside.meth=\
return outside method
@@ -914,6 +918,10 @@
compiler.err.signature.doesnt.match.intf=\
signature does not match {0}; incompatible interfaces
+# 0: number, 1: number
+compiler.err.method.invoked.with.incorrect.number.arguments=\
+ method invoked with incorrect number of arguments; expected {0}, found {1}
+
# 0: symbol, 1: symbol, 2: symbol
compiler.err.does.not.override.abstract=\
{0} is not abstract and does not override abstract method {1} in {2}
@@ -1069,6 +1077,10 @@
variable {0} might not have been initialized
# 0: symbol
+compiler.err.var.not.initialized.in.default.constructor=\
+ variable {0} not initialized in the default constructor
+
+# 0: symbol
compiler.err.var.might.be.assigned.in.loop=\
variable {0} might be assigned in loop
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/EndPosTable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/EndPosTable.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -43,10 +43,17 @@
public int getEndPos(JCTree tree);
/**
+ * Store ending position for a tree, the value of which is the greater of
+ * last error position and the given ending position.
+ * @param tree The tree.
+ * @param endpos The ending position to associate with the tree.
+ */
+ public abstract void storeEnd(JCTree tree, int endpos);
+
+ /**
* Give an old tree and a new tree, the old tree will be replaced with
* the new tree, the position of the new tree will be that of the old
* tree.
- * not exist.
* @param oldtree a JCTree to be replaced
* @param newtree a JCTree to be replaced with
* @return position of the old tree or Positions.NOPOS for non-existent mapping
--- a/langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -38,7 +38,7 @@
public class TestCRLineSeparator extends JavadocTester {
//Test information.
- private static final String BUG_ID = "4979486";
+ private static final String BUG_ID = "4979486-8014636";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
@@ -47,7 +47,7 @@
//Input for string search tests.
private static final String[][] TEST = {
- {BUG_ID + FS + "pkg" + FS + "MyClass.html", "Line 1\n Line 2"}
+ {BUG_ID + FS + "pkg" + FS + "MyClass.html", "Line 1" + NL + " Line 2"}
};
private static final String[][] NEGATED_TEST = NO_TEST;
--- a/langtools/test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -23,11 +23,11 @@
/*
* @test
- * @bug 4232882
+ * @bug 4232882 8014636
* @summary Javadoc strips all of the leading spaces when the comment
* does not begin with a star. This RFE allows users to
* begin their comment without a leading star without leading
- * spaces striped
+ * spaces stripped
* @author jamieh
* @library ../lib/
* @build JavadocTester
@@ -37,15 +37,15 @@
public class LeadingSpaces extends JavadocTester {
- private static final String BUG_ID = "4232882";
+ private static final String BUG_ID = "4232882-8014636";
private static final String[][] TEST = {
{BUG_ID + FS + "LeadingSpaces.html",
-" 1\n" +
-" 2\n" +
-" 3\n" +
-" 4\n" +
-" 5\n" +
-" 6\n" +
+" 1" + NL +
+" 2" + NL +
+" 3" + NL +
+" 4" + NL +
+" 5" + NL +
+" 6" + NL +
" 7"}
};
private static final String[][] NEGATED_TEST = NO_TEST;
--- a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4732864 6280605 7064544
+ * @bug 4732864 6280605 7064544 8014636
* @summary Make sure that you can link from one member to another using
* non-qualified name, furthermore, ensure the right one is linked.
* @author jamieh
@@ -36,7 +36,7 @@
public class TestLinkTaglet extends JavadocTester {
//Test information.
- private static final String BUG_ID = "4732864-6280605-7064544";
+ private static final String BUG_ID = "4732864-6280605-7064544-8014636";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
@@ -46,16 +46,16 @@
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "pkg" + FS + "C.html",
- "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" +
- " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" +
- " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" +
- " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n" +
- " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n" +
+ "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
+ " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
+ " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
+ " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>" + NL +
+ " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
" Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
},
{BUG_ID + FS + "pkg" + FS + "C.InnerC.html",
- "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n" +
- " Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>\n" +
+ "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>" + NL +
+ " Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>" + NL +
" Link to another inner class: <a href=\"../pkg/C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>"
},
{BUG_ID + FS + "pkg" + FS + "C.InnerC2.html",
--- a/langtools/test/com/sun/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/com/sun/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8002387
+ * @bug 8002387 8014636
* @summary Improve rendered HTML formatting for {@code}
* @library ../lib/
* @build JavadocTester TestLiteralCodeInPre
@@ -33,7 +33,7 @@
public class TestLiteralCodeInPre extends JavadocTester {
//Test information.
- private static final String BUG_ID = "8002387";
+ private static final String BUG_ID = "8002387-8014636";
private static final String OUTPUT_DIR = BUG_ID;
//Javadoc arguments.
--- a/langtools/test/com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -23,11 +23,9 @@
/*
* @test
- * @bug 4460354
+ * @bug 4460354 8014636
* @summary Test to make sure that relative paths are redirected in the
* output so that they are not broken.
- * NOTE: these tests have \\n instead of NL because they are user
- * generated new lines, not Java generated.
* @author jamieh
* @library ../lib/
* @build JavadocTester
@@ -38,7 +36,7 @@
public class TestRelativeLinks extends JavadocTester {
//Test information.
- private static final String BUG_ID = "4460354";
+ private static final String BUG_ID = "4460354-8014636";
//Javadoc arguments.
private static final String[] ARGS = new String[] {
@@ -58,7 +56,7 @@
{BUG_ID + FS + "pkg" + FS + "package-summary.html",
"<a href=\"relative-package-link.html\">relative package link</a>"},
{BUG_ID + FS + "pkg" + FS + "C.html",
- " <a\n" +
+ " <a" + NL +
" href=\"relative-multi-line-link.html\">relative-multi-line-link</a>."},
//These relative paths should be redirected because they are in different
@@ -74,7 +72,7 @@
{BUG_ID + FS + "index-all.html",
"<a href=\"./pkg/relative-package-link.html\">relative package link</a>"},
{BUG_ID + FS + "index-all.html",
- " <a\n" +
+ " <a" + NL +
" href=\"./pkg/relative-multi-line-link.html\">relative-multi-line-link</a>."},
@@ -92,7 +90,7 @@
{BUG_ID + FS + "pkg" + FS + "class-use" + FS + "C.html",
"<a href=\"../../pkg/relative-package-link.html\">relative package link</a>"},
{BUG_ID + FS + "pkg" + FS + "class-use" + FS + "C.html",
- " <a\n" +
+ " <a" + NL +
" href=\"../../pkg/relative-multi-line-link.html\">relative-multi-line-link</a>."},
//PACKAGE OVERVIEW
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/AnchorTest2.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,20 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020313
+ * @summary doclint doesn't reset HTML anchors correctly
+ * @build DocLintTester
+ * @run main DocLintTester -ref AnchorTest2.out AnchorTest2.java AnchorTest2a.java
+ * @run main DocLintTester -ref AnchorTest2.out AnchorTest2a.java AnchorTest2.java
+ */
+
+/** */
+public class AnchorTest2 {
+ /** <a name="AnchorTest2"> </a> */
+ public void a_name_AnchorTest2() { }
+
+ /** <a name="AnchorTest2"> </a> */
+ public void a_name_AnchorTest2_already_defined() { }
+
+ /** <a name="AnchorTest2a"> </a> */
+ public void a_name_AnchorTest2a_defined_in_other_file() { }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/AnchorTest2.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,4 @@
+AnchorTest2.java:15: error: anchor already defined: AnchorTest2
+ /** <a name="AnchorTest2"> </a> */
+ ^
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/AnchorTest2a.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,7 @@
+/* /nodynamiccopyright/ */
+
+/**
+ * <a name="AnchorTest2a"> </a>
+ */
+public class AnchorTest2a { }
+
--- a/langtools/test/tools/doclint/BadPackageCommentTest.out Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/doclint/BadPackageCommentTest.out Mon Aug 12 09:29:06 2013 -0400
@@ -1,3 +1,6 @@
+BadPackageCommentTest.java:13: warning: documentation comment not expected here
+package p;
+^
BadPackageCommentTest.java:11: error: no tag name after @
* @@@
^
@@ -8,3 +11,4 @@
* @@@
^
3 errors
+1 warning
--- a/langtools/test/tools/doclint/DocLintTester.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/doclint/DocLintTester.java Mon Aug 12 09:29:06 2013 -0400
@@ -123,7 +123,7 @@
private static final Pattern dirFileLine = Pattern.compile(
"(?m)" // multi-line mode
+ "^(.*?)" // directory part of file name
- + "([A-Za-z0-9.]+:[0-9]+:)"); // file name and line number
+ + "([-A-Za-z0-9.]+:[0-9]+:)"); // file name and line number
String removeFileNames(String s) {
Matcher m = dirFileLine.matcher(s);
--- a/langtools/test/tools/doclint/ReferenceTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/doclint/ReferenceTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 8004832
+ * @bug 8004832 8020556
* @summary Add new doclint package
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-reference ReferenceTest.java
@@ -48,5 +48,11 @@
* @throws Exception description
*/
public void exception_not_thrown() { }
+
+ /**
+ * @param <T> throwable
+ * @throws T description
+ */
+ public <T extends Throwable> void valid_throws_generic() throws T { }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/bad/Test.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020664 8021215
+ * @summary doclint gives incorrect warnings on normal package statements
+ * @library ../..
+ * @build DocLintTester
+ * @run main DocLintTester -ref Test.out Test.java
+ * @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java
+ */
+
+/** Unexpected comment */
+package bad;
+
+/** */
+class Test { }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/bad/Test.javac.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,4 @@
+Test.java:12:1: compiler.warn.proc.messager: documentation comment not expected here
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/bad/Test.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,4 @@
+Test.java:12: warning: documentation comment not expected here
+package bad;
+^
+1 warning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/bad/package-info.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,12 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020664 8021215
+ * @summary doclint gives incorrect warnings on normal package statements
+ * @library ../..
+ * @build DocLintTester
+ * @run main DocLintTester -ref package-info.out package-info.java
+ * @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java
+ */
+
+// missing comment
+package bad;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/bad/package-info.javac.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,4 @@
+package-info.java:12:1: compiler.warn.proc.messager: no comment
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/bad/package-info.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,4 @@
+package-info.java:12: warning: no comment
+package bad;
+^
+1 warning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/good/Test.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012, 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.
+ */
+
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020664 8021215
+ * @summary doclint gives incorrect warnings on normal package statements
+ * @library ../..
+ * @build DocLintTester
+ * @run main DocLintTester Test.java
+ * @compile -Xdoclint:all Test.java
+ */
+
+// no doc comment
+package good;
+
+/** */
+class Test { }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/doclint/packageTests/good/package-info.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, 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.
+ */
+
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020664 8021215
+ * @summary doclint gives incorrect warnings on normal package statements
+ * @library ../..
+ * @build DocLintTester
+ * @run main DocLintTester package-info.java
+ * @compile -Xdoclint:all package-info.java
+ */
+
+/** Description. */
+package good;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/ErasureTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8016013
+ * @summary Compiler incorrectly treats annotated and unannotated type variable bounds as different types
+ * @compile -doe ErasureTest.java
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER })
+@interface Advanced {}
+
+class U {}
+interface I {}
+
+class ErasureTest {
+ <T extends U & @Advanced I> void TestMethod(T arg1) { }
+ public static void main(String argv[]) {
+ ErasureTest t1 = new ErasureTest(){
+ public <T extends @Advanced U & I> void TestMethod(T arg1) { }
+ };
+
+ ErasureTest t2 = new ErasureTest(){
+ public <T extends U & @Advanced I> void TestMethod(T arg1) { }
+ };
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/MethodInvokedWithWrongNumberOfArgs.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// key: compiler.err.method.invoked.with.incorrect.number.arguments
+// options: -Xlint:-options -source 6 -target 6
+
+class MethodInvokedWithWrongNumberOfArgs {
+ static java.lang.invoke.MethodHandle getNamedMember;
+ public static Object getMember(String name, Object rec) throws Throwable {
+ return getNamedMember.invoke(rec, name);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/ReportAccessFragment.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.invalid.mref
+// key: compiler.misc.report.access
+
+class ReportAccessFragment {
+ void test(Object o) {
+ Runnable r = o::clone;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/VarNotIntializedInDefaultConstructor.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+// key: compiler.err.var.not.initialized.in.default.constructor
+
+class X {
+ final int j;
+}
--- a/langtools/test/tools/javac/generics/diamond/6939780/T6939780.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/generics/diamond/6939780/T6939780.java Mon Aug 12 09:29:06 2013 -0400
@@ -1,6 +1,6 @@
/*
* @test /nodynamiccopyright/
- * @bug 6939780 7020044 8009459
+ * @bug 6939780 7020044 8009459 8021338
*
* @summary add a warning to detect diamond sites
* @author mcimadamore
@@ -36,4 +36,15 @@
void gw(Foo<?> fw) { }
void gn(Foo<Number> fn) { }
+
+ static class Foo2<X> {
+ X copy(X t) {
+ return t;
+ }
+ }
+
+ void testReciever() {
+ Number s = new Foo2<Number>().copy(0);
+ }
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/jvm/T8020689.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,36 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020689
+ * @summary Making sure the LineNumberTable entry is correctly generated for the leading method invocation in the else section
+ * @compile T8020689.java
+ * @run main T8020689
+ */
+
+public class T8020689 {
+
+ public static void main(String... args) {
+ if (args.length > 0) {
+ a();
+ } else {
+ b();
+ }
+ }
+
+ static void a() {
+ }
+
+ static void b() {
+ assertLine(15);
+ }
+
+ public static void assertLine(int expectedline) {
+ Exception e = new Exception("expected line#: " + expectedline);
+ int myline = e.getStackTrace()[2].getLineNumber();
+ if( myline != expectedline) {
+ throw new RuntimeException("Incorrect line number " +
+ "expected: " + expectedline +
+ ", got: " + myline, e);
+ }
+ System.out.format("Got expected line number %d correct %n", myline);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8016081/T8016081.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8016081
+ * @summary field initialized with lambda in annotation types doesn't compile
+ * @compile T8016081.java
+ */
+
+class T8016081 {
+ interface fint { int get(); }
+
+ @interface atype {
+ fint fld = ()->( fld == null ?0 : 1);
+ }
+
+ @atype class T {}
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8020804/T8020804.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8020804
+ * @summary javac crashes when speculative attribution infers intersection type with array component
+ * @compile T8020804.java
+ */
+
+import java.util.*;
+
+class T8020804 {
+ interface Supplier<D> {
+ D make();
+ }
+
+ void m(Object o) { }
+ void m(char[] c) { }
+
+ <C extends Collection<?>> C g(Supplier<C> sc) { return null; }
+
+ void test() {
+ m(g(LinkedList<Double>::new));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8020843/T8020843a.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,16 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020843
+ * @summary javac crashes on accessibility check with method reference with typevar receiver
+ * @compile/fail/ref=T8020843a.out -XDrawDiagnostics T8020843a.java
+ */
+
+class T8020843a {
+ interface Function<X, Y> {
+ Y m(X x);
+ }
+
+ <T> void test(T t) {
+ Function<T, Object> ss = T::clone;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8020843/T8020843a.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,2 @@
+T8020843a.java:14:34: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.report.access: clone(), protected, java.lang.Object))
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8020843/T8020843b.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,27 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8020843
+ * @summary javac crashes on accessibility check with method reference with typevar receiver
+ * @compile/fail/ref=T8020843b.out -XDrawDiagnostics T8020843b.java
+ */
+
+class T8020843b {
+ interface Function<X, Y> {
+ Y m(X x);
+ }
+
+ interface BiFunction<X, Y, Z> {
+ Z m(X x, Y y);
+ }
+
+ Object m(int i) { return null; }
+ static Object m(String t) { return null; }
+
+ Object m2(int i) { return null; }
+ static Object m2(long t) { return null; }
+
+ static void test() {
+ Function<T8020843b, Object> f1 = T8020843b::m; //show bound case diag
+ BiFunction<T8020843b, String, Object> f2 = T8020843b::m2; //show unbound case diag
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/8020843/T8020843b.out Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,3 @@
+T8020843b.java:24:42: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbols: kindname.method, m, T8020843b,{(compiler.misc.inapplicable.method: kindname.method, T8020843b, m(int), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: T8020843b, int))),(compiler.misc.inapplicable.method: kindname.method, T8020843b, m(java.lang.String), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: T8020843b, java.lang.String)))}))
+T8020843b.java:25:52: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbols: kindname.method, m2, T8020843b,java.lang.String,{(compiler.misc.inapplicable.method: kindname.method, T8020843b, m2(int), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, int))),(compiler.misc.inapplicable.method: kindname.method, T8020843b, m2(long), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, long)))}))
+2 errors
--- a/langtools/test/tools/javac/lambda/MethodReference28.out Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/lambda/MethodReference28.out Mon Aug 12 09:29:06 2013 -0400
@@ -9,6 +9,6 @@
MethodReference28.java:46:19: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m3, java.lang.String, int, kindname.class, MethodReference28, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: int, java.lang.String))))
MethodReference28.java:47:19: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m4, java.lang.String[], int, kindname.class, MethodReference28, (compiler.misc.varargs.argument.mismatch: (compiler.misc.inconvertible.types: int, java.lang.String))))
MethodReference28.java:52:19: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m2, java.lang.Integer,java.lang.Integer, MethodReference28,int, kindname.class, MethodReference28, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: MethodReference28, java.lang.Integer))))
-MethodReference28.java:53:19: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m3, java.lang.String, MethodReference28,int, kindname.class, MethodReference28, (compiler.misc.arg.length.mismatch)))
+MethodReference28.java:53:19: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m3, java.lang.String, MethodReference28,int, kindname.class, MethodReference28, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: int, java.lang.String))))
MethodReference28.java:54:19: compiler.err.prob.found.req: (compiler.misc.invalid.mref: kindname.method, (compiler.misc.cant.apply.symbol: kindname.method, m4, java.lang.String[], MethodReference28,int, kindname.class, MethodReference28, (compiler.misc.varargs.argument.mismatch: (compiler.misc.inconvertible.types: MethodReference28, java.lang.String))))
13 errors
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/positions/TreeEndPosTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,163 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8017216 8019422 8019421
+ * @summary verify start and end positions
+ * @run main TreeEndPosTest
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+public class TreeEndPosTest {
+ private static JavaFileManager getJavaFileManager(JavaCompiler compiler,
+ DiagnosticCollector dc) {
+ return compiler.getStandardFileManager(dc, null, null);
+ }
+
+ static class JavaSource extends SimpleJavaFileObject {
+
+ final String source;
+ int startPos;
+ int endPos;
+
+ private JavaSource(String filename, String source) {
+ super(URI.create("myfo:/" + filename), JavaFileObject.Kind.SOURCE);
+ this.source = source;
+ }
+
+ @Override
+ public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+ return source;
+ }
+
+ static JavaSource createJavaSource(String preamble, String body,
+ String postamble, String expected) {
+ JavaSource js = createJavaSource(preamble, body, postamble, -1, -1);
+ js.startPos = js.source.indexOf(expected);
+ js.endPos = js.startPos + expected.length();
+ return js;
+ }
+
+ static JavaSource createJavaSource(String body, String expected) {
+ return createJavaSource(null, body, null, expected);
+ }
+
+ private static JavaSource createJavaSource(String preamble, String body,
+ String postamble, int start, int end) {
+ final String name = "Bug";
+ StringBuilder code = new StringBuilder();
+ if (preamble != null) {
+ code.append(preamble);
+ }
+ code.append("public class " + name + "{");
+ if (body != null) {
+ code.append(body);
+ }
+ code.append("}");
+ if (postamble != null) {
+ code.append(postamble);
+ }
+ JavaSource js = new JavaSource(name + ".java", code.toString());
+ js.startPos = start;
+ js.endPos = end;
+ return js;
+ }
+ }
+
+ public static void main(String... args) throws IOException {
+ testUninitializedVariable();
+ testMissingAnnotationValue();
+ testFinalVariableWithDefaultConstructor();
+ testFinalVariableWithConstructor();
+ }
+
+ static void testUninitializedVariable() throws IOException {
+ compile(JavaSource.createJavaSource("Object o = new A().new B(); class A { }",
+ "B()"));
+ }
+ static void testMissingAnnotationValue() throws IOException {
+ compile(JavaSource.createJavaSource("@Foo(\"vvvv\")",
+ null, "@interface Foo { }", "\"vvvv\""));
+ }
+
+ static void testFinalVariableWithDefaultConstructor() throws IOException {
+ compile(JavaSource.createJavaSource("private static final String Foo; public void bar() { }",
+ "private static final String Foo;"));
+ }
+
+ static void testFinalVariableWithConstructor() throws IOException {
+ compile(JavaSource.createJavaSource("public Bug (){} private static final String Foo; public void bar() { }",
+ "{}"));
+ }
+
+ static void compile(JavaSource src) throws IOException {
+ ByteArrayOutputStream ba = new ByteArrayOutputStream();
+ PrintWriter writer = new PrintWriter(ba);
+ File tempDir = new File(".");
+ JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+ DiagnosticCollector dc = new DiagnosticCollector();
+ JavaFileManager javaFileManager = getJavaFileManager(compiler, dc);
+ List<String> options = new ArrayList<>();
+ options.add("-cp");
+ options.add(tempDir.getPath());
+ options.add("-d");
+ options.add(tempDir.getPath());
+ options.add("-XDshouldStopPolicy=GENERATE");
+
+ List<JavaFileObject> sources = new ArrayList<>();
+ sources.add(src);
+ JavaCompiler.CompilationTask task =
+ compiler.getTask(writer, javaFileManager,
+ dc, options, null,
+ sources);
+ task.call();
+ for (Diagnostic diagnostic : (List<Diagnostic>) dc.getDiagnostics()) {
+ long actualStart = diagnostic.getStartPosition();
+ long actualEnd = diagnostic.getEndPosition();
+ System.out.println("Source: " + src.source);
+ System.out.println("Diagnostic: " + diagnostic);
+ System.out.print("Start position: Expected: " + src.startPos);
+ System.out.println(", Actual: " + actualStart);
+ System.out.print("End position: Expected: " + src.endPos);
+ System.out.println(", Actual: " + actualEnd);
+ if (src.startPos != actualStart || src.endPos != actualEnd) {
+ throw new RuntimeException("error: trees don't match");
+ }
+ }
+ }
+}
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedA1Test.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedA1Test.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,12 +23,11 @@
/*
* @test
- * @bug 8004822
+ * @bug 8004822 8007961
* @author mnunez
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
- * @ignore 8013407: test failures for repeating annotations
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedA1Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB1Test.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB1Test.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,12 +23,11 @@
/*
* @test
- * @bug 8004822
+ * @bug 8004822 8007961
* @author mnunez
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
- * @ignore 8013407: test failures for repeating annotations
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedB1Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB2Test.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB2Test.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,12 +23,11 @@
/*
* @test
- * @bug 8004822
+ * @bug 8004822 8007961
* @author mnunez
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
- * @ignore 8013407: test failures for repeating annotations
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedB2Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideATest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideATest.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,12 +23,11 @@
/*
* @test
- * @bug 8004822
+ * @bug 8004822 8007961
* @author mnunez
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
- * @ignore 8013407: test failures for repeating annotations
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideATest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideBTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideBTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -23,12 +23,11 @@
/*
* @test
- * @bug 8004822
+ * @bug 8004822 8007961
* @author mnunez
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
- * @ignore 8013407: test failures for repeating annotations
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideBTest.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/model/inheritedByType/EnsureOrder.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @summary test that order is respected when inheriting both legacy container and single anno
+ * @bug 8007961
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor EnsureOrder
+ * @compile -processor EnsureOrder -proc:only EnsureOrder.java
+ */
+
+import java.util.Set;
+import java.lang.annotation.*;
+import javax.annotation.processing.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.element.*;
+import javax.lang.model.util.*;
+import static javax.lang.model.util.ElementFilter.*;
+import static javax.tools.Diagnostic.Kind.*;
+import static javax.tools.StandardLocation.*;
+import com.sun.tools.javac.util.Assert;
+
+@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE})
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Repeatable(Foos.class)
+@interface Foo {
+ int value();
+}
+
+@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE})
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@interface Foos {
+ Foo[] value();
+}
+
+@Foos({@Foo(0), @Foo(1)}) @Foo(2)
+class Base {}
+
+class Sub extends Base {}
+
+public class EnsureOrder<@Foos({@Foo(0), @Foo(1)}) @Foo(2)T> extends JavacTestingAbstractProcessor {
+ public boolean process(Set<? extends TypeElement> annotations,
+ RoundEnvironment roundEnv) {
+ if (!roundEnv.processingOver()) {
+ int hasRun = 0;
+ for (Element element : roundEnv.getRootElements()) {
+ Name elemName = element.getSimpleName();
+ if (elemName.contentEquals("Base")) {
+ hasRun++;
+ Foo[] foos = element.getAnnotationsByType(Foo.class);
+ Assert.check(foos.length == 3);
+ Assert.check(foos[0].value() == 0);
+ Assert.check(foos[1].value() == 1);
+ Assert.check(foos[2].value() == 2);
+ }
+ if (elemName.contentEquals("Sub")) {
+ hasRun++;
+ Foo[] foos = element.getAnnotationsByType(Foo.class);
+ Assert.check(foos.length == 3);
+ Assert.check(foos[0].value() == 0);
+ Assert.check(foos[1].value() == 1);
+ Assert.check(foos[2].value() == 2);
+ }
+ if (elemName.contentEquals("EnsureOrder")) {
+ for (TypeParameterElement t : ((TypeElement)element).getTypeParameters()) {
+ if (t.getSimpleName().contentEquals("T")) {
+ hasRun++;
+ Foo[] foos = t.getAnnotationsByType(Foo.class);
+ Assert.check(foos.length == 3);
+ Assert.check(foos[0].value() == 0);
+ Assert.check(foos[1].value() == 1);
+ Assert.check(foos[2].value() == 2);
+ }
+ }
+ }
+ }
+ if (hasRun != 3)
+ throw new RuntimeException("Couldn't find elements");
+ }
+ return true;
+ }
+}
--- a/nashorn/.hgtags Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/.hgtags Mon Aug 12 09:29:06 2013 -0400
@@ -210,3 +210,4 @@
542b7803f0389a91fab58608a0f46fac0e15d759 jdk8-b98
10a1ab9e20a42d278aa1a89698f2a4cf5883d00d jdk8-b99
598321c438b52d9408a2671fb3fc2b2947d0f654 jdk8-b100
+a302b05d0ee460679501dc01004f70eb395fadf5 jdk8-b101
--- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ClassGenerator.java Mon Aug 12 09:29:06 2013 -0400
@@ -152,14 +152,14 @@
}
static MethodGenerator makeStaticInitializer(final ClassVisitor cv, final String name) {
- final int access = ACC_PUBLIC | ACC_STATIC;
+ final int access = ACC_PUBLIC | ACC_STATIC;
final String desc = DEFAULT_INIT_DESC;
final MethodVisitor mv = cv.visitMethod(access, name, desc, null, null);
return new MethodGenerator(mv, access, name, desc);
}
static MethodGenerator makeConstructor(final ClassVisitor cv) {
- final int access = ACC_PUBLIC;
+ final int access = 0;
final String name = INIT;
final String desc = DEFAULT_INIT_DESC;
final MethodVisitor mv = cv.visitMethod(access, name, desc, null, null);
--- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package jdk.nashorn.internal.tools.nasgen;
+import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER;
import static jdk.internal.org.objectweb.asm.Opcodes.H_INVOKESTATIC;
@@ -80,7 +81,7 @@
byte[] getClassBytes() {
// new class extensing from ScriptObject
final String superClass = (constructor != null)? SCRIPTFUNCTIONIMPL_TYPE : SCRIPTOBJECT_TYPE;
- cw.visit(V1_7, ACC_PUBLIC | ACC_SUPER, className, null, superClass, null);
+ cw.visit(V1_7, ACC_FINAL, className, null, superClass, null);
if (memberCount > 0) {
// add fields
emitFields();
--- a/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package jdk.nashorn.internal.tools.nasgen;
+import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER;
import static jdk.internal.org.objectweb.asm.Opcodes.V1_7;
@@ -60,7 +61,7 @@
byte[] getClassBytes() {
// new class extensing from ScriptObject
- cw.visit(V1_7, ACC_PUBLIC | ACC_SUPER, className, null, PROTOTYPEOBJECT_TYPE, null);
+ cw.visit(V1_7, ACC_FINAL | ACC_SUPER, className, null, PROTOTYPEOBJECT_TYPE, null);
if (memberCount > 0) {
// add fields
emitFields();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/exclude/exclude_list.txt Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<excludeList>
+</excludeList>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/exclude/exclude_list_cc.txt Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<excludeList>
+ <test id="JDK-8014647.js" />
+ <test id="javaclassoverrides.js" />
+</excludeList>
--- a/nashorn/make/build.xml Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/make/build.xml Mon Aug 12 09:29:06 2013 -0400
@@ -47,17 +47,22 @@
<!-- check if testng.jar is avaiable -->
<available property="testng.available" file="${file.reference.testng.jar}"/>
- <!-- enable/disable make code coverage -->
- <condition property="cc.enabled">
- <istrue value="${make.code.coverage}" />
- </condition>
+ <!-- enable/disable make code coverage -->
+ <condition property="cc.enabled">
+ <istrue value="${make.code.coverage}" />
+ </condition>
+
+ <!-- exclude tests in exclude lists -->
+ <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt">
+ <istrue value="${make.code.coverage}" />
+ </condition>
</target>
<target name="init" depends="init-conditions, init-cc">
- <!-- extends jvm args -->
- <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs}"/>
- <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs}" />
+ <!-- extends jvm args -->
+ <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs}"/>
+ <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs}" />
<echo message="run.test.jvmargs=${run.test.jvmargs}"/>
<echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/>
@@ -262,6 +267,11 @@
grant codeBase "file:/${basedir}/test/script/basic/JDK-8010946-privileged.js" {
permission java.util.PropertyPermission "java.security.policy", "read";
};
+
+grant codeBase "file:/${basedir}/test/script/basic/classloader.js" {
+ permission java.lang.RuntimePermission "nashorn.JavaReflection";
+};
+
</echo>
<replace file="${build.dir}/nashorn.policy"><replacetoken>\</replacetoken><replacevalue>/</replacevalue></replace> <!--hack for Windows - to make URLs with normal path separators -->
@@ -284,19 +294,6 @@
</target>
<target name="test" depends="jar, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
- <java classname="${nashorn.shell.tool}" fork="true" dir="${test.script.dir}/representations" output="${build.dir}/output1.log" error="${build.dir}/err.log">
- <jvmarg line="${ext.class.path}"/>
- <jvmarg line="-Dnashorn.fields.dual=true"/>
- <arg value="NASHORN-592a.js"/>
- </java>
- <java classname="${nashorn.shell.tool}" fork="true" dir="${test.script.dir}/representations" output="${build.dir}/output2.log" error="${build.dir}/err.log">
- <jvmarg line="${ext.class.path}"/>
- <arg value="NASHORN-592a.js"/>
- </java>
- <condition property="representation-ok">
- <filesmatch file1="${build.dir}/output1.log" file2="${build.dir}/output2.log"/>
- </condition>
- <fail unless="representation-ok">Representation test failed - output differs!</fail>
<fileset id="test.classes" dir="${build.test.classes.dir}">
<include name="**/api/javaaccess/*Test.class"/>
<include name="**/api/scripting/*Test.class"/>
@@ -316,6 +313,7 @@
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</propertyset>
+ <sysproperty key="test.js.excludes.file" value="${exclude.list}"/>
<classpath>
<pathelement path="${run.test.classpath}"/>
</classpath>
--- a/nashorn/make/code_coverage.xml Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/make/code_coverage.xml Mon Aug 12 09:29:06 2013 -0400
@@ -132,7 +132,7 @@
<arg value="-exclude"/>
<arg value="com\.oracle\.nashorn\.runtime\.ScriptRuntime*"/>
<arg value="-exclude"/>
- <arg value="jdk\.nashorn\.internal\.javaadapters*"/>
+ <arg value="jdk\.nashorn\.javaadapters*"/>
<arg value="-exclude"/>
<arg value="jdk\.nashorn\.internal\.objects\.annotations*"/>
<arg value="-exclude"/>
--- a/nashorn/make/project.properties Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/make/project.properties Mon Aug 12 09:29:06 2013 -0400
@@ -223,7 +223,6 @@
run.test.user.country=TR
# -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMethods
-# add '-Dtest.js.outofprocess' to run each test in a new sub-process
run.test.jvmargs.main=-server -Xmx${run.test.xmx} -XX:+TieredCompilation -ea -Dfile.encoding=UTF-8 -Duser.language=${run.test.user.language} -Duser.country=${run.test.user.country}
#-XX:+HeapDumpOnOutOfMemoryError -XX:-UseCompressedKlassPointers -XX:+PrintHeapAtGC -XX:ClassMetaspaceSize=300M
@@ -231,6 +230,9 @@
run.test.jvmsecurityargs=-Xverify:all -Djava.security.properties=${basedir}/make/java.security.override -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
+# VM options for script tests with @fork option
+test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} ${run.test.jvmsecurityargs}
+
# path of rhino.jar for benchmarks
rhino.jar=
--- a/nashorn/src/jdk/internal/dynalink/beans/AbstractJavaLinker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/internal/dynalink/beans/AbstractJavaLinker.java Mon Aug 12 09:29:06 2013 -0400
@@ -303,14 +303,13 @@
private static MethodHandle unreflectSafely(AccessibleObject m) {
if(m instanceof Method) {
final Method reflMethod = (Method)m;
- final MethodHandle handle = SafeUnreflector.unreflect(reflMethod);
+ final MethodHandle handle = Lookup.PUBLIC.unreflect(reflMethod);
if(Modifier.isStatic(reflMethod.getModifiers())) {
return StaticClassIntrospector.editStaticMethodHandle(handle);
}
return handle;
}
- return StaticClassIntrospector.editConstructorMethodHandle(SafeUnreflector.unreflectConstructor(
- (Constructor<?>)m));
+ return StaticClassIntrospector.editConstructorMethodHandle(Lookup.PUBLIC.unreflectConstructor((Constructor<?>)m));
}
private static DynamicMethod mergeMethods(SingleDynamicMethod method, DynamicMethod existing, Class<?> clazz, String name) {
--- a/nashorn/src/jdk/internal/dynalink/beans/FacetIntrospector.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/internal/dynalink/beans/FacetIntrospector.java Mon Aug 12 09:29:06 2013 -0400
@@ -92,6 +92,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
+import jdk.internal.dynalink.support.Lookup;
/**
* Base for classes that expose class field and method information to an {@link AbstractJavaLinker}. There are
@@ -160,11 +161,11 @@
MethodHandle unreflectGetter(Field field) {
- return editMethodHandle(SafeUnreflector.unreflectGetter(field));
+ return editMethodHandle(Lookup.PUBLIC.unreflectGetter(field));
}
MethodHandle unreflectSetter(Field field) {
- return editMethodHandle(SafeUnreflector.unreflectSetter(field));
+ return editMethodHandle(Lookup.PUBLIC.unreflectSetter(field));
}
/**
--- a/nashorn/src/jdk/internal/dynalink/beans/SafeUnreflector.java Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2010, 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.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file, and Oracle licenses the original version of this file under the BSD
- * license:
- */
-/*
- Copyright 2009-2013 Attila Szegedi
-
- Licensed under both the Apache License, Version 2.0 (the "Apache License")
- and the BSD License (the "BSD License"), with licensee being free to
- choose either of the two at their discretion.
-
- You may not use this file except in compliance with either the Apache
- License or the BSD License.
-
- If you choose to use this file in compliance with the Apache License, the
- following notice applies to you:
-
- You may obtain a copy of the Apache License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
-
- If you choose to use this file in compliance with the BSD License, the
- following notice applies to you:
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the copyright holder nor the names of
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package jdk.internal.dynalink.beans;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import jdk.internal.dynalink.beans.sandbox.Unreflector;
-
-/**
- * Provides lookup of unreflected method handles through delegation to an instance of {@link SafeUnreflectorImpl}. If
- * Dynalink is run as trusted code, the delegate class is loaded into an isolated zero-permissions protection domain,
- * serving as a firebreak against an accidental privilege escalation downstream.
- */
-final class SafeUnreflector {
- private static final String UNREFLECTOR_IMPL_CLASS_NAME = "jdk.internal.dynalink.beans.SafeUnreflectorImpl";
- private static final Unreflector impl = createImpl();
-
- private SafeUnreflector() {
- }
-
- /**
- * Performs a {@link java.lang.invoke.MethodHandles.Lookup#unreflect(Method)}, converting any encountered
- * {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param m the method to unreflect
- * @return the unreflected method handle.
- */
- static MethodHandle unreflect(Method m) {
- return impl.unreflect(m);
- }
-
- /**
- * Performs a {@link java.lang.invoke.MethodHandles.Lookup#unreflectGetter(Field)}, converting any encountered
- * {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param f the field for which a getter is unreflected
- * @return the unreflected field getter handle.
- */
- static MethodHandle unreflectGetter(Field f) {
- return impl.unreflectGetter(f);
- }
-
- /**
- * Performs a {@link java.lang.invoke.MethodHandles.Lookup#unreflectSetter(Field)}, converting any encountered
- * {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param f the field for which a setter is unreflected
- * @return the unreflected field setter handle.
- */
- static MethodHandle unreflectSetter(Field f) {
- return impl.unreflectSetter(f);
- }
-
- static MethodHandle unreflectConstructor(Constructor<?> c) {
- return impl.unreflectConstructor(c);
- }
-
- private static Unreflector createImpl() {
- final Class<?> unreflectorImplClass = AccessController.doPrivileged(new PrivilegedAction<Class<?>>() {
- @Override
- public Class<?> run() {
- return SandboxClassLoader.loadClass(UNREFLECTOR_IMPL_CLASS_NAME);
- }
- });
- try {
- return (Unreflector)unreflectorImplClass.newInstance();
- } catch(InstantiationException | IllegalAccessException e) {
- throw new RuntimeException(e.getMessage(), e);
- }
- }
-}
--- a/nashorn/src/jdk/internal/dynalink/beans/SafeUnreflectorImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2010, 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.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file, and Oracle licenses the original version of this file under the BSD
- * license:
- */
-/*
- Copyright 2009-2013 Attila Szegedi
-
- Licensed under both the Apache License, Version 2.0 (the "Apache License")
- and the BSD License (the "BSD License"), with licensee being free to
- choose either of the two at their discretion.
-
- You may not use this file except in compliance with either the Apache
- License or the BSD License.
-
- If you choose to use this file in compliance with the Apache License, the
- following notice applies to you:
-
- You may obtain a copy of the Apache License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
-
- If you choose to use this file in compliance with the BSD License, the
- following notice applies to you:
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the copyright holder nor the names of
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package jdk.internal.dynalink.beans;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodHandles;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import jdk.internal.dynalink.beans.sandbox.Unreflector;
-
-/**
- * Performs lookup of unreflected method handles by delegating to {@link MethodHandles#lookup()} using itself as the
- * lookup class. When Dynalink runs as trusted code, this class is loaded into an isolated zero-permissions protection
- * domain to stop any accidental privilege escalation.
- */
-final class SafeUnreflectorImpl implements Unreflector {
-
- SafeUnreflectorImpl() {
- }
-
- @Override
- public MethodHandle unreflect(Method m) {
- try {
- return MethodHandles.lookup().unreflect(m);
- } catch(IllegalAccessException e) {
- final IllegalAccessError ee = new IllegalAccessError("Failed to unreflect method " + m);
- ee.initCause(e);
- throw ee;
- }
- }
-
- @Override
- public MethodHandle unreflectGetter(Field f) {
- try {
- return MethodHandles.lookup().unreflectGetter(f);
- } catch(IllegalAccessException e) {
- final IllegalAccessError ee = new IllegalAccessError("Failed to unreflect getter for field " + f);
- ee.initCause(e);
- throw ee;
- }
- }
-
- @Override
- public MethodHandle unreflectSetter(Field f) {
- try {
- return MethodHandles.lookup().unreflectSetter(f);
- } catch(IllegalAccessException e) {
- final IllegalAccessError ee = new IllegalAccessError("Failed to unreflect setter for field " + f);
- ee.initCause(e);
- throw ee;
- }
- }
-
- @Override
- public MethodHandle unreflectConstructor(Constructor<?> c) {
- try {
- return MethodHandles.lookup().unreflectConstructor(c);
- } catch(IllegalAccessException e) {
- final IllegalAccessError ee = new IllegalAccessError("Failed to unreflect constructor " + c);
- ee.initCause(e);
- throw ee;
- }
- }
-}
--- a/nashorn/src/jdk/internal/dynalink/beans/SandboxClassLoader.java Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 2010, 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.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file, and Oracle licenses the original version of this file under the BSD
- * license:
- */
-/*
- Copyright 2009-2013 Attila Szegedi
-
- Licensed under both the Apache License, Version 2.0 (the "Apache License")
- and the BSD License (the "BSD License"), with licensee being free to
- choose either of the two at their discretion.
-
- You may not use this file except in compliance with either the Apache
- License or the BSD License.
-
- If you choose to use this file in compliance with the Apache License, the
- following notice applies to you:
-
- You may obtain a copy of the Apache License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
-
- If you choose to use this file in compliance with the BSD License, the
- following notice applies to you:
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the copyright holder nor the names of
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package jdk.internal.dynalink.beans;
-
-import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
-import static jdk.internal.org.objectweb.asm.Opcodes.ASM4;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.Permissions;
-import java.security.ProtectionDomain;
-import java.security.SecureClassLoader;
-import java.security.SecureRandom;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassVisitor;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
-
-/**
- * A utility class that can load a class with specified name into an isolated zero-permissions protection domain. It can
- * be used to load classes that perform security-sensitive operations with no privileges at all, therefore ensuring such
- * operations will only succeed if they would require no permissions, as well as to make sure that if these operations
- * bind some part of the security execution context to their results, the bound security context is completely
- * unprivileged. Such measures serve as firebreaks against accidental privilege escalation.
- */
-final class SandboxClassLoader {
- private final String className;
- private final String randomizedClassName;
-
- private SandboxClassLoader(String className) {
- this.className = className;
- final String simpleClassName = className.substring(className.lastIndexOf('.') + 1);
- this.randomizedClassName = "randomPackage" + Long.toHexString(new SecureRandom().nextLong()) + "." + simpleClassName;
- }
-
- /**
- * Load the named class into a zero-permissions protection domain. Even if the class is already loaded into the
- * Dynalink's class loader, an independent class is created from the same bytecode, thus the returned class will
- * never be identical with the one that might already be loaded. The class to be loaded is supposed to be package
- * private and have no public constructors. This is not a functional requirement, but it is enforced to ensure that
- * the original class was made adequately inaccessible. The returned class will be public and its constructors will
- * be changed to public. The only permission given to the returned class will be
- * {@code accessClassInPackage.jdk.internal.dynalink.beans.sandbox}. That package should be used solely to define
- * SPI interfaces implemented by the loaded class.
- * @param className the fully qualified name of the class to load
- * @return the loaded class, renamed to a random package, made public, its constructors made public, and lacking any
- * permissions except access to the sandbox package.
- * @throws SecurityException if the calling code lacks the {@code createClassLoader} runtime permission. This
- * normally means that Dynalink itself is running as untrusted code, and whatever functionality was meant to be
- * isolated into an unprivileged class is likely okay to be used directly too.
- */
- static Class<?> loadClass(String className) throws SecurityException {
- return new SandboxClassLoader(className).loadClass();
- }
-
- private Class<?> loadClass() throws SecurityException {
- final ClassLoader loader = createClassLoader();
- try {
- final Class<?> clazz = Class.forName(randomizedClassName, true, loader);
- // Sanity check to ensure we didn't accidentally pick up the class from elsewhere
- if(clazz.getClassLoader() != loader) {
- throw new AssertionError(randomizedClassName + " was loaded from a different class loader");
- }
- return clazz;
- } catch(ClassNotFoundException e) {
- throw new AssertionError(e);
- }
- }
-
- private ClassLoader createClassLoader() throws SecurityException {
- final String lclassName = this.randomizedClassName;
- // We deliberately override loadClass instead of findClass so that we don't give a chance to finding this
- // class already loaded anywhere else. We use this class' loader as the parent class loader as the loaded class
- // needs to be able to access implemented interfaces from the sandbox package.
- return new SecureClassLoader(getClass().getClassLoader()) {
- @Override
- protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
- if(name.equals(lclassName)) {
- final byte[] bytes = getClassBytes();
- // Define the class with a protection domain that grants (almost) no permissions.
- Class<?> clazz = defineClass(name, bytes, 0, bytes.length, createMinimalPermissionsDomain());
- if(resolve) {
- resolveClass(clazz);
- }
- return clazz;
- }
-
- final int i = name.lastIndexOf('.');
- if (i != -1) {
- final SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPackageAccess(name.substring(0, i));
- }
- }
- return super.loadClass(name, resolve);
- }
- };
- }
-
- /**
- * Create a no-permissions protection domain. Except, it's not really a no-permissions protection domain, since we
- * need to give the protection domain the permission to access the sandbox package where the interop interfaces are
- * defined.
- * @return a new (almost) no-permission protection domain.
- */
- private static ProtectionDomain createMinimalPermissionsDomain() {
- final Permissions p = new Permissions();
- p.add(new RuntimePermission("accessClassInPackage.jdk.internal.dynalink.beans.sandbox"));
- return new ProtectionDomain(null, p);
- }
-
- private byte[] getClassBytes() {
- try(final InputStream in = getClass().getResourceAsStream("/" + className.replace('.', '/') + ".class")) {
- final ClassReader cr = new ClassReader(in);
- final ClassWriter cw = new ClassWriter(cr, 0);
- cr.accept(new ClassVisitor(ASM4, cw) {
- @Override
- public void visit(int version, int access, String name, String signature, String superName,
- String[] interfaces) {
- // Rename the class to its random name, and make it public (otherwise we won't be able to
- // instantiate it). The privileged template class is package-private.
- if((access & ACC_PUBLIC) != 0) {
- throw new IllegalArgumentException("Class " + className + " must be package-private");
- }
- super.visit(version, access | ACC_PUBLIC, randomizedClassName.replace('.', '/'),
- signature, superName, interfaces);
- }
-
- @Override
- public MethodVisitor visitMethod(int access, String name, String desc, String signature,
- String[] exceptions) {
- // Make the constructor(s) public (otherwise we won't be able to instantiate the class). The
- // privileged template's constructor(s) should not be public.
- final boolean isCtor = "<init>".equals(name);
- if(isCtor && ((access & ACC_PUBLIC) != 0)) {
- throw new IllegalArgumentException("Class " + className + " must have no public constructors");
- }
- return super.visitMethod(isCtor ? (access | ACC_PUBLIC) : access, name, desc, signature,
- exceptions);
- }
- }, 0);
- return cw.toByteArray();
- } catch(IOException e) {
- throw new RuntimeException(e);
- }
- }
-}
--- a/nashorn/src/jdk/internal/dynalink/beans/StaticClassLinker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/internal/dynalink/beans/StaticClassLinker.java Mon Aug 12 09:29:06 2013 -0400
@@ -132,7 +132,9 @@
return new SimpleDynamicMethod(StaticClassIntrospector.editConstructorMethodHandle(
boundArrayCtor.asType(boundArrayCtor.type().changeReturnType(clazz))), clazz, "<init>");
}
-
+ if(CheckRestrictedPackage.isRestrictedClass(clazz)) {
+ return null;
+ }
return createDynamicMethod(Arrays.asList(clazz.getConstructors()), clazz, "<init>");
}
--- a/nashorn/src/jdk/internal/dynalink/beans/sandbox/Unreflector.java Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2010, 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.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file, and Oracle licenses the original version of this file under the BSD
- * license:
- */
-/*
- Copyright 2009-2013 Attila Szegedi
-
- Licensed under both the Apache License, Version 2.0 (the "Apache License")
- and the BSD License (the "BSD License"), with licensee being free to
- choose either of the two at their discretion.
-
- You may not use this file except in compliance with either the Apache
- License or the BSD License.
-
- If you choose to use this file in compliance with the Apache License, the
- following notice applies to you:
-
- You may obtain a copy of the Apache License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
-
- If you choose to use this file in compliance with the BSD License, the
- following notice applies to you:
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the copyright holder nor the names of
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package jdk.internal.dynalink.beans.sandbox;
-
-import java.lang.invoke.MethodHandle;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-/**
- * Interface for creating unreflected method handles. This class is public for implementation purposes and is not part
- * of any supported API.
- */
-public interface Unreflector {
- /**
- * Performs similarly to {@link java.lang.invoke.MethodHandles.Lookup#unreflect(Method)} for some lookup object,
- * also converting any encountered {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param m the method to unreflect
- * @return the unreflected method handle.
- */
- public MethodHandle unreflect(Method m);
-
- /**
- * Performs similarly to {@link java.lang.invoke.MethodHandles.Lookup#unreflectGetter(Field)} for some lookup
- * object, also converting any encountered {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param f the field for which a getter is unreflected
- * @return the unreflected field getter handle.
- */
- public MethodHandle unreflectGetter(Field f);
-
- /**
- * Performs similarly to {@link java.lang.invoke.MethodHandles.Lookup#unreflectSetter(Field)} for some lookup
- * object, also converting any encountered {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param f the field for which a setter is unreflected
- * @return the unreflected field setter handle.
- */
- public MethodHandle unreflectSetter(Field f);
-
- /**
- * Performs similarly to {@link java.lang.invoke.MethodHandles.Lookup#unreflectConstructor(Constructor)} for some
- * lookup object, also converting any encountered {@link IllegalAccessException} into an {@link IllegalAccessError}.
- *
- * @param c the constructor to unreflect
- * @return the unreflected constructor handle.
- */
- public MethodHandle unreflectConstructor(Constructor<?> c);
-
-}
--- a/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/api/scripting/NashornScriptEngine.java Mon Aug 12 09:29:06 2013 -0400
@@ -40,6 +40,9 @@
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.ResourceBundle;
import javax.script.AbstractScriptEngine;
import javax.script.Bindings;
import javax.script.Compilable;
@@ -79,6 +82,28 @@
// default options passed to Nashorn Options object
private static final String[] DEFAULT_OPTIONS = new String[] { "-scripting", "-doe" };
+ private static final String MESSAGES_RESOURCE = "jdk.nashorn.api.scripting.resources.Messages";
+
+ // Without do privileged, under security manager messages can not be loaded.
+ private static final ResourceBundle MESSAGES_BUNDLE;
+ static {
+ MESSAGES_BUNDLE = AccessController.doPrivileged(
+ new PrivilegedAction<ResourceBundle>() {
+ @Override
+ public ResourceBundle run() {
+ return ResourceBundle.getBundle(MESSAGES_RESOURCE, Locale.getDefault());
+ }
+ });
+ }
+
+ private static String getMessage(final String msgId, final String... args) {
+ try {
+ return new MessageFormat(MESSAGES_BUNDLE.getString(msgId)).format(args);
+ } catch (final java.util.MissingResourceException e) {
+ throw new RuntimeException("no message resource found for message id: "+ msgId);
+ }
+ }
+
NashornScriptEngine(final NashornScriptEngineFactory factory, final ClassLoader appLoader) {
this(factory, DEFAULT_OPTIONS, appLoader);
}
@@ -176,43 +201,63 @@
}
@Override
- public Object invokeMethod(final Object self, final String name, final Object... args)
+ public Object invokeMethod(final Object thiz, final String name, final Object... args)
throws ScriptException, NoSuchMethodException {
- if (self == null) {
- throw new IllegalArgumentException("script object can not be null");
+ if (thiz == null) {
+ throw new IllegalArgumentException(getMessage("thiz.cannot.be.null"));
}
- return invokeImpl(self, name, args);
+ return invokeImpl(thiz, name, args);
}
- private <T> T getInterfaceInner(final Object self, final Class<T> clazz) {
+ private <T> T getInterfaceInner(final Object thiz, final Class<T> clazz) {
if (clazz == null || !clazz.isInterface()) {
- throw new IllegalArgumentException("interface Class expected");
+ throw new IllegalArgumentException(getMessage("interface.class.expected"));
}
// perform security access check as early as possible
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (! Modifier.isPublic(clazz.getModifiers())) {
- throw new SecurityException("attempt to implement non-public interfce: " + clazz);
+ throw new SecurityException(getMessage("implementing.non.public.interface", clazz.getName()));
}
Context.checkPackageAccess(clazz.getName());
}
- final ScriptObject realSelf;
- final ScriptObject ctxtGlobal = getNashornGlobalFrom(context);
- if(self == null) {
- realSelf = ctxtGlobal;
- } else if (!(self instanceof ScriptObject)) {
- realSelf = (ScriptObject)ScriptObjectMirror.unwrap(self, ctxtGlobal);
- } else {
- realSelf = (ScriptObject)self;
+ ScriptObject realSelf = null;
+ ScriptObject realGlobal = null;
+ if(thiz == null) {
+ // making interface out of global functions
+ realSelf = realGlobal = getNashornGlobalFrom(context);
+ } else if (thiz instanceof ScriptObjectMirror) {
+ final ScriptObjectMirror mirror = (ScriptObjectMirror)thiz;
+ realSelf = mirror.getScriptObject();
+ realGlobal = mirror.getHomeGlobal();
+ if (! realGlobal.isOfContext(nashornContext)) {
+ throw new IllegalArgumentException(getMessage("script.object.from.another.engine"));
+ }
+ } else if (thiz instanceof ScriptObject) {
+ // called from script code.
+ realSelf = (ScriptObject)thiz;
+ realGlobal = Context.getGlobal();
+ if (realGlobal == null) {
+ throw new IllegalArgumentException(getMessage("no.current.nashorn.global"));
+ }
+
+ if (! realGlobal.isOfContext(nashornContext)) {
+ throw new IllegalArgumentException(getMessage("script.object.from.another.engine"));
+ }
+ }
+
+ if (realSelf == null) {
+ throw new IllegalArgumentException(getMessage("interface.on.non.script.object"));
}
try {
- final ScriptObject oldGlobal = getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
+ final boolean globalChanged = (oldGlobal != realGlobal);
try {
- if(oldGlobal != ctxtGlobal) {
- setNashornGlobal(ctxtGlobal);
+ if (globalChanged) {
+ Context.setGlobal(realGlobal);
}
if (! isInterfaceImplemented(clazz, realSelf)) {
@@ -220,8 +265,8 @@
}
return clazz.cast(JavaAdapterFactory.getConstructor(realSelf.getClass(), clazz).invoke(realSelf));
} finally {
- if(oldGlobal != ctxtGlobal) {
- setNashornGlobal(oldGlobal);
+ if (globalChanged) {
+ Context.setGlobal(oldGlobal);
}
}
} catch(final RuntimeException|Error e) {
@@ -237,11 +282,11 @@
}
@Override
- public <T> T getInterface(final Object self, final Class<T> clazz) {
- if (self == null) {
- throw new IllegalArgumentException("script object can not be null");
+ public <T> T getInterface(final Object thiz, final Class<T> clazz) {
+ if (thiz == null) {
+ throw new IllegalArgumentException(getMessage("thiz.cannot.be.null"));
}
- return getInterfaceInner(self, clazz);
+ return getInterfaceInner(thiz, clazz);
}
// These are called from the "engine.js" script
@@ -357,50 +402,48 @@
}
private Object invokeImpl(final Object selfObject, final String name, final Object... args) throws ScriptException, NoSuchMethodException {
- final ScriptObject oldGlobal = getNashornGlobal();
- final ScriptObject ctxtGlobal = getNashornGlobalFrom(context);
- final boolean globalChanged = (oldGlobal != ctxtGlobal);
+ name.getClass(); // null check
- Object self = globalChanged? ScriptObjectMirror.wrap(selfObject, oldGlobal) : selfObject;
+ ScriptObjectMirror selfMirror = null;
+ if (selfObject instanceof ScriptObjectMirror) {
+ selfMirror = (ScriptObjectMirror)selfObject;
+ if (! selfMirror.getHomeGlobal().isOfContext(nashornContext)) {
+ throw new IllegalArgumentException(getMessage("script.object.from.another.engine"));
+ }
+ } else if (selfObject instanceof ScriptObject) {
+ // invokeMethod called from script code - in which case we may get 'naked' ScriptObject
+ // Wrap it with oldGlobal to make a ScriptObjectMirror for the same.
+ final ScriptObject oldGlobal = Context.getGlobal();
+ if (oldGlobal == null) {
+ throw new IllegalArgumentException(getMessage("no.current.nashorn.global"));
+ }
- try {
- if (globalChanged) {
- setNashornGlobal(ctxtGlobal);
+ if (! oldGlobal.isOfContext(nashornContext)) {
+ throw new IllegalArgumentException(getMessage("script.object.from.another.engine"));
}
- ScriptObject sobj;
- Object value = null;
-
- self = ScriptObjectMirror.unwrap(self, ctxtGlobal);
-
- // FIXME: should convert when self is not ScriptObject
- if (self instanceof ScriptObject) {
- sobj = (ScriptObject)self;
- value = sobj.get(name);
- } else if (self == null) {
- self = ctxtGlobal;
- sobj = ctxtGlobal;
- value = sobj.get(name);
- }
+ selfMirror = (ScriptObjectMirror)ScriptObjectMirror.wrap(selfObject, oldGlobal);
+ } else if (selfObject == null) {
+ // selfObject is null => global function call
+ final ScriptObject ctxtGlobal = getNashornGlobalFrom(context);
+ selfMirror = (ScriptObjectMirror)ScriptObjectMirror.wrap(ctxtGlobal, ctxtGlobal);
+ }
- if (value instanceof ScriptFunction) {
- final Object res;
- try {
- final Object[] modArgs = globalChanged? ScriptObjectMirror.wrapArray(args, oldGlobal) : args;
- res = ScriptRuntime.checkAndApply((ScriptFunction)value, self, ScriptObjectMirror.unwrapArray(modArgs, ctxtGlobal));
- } catch (final Exception e) {
- throwAsScriptException(e);
- throw new AssertionError("should not reach here");
+ if (selfMirror != null) {
+ try {
+ return ScriptObjectMirror.translateUndefined(selfMirror.call(name, args));
+ } catch (final Exception e) {
+ final Throwable cause = e.getCause();
+ if (cause instanceof NoSuchMethodException) {
+ throw (NoSuchMethodException)cause;
}
- return ScriptObjectMirror.translateUndefined(ScriptObjectMirror.wrap(res, ctxtGlobal));
- }
-
- throw new NoSuchMethodException(name);
- } finally {
- if (globalChanged) {
- setNashornGlobal(oldGlobal);
+ throwAsScriptException(e);
+ throw new AssertionError("should not reach here");
}
}
+
+ // Non-script object passed as selfObject
+ throw new IllegalArgumentException(getMessage("interface.on.non.script.object"));
}
private Object evalImpl(final char[] buf, final ScriptContext ctxt) throws ScriptException {
@@ -411,12 +454,12 @@
if (script == null) {
return null;
}
- final ScriptObject oldGlobal = getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final ScriptObject ctxtGlobal = getNashornGlobalFrom(ctxt);
final boolean globalChanged = (oldGlobal != ctxtGlobal);
try {
if (globalChanged) {
- setNashornGlobal(ctxtGlobal);
+ Context.setGlobal(ctxtGlobal);
}
setContextVariables(ctxt);
@@ -426,7 +469,7 @@
throw new AssertionError("should not reach here");
} finally {
if (globalChanged) {
- setNashornGlobal(oldGlobal);
+ Context.setGlobal(oldGlobal);
}
}
}
@@ -469,12 +512,12 @@
}
private ScriptFunction compileImpl(final Source source, final ScriptContext ctxt) throws ScriptException {
- final ScriptObject oldGlobal = getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final ScriptObject ctxtGlobal = getNashornGlobalFrom(ctxt);
final boolean globalChanged = (oldGlobal != ctxtGlobal);
try {
if (globalChanged) {
- setNashornGlobal(ctxtGlobal);
+ Context.setGlobal(ctxtGlobal);
}
return nashornContext.compileScript(source, ctxtGlobal);
@@ -483,7 +526,7 @@
throw new AssertionError("should not reach here");
} finally {
if (globalChanged) {
- setNashornGlobal(oldGlobal);
+ Context.setGlobal(oldGlobal);
}
}
}
@@ -502,19 +545,4 @@
}
return true;
}
-
- // don't make this public!!
- static ScriptObject getNashornGlobal() {
- return Context.getGlobal();
- }
-
- static void setNashornGlobal(final ScriptObject newGlobal) {
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
- @Override
- public Void run() {
- Context.setGlobal(newGlobal);
- return null;
- }
- });
- }
}
--- a/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java Mon Aug 12 09:29:06 2013 -0400
@@ -79,17 +79,17 @@
// JSObject methods
@Override
public Object call(final String functionName, final Object... args) {
- final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final boolean globalChanged = (oldGlobal != global);
try {
if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(global);
+ Context.setGlobal(global);
}
final Object val = functionName == null? sobj : sobj.get(functionName);
if (! (val instanceof ScriptFunction)) {
- throw new RuntimeException("No such function " + ((functionName != null)? functionName : ""));
+ throw new NoSuchMethodException("No such function " + ((functionName != null)? functionName : ""));
}
final Object[] modArgs = globalChanged? wrapArray(args, oldGlobal) : args;
@@ -100,19 +100,19 @@
throw new RuntimeException(t);
} finally {
if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(oldGlobal);
+ Context.setGlobal(oldGlobal);
}
}
}
@Override
public Object newObject(final String functionName, final Object... args) {
- final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final boolean globalChanged = (oldGlobal != global);
try {
if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(global);
+ Context.setGlobal(global);
}
final Object val = functionName == null? sobj : sobj.get(functionName);
@@ -128,7 +128,7 @@
throw new RuntimeException(t);
} finally {
if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(oldGlobal);
+ Context.setGlobal(oldGlobal);
}
}
}
@@ -272,7 +272,7 @@
@Override
public Object put(final String key, final Object value) {
- final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final boolean globalChanged = (oldGlobal != global);
return inGlobal(new Callable<Object>() {
@Override public Object call() {
@@ -284,7 +284,7 @@
@Override
public void putAll(final Map<? extends String, ? extends Object> map) {
- final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final boolean globalChanged = (oldGlobal != global);
inGlobal(new Callable<Object>() {
@Override public Object call() {
@@ -535,7 +535,7 @@
* @return wrapped object
*/
public static Object wrap(final Object obj, final ScriptObject homeGlobal) {
- return (obj instanceof ScriptObject) ? new ScriptObjectMirror((ScriptObject)obj, homeGlobal) : obj;
+ return (obj instanceof ScriptObject && homeGlobal != null) ? new ScriptObjectMirror((ScriptObject)obj, homeGlobal) : obj;
}
/**
@@ -599,24 +599,32 @@
// package-privates below this.
ScriptObjectMirror(final ScriptObject sobj, final ScriptObject global) {
+ assert sobj != null : "ScriptObjectMirror on null!";
+ assert global != null : "null global for ScriptObjectMirror!";
+
this.sobj = sobj;
this.global = global;
}
+ // accessors for script engine
ScriptObject getScriptObject() {
return sobj;
}
+ ScriptObject getHomeGlobal() {
+ return global;
+ }
+
static Object translateUndefined(Object obj) {
return (obj == ScriptRuntime.UNDEFINED)? null : obj;
}
// internals only below this.
private <V> V inGlobal(final Callable<V> callable) {
- final ScriptObject oldGlobal = NashornScriptEngine.getNashornGlobal();
+ final ScriptObject oldGlobal = Context.getGlobal();
final boolean globalChanged = (oldGlobal != global);
if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(global);
+ Context.setGlobal(global);
}
try {
return callable.call();
@@ -626,9 +634,8 @@
throw new AssertionError("Cannot happen", e);
} finally {
if (globalChanged) {
- NashornScriptEngine.setNashornGlobal(oldGlobal);
+ Context.setGlobal(oldGlobal);
}
}
}
-
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/src/jdk/nashorn/api/scripting/resources/Messages.properties Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2010, 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.
+#
+
+thiz.cannot.be.null=script object 'this' for getMethod, getInterface calls can not be null
+interface.class.expected=interface Class expected in getInterface
+interface.on.non.script.object=getInterface cannot be called on non-script object
+no.current.nashorn.global=no current Global instance for nashorn
+implementing.non.public.interface=Cannot implement non-public interface: {0}
+script.object.from.another.engine=Script object belongs to another script engine
+
--- a/nashorn/src/jdk/nashorn/api/scripting/resources/engine.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/api/scripting/resources/engine.js Mon Aug 12 09:29:06 2013 -0400
@@ -39,12 +39,20 @@
}
});
-function print(str) {
+function print() {
var writer = context.getWriter();
if (! (writer instanceof java.io.PrintWriter)) {
writer = new java.io.PrintWriter(writer);
}
- writer.println(String(str));
+
+ var buf = new java.lang.StringBuilder();
+ for (var i = 0; i < arguments.length; i++) {
+ if (i != 0) {
+ buf.append(' ');
+ }
+ buf.append(String(arguments[i]));
+ }
+ writer.println(buf.toString());
}
/**
--- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Mon Aug 12 09:29:06 2013 -0400
@@ -1143,22 +1143,23 @@
final Type elementType = arrayType.getElementType();
if (units != null) {
- final MethodEmitter savedMethod = method;
+ final MethodEmitter savedMethod = method;
+ final FunctionNode currentFunction = lc.getCurrentFunction();
for (final ArrayUnit arrayUnit : units) {
unit = lc.pushCompileUnit(arrayUnit.getCompileUnit());
final String className = unit.getUnitClassName();
- final String name = lc.getCurrentFunction().uniqueName(SPLIT_PREFIX.symbolName());
- final String signature = methodDescriptor(type, Object.class, ScriptFunction.class, ScriptObject.class, type);
+ final String name = currentFunction.uniqueName(SPLIT_PREFIX.symbolName());
+ final String signature = methodDescriptor(type, ScriptFunction.class, Object.class, ScriptObject.class, type);
final MethodEmitter me = unit.getClassEmitter().method(EnumSet.of(Flag.PUBLIC, Flag.STATIC), name, signature);
method = lc.pushMethodEmitter(me);
- method.setFunctionNode(lc.getCurrentFunction());
+ method.setFunctionNode(currentFunction);
method.begin();
- fixScopeSlot();
+ fixScopeSlot(currentFunction);
method.load(arrayType, SPLIT_ARRAY_ARG.slot());
@@ -1171,9 +1172,9 @@
method = lc.popMethodEmitter(me);
assert method == savedMethod;
- method.loadCompilerConstant(THIS);
+ method.loadCompilerConstant(CALLEE);
method.swap();
- method.loadCompilerConstant(CALLEE);
+ method.loadCompilerConstant(THIS);
method.swap();
method.loadCompilerConstant(SCOPE);
method.swap();
@@ -1680,11 +1681,8 @@
method = lc.pushMethodEmitter(splitEmitter);
method.setFunctionNode(fn);
- if (fn.needsCallee()) {
- caller.loadCompilerConstant(CALLEE);
- } else {
- caller.loadNull();
- }
+ assert fn.needsCallee() : "split function should require callee";
+ caller.loadCompilerConstant(CALLEE);
caller.loadCompilerConstant(THIS);
caller.loadCompilerConstant(SCOPE);
if (needsArguments) {
@@ -1694,18 +1692,18 @@
caller.storeCompilerConstant(RETURN);
method.begin();
+ // Copy scope to its target slot as first thing because the original slot could be used by return symbol.
+ fixScopeSlot(fn);
method.loadUndefined(fn.getReturnType());
method.storeCompilerConstant(RETURN);
- fixScopeSlot();
-
return true;
}
- private void fixScopeSlot() {
- if (lc.getCurrentFunction().compilerConstant(SCOPE).getSlot() != SCOPE.slot()) {
- // TODO hack to move the scope to the expected slot (that's needed because split methods reuse the same slots as the root method)
+ private void fixScopeSlot(final FunctionNode functionNode) {
+ // TODO hack to move the scope to the expected slot (needed because split methods reuse the same slots as the root method)
+ if (functionNode.compilerConstant(SCOPE).getSlot() != SCOPE.slot()) {
method.load(Type.typeFor(ScriptObject.class), SCOPE.slot());
method.storeCompilerConstant(SCOPE);
}
@@ -1756,7 +1754,7 @@
caller.ifne(breakLabel);
//has to be zero
caller.label(new Label("split_return"));
- method.loadCompilerConstant(RETURN);
+ caller.loadCompilerConstant(RETURN);
caller._return(lc.getCurrentFunction().getReturnType());
caller.label(breakLabel);
} else {
@@ -1787,6 +1785,11 @@
caller.label(breakLabel);
}
+ // If split has a return and caller is itself a split method it needs to propagate the return.
+ if (hasReturn) {
+ caller.setHasReturn();
+ }
+
return splitNode;
}
--- a/nashorn/src/jdk/nashorn/internal/codegen/FinalizeTypes.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/FinalizeTypes.java Mon Aug 12 09:29:06 2013 -0400
@@ -649,8 +649,8 @@
}
/**
- * A symbol (and {@link Property}) can be tagged as "may be primitive". This is
- * used a hint for dual fields that it is even worth it to try representing this
+ * A symbol (and {@link jdk.nashorn.internal.runtime.Property}) can be tagged as "may be primitive".
+ * This is used a hint for dual fields that it is even worth it to try representing this
* field as something other than java.lang.Object.
*
* @param node node in which to tag symbols as primitive
@@ -856,7 +856,7 @@
* if the expression type changes.
*
* Assignments use their lhs as node symbol, and in this case we can't modify
- * it. Then {@link CodeGenerator#Store} needs to do an explicit conversion.
+ * it. Then {@link CodeGenerator.Store} needs to do an explicit conversion.
* This is happens very rarely.
*
* @param node
--- a/nashorn/src/jdk/nashorn/internal/codegen/Label.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Label.java Mon Aug 12 09:29:06 2013 -0400
@@ -105,6 +105,18 @@
Stack copy() {
return new Stack(data, sp);
}
+
+ @Override
+ public String toString() {
+ final StringBuilder builder = new StringBuilder("[");
+ for (int i = 0; i < sp; i++) {
+ builder.append(data[i]);
+ if (i < sp - 1) {
+ builder.append(", ");
+ }
+ }
+ return builder.append("]").toString();
+ }
}
/** Name of this label */
--- a/nashorn/src/jdk/nashorn/internal/codegen/Lower.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Lower.java Mon Aug 12 09:29:06 2013 -0400
@@ -88,8 +88,6 @@
/**
* Constructor.
- *
- * @param compiler the compiler
*/
Lower() {
super(new BlockLexicalContext() {
@@ -307,8 +305,8 @@
final IdentNode exception = new IdentNode(token, finish, lc.getCurrentFunction().uniqueName("catch_all"));
- final Block catchBody = new Block(token, finish, new ThrowNode(lineNumber, token, finish, new IdentNode(exception), ThrowNode.IS_SYNTHETIC_RETHROW)).
- setIsTerminal(lc, true); //ends with throw, so terminal
+ final Block catchBody = new Block(token, finish, new ThrowNode(lineNumber, token, finish, new IdentNode(exception), ThrowNode.IS_SYNTHETIC_RETHROW));
+ assert catchBody.isTerminal(); //ends with throw, so terminal
final CatchNode catchAllNode = new CatchNode(lineNumber, token, finish, new IdentNode(exception), null, catchBody, CatchNode.IS_SYNTHETIC_RETHROW);
final Block catchAllBlock = new Block(token, finish, catchAllNode);
@@ -330,13 +328,12 @@
/**
* Splice finally code into all endpoints of a trynode
* @param tryNode the try node
- * @param list of rethrowing throw nodes from synthetic catch blocks
+ * @param rethrows list of rethrowing throw nodes from synthetic catch blocks
* @param finallyBody the code in the original finally block
* @return new try node after splicing finally code (same if nop)
*/
private Node spliceFinally(final TryNode tryNode, final List<ThrowNode> rethrows, final Block finallyBody) {
assert tryNode.getFinallyBody() == null;
- final int finish = tryNode.getFinish();
final TryNode newTryNode = (TryNode)tryNode.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) {
final List<Node> insideTry = new ArrayList<>();
@@ -404,7 +401,7 @@
if (!isTerminal(newStatements)) {
newStatements.add(endpoint);
}
- return BlockStatement.createReplacement(endpoint, finish, newStatements);
+ return BlockStatement.createReplacement(endpoint, tryNode.getFinish(), newStatements);
}
return endpoint;
}
@@ -466,7 +463,7 @@
if (tryNode.getCatchBlocks().isEmpty()) {
newTryNode = tryNode.setFinallyBody(null);
} else {
- Block outerBody = new Block(tryNode.getToken(), tryNode.getFinish(), new ArrayList<Statement>(Arrays.asList(tryNode.setFinallyBody(null))));
+ Block outerBody = new Block(tryNode.getToken(), tryNode.getFinish(), tryNode.setFinallyBody(null));
newTryNode = tryNode.setBody(outerBody).setCatchBlocks(null);
}
--- a/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/MethodEmitter.java Mon Aug 12 09:29:06 2013 -0400
@@ -1281,8 +1281,12 @@
}
MethodEmitter registerReturn() {
+ setHasReturn();
+ return this;
+ }
+
+ void setHasReturn() {
this.hasReturn = true;
- return this;
}
/**
--- a/nashorn/src/jdk/nashorn/internal/codegen/SpillObjectCreator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/SpillObjectCreator.java Mon Aug 12 09:29:06 2013 -0400
@@ -65,7 +65,7 @@
final int length = keys.size();
final Object[] presetValues = new Object[propertyMap.size()];
- final Class clazz = JO.class;
+ final Class<?> clazz = JO.class;
// Compute constant values
for (int i = 0; i < length; i++) {
--- a/nashorn/src/jdk/nashorn/internal/codegen/SplitMethodEmitter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/SplitMethodEmitter.java Mon Aug 12 09:29:06 2013 -0400
@@ -77,15 +77,15 @@
}
if (lc.isExternalTarget(splitNode, label)) {
- externalTargets.add(label);
- return externalTargets.size() - 1;
- }
- return -1;
+ externalTargets.add(label);
+ return externalTargets.size() - 1;
+ }
+ return -1;
}
@Override
MethodEmitter registerReturn() {
- super.registerReturn();
+ setHasReturn();
loadCompilerConstant(SCOPE);
checkcast(Scope.class);
load(0);
--- a/nashorn/src/jdk/nashorn/internal/codegen/Splitter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/Splitter.java Mon Aug 12 09:29:06 2013 -0400
@@ -96,6 +96,10 @@
long weight = WeighNodes.weigh(functionNode);
final boolean top = fn.isProgram(); //compiler.getFunctionNode() == outermost;
+ // We know that our LexicalContext is empty outside the call to functionNode.accept(this) below,
+ // so we can pass null to all methods expecting a LexicalContext parameter.
+ assert lc.isEmpty() : "LexicalContext not empty";
+
if (weight >= SPLIT_THRESHOLD) {
LOG.finest("Splitting '", functionNode.getName(), "' as its weight ", weight, " exceeds split threshold ", SPLIT_THRESHOLD);
functionNode = (FunctionNode)functionNode.accept(this);
@@ -103,11 +107,12 @@
if (functionNode.isSplit()) {
// Weight has changed so weigh again, this time using block weight cache
weight = WeighNodes.weigh(functionNode, weightCache);
- functionNode = functionNode.setBody(lc, functionNode.getBody().setNeedsScope(lc));
+ functionNode = functionNode.setBody(null, functionNode.getBody().setNeedsScope(null));
}
if (weight >= SPLIT_THRESHOLD) {
- functionNode = functionNode.setBody(lc, splitBlock(functionNode.getBody(), functionNode));
+ functionNode = functionNode.setBody(null, splitBlock(functionNode.getBody(), functionNode));
+ functionNode = functionNode.setFlag(null, FunctionNode.IS_SPLIT);
weight = WeighNodes.weigh(functionNode.getBody(), weightCache);
}
}
@@ -116,10 +121,10 @@
if (top) {
assert outermostCompileUnit != null : "outermost compile unit is null";
- functionNode = functionNode.setCompileUnit(lc, outermostCompileUnit);
+ functionNode = functionNode.setCompileUnit(null, outermostCompileUnit);
outermostCompileUnit.addWeight(weight + WeighNodes.FUNCTION_WEIGHT);
} else {
- functionNode = functionNode.setCompileUnit(lc, findUnit(weight));
+ functionNode = functionNode.setCompileUnit(null, findUnit(weight));
}
final Block body = functionNode.getBody();
@@ -138,11 +143,11 @@
return split;
}
});
- functionNode = functionNode.setBody(lc, newBody);
+ functionNode = functionNode.setBody(null, newBody);
assert functionNode.getCompileUnit() != null;
- return functionNode.setState(lc, CompilationState.SPLIT);
+ return functionNode.setState(null, CompilationState.SPLIT);
}
private static List<FunctionNode> directChildren(final FunctionNode functionNode) {
@@ -179,7 +184,6 @@
* @return new weight for the resulting block.
*/
private Block splitBlock(final Block block, final FunctionNode function) {
- lc.setFlag(lc.getCurrentFunction(), FunctionNode.IS_SPLIT);
final List<Statement> splits = new ArrayList<>();
List<Statement> statements = new ArrayList<>();
@@ -255,8 +259,10 @@
// been split already, so weigh again before splitting.
long weight = WeighNodes.weigh(block, weightCache);
if (weight >= SPLIT_THRESHOLD) {
- newBlock = splitBlock(block, lc.getFunction(block));
+ final FunctionNode currentFunction = lc.getCurrentFunction();
+ newBlock = splitBlock(block, currentFunction);
weight = WeighNodes.weigh(newBlock, weightCache);
+ lc.setFlag(currentFunction, FunctionNode.IS_SPLIT);
}
weightCache.put(newBlock, weight);
return newBlock;
@@ -289,7 +295,7 @@
final Node element = value[postset];
weight = WeighNodes.weigh(element);
- totalWeight += weight;
+ totalWeight += WeighNodes.AASTORE_WEIGHT + weight;
if (totalWeight >= SPLIT_THRESHOLD) {
final CompileUnit unit = compiler.findUnit(totalWeight - weight);
--- a/nashorn/src/jdk/nashorn/internal/codegen/WeighNodes.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/codegen/WeighNodes.java Mon Aug 12 09:29:06 2013 -0400
@@ -68,24 +68,25 @@
/*
* Weight constants.
*/
- static final long FUNCTION_WEIGHT = 40;
- private static final long ACCESS_WEIGHT = 4;
- private static final long ADD_WEIGHT = 10;
- private static final long BREAK_WEIGHT = 1;
- private static final long CALL_WEIGHT = 10;
- private static final long CATCH_WEIGHT = 10;
- private static final long CONTINUE_WEIGHT = 1;
- private static final long IF_WEIGHT = 2;
- private static final long LITERAL_WEIGHT = 10;
- private static final long LOOP_WEIGHT = 4;
- private static final long NEW_WEIGHT = 6;
- private static final long FUNC_EXPR_WEIGHT = 20;
- private static final long RETURN_WEIGHT = 2;
- private static final long SPLIT_WEIGHT = 40;
- private static final long SWITCH_WEIGHT = 8;
- private static final long THROW_WEIGHT = 2;
- private static final long VAR_WEIGHT = 40;
- private static final long WITH_WEIGHT = 8;
+ static final long FUNCTION_WEIGHT = 40;
+ static final long AASTORE_WEIGHT = 2;
+ static final long ACCESS_WEIGHT = 4;
+ static final long ADD_WEIGHT = 10;
+ static final long BREAK_WEIGHT = 1;
+ static final long CALL_WEIGHT = 10;
+ static final long CATCH_WEIGHT = 10;
+ static final long CONTINUE_WEIGHT = 1;
+ static final long IF_WEIGHT = 2;
+ static final long LITERAL_WEIGHT = 10;
+ static final long LOOP_WEIGHT = 4;
+ static final long NEW_WEIGHT = 6;
+ static final long FUNC_EXPR_WEIGHT = 20;
+ static final long RETURN_WEIGHT = 2;
+ static final long SPLIT_WEIGHT = 40;
+ static final long SWITCH_WEIGHT = 8;
+ static final long THROW_WEIGHT = 2;
+ static final long VAR_WEIGHT = 40;
+ static final long WITH_WEIGHT = 8;
/** Accumulated weight. */
private long weight;
@@ -210,6 +211,7 @@
if (units == null) {
for (final int postset : postsets) {
+ weight += AASTORE_WEIGHT;
final Node element = value[postset];
if (element != null) {
--- a/nashorn/src/jdk/nashorn/internal/ir/Block.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/Block.java Mon Aug 12 09:29:06 2013 -0400
@@ -33,10 +33,14 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+
import jdk.nashorn.internal.codegen.Label;
+import jdk.nashorn.internal.codegen.types.Type;
import jdk.nashorn.internal.ir.annotations.Immutable;
import jdk.nashorn.internal.ir.visitor.NodeVisitor;
+import static jdk.nashorn.internal.codegen.CompilerConstants.RETURN;
+
/**
* IR representation for a list of statements.
*/
@@ -89,13 +93,13 @@
this.symbols = new LinkedHashMap<>();
this.entryLabel = new Label("block_entry");
this.breakLabel = new Label("block_break");
- this.flags = 0;
+ final int len = statements.length;
+ this.flags = (len > 0 && statements[len - 1].hasTerminalFlags()) ? IS_TERMINAL : 0;
}
/**
* Constructor
*
- * @param lineNumber line number
* @param token token
* @param finish finish
* @param statements statements
@@ -213,6 +217,19 @@
return isTerminal ? setFlag(lc, IS_TERMINAL) : clearFlag(lc, IS_TERMINAL);
}
+ /**
+ * Set the type of the return symbol in this block if present.
+ * @param returnType the new type
+ * @return this block
+ */
+ public Block setReturnType(final Type returnType) {
+ final Symbol symbol = getExistingSymbol(RETURN.symbolName());
+ if (symbol != null) {
+ symbol.setTypeOverride(returnType);
+ }
+ return this;
+ }
+
@Override
public boolean isTerminal() {
return getFlag(IS_TERMINAL);
--- a/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/FunctionNode.java Mon Aug 12 09:29:06 2013 -0400
@@ -540,12 +540,13 @@
/**
* Check if this function's generated Java method needs a {@code callee} parameter. Functions that need access to
* their parent scope, functions that reference themselves, and non-strict functions that need an Arguments object
- * (since it exposes {@code arguments.callee} property) will need to have a callee parameter.
+ * (since it exposes {@code arguments.callee} property) will need to have a callee parameter. We also return true
+ * for split functions to make sure symbols slots are the same in the main and split methods.
*
* @return true if the function's generated Java method needs a {@code callee} parameter.
*/
public boolean needsCallee() {
- return needsParentScope() || needsSelfSymbol() || (needsArguments() && !isStrict());
+ return needsParentScope() || needsSelfSymbol() || isSplit() || (needsArguments() && !isStrict());
}
/**
@@ -816,6 +817,7 @@
if (this.returnType == returnType) {
return this;
}
+ final Type type = Type.widest(this.returnType, returnType.isObject() ? Type.OBJECT : returnType);
return Node.replaceInLexicalContext(
lc,
this,
@@ -824,12 +826,10 @@
lastToken,
flags,
name,
- Type.widest(this.returnType, returnType.isObject() ?
- Type.OBJECT :
- returnType),
+ type,
compileUnit,
compilationState,
- body,
+ body.setReturnType(type),
parameters,
snapshot,
hints));
--- a/nashorn/src/jdk/nashorn/internal/ir/IdentNode.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/IdentNode.java Mon Aug 12 09:29:06 2013 -0400
@@ -153,14 +153,27 @@
}
/**
- * We can only override type if the symbol lives in the scope, otherwise
- * it is strongly determined by the local variable already allocated
+ * We can only override type if the symbol lives in the scope, as otherwise
+ * it is strongly determined by the local variable already allocated.
+ *
+ * <p>We also return true if the symbol represents the return value of a function with a
+ * non-generic return type as in this case we need to propagate the type instead of
+ * converting to object, for example if the symbol is used as the left hand side of an
+ * assignment such as in the code below.</p>
+ *
+ * <pre>{@code
+ * try {
+ * return 2;
+ * } finally {
+ * return 3;
+ * }
+ * }</pre>
*
* @return true if can have callsite type
*/
@Override
public boolean canHaveCallSiteType() {
- return getSymbol() != null && getSymbol().isScope();
+ return getSymbol() != null && (getSymbol().isScope() || getSymbol().isNonGenericReturn());
}
/**
--- a/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/LexicalContext.java Mon Aug 12 09:29:06 2013 -0400
@@ -350,10 +350,12 @@
* @return the innermost function in the context.
*/
public FunctionNode getCurrentFunction() {
- if (isEmpty()) {
- return null;
+ for (int i = sp - 1; i >= 0; i--) {
+ if (stack[i] instanceof FunctionNode) {
+ return (FunctionNode) stack[i];
+ }
}
- return new NodeIterator<>(FunctionNode.class).next();
+ return null;
}
/**
--- a/nashorn/src/jdk/nashorn/internal/ir/Symbol.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/Symbol.java Mon Aug 12 09:29:06 2013 -0400
@@ -35,6 +35,8 @@
import jdk.nashorn.internal.runtime.Debug;
import jdk.nashorn.internal.runtime.options.Options;
+import static jdk.nashorn.internal.codegen.CompilerConstants.RETURN;
+
/**
* Maps a name to specific data.
*/
@@ -442,6 +444,14 @@
}
/**
+ * Check if this symbol represents a return value with a known non-generic type.
+ * @return true if specialized return value
+ */
+ public boolean isNonGenericReturn() {
+ return getName().equals(RETURN.symbolName()) && type != Type.OBJECT;
+ }
+
+ /**
* Check if this symbol is a function parameter of known
* narrowest type
* @return true if parameter
--- a/nashorn/src/jdk/nashorn/internal/ir/debug/ASTWriter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/debug/ASTWriter.java Mon Aug 12 09:29:06 2013 -0400
@@ -102,7 +102,7 @@
preorder.add(node);
}
- final boolean isReference = field != null && field.getAnnotation(Reference.class) != null;
+ final boolean isReference = field != null && field.isAnnotationPresent(Reference.class);
Class<?> clazz = node.getClass();
String type = clazz.getName();
@@ -183,7 +183,7 @@
append('\n');
for (final Field child : children) {
- if (child.getAnnotation(Ignore.class) != null) {
+ if (child.isAnnotationPresent(Ignore.class)) {
continue;
}
--- a/nashorn/src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/BoundScriptFunctionImpl.java Mon Aug 12 09:29:06 2013 -0400
@@ -35,7 +35,7 @@
* must track their {@code [[TargetFunction]]} property for purposes of correctly implementing {@code [[HasInstance]]};
* see {@link ScriptFunction#isInstance(ScriptObject)}.
*/
-class BoundScriptFunctionImpl extends ScriptFunctionImpl {
+final class BoundScriptFunctionImpl extends ScriptFunctionImpl {
private final ScriptFunction targetFunction;
BoundScriptFunctionImpl(ScriptFunctionData data, ScriptFunction targetFunction) {
--- a/nashorn/src/jdk/nashorn/internal/objects/Global.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/Global.java Mon Aug 12 09:29:06 2013 -0400
@@ -63,6 +63,7 @@
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.ScriptingFunctions;
import jdk.nashorn.internal.runtime.Source;
+import jdk.nashorn.internal.runtime.linker.Bootstrap;
import jdk.nashorn.internal.runtime.linker.InvokeByName;
import jdk.nashorn.internal.scripts.JO;
@@ -411,18 +412,33 @@
// initialized by nasgen
private static PropertyMap $nasgenmap$;
+ // performs initialization checks for Global constructor and returns the
+ // PropertyMap, if everything is fine.
+ private static PropertyMap checkAndGetMap(final Context context) {
+ // security check first
+ final SecurityManager sm = System.getSecurityManager();
+ if (sm != null) {
+ sm.checkPermission(new RuntimePermission("nashorn.newGlobal"));
+ }
+
+ // null check on context
+ context.getClass();
+
+ /*
+ * Duplicate global's map and use it. This way the initial Map filled
+ * by nasgen (referenced from static field in this class) is retained
+ * 'as is' (as that one is process wide singleton.
+ */
+ return $nasgenmap$.duplicate();
+ }
+
/**
* Constructor
*
* @param context the context
*/
public Global(final Context context) {
- /*
- * Duplicate global's map and use it. This way the initial Map filled
- * by nasgen (referenced from static field in this class) is retained
- * 'as is' (as that one is process wide singleton.
- */
- super($nasgenmap$.duplicate());
+ super(checkAndGetMap(context));
this.setContext(context);
this.setIsScope();
@@ -533,7 +549,8 @@
if (hint == String.class) {
final Object toString = TO_STRING.getGetter().invokeExact(sobj);
- if (toString instanceof ScriptFunction) {
+
+ if (Bootstrap.isCallable(toString)) {
final Object value = TO_STRING.getInvoker().invokeExact(toString, sobj);
if (JSType.isPrimitive(value)) {
return value;
@@ -541,7 +558,7 @@
}
final Object valueOf = VALUE_OF.getGetter().invokeExact(sobj);
- if (valueOf instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(valueOf)) {
final Object value = VALUE_OF.getInvoker().invokeExact(valueOf, sobj);
if (JSType.isPrimitive(value)) {
return value;
@@ -552,7 +569,7 @@
if (hint == Number.class) {
final Object valueOf = VALUE_OF.getGetter().invokeExact(sobj);
- if (valueOf instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(valueOf)) {
final Object value = VALUE_OF.getInvoker().invokeExact(valueOf, sobj);
if (JSType.isPrimitive(value)) {
return value;
@@ -560,7 +577,7 @@
}
final Object toString = TO_STRING.getGetter().invokeExact(sobj);
- if (toString instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(toString)) {
final Object value = TO_STRING.getInvoker().invokeExact(toString, sobj);
if (JSType.isPrimitive(value)) {
return value;
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java Mon Aug 12 09:29:06 2013 -0400
@@ -360,7 +360,7 @@
final ScriptObject sobj = (ScriptObject)obj;
try {
final Object join = JOIN.getGetter().invokeExact(sobj);
- if (join instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(join)) {
return JOIN.getInvoker().invokeExact(join, sobj);
}
} catch (final RuntimeException | Error e) {
@@ -396,7 +396,7 @@
final ScriptObject sobj = (ScriptObject)val;
final Object toLocaleString = TO_LOCALE_STRING.getGetter().invokeExact(sobj);
- if (toLocaleString instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(toLocaleString)) {
sb.append((String)TO_LOCALE_STRING.getInvoker().invokeExact(toLocaleString, sobj));
} else {
throw typeError("not.a.function", "toLocaleString");
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java Mon Aug 12 09:29:06 2013 -0400
@@ -44,9 +44,9 @@
import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.PropertyMap;
import jdk.nashorn.internal.runtime.ScriptEnvironment;
-import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
+import jdk.nashorn.internal.runtime.linker.Bootstrap;
import jdk.nashorn.internal.runtime.linker.InvokeByName;
/**
@@ -862,7 +862,7 @@
try {
final Object func = TO_ISO_STRING.getGetter().invokeExact(sobj);
- if (func instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(func)) {
return TO_ISO_STRING.getInvoker().invokeExact(func, sobj, key);
}
throw typeError("not.a.function", ScriptRuntime.safeToString(func));
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeJSON.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeJSON.java Mon Aug 12 09:29:06 2013 -0400
@@ -189,7 +189,7 @@
if (value instanceof ScriptObject) {
final ScriptObject svalue = (ScriptObject)value;
final Object toJSON = TO_JSON.getGetter().invokeExact(svalue);
- if (toJSON instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(toJSON)) {
value = TO_JSON.getInvoker().invokeExact(toJSON, svalue, key);
}
}
--- a/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/NativeObject.java Mon Aug 12 09:29:06 2013 -0400
@@ -55,7 +55,6 @@
import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.Property;
import jdk.nashorn.internal.runtime.PropertyMap;
-import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.linker.Bootstrap;
@@ -407,7 +406,7 @@
try {
final Object toString = TO_STRING.getGetter().invokeExact(sobj);
- if (toString instanceof ScriptFunction) {
+ if (Bootstrap.isCallable(toString)) {
return TO_STRING.getInvoker().invokeExact(toString, sobj);
}
} catch (final RuntimeException | Error e) {
--- a/nashorn/src/jdk/nashorn/internal/objects/PrototypeObject.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/objects/PrototypeObject.java Mon Aug 12 09:29:06 2013 -0400
@@ -75,7 +75,7 @@
*
* @param map property map
*/
- public PrototypeObject(final PropertyMap map) {
+ PrototypeObject(final PropertyMap map) {
this(Global.instance(), map);
}
@@ -89,7 +89,7 @@
* @param self self reference
* @return constructor, probably, but not necessarily, a {@link ScriptFunction}
*/
- public static Object getConstructor(final Object self) {
+ static Object getConstructor(final Object self) {
return (self instanceof PrototypeObject) ?
((PrototypeObject)self).getConstructor() :
UNDEFINED;
@@ -100,7 +100,7 @@
* @param self self reference
* @param constructor constructor, probably, but not necessarily, a {@link ScriptFunction}
*/
- public static void setConstructor(final Object self, final Object constructor) {
+ static void setConstructor(final Object self, final Object constructor) {
if (self instanceof PrototypeObject) {
((PrototypeObject)self).setConstructor(constructor);
}
--- a/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/parser/AbstractParser.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,6 +25,7 @@
package jdk.nashorn.internal.parser;
+import static jdk.nashorn.internal.parser.TokenType.COMMENT;
import static jdk.nashorn.internal.parser.TokenType.EOF;
import static jdk.nashorn.internal.parser.TokenType.EOL;
import static jdk.nashorn.internal.parser.TokenType.IDENT;
@@ -135,14 +136,27 @@
}
/**
- * Seek next token that is not an EOL.
+ * Seek next token that is not an EOL or comment.
*
* @return tokenType of next token.
*/
protected final TokenType next() {
do {
nextOrEOL();
- } while (type == EOL);
+ } while (type == EOL || type == COMMENT);
+
+ return type;
+ }
+
+ /**
+ * Seek next token or EOL (skipping comments.)
+ *
+ * @return tokenType of next token.
+ */
+ protected final TokenType nextOrEOL() {
+ do {
+ nextToken();
+ } while (type == COMMENT);
return type;
}
@@ -152,7 +166,7 @@
*
* @return tokenType of next token.
*/
- protected final TokenType nextOrEOL() {
+ private final TokenType nextToken() {
// Capture last token tokenType.
last = type;
if (type != EOF) {
--- a/nashorn/src/jdk/nashorn/internal/parser/Lexer.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/parser/Lexer.java Mon Aug 12 09:29:06 2013 -0400
@@ -26,6 +26,7 @@
package jdk.nashorn.internal.parser;
import static jdk.nashorn.internal.parser.TokenType.ADD;
+import static jdk.nashorn.internal.parser.TokenType.COMMENT;
import static jdk.nashorn.internal.parser.TokenType.DECIMAL;
import static jdk.nashorn.internal.parser.TokenType.EOF;
import static jdk.nashorn.internal.parser.TokenType.EOL;
@@ -83,12 +84,70 @@
/** Type of last token added. */
private TokenType last;
- private static final String JAVASCRIPT_WHITESPACE;
- private static final String JAVASCRIPT_WHITESPACE_EOL;
- private static final String JAVASCRIPT_WHITESPACE_IN_REGEXP;
+ private static final String SPACETAB = " \t"; // ASCII space and tab
+ private static final String LFCR = "\n\r"; // line feed and carriage return (ctrl-m)
+
+ private static final String JSON_WHITESPACE_EOL = LFCR;
+ private static final String JSON_WHITESPACE = SPACETAB + LFCR;
- private static final String JSON_WHITESPACE;
- private static final String JSON_WHITESPACE_EOL;
+ private static final String JAVASCRIPT_WHITESPACE_EOL =
+ LFCR +
+ "\u2028" + // line separator
+ "\u2029" // paragraph separator
+ ;
+ private static final String JAVASCRIPT_WHITESPACE =
+ SPACETAB +
+ JAVASCRIPT_WHITESPACE_EOL +
+ "\u000b" + // tabulation line
+ "\u000c" + // ff (ctrl-l)
+ "\u00a0" + // Latin-1 space
+ "\u1680" + // Ogham space mark
+ "\u180e" + // separator, Mongolian vowel
+ "\u2000" + // en quad
+ "\u2001" + // em quad
+ "\u2002" + // en space
+ "\u2003" + // em space
+ "\u2004" + // three-per-em space
+ "\u2005" + // four-per-em space
+ "\u2006" + // six-per-em space
+ "\u2007" + // figure space
+ "\u2008" + // punctuation space
+ "\u2009" + // thin space
+ "\u200a" + // hair space
+ "\u202f" + // narrow no-break space
+ "\u205f" + // medium mathematical space
+ "\u3000" + // ideographic space
+ "\ufeff" // byte order mark
+ ;
+
+ private static final String JAVASCRIPT_WHITESPACE_IN_REGEXP =
+ "\\u000a" + // line feed
+ "\\u000d" + // carriage return (ctrl-m)
+ "\\u2028" + // line separator
+ "\\u2029" + // paragraph separator
+ "\\u0009" + // tab
+ "\\u0020" + // ASCII space
+ "\\u000b" + // tabulation line
+ "\\u000c" + // ff (ctrl-l)
+ "\\u00a0" + // Latin-1 space
+ "\\u1680" + // Ogham space mark
+ "\\u180e" + // separator, Mongolian vowel
+ "\\u2000" + // en quad
+ "\\u2001" + // em quad
+ "\\u2002" + // en space
+ "\\u2003" + // em space
+ "\\u2004" + // three-per-em space
+ "\\u2005" + // four-per-em space
+ "\\u2006" + // six-per-em space
+ "\\u2007" + // figure space
+ "\\u2008" + // punctuation space
+ "\\u2009" + // thin space
+ "\\u200a" + // hair space
+ "\\u202f" + // narrow no-break space
+ "\\u205f" + // medium mathematical space
+ "\\u3000" + // ideographic space
+ "\\ufeff" // byte order mark
+ ;
static String unicodeEscape(final char ch) {
final StringBuilder sb = new StringBuilder();
@@ -104,65 +163,6 @@
return sb.toString();
}
- static {
- final StringBuilder ws = new StringBuilder();
- final StringBuilder wsEOL = new StringBuilder();
- final StringBuilder wsRegExp = new StringBuilder();
- final StringBuilder jsonWs = new StringBuilder();
-
- jsonWs.append((char)0x000a);
- jsonWs.append((char)0x000d);
- JSON_WHITESPACE_EOL = jsonWs.toString();
-
- jsonWs.append((char)0x0009);
- jsonWs.append((char)0x0020);
- JSON_WHITESPACE = jsonWs.toString();
-
- for (int i = 0; i <= 0xffff; i++) {
- switch (i) {
- case 0x000a: // line feed
- case 0x000d: // carriage return (ctrl-m)
- case 0x2028: // line separator
- case 0x2029: // paragraph separator
- wsEOL.append((char)i);
- case 0x0009: // tab
- case 0x0020: // ASCII space
- case 0x000b: // tabulation line
- case 0x000c: // ff (ctrl-l)
- case 0x00a0: // Latin-1 space
- case 0x1680: // Ogham space mark
- case 0x180e: // separator, Mongolian vowel
- case 0x2000: // en quad
- case 0x2001: // em quad
- case 0x2002: // en space
- case 0x2003: // em space
- case 0x2004: // three-per-em space
- case 0x2005: // four-per-em space
- case 0x2006: // six-per-em space
- case 0x2007: // figure space
- case 0x2008: // punctuation space
- case 0x2009: // thin space
- case 0x200a: // hair space
- case 0x202f: // narrow no-break space
- case 0x205f: // medium mathematical space
- case 0x3000: // ideographic space
- case 0xfeff: // byte order mark
- ws.append((char)i);
-
- wsRegExp.append(Lexer.unicodeEscape((char)i));
- break;
-
- default:
- break;
- }
- }
-
- JAVASCRIPT_WHITESPACE = ws.toString();
- JAVASCRIPT_WHITESPACE_EOL = wsEOL.toString();
- JAVASCRIPT_WHITESPACE_IN_REGEXP = wsRegExp.toString();
-
- }
-
/**
* Constructor
*
@@ -427,6 +427,9 @@
* @return True if a comment.
*/
protected boolean skipComments() {
+ // Save the current position.
+ final int start = position;
+
if (ch0 == '/') {
// Is it a // comment.
if (ch1 == '/') {
@@ -437,10 +440,9 @@
skip(1);
}
// Did detect a comment.
+ add(COMMENT, start);
return true;
} else if (ch1 == '*') {
- // Record beginning of comment.
- final int start = position;
// Skip over /*.
skip(2);
// Scan for */.
@@ -462,11 +464,11 @@
}
// Did detect a comment.
+ add(COMMENT, start);
return true;
}
- }
-
- if (scripting && ch0 == '#') {
+ } else if (ch0 == '#') {
+ assert scripting;
// shell style comment
// Skip over #.
skip(1);
@@ -475,6 +477,7 @@
skip(1);
}
// Did detect a comment.
+ add(COMMENT, start);
return true;
}
@@ -563,7 +566,7 @@
*
* @param token the token.
* @param startTokenType the token type.
- * @parasm lir LineInfoReceiver that receives line info for multi-line string literals.
+ * @param lir LineInfoReceiver that receives line info for multi-line string literals.
* @return True if a literal beginning with startToken was found and scanned.
*/
protected boolean scanLiteral(final long token, final TokenType startTokenType, final LineInfoReceiver lir) {
@@ -1461,11 +1464,10 @@
final State restState = saveState();
// keep line number updated
int lastLine = line;
- int lastLinePosition = linePosition;
skipLine(false);
lastLine++;
- lastLinePosition = position;
+ int lastLinePosition = position;
restState.setLimit(position);
// Record beginning of string.
--- a/nashorn/src/jdk/nashorn/internal/parser/TokenType.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/parser/TokenType.java Mon Aug 12 09:29:06 2013 -0400
@@ -44,6 +44,7 @@
ERROR (SPECIAL, null),
EOF (SPECIAL, null),
EOL (SPECIAL, null),
+ COMMENT (SPECIAL, null),
NOT (UNARY, "!", 14, false),
NE (BINARY, "!=", 9, true),
--- a/nashorn/src/jdk/nashorn/internal/runtime/AccessorProperty.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/AccessorProperty.java Mon Aug 12 09:29:06 2013 -0400
@@ -51,7 +51,7 @@
* An AccessorProperty is the most generic property type. An AccessorProperty is
* represented as fields in a ScriptObject class.
*/
-public class AccessorProperty extends Property {
+public final class AccessorProperty extends Property {
private static final MethodHandles.Lookup lookup = MethodHandles.lookup();
private static final MethodHandle REPLACE_MAP = findOwnMH("replaceMap", Object.class, Object.class, PropertyMap.class, String.class, Class.class, Class.class);
@@ -149,7 +149,7 @@
* @param property accessor property to rebind
* @param delegate delegate object to rebind receiver to
*/
- public AccessorProperty(final AccessorProperty property, final Object delegate) {
+ AccessorProperty(final AccessorProperty property, final Object delegate) {
super(property);
this.primitiveGetter = bindTo(property.primitiveGetter, delegate);
@@ -185,7 +185,7 @@
* @param getter the property getter
* @param setter the property setter or null if non writable, non configurable
*/
- public AccessorProperty(final String key, final int flags, final int slot, final MethodHandle getter, final MethodHandle setter) {
+ AccessorProperty(final String key, final int flags, final int slot, final MethodHandle getter, final MethodHandle setter) {
super(key, flags, slot);
// we don't need to prep the setters these will never be invalidated as this is a nasgen
--- a/nashorn/src/jdk/nashorn/internal/runtime/Context.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/Context.java Mon Aug 12 09:29:06 2013 -0400
@@ -36,13 +36,17 @@
import java.io.PrintWriter;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
+import java.lang.reflect.Modifier;
import java.util.concurrent.atomic.AtomicLong;
import java.net.MalformedURLException;
import java.net.URL;
+import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.CodeSigner;
import java.security.CodeSource;
+import java.security.Permissions;
import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
import java.util.Map;
import jdk.internal.org.objectweb.asm.ClassReader;
import jdk.internal.org.objectweb.asm.util.CheckClassAdapter;
@@ -121,11 +125,6 @@
* @param global the global scope
*/
public static void setGlobal(final ScriptObject global) {
- final SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPermission(new RuntimePermission("nashorn.setGlobal"));
- }
-
if (global != null && !(global instanceof Global)) {
throw new IllegalArgumentException("global is not an instance of Global!");
}
@@ -205,6 +204,7 @@
private static final ClassLoader myLoader = Context.class.getClassLoader();
private static final StructureLoader sharedLoader;
+ private static final AccessControlContext NO_PERMISSIONS_CONTEXT;
static {
sharedLoader = AccessController.doPrivileged(new PrivilegedAction<StructureLoader>() {
@@ -213,6 +213,7 @@
return new StructureLoader(myLoader, null);
}
});
+ NO_PERMISSIONS_CONTEXT = new AccessControlContext(new ProtectionDomain[] { new ProtectionDomain(null, new Permissions()) });
}
/**
@@ -483,7 +484,7 @@
source = new Source(name, script);
}
} else if (src instanceof Map) {
- final Map map = (Map)src;
+ final Map<?,?> map = (Map<?,?>)src;
if (map.containsKey("script") && map.containsKey("name")) {
final String script = JSType.toString(map.get("script"));
final String name = JSType.toString(map.get("name"));
@@ -553,25 +554,60 @@
* @throws ClassNotFoundException if structure class cannot be resolved
*/
public static Class<?> forStructureClass(final String fullName) throws ClassNotFoundException {
+ if (System.getSecurityManager() != null && !NashornLoader.isStructureClass(fullName)) {
+ throw new ClassNotFoundException(fullName);
+ }
return Class.forName(fullName, true, sharedLoader);
}
/**
- * Checks that the given package can be accessed from current call stack.
+ * Checks that the given package can be accessed from no permissions context.
*
* @param fullName fully qualified package name
+ * @throw SecurityException if not accessible
*/
public static void checkPackageAccess(final String fullName) {
final int index = fullName.lastIndexOf('.');
if (index != -1) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkPackageAccess(fullName.substring(0, index));
+ AccessController.doPrivileged(new PrivilegedAction<Void>() {
+ @Override
+ public Void run() {
+ sm.checkPackageAccess(fullName.substring(0, index));
+ return null;
+ }
+ }, NO_PERMISSIONS_CONTEXT);
}
}
}
/**
+ * Checks that the given package can be accessed from no permissions context.
+ *
+ * @param fullName fully qualified package name
+ * @return true if package is accessible, false otherwise
+ */
+ public static boolean isAccessiblePackage(final String fullName) {
+ try {
+ checkPackageAccess(fullName);
+ return true;
+ } catch (final SecurityException se) {
+ return false;
+ }
+ }
+
+ /**
+ * Checks that the given Class is public and it can be accessed from no permissions context.
+ *
+ * @param clazz Class object to check
+ * @return true if Class is accessible, false otherwise
+ */
+ public static boolean isAccessibleClass(final Class<?> clazz) {
+ return Modifier.isPublic(clazz.getModifiers()) && Context.isAccessiblePackage(clazz.getName());
+ }
+
+ /**
* Lookup a Java class. This is used for JSR-223 stuff linking in from
* {@code jdk.nashorn.internal.objects.NativeJava} and {@code jdk.nashorn.internal.runtime.NativeJavaPackage}
*
@@ -626,7 +662,7 @@
// No verification when security manager is around as verifier
// may load further classes - which should be avoided.
if (System.getSecurityManager() == null) {
- CheckClassAdapter.verify(new ClassReader(bytecode), scriptLoader, false, new PrintWriter(System.err, true));
+ CheckClassAdapter.verify(new ClassReader(bytecode), sharedLoader, false, new PrintWriter(System.err, true));
}
}
}
@@ -645,12 +681,7 @@
* @return the global script object
*/
public ScriptObject newGlobal() {
- final SecurityManager sm = System.getSecurityManager();
- if (sm != null) {
- sm.checkPermission(new RuntimePermission("nashorn.newGlobal"));
- }
-
- return newGlobalTrusted();
+ return new Global(this);
}
/**
@@ -828,10 +859,6 @@
});
}
- private ScriptObject newGlobalTrusted() {
- return new Global(this);
- }
-
private long getUniqueScriptId() {
return uniqueScriptId.getAndIncrement();
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/FinalScriptFunctionData.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/FinalScriptFunctionData.java Mon Aug 12 09:29:06 2013 -0400
@@ -33,7 +33,7 @@
* This is a subclass that represents a script function that may not be regenerated.
* This is used for example for bound functions and builtins.
*/
-public final class FinalScriptFunctionData extends ScriptFunctionData {
+final class FinalScriptFunctionData extends ScriptFunctionData {
/**
* Constructor - used for bind
--- a/nashorn/src/jdk/nashorn/internal/runtime/ListAdapter.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ListAdapter.java Mon Aug 12 09:29:06 2013 -0400
@@ -31,6 +31,7 @@
import java.util.ListIterator;
import java.util.NoSuchElementException;
import java.util.RandomAccess;
+import jdk.nashorn.internal.runtime.linker.Bootstrap;
import jdk.nashorn.internal.runtime.linker.InvokeByName;
/**
@@ -46,7 +47,7 @@
* operations respectively, while {@link #addLast(Object)} and {@link #removeLast()} will translate to {@code push} and
* {@code pop}.
*/
-public class ListAdapter extends AbstractList<Object> implements RandomAccess, Deque<Object> {
+public final class ListAdapter extends AbstractList<Object> implements RandomAccess, Deque<Object> {
// These add to the back and front of the list
private static final InvokeByName PUSH = new InvokeByName("push", ScriptObject.class, void.class, Object.class);
private static final InvokeByName UNSHIFT = new InvokeByName("unshift", ScriptObject.class, void.class, Object.class);
@@ -157,7 +158,7 @@
}
}
private static void checkFunction(Object fn, InvokeByName invoke) {
- if(!(fn instanceof ScriptFunction)) {
+ if(!(Bootstrap.isCallable(fn))) {
throw new UnsupportedOperationException("The script object doesn't have a function named " + invoke.getName());
}
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/NashornLoader.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/NashornLoader.java Mon Aug 12 09:29:06 2013 -0400
@@ -118,6 +118,10 @@
return permCollection;
}
+ static boolean isStructureClass(final String fullName) {
+ return fullName.startsWith(SCRIPTS_PKG);
+ }
+
/**
* Create a secure URL class loader for the given classpath
* @param classPath classpath for the loader to search from
--- a/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/NativeJavaPackage.java Mon Aug 12 09:29:06 2013 -0400
@@ -84,8 +84,8 @@
* @param proto proto
*/
public NativeJavaPackage(final String name, final ScriptObject proto) {
+ super(proto, null);
this.name = name;
- this.setProto(proto);
}
@Override
--- a/nashorn/src/jdk/nashorn/internal/runtime/Property.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/Property.java Mon Aug 12 09:29:06 2013 -0400
@@ -100,7 +100,7 @@
* @param flags property flags
* @param slot property field number or spill slot
*/
- public Property(final String key, final int flags, final int slot) {
+ Property(final String key, final int flags, final int slot) {
assert key != null;
this.key = key;
this.flags = flags;
@@ -112,7 +112,7 @@
*
* @param property source property
*/
- protected Property(final Property property) {
+ Property(final Property property) {
this.key = property.key;
this.flags = property.flags;
this.slot = property.slot;
@@ -123,7 +123,7 @@
*
* @return cloned property
*/
- protected abstract Property copy();
+ abstract Property copy();
/**
* Property flag utility method for {@link PropertyDescriptor}s. Given two property descriptors,
--- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyListenerManager.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyListenerManager.java Mon Aug 12 09:29:06 2013 -0400
@@ -32,6 +32,7 @@
* Helper class to manage property listeners and notification.
*/
public class PropertyListenerManager implements PropertyListener {
+ PropertyListenerManager() {}
/** property listeners for this object. */
private Map<PropertyListener,Boolean> listeners;
--- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java Mon Aug 12 09:29:06 2013 -0400
@@ -352,11 +352,15 @@
return newMap;
}
- /*
+ /**
* Make a new UserAccessorProperty property. getter and setter functions are stored in
* this ScriptObject and slot values are used in property object. Note that slots
* are assigned speculatively and should be added to map before adding other
* properties.
+ *
+ * @param key the property name
+ * @param propertyFlags attribute flags of the property
+ * @return the newly created UserAccessorProperty
*/
public UserAccessorProperty newUserAccessors(final String key, final int propertyFlags) {
int oldSpillLength = spillLength;
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java Mon Aug 12 09:29:06 2013 -0400
@@ -67,7 +67,7 @@
* @param isBuiltin is the function built in
* @param isConstructor is the function a constructor
*/
- protected ScriptFunctionData(final String name, final int arity, final boolean isStrict, final boolean isBuiltin, final boolean isConstructor) {
+ ScriptFunctionData(final String name, final int arity, final boolean isStrict, final boolean isBuiltin, final boolean isConstructor) {
this.name = name;
this.arity = arity;
this.code = new CompiledFunctions();
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptObject.java Mon Aug 12 09:29:06 2013 -0400
@@ -1046,6 +1046,15 @@
}
/**
+ * Checks if this object belongs to the given context
+ * @param ctx context to check against
+ * @return true if this object belongs to the given context
+ */
+ public final boolean isOfContext(final Context ctx) {
+ return context == ctx;
+ }
+
+ /**
* Return the current context from the object's map.
* @return Current context.
*/
@@ -3192,9 +3201,15 @@
return true;
}
- /*
+ /**
* Make a new UserAccessorProperty property. getter and setter functions are stored in
* this ScriptObject and slot values are used in property object.
+ *
+ * @param key the property name
+ * @param propertyFlags attribute flags of the property
+ * @param getter getter function for the property
+ * @param setter setter function for the property
+ * @return the newly created UserAccessorProperty
*/
protected final UserAccessorProperty newUserAccessors(final String key, final int propertyFlags, final ScriptFunction getter, final ScriptFunction setter) {
final UserAccessorProperty property = getMap().newUserAccessors(key, propertyFlags);
--- a/nashorn/src/jdk/nashorn/internal/runtime/ScriptRuntime.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/ScriptRuntime.java Mon Aug 12 09:29:06 2013 -0400
@@ -335,9 +335,7 @@
*/
public static Object checkAndApply(final ScriptFunction target, final Object self, final Object... args) {
final ScriptObject global = Context.getGlobalTrusted();
- if (! (global instanceof GlobalObject)) {
- throw new IllegalStateException("No current global set");
- }
+ assert (global instanceof GlobalObject): "No current global set";
if (target.getContext() != global.getContext()) {
throw new IllegalArgumentException("'target' function is not from current Context");
@@ -383,9 +381,7 @@
*/
public static Object checkAndConstruct(final ScriptFunction target, final Object... args) {
final ScriptObject global = Context.getGlobalTrusted();
- if (! (global instanceof GlobalObject)) {
- throw new IllegalStateException("No current global set");
- }
+ assert (global instanceof GlobalObject): "No current global set";
if (target.getContext() != global.getContext()) {
throw new IllegalArgumentException("'target' function is not from current Context");
@@ -395,7 +391,7 @@
return construct(target, args);
}
- /*
+ /**
* Call a script function as a constructor with given args.
*
* @param target ScriptFunction object.
--- a/nashorn/src/jdk/nashorn/internal/runtime/Source.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/Source.java Mon Aug 12 09:29:06 2013 -0400
@@ -384,11 +384,7 @@
}
final byte[] buf = Files.readAllBytes(file.toPath());
- if (cs != null) {
- return new String(buf, cs).toCharArray();
- } else {
- return byteToCharArray(buf);
- }
+ return (cs != null)? new String(buf, cs).toCharArray() : byteToCharArray(buf);
}
/**
@@ -465,11 +461,7 @@
}
private static char[] readFully(final InputStream is, final Charset cs) throws IOException {
- if (cs != null) {
- return new String(readBytes(is), cs).toCharArray();
- } else {
- return readFully(is);
- }
+ return (cs != null)? new String(readBytes(is), cs).toCharArray() : readFully(is);
}
private static char[] readFully(final InputStream is) throws IOException {
--- a/nashorn/src/jdk/nashorn/internal/runtime/UserAccessorProperty.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/UserAccessorProperty.java Mon Aug 12 09:29:06 2013 -0400
@@ -83,7 +83,7 @@
* @param getterSlot getter slot, starting at first embed
* @param setterSlot setter slot, starting at first embed
*/
- public UserAccessorProperty(final String key, final int flags, final int getterSlot, final int setterSlot) {
+ UserAccessorProperty(final String key, final int flags, final int getterSlot, final int setterSlot) {
super(key, flags, -1);
this.getterSlot = getterSlot;
this.setterSlot = setterSlot;
--- a/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java Mon Aug 12 09:29:06 2013 -0400
@@ -57,11 +57,9 @@
* @param scope scope object
* @param expression with expression
*/
- public WithObject(final ScriptObject scope, final Object expression) {
- super();
-
+ WithObject(final ScriptObject scope, final Object expression) {
+ super(scope, null);
setIsScope();
- setProto(scope);
this.expression = expression;
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/arrays/IteratorAction.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/arrays/IteratorAction.java Mon Aug 12 09:29:06 2013 -0400
@@ -31,6 +31,7 @@
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptRuntime;
+import jdk.nashorn.internal.runtime.linker.Bootstrap;
/**
* Helper class for the various map/apply functions in {@link jdk.nashorn.internal.objects.NativeArray}.
@@ -103,6 +104,8 @@
} else if (callbackfn instanceof ScriptObjectMirror &&
((ScriptObjectMirror)callbackfn).isFunction()) {
strict = ((ScriptObjectMirror)callbackfn).isStrictFunction();
+ } else if (Bootstrap.isDynamicMethod(callbackfn) || Bootstrap.isFunctionalInterfaceObject(callbackfn)) {
+ strict = false;
} else {
throw typeError("not.a.function", ScriptRuntime.safeToString(callbackfn));
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationException.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationException.java Mon Aug 12 09:29:06 2013 -0400
@@ -26,7 +26,7 @@
package jdk.nashorn.internal.runtime.linker;
@SuppressWarnings("serial")
-class AdaptationException extends Exception {
+final class AdaptationException extends Exception {
private final AdaptationResult adaptationResult;
AdaptationException(final AdaptationResult.Outcome outcome, final String classList) {
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationResult.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationResult.java Mon Aug 12 09:29:06 2013 -0400
@@ -32,7 +32,7 @@
* A result of generating an adapter for a class. A tuple of an outcome and - in case of an error outcome - a list of
* classes that caused the error.
*/
-class AdaptationResult {
+final class AdaptationResult {
/**
* Contains various outcomes for attempting to generate an adapter class. These are stored in AdapterInfo instances.
* We have a successful outcome (adapter class was generated) and four possible error outcomes: superclass is final,
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java Mon Aug 12 09:29:06 2013 -0400
@@ -38,8 +38,12 @@
import jdk.internal.dynalink.beans.BeansLinker;
import jdk.internal.dynalink.linker.GuardedInvocation;
import jdk.internal.dynalink.linker.LinkerServices;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
import jdk.nashorn.internal.codegen.CompilerConstants.Call;
import jdk.nashorn.internal.codegen.RuntimeCallSite;
+import jdk.nashorn.internal.runtime.JSType;
+import jdk.nashorn.internal.runtime.ScriptFunction;
+import jdk.nashorn.internal.runtime.ScriptRuntime;
import jdk.nashorn.internal.runtime.options.Options;
/**
@@ -68,6 +72,41 @@
}
/**
+ * Returns if the given object is a "callable"
+ * @param obj object to be checked for callability
+ * @return true if the obj is callable
+ */
+ public static boolean isCallable(final Object obj) {
+ if (obj == ScriptRuntime.UNDEFINED || obj == null) {
+ return false;
+ }
+
+ return obj instanceof ScriptFunction ||
+ ((obj instanceof ScriptObjectMirror) && ((ScriptObjectMirror)obj).isFunction()) ||
+ isDynamicMethod(obj) ||
+ isFunctionalInterfaceObject(obj);
+ }
+
+ /**
+ * Returns if the given object is a dynalink Dynamic method
+ * @param obj object to be checked
+ * @return true if the obj is a dynamic method
+ */
+ public static boolean isDynamicMethod(final Object obj) {
+ return obj instanceof BoundDynamicMethod || BeansLinker.isDynamicMethod(obj);
+ }
+
+ /**
+ * Returns if the given object is an instance of an interface annotated with
+ * java.lang.FunctionalInterface
+ * @param obj object to be checked
+ * @return true if the obj is an instance of @FunctionalInterface interface
+ */
+ public static boolean isFunctionalInterfaceObject(final Object obj) {
+ return !JSType.isPrimitive(obj) && (NashornBottomLinker.getFunctionalInterfaceMethod(obj.getClass()) != null);
+ }
+
+ /**
* Create a call site and link it for Nashorn. This version of the method conforms to the invokedynamic bootstrap
* method expected signature and is referenced from Nashorn generated bytecode as the bootstrap method for all
* invokedynamic instructions.
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/InvokeByName.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/InvokeByName.java Mon Aug 12 09:29:06 2013 -0400
@@ -58,7 +58,7 @@
* you dynamically invoke a function with the same name from multiple places in your code, it is advisable to create a
* separate instance of this class for every place.
*/
-public class InvokeByName {
+public final class InvokeByName {
private final String name;
private final MethodHandle getter;
private final MethodHandle invoker;
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java Mon Aug 12 09:29:06 2013 -0400
@@ -45,18 +45,17 @@
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType;
+import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import java.security.SecureRandom;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Random;
import java.util.Set;
import jdk.internal.org.objectweb.asm.ClassWriter;
import jdk.internal.org.objectweb.asm.Label;
@@ -66,6 +65,7 @@
import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ScriptFunction;
import jdk.nashorn.internal.runtime.ScriptObject;
+import sun.reflect.CallerSensitive;
/**
* Generates bytecode for a Java adapter class. Used by the {@link JavaAdapterFactory}.
@@ -121,7 +121,23 @@
* constructor's trailing position and thus provide further instance-specific overrides. The order of invocation is
* always instance-specified method, then a class-specified method, and finally the superclass method.
*/
-final class JavaAdapterBytecodeGenerator extends JavaAdapterGeneratorBase {
+final class JavaAdapterBytecodeGenerator {
+ static final Type CONTEXT_TYPE = Type.getType(Context.class);
+ static final Type OBJECT_TYPE = Type.getType(Object.class);
+ static final Type SCRIPT_OBJECT_TYPE = Type.getType(ScriptObject.class);
+
+ static final String CONTEXT_TYPE_NAME = CONTEXT_TYPE.getInternalName();
+ static final String OBJECT_TYPE_NAME = OBJECT_TYPE.getInternalName();
+
+ static final String INIT = "<init>";
+
+ static final String GLOBAL_FIELD_NAME = "global";
+
+ static final String SCRIPT_OBJECT_TYPE_DESCRIPTOR = SCRIPT_OBJECT_TYPE.getDescriptor();
+
+ static final String SET_GLOBAL_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE, SCRIPT_OBJECT_TYPE);
+ static final String VOID_NOARG_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE);
+
private static final Type SCRIPT_FUNCTION_TYPE = Type.getType(ScriptFunction.class);
private static final Type STRING_TYPE = Type.getType(String.class);
private static final Type METHOD_TYPE_TYPE = Type.getType(MethodType.class);
@@ -147,11 +163,11 @@
// Package used when the adapter can't be defined in the adaptee's package (either because it's sealed, or because
// it's a java.* package.
- private static final String ADAPTER_PACKAGE_PREFIX = "jdk/nashorn/internal/javaadapters/";
+ private static final String ADAPTER_PACKAGE_PREFIX = "jdk/nashorn/javaadapters/";
// Class name suffix used to append to the adaptee class name, when it can be defined in the adaptee's package.
private static final String ADAPTER_CLASS_NAME_SUFFIX = "$$NashornJavaAdapter";
private static final String JAVA_PACKAGE_PREFIX = "java/";
- private static final int MAX_GENERATED_TYPE_NAME_LENGTH = 238; //255 - 17; 17 is the maximum possible length for the global setter inner class suffix
+ private static final int MAX_GENERATED_TYPE_NAME_LENGTH = 255;
private static final String CLASS_INIT = "<clinit>";
private static final String STATIC_GLOBAL_FIELD_NAME = "staticGlobal";
@@ -161,8 +177,6 @@
*/
private static final Collection<MethodInfo> EXCLUDED = getExcludedMethods();
- private static final Random random = new SecureRandom();
-
// This is the superclass for our generated adapter.
private final Class<?> superClass;
// Class loader used as the parent for the class loader we'll create to load the generated class. It will be a class
@@ -175,8 +189,6 @@
private final String superClassName;
// Binary name of the generated class.
private final String generatedClassName;
- // Binary name of the PrivilegedAction inner class that is used to
- private final String globalSetterClassName;
private final Set<String> usedFieldNames = new HashSet<>();
private final Set<String> abstractMethodNames = new HashSet<>();
private final String samName;
@@ -214,15 +226,6 @@
superClassName = Type.getInternalName(superClass);
generatedClassName = getGeneratedClassName(superClass, interfaces);
- // Randomize the name of the privileged global setter, to make it non-feasible to find.
- final long l;
- synchronized(random) {
- l = random.nextLong();
- }
-
- // NOTE: they way this class name is calculated affects the value of MAX_GENERATED_TYPE_NAME_LENGTH constant. If
- // you change the calculation of globalSetterClassName, adjust the constant too.
- globalSetterClassName = generatedClassName.concat("$" + Long.toHexString(l & Long.MAX_VALUE));
cw.visit(Opcodes.V1_7, ACC_PUBLIC | ACC_SUPER | ACC_FINAL, generatedClassName, null, superClassName, getInternalTypeNames(interfaces));
generateGlobalFields();
@@ -250,7 +253,7 @@
}
JavaAdapterClassLoader createAdapterClassLoader() {
- return new JavaAdapterClassLoader(generatedClassName, cw.toByteArray(), globalSetterClassName);
+ return new JavaAdapterClassLoader(generatedClassName, cw.toByteArray());
}
boolean isAutoConvertibleFromFunction() {
@@ -367,7 +370,7 @@
boolean gotCtor = false;
for (final Constructor<?> ctor: superClass.getDeclaredConstructors()) {
final int modifier = ctor.getModifiers();
- if((modifier & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0) {
+ if((modifier & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0 && !isCallerSensitive(ctor)) {
generateConstructors(ctor);
gotCtor = true;
}
@@ -511,8 +514,8 @@
mv.invokestatic(CONTEXT_TYPE_NAME, "getGlobal", GET_GLOBAL_METHOD_DESCRIPTOR);
}
- private void invokeSetGlobal(final InstructionAdapter mv) {
- mv.invokestatic(globalSetterClassName, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR);
+ private static void invokeSetGlobal(final InstructionAdapter mv) {
+ mv.invokestatic(CONTEXT_TYPE_NAME, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR);
}
/**
@@ -794,7 +797,7 @@
* entry.
* @param globalsDifferVar index of the boolean local variable that is true if the global needs to be restored.
*/
- private void emitFinally(final InstructionAdapter mv, final int currentGlobalVar, final int globalsDifferVar) {
+ private static void emitFinally(final InstructionAdapter mv, final int currentGlobalVar, final int globalsDifferVar) {
// Emit code to restore the previous Nashorn global if needed
mv.visitVarInsn(ILOAD, globalsDifferVar);
final Label skip = new Label();
@@ -832,7 +835,7 @@
}
if (Modifier.isPublic(m) || Modifier.isProtected(m)) {
final MethodInfo mi = new MethodInfo(typeMethod);
- if (Modifier.isFinal(m)) {
+ if (Modifier.isFinal(m) || isCallerSensitive(typeMethod)) {
finalMethods.add(mi);
} else if (!finalMethods.contains(mi) && methodInfos.add(mi)) {
if (Modifier.isAbstract(m)) {
@@ -909,4 +912,8 @@
final Class<?> superClass = c1.getSuperclass();
return superClass.isAssignableFrom(c2) ? superClass : assignableSuperClass(superClass, c2);
}
+
+ private static boolean isCallerSensitive(final AccessibleObject e) {
+ return e.isAnnotationPresent(CallerSensitive.class);
+ }
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,16 +25,6 @@
package jdk.nashorn.internal.runtime.linker;
-import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL;
-import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PRIVATE;
-import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC;
-import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC;
-import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER;
-import static jdk.internal.org.objectweb.asm.Opcodes.ACONST_NULL;
-import static jdk.internal.org.objectweb.asm.Opcodes.ALOAD;
-import static jdk.internal.org.objectweb.asm.Opcodes.ARETURN;
-import static jdk.internal.org.objectweb.asm.Opcodes.RETURN;
-
import java.security.AccessController;
import java.security.AllPermission;
import java.security.CodeSigner;
@@ -45,12 +35,6 @@
import java.security.SecureClassLoader;
import jdk.internal.dynalink.beans.StaticClass;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.internal.org.objectweb.asm.Type;
-import jdk.internal.org.objectweb.asm.commons.InstructionAdapter;
-import jdk.nashorn.internal.runtime.Context;
-import jdk.nashorn.internal.runtime.ScriptObject;
/**
* This class encapsulates the bytecode of the adapter class and can be used to load it into the JVM as an actual Class.
@@ -60,22 +44,15 @@
* class are normally created by {@link JavaAdapterBytecodeGenerator}.
*/
@SuppressWarnings("javadoc")
-class JavaAdapterClassLoader extends JavaAdapterGeneratorBase {
- private static final Type PRIVILEGED_ACTION_TYPE = Type.getType(PrivilegedAction.class);
-
- private static final String PRIVILEGED_ACTION_TYPE_NAME = PRIVILEGED_ACTION_TYPE.getInternalName();
- private static final String PRIVILEGED_RUN_METHOD_DESCRIPTOR = Type.getMethodDescriptor(OBJECT_TYPE);
-
+final class JavaAdapterClassLoader {
private static final ProtectionDomain GENERATED_PROTECTION_DOMAIN = createGeneratedProtectionDomain();
private final String className;
private final byte[] classBytes;
- private final String globalSetterClassName;
- JavaAdapterClassLoader(String className, byte[] classBytes, String globalSetterClassName) {
+ JavaAdapterClassLoader(String className, byte[] classBytes) {
this.className = className.replace('/', '.');
this.classBytes = classBytes;
- this.globalSetterClassName = globalSetterClassName.replace('/', '.');
}
/**
@@ -96,16 +73,6 @@
});
}
- private static class AdapterLoader extends SecureClassLoader {
- AdapterLoader(ClassLoader parent) {
- super(parent);
- }
- }
-
- static boolean isAdapterClass(Class<?> clazz) {
- return clazz.getClassLoader() instanceof AdapterLoader;
- }
-
// Note that the adapter class is created in the protection domain of the class/interface being
// extended/implemented, and only the privileged global setter action class is generated in the protection domain
// of Nashorn itself. Also note that the creation and loading of the global setter is deferred until it is
@@ -114,9 +81,8 @@
// with ability to introspect on the class and use setAccessible(true) on it could invoke the method. It's a
// security tradeoff...
private ClassLoader createClassLoader(final ClassLoader parentLoader) {
- return new AdapterLoader(parentLoader) {
+ return new SecureClassLoader(parentLoader) {
private final ClassLoader myLoader = getClass().getClassLoader();
- private final ProtectionDomain myProtectionDomain = getClass().getProtectionDomain();
@Override
public Class<?> loadClass(final String name, final boolean resolve) throws ClassNotFoundException {
@@ -138,9 +104,6 @@
protected Class<?> findClass(final String name) throws ClassNotFoundException {
if(name.equals(className)) {
return defineClass(name, classBytes, 0, classBytes.length, GENERATED_PROTECTION_DOMAIN);
- } else if(name.equals(globalSetterClassName)) {
- final byte[] bytes = generatePrivilegedActionClassBytes(globalSetterClassName.replace('.', '/'));
- return defineClass(name, bytes, 0, bytes.length, myProtectionDomain);
} else {
throw new ClassNotFoundException(name);
}
@@ -158,70 +121,4 @@
permissions.add(new AllPermission());
return new ProtectionDomain(new CodeSource(null, (CodeSigner[])null), permissions);
}
-
- /**
- * Generates a PrivilegedAction implementation class for invoking {@link Context#setGlobal(ScriptObject)} from the
- * adapter class.
- */
- private static byte[] generatePrivilegedActionClassBytes(final String className) {
- final ClassWriter w = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
- // class GlobalSetter implements PrivilegedAction {
- w.visit(Opcodes.V1_7, ACC_SUPER | ACC_FINAL, className, null, OBJECT_TYPE_NAME, new String[] {
- PRIVILEGED_ACTION_TYPE_NAME
- });
-
- // private final ScriptObject global;
- w.visitField(ACC_PRIVATE | ACC_FINAL, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, null).visitEnd();
-
- // private GlobalSetter(ScriptObject global) {
- InstructionAdapter mv = new InstructionAdapter(w.visitMethod(ACC_PRIVATE, INIT,
- SET_GLOBAL_METHOD_DESCRIPTOR, null, new String[0]));
- mv.visitCode();
- // super();
- mv.visitVarInsn(ALOAD, 0);
- mv.invokespecial(OBJECT_TYPE_NAME, INIT, VOID_NOARG_METHOD_DESCRIPTOR);
- // this.global = global;
- mv.visitVarInsn(ALOAD, 0);
- mv.visitVarInsn(ALOAD, 1);
- mv.putfield(className, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR);
-
- mv.visitInsn(RETURN);
- mv.visitEnd();
- mv.visitMaxs(0, 0);
-
- // public Object run() {
- mv = new InstructionAdapter(w.visitMethod(ACC_PUBLIC, "run", PRIVILEGED_RUN_METHOD_DESCRIPTOR, null,
- new String[0]));
- mv.visitCode();
- // Context.setGlobal(this.global);
- mv.visitVarInsn(ALOAD, 0);
- mv.getfield(className, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR);
- mv.invokestatic(CONTEXT_TYPE_NAME, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR);
- // return null;
- mv.visitInsn(ACONST_NULL);
- mv.visitInsn(ARETURN);
-
- mv.visitEnd();
- mv.visitMaxs(0, 0);
-
- // static void setGlobal(ScriptObject global) {
- mv = new InstructionAdapter(w.visitMethod(ACC_STATIC, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR, null,
- new String[0]));
- mv.visitCode();
- // new GlobalSetter(ScriptObject global)
- mv.anew(Type.getType("L" + className + ";"));
- mv.dup();
- mv.visitVarInsn(ALOAD, 0);
- mv.invokespecial(className, INIT, SET_GLOBAL_METHOD_DESCRIPTOR);
- // AccessController.doPrivileged(...)
- mv.invokestatic(Type.getInternalName(AccessController.class), "doPrivileged", Type.getMethodDescriptor(
- OBJECT_TYPE, PRIVILEGED_ACTION_TYPE));
- mv.pop();
- mv.visitInsn(RETURN);
-
- mv.visitEnd();
- mv.visitMaxs(0, 0);
-
- return w.toByteArray();
- }
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java Mon Aug 12 09:29:06 2013 -0400
@@ -138,15 +138,6 @@
}
/**
- * Tells if the given Class is an adapter or support class
- * @param clazz Class object
- * @return true if the Class given is adapter or support class
- */
- public static boolean isAdapterClass(Class<?> clazz) {
- return JavaAdapterClassLoader.isAdapterClass(clazz);
- }
-
- /**
* Returns whether an instance of the specified class/interface can be generated from a ScriptFunction. Returns true
* iff: the adapter for the class/interface can be created, it is abstract (this includes interfaces), it has at
* least one abstract method, all the abstract methods share the same name, and it has a public or protected default
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterGeneratorBase.java Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.nashorn.internal.runtime.linker;
-
-import jdk.internal.org.objectweb.asm.Type;
-import jdk.nashorn.internal.runtime.Context;
-import jdk.nashorn.internal.runtime.ScriptObject;
-
-/**
- * Base class for both {@link JavaAdapterBytecodeGenerator} and {@link JavaAdapterClassLoader}, containing those
- * bytecode types, type names and method descriptor that are used by both.
- */
-@SuppressWarnings("javadoc")
-abstract class JavaAdapterGeneratorBase {
- static final Type CONTEXT_TYPE = Type.getType(Context.class);
- static final Type OBJECT_TYPE = Type.getType(Object.class);
- static final Type SCRIPT_OBJECT_TYPE = Type.getType(ScriptObject.class);
-
- static final String CONTEXT_TYPE_NAME = CONTEXT_TYPE.getInternalName();
- static final String OBJECT_TYPE_NAME = OBJECT_TYPE.getInternalName();
-
- static final String INIT = "<init>";
-
- static final String GLOBAL_FIELD_NAME = "global";
-
- static final String SCRIPT_OBJECT_TYPE_DESCRIPTOR = SCRIPT_OBJECT_TYPE.getDescriptor();
-
- static final String SET_GLOBAL_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE, SCRIPT_OBJECT_TYPE);
- static final String VOID_NOARG_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE);
-
- protected JavaAdapterGeneratorBase() {
- }
-}
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java Mon Aug 12 09:29:06 2013 -0400
@@ -37,7 +37,7 @@
/**
* Provides static utility services to generated Java adapter classes.
*/
-public class JavaAdapterServices {
+public final class JavaAdapterServices {
private static final ThreadLocal<ScriptObject> classOverrides = new ThreadLocal<>();
private JavaAdapterServices() {
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaArgumentConverters.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaArgumentConverters.java Mon Aug 12 09:29:06 2013 -0400
@@ -42,7 +42,7 @@
* Utility class shared by {@code NashornLinker} and {@code NashornPrimitiveLinker} for converting JS values to Java
* types.
*/
-public class JavaArgumentConverters {
+final class JavaArgumentConverters {
private static final MethodHandle TO_BOOLEAN = findOwnMH("toBoolean", Boolean.class, Object.class);
private static final MethodHandle TO_STRING = findOwnMH("toString", String.class, Object.class);
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java Mon Aug 12 09:29:06 2013 -0400
@@ -477,6 +477,7 @@
/**
* Tracer function that logs a callsite miss
*
+ * @param desc callsite descriptor string
* @param args arguments to function
*
* @throws Throwable if invocation failes or throws exception/error
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java Mon Aug 12 09:29:06 2013 -0400
@@ -30,6 +30,9 @@
import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodType;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import jdk.internal.dynalink.CallSiteDescriptor;
import jdk.internal.dynalink.beans.BeansLinker;
import jdk.internal.dynalink.linker.GuardedInvocation;
@@ -37,6 +40,7 @@
import jdk.internal.dynalink.linker.LinkRequest;
import jdk.internal.dynalink.linker.LinkerServices;
import jdk.internal.dynalink.support.Guards;
+import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ScriptRuntime;
/**
@@ -73,7 +77,7 @@
private static final MethodHandle EMPTY_ELEM_SETTER =
MH.dropArguments(EMPTY_PROP_SETTER, 0, Object.class);
- private static GuardedInvocation linkBean(final LinkRequest linkRequest, final LinkerServices linkerServices) {
+ private static GuardedInvocation linkBean(final LinkRequest linkRequest, final LinkerServices linkerServices) throws Exception {
final NashornCallSiteDescriptor desc = (NashornCallSiteDescriptor)linkRequest.getCallSiteDescriptor();
final Object self = linkRequest.getReceiver();
final String operator = desc.getFirstOperator();
@@ -84,6 +88,22 @@
}
throw typeError("not.a.function", ScriptRuntime.safeToString(self));
case "call":
+ // Support dyn:call on any object that supports some @FunctionalInterface
+ // annotated interface. This way Java method, constructor references or
+ // implementations of java.util.function.* interfaces can be called as though
+ // those are script functions.
+ final Method m = getFunctionalInterfaceMethod(self.getClass());
+ if (m != null) {
+ final MethodType callType = desc.getMethodType();
+ // 'callee' and 'thiz' passed from script + actual arguments
+ if (callType.parameterCount() != m.getParameterCount() + 2) {
+ throw typeError("no.method.matches.args", ScriptRuntime.safeToString(self));
+ }
+ return new GuardedInvocation(
+ // drop 'thiz' passed from the script.
+ MH.dropArguments(desc.getLookup().unreflect(m), 1, callType.parameterType(1)),
+ Guards.getInstanceOfGuard(m.getDeclaringClass())).asType(callType);
+ }
if(BeansLinker.isDynamicMethod(self)) {
throw typeError("no.method.matches.args", ScriptRuntime.safeToString(self));
}
@@ -148,4 +168,44 @@
}
return ScriptRuntime.safeToString(linkRequest.getArguments()[1]);
}
+
+ // cache of @FunctionalInterface method of implementor classes
+ private static final ClassValue<Method> FUNCTIONAL_IFACE_METHOD = new ClassValue<Method>() {
+ @Override
+ protected Method computeValue(final Class<?> type) {
+ return findFunctionalInterfaceMethod(type);
+ }
+
+ private Method findFunctionalInterfaceMethod(final Class<?> clazz) {
+ if (clazz == null) {
+ return null;
+ }
+
+ for (Class<?> iface : clazz.getInterfaces()) {
+ // check accessiblity up-front
+ if (! Context.isAccessibleClass(iface)) {
+ continue;
+ }
+
+ // check for @FunctionalInterface
+ if (iface.isAnnotationPresent(FunctionalInterface.class)) {
+ // return the first abstract method
+ for (final Method m : iface.getMethods()) {
+ if (Modifier.isAbstract(m.getModifiers())) {
+ return m;
+ }
+ }
+ }
+ }
+
+ // did not find here, try super class
+ return findFunctionalInterfaceMethod(clazz.getSuperclass());
+ }
+ };
+
+ // Returns @FunctionalInterface annotated interface's single abstract
+ // method. If not found, returns null.
+ static Method getFunctionalInterfaceMethod(final Class<?> clazz) {
+ return FUNCTIONAL_IFACE_METHOD.get(clazz);
+ }
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java Mon Aug 12 09:29:06 2013 -0400
@@ -39,7 +39,7 @@
* we can have a more compact representation, as we know that we're always only using {@code "dyn:*"} operations; also
* we're storing flags in an additional primitive field.
*/
-public class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor {
+public final class NashornCallSiteDescriptor extends AbstractCallSiteDescriptor {
/** Flags that the call site references a scope variable (it's an identifier reference or a var declaration, not a
* property access expression. */
public static final int CALLSITE_SCOPE = 0x01;
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornLinker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornLinker.java Mon Aug 12 09:29:06 2013 -0400
@@ -46,7 +46,7 @@
* This is the main dynamic linker for Nashorn. It is used for linking all {@link ScriptObject} and its subclasses (this
* includes {@link ScriptFunction} and its subclasses) as well as {@link Undefined}.
*/
-public final class NashornLinker implements TypeBasedGuardingDynamicLinker, GuardingTypeConverterFactory, ConversionComparator {
+final class NashornLinker implements TypeBasedGuardingDynamicLinker, GuardingTypeConverterFactory, ConversionComparator {
/**
* Returns true if {@code ScriptObject} is assignable from {@code type}, or it is {@code Undefined}.
*/
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java Mon Aug 12 09:29:06 2013 -0400
@@ -34,6 +34,7 @@
import jdk.internal.dynalink.linker.LinkerServices;
import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
import jdk.internal.dynalink.support.Guards;
+import jdk.nashorn.internal.runtime.Context;
import jdk.nashorn.internal.runtime.ECMAErrors;
/**
@@ -63,10 +64,14 @@
if (self.getClass() != StaticClass.class) {
return null;
}
+ final Class<?> receiverClass = ((StaticClass) self).getRepresentedClass();
+ Bootstrap.checkReflectionAccess(receiverClass);
final CallSiteDescriptor desc = request.getCallSiteDescriptor();
// We intercept "new" on StaticClass instances to provide additional capabilities
if ("new".equals(desc.getNameToken(CallSiteDescriptor.OPERATOR))) {
- final Class<?> receiverClass = ((StaticClass) self).getRepresentedClass();
+ // make sure new is on accessible Class
+ Context.checkPackageAccess(receiverClass.getName());
+
// Is the class abstract? (This includes interfaces.)
if (NashornLinker.isAbstractClass(receiverClass)) {
// Change this link request into a link request on the adapter class.
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/PrimitiveLookup.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/PrimitiveLookup.java Mon Aug 12 09:29:06 2013 -0400
@@ -25,7 +25,6 @@
package jdk.nashorn.internal.runtime.linker;
-import jdk.nashorn.internal.lookup.Lookup;
import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
@@ -35,6 +34,7 @@
import jdk.internal.dynalink.linker.LinkRequest;
import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
import jdk.internal.dynalink.support.Guards;
+import jdk.nashorn.internal.lookup.Lookup;
import jdk.nashorn.internal.runtime.ScriptObject;
/**
@@ -42,7 +42,7 @@
* numbers). This class is only public so it can be accessed by classes in the {@code jdk.nashorn.internal.objects}
* package.
*/
-public class PrimitiveLookup {
+public final class PrimitiveLookup {
private PrimitiveLookup() {
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/ReflectionCheckLinker.java Mon Aug 12 09:29:06 2013 -0400
@@ -76,9 +76,10 @@
final CallSiteDescriptor desc = requestWithoutContext.getCallSiteDescriptor();
if(CallSiteDescriptorFactory.tokenizeOperators(desc).contains("getProp")) {
if ("static".equals(desc.getNameToken(CallSiteDescriptor.NAME_OPERAND))) {
- Context.checkPackageAccess(((Class)self).getName());
- // If "getProp:static" passes package access, allow access.
- return;
+ if (Context.isAccessibleClass((Class<?>)self) && !isReflectionClass((Class<?>)self)) {
+ // If "getProp:static" passes access checks, allow access.
+ return;
+ }
}
}
}
--- a/nashorn/src/jdk/nashorn/internal/runtime/options/KeyValueOption.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/options/KeyValueOption.java Mon Aug 12 09:29:06 2013 -0400
@@ -36,7 +36,7 @@
*
* {@code --log=module1:level1,module2:level2... }
*/
-public class KeyValueOption extends Option<String> {
+public final class KeyValueOption extends Option<String> {
/**
* Map of keys given
*/
--- a/nashorn/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java Mon Aug 12 09:29:06 2013 -0400
@@ -34,7 +34,7 @@
* bundle file. Metainfo such as parameters and description is here as well
* for context sensitive help generation.
*/
-public class OptionTemplate implements Comparable<OptionTemplate> {
+public final class OptionTemplate implements Comparable<OptionTemplate> {
/** Resource, e.g. "nashorn" for this option */
private final String resource;
--- a/nashorn/test/script/basic/JDK-8010946-2.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/basic/JDK-8010946-2.js Mon Aug 12 09:29:06 2013 -0400
@@ -30,9 +30,8 @@
* @run
*/
-// Ensure these are CallerSensitiveDynamicMethods
+// Ensure this is CallerSensitiveDynamicMethod
print(java.security.AccessController["doPrivileged(PrivilegedAction)"])
-print(java.lang.Class["forName(String)"])
// Ensure this is not
print(java.lang.String["valueOf(char)"])
--- a/nashorn/test/script/basic/JDK-8010946-2.js.EXPECTED Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/basic/JDK-8010946-2.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -1,3 +1,2 @@
[jdk.internal.dynalink.beans.CallerSensitiveDynamicMethod Object java.security.AccessController.doPrivileged(PrivilegedAction)]
-[jdk.internal.dynalink.beans.CallerSensitiveDynamicMethod Class java.lang.Class.forName(String)]
[jdk.internal.dynalink.beans.SimpleDynamicMethod String java.lang.String.valueOf(char)]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8020356.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,10435 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * JDK-8020356: ClassCastException Undefined->Scope on spiltter class generated for a large switch statement
+ *
+ * @test
+ * @run
+ */
+
+print(hugeSwitch.apply({i: 20}));
+print(hugeArrayLiteral.apply({i: 10}));
+
+function hugeSwitch() {
+ switch (1) {
+ case 1:
+ return this.i;
+ case 2:
+ return this.i;
+ case 3:
+ return this.i;
+ case 4:
+ return this.i;
+ case 5:
+ return this.i;
+ case 6:
+ return this.i;
+ case 7:
+ return this.i;
+ case 8:
+ return this.i;
+ case 9:
+ return this.i;
+ case 10:
+ return this.i;
+ case 11:
+ return this.i;
+ case 12:
+ return this.i;
+ case 13:
+ return this.i;
+ case 14:
+ return this.i;
+ case 15:
+ return this.i;
+ case 16:
+ return this.i;
+ case 17:
+ return this.i;
+ case 18:
+ return this.i;
+ case 19:
+ return this.i;
+ case 20:
+ return this.i;
+ case 21:
+ return this.i;
+ case 22:
+ return this.i;
+ case 23:
+ return this.i;
+ case 24:
+ return this.i;
+ case 25:
+ return this.i;
+ case 26:
+ return this.i;
+ case 27:
+ return this.i;
+ case 28:
+ return this.i;
+ case 29:
+ return this.i;
+ case 30:
+ return this.i;
+ case 31:
+ return this.i;
+ case 32:
+ return this.i;
+ case 33:
+ return this.i;
+ case 34:
+ return this.i;
+ case 35:
+ return this.i;
+ case 36:
+ return this.i;
+ case 37:
+ return this.i;
+ case 38:
+ return this.i;
+ case 39:
+ return this.i;
+ case 40:
+ return this.i;
+ case 41:
+ return this.i;
+ case 42:
+ return this.i;
+ case 43:
+ return this.i;
+ case 44:
+ return this.i;
+ case 45:
+ return this.i;
+ case 46:
+ return this.i;
+ case 47:
+ return this.i;
+ case 48:
+ return this.i;
+ case 49:
+ return this.i;
+ case 50:
+ return this.i;
+ case 51:
+ return this.i;
+ case 52:
+ return this.i;
+ case 53:
+ return this.i;
+ case 54:
+ return this.i;
+ case 55:
+ return this.i;
+ case 56:
+ return this.i;
+ case 57:
+ return this.i;
+ case 58:
+ return this.i;
+ case 59:
+ return this.i;
+ case 60:
+ return this.i;
+ case 61:
+ return this.i;
+ case 62:
+ return this.i;
+ case 63:
+ return this.i;
+ case 64:
+ return this.i;
+ case 65:
+ return this.i;
+ case 66:
+ return this.i;
+ case 67:
+ return this.i;
+ case 68:
+ return this.i;
+ case 69:
+ return this.i;
+ case 70:
+ return this.i;
+ case 71:
+ return this.i;
+ case 72:
+ return this.i;
+ case 73:
+ return this.i;
+ case 74:
+ return this.i;
+ case 75:
+ return this.i;
+ case 76:
+ return this.i;
+ case 77:
+ return this.i;
+ case 78:
+ return this.i;
+ case 79:
+ return this.i;
+ case 80:
+ return this.i;
+ case 81:
+ return this.i;
+ case 82:
+ return this.i;
+ case 83:
+ return this.i;
+ case 84:
+ return this.i;
+ case 85:
+ return this.i;
+ case 86:
+ return this.i;
+ case 87:
+ return this.i;
+ case 88:
+ return this.i;
+ case 89:
+ return this.i;
+ case 90:
+ return this.i;
+ case 91:
+ return this.i;
+ case 92:
+ return this.i;
+ case 93:
+ return this.i;
+ case 94:
+ return this.i;
+ case 95:
+ return this.i;
+ case 96:
+ return this.i;
+ case 97:
+ return this.i;
+ case 98:
+ return this.i;
+ case 99:
+ return this.i;
+ case 100:
+ return this.i;
+ case 101:
+ return this.i;
+ case 102:
+ return this.i;
+ case 103:
+ return this.i;
+ case 104:
+ return this.i;
+ case 105:
+ return this.i;
+ case 106:
+ return this.i;
+ case 107:
+ return this.i;
+ case 108:
+ return this.i;
+ case 109:
+ return this.i;
+ case 110:
+ return this.i;
+ case 111:
+ return this.i;
+ case 112:
+ return this.i;
+ case 113:
+ return this.i;
+ case 114:
+ return this.i;
+ case 115:
+ return this.i;
+ case 116:
+ return this.i;
+ case 117:
+ return this.i;
+ case 118:
+ return this.i;
+ case 119:
+ return this.i;
+ case 120:
+ return this.i;
+ case 121:
+ return this.i;
+ case 122:
+ return this.i;
+ case 123:
+ return this.i;
+ case 124:
+ return this.i;
+ case 125:
+ return this.i;
+ case 126:
+ return this.i;
+ case 127:
+ return this.i;
+ case 128:
+ return this.i;
+ case 129:
+ return this.i;
+ case 130:
+ return this.i;
+ case 131:
+ return this.i;
+ case 132:
+ return this.i;
+ case 133:
+ return this.i;
+ case 134:
+ return this.i;
+ case 135:
+ return this.i;
+ case 136:
+ return this.i;
+ case 137:
+ return this.i;
+ case 138:
+ return this.i;
+ case 139:
+ return this.i;
+ case 140:
+ return this.i;
+ case 141:
+ return this.i;
+ case 142:
+ return this.i;
+ case 143:
+ return this.i;
+ case 144:
+ return this.i;
+ case 145:
+ return this.i;
+ case 146:
+ return this.i;
+ case 147:
+ return this.i;
+ case 148:
+ return this.i;
+ case 149:
+ return this.i;
+ case 150:
+ return this.i;
+ case 151:
+ return this.i;
+ case 152:
+ return this.i;
+ case 153:
+ return this.i;
+ case 154:
+ return this.i;
+ case 155:
+ return this.i;
+ case 156:
+ return this.i;
+ case 157:
+ return this.i;
+ case 158:
+ return this.i;
+ case 159:
+ return this.i;
+ case 160:
+ return this.i;
+ case 161:
+ return this.i;
+ case 162:
+ return this.i;
+ case 163:
+ return this.i;
+ case 164:
+ return this.i;
+ case 165:
+ return this.i;
+ case 166:
+ return this.i;
+ case 167:
+ return this.i;
+ case 168:
+ return this.i;
+ case 169:
+ return this.i;
+ case 170:
+ return this.i;
+ case 171:
+ return this.i;
+ case 172:
+ return this.i;
+ case 173:
+ return this.i;
+ case 174:
+ return this.i;
+ case 175:
+ return this.i;
+ case 176:
+ return this.i;
+ case 177:
+ return this.i;
+ case 178:
+ return this.i;
+ case 179:
+ return this.i;
+ case 180:
+ return this.i;
+ case 181:
+ return this.i;
+ case 182:
+ return this.i;
+ case 183:
+ return this.i;
+ case 184:
+ return this.i;
+ case 185:
+ return this.i;
+ case 186:
+ return this.i;
+ case 187:
+ return this.i;
+ case 188:
+ return this.i;
+ case 189:
+ return this.i;
+ case 190:
+ return this.i;
+ case 191:
+ return this.i;
+ case 192:
+ return this.i;
+ case 193:
+ return this.i;
+ case 194:
+ return this.i;
+ case 195:
+ return this.i;
+ case 196:
+ return this.i;
+ case 197:
+ return this.i;
+ case 198:
+ return this.i;
+ case 199:
+ return this.i;
+ case 200:
+ return this.i;
+ case 201:
+ return this.i;
+ case 202:
+ return this.i;
+ case 203:
+ return this.i;
+ case 204:
+ return this.i;
+ case 205:
+ return this.i;
+ case 206:
+ return this.i;
+ case 207:
+ return this.i;
+ case 208:
+ return this.i;
+ case 209:
+ return this.i;
+ case 210:
+ return this.i;
+ case 211:
+ return this.i;
+ case 212:
+ return this.i;
+ case 213:
+ return this.i;
+ case 214:
+ return this.i;
+ case 215:
+ return this.i;
+ case 216:
+ return this.i;
+ case 217:
+ return this.i;
+ case 218:
+ return this.i;
+ case 219:
+ return this.i;
+ case 220:
+ return this.i;
+ case 221:
+ return this.i;
+ case 222:
+ return this.i;
+ case 223:
+ return this.i;
+ case 224:
+ return this.i;
+ case 225:
+ return this.i;
+ case 226:
+ return this.i;
+ case 227:
+ return this.i;
+ case 228:
+ return this.i;
+ case 229:
+ return this.i;
+ case 230:
+ return this.i;
+ case 231:
+ return this.i;
+ case 232:
+ return this.i;
+ case 233:
+ return this.i;
+ case 234:
+ return this.i;
+ case 235:
+ return this.i;
+ case 236:
+ return this.i;
+ case 237:
+ return this.i;
+ case 238:
+ return this.i;
+ case 239:
+ return this.i;
+ case 240:
+ return this.i;
+ case 241:
+ return this.i;
+ case 242:
+ return this.i;
+ case 243:
+ return this.i;
+ case 244:
+ return this.i;
+ case 245:
+ return this.i;
+ case 246:
+ return this.i;
+ case 247:
+ return this.i;
+ case 248:
+ return this.i;
+ case 249:
+ return this.i;
+ case 250:
+ return this.i;
+ case 251:
+ return this.i;
+ case 252:
+ return this.i;
+ case 253:
+ return this.i;
+ case 254:
+ return this.i;
+ case 255:
+ return this.i;
+ case 256:
+ return this.i;
+ case 257:
+ return this.i;
+ case 258:
+ return this.i;
+ case 259:
+ return this.i;
+ case 260:
+ return this.i;
+ case 261:
+ return this.i;
+ case 262:
+ return this.i;
+ case 263:
+ return this.i;
+ case 264:
+ return this.i;
+ case 265:
+ return this.i;
+ case 266:
+ return this.i;
+ case 267:
+ return this.i;
+ case 268:
+ return this.i;
+ case 269:
+ return this.i;
+ case 270:
+ return this.i;
+ case 271:
+ return this.i;
+ case 272:
+ return this.i;
+ case 273:
+ return this.i;
+ case 274:
+ return this.i;
+ case 275:
+ return this.i;
+ case 276:
+ return this.i;
+ case 277:
+ return this.i;
+ case 278:
+ return this.i;
+ case 279:
+ return this.i;
+ case 280:
+ return this.i;
+ case 281:
+ return this.i;
+ case 282:
+ return this.i;
+ case 283:
+ return this.i;
+ case 284:
+ return this.i;
+ case 285:
+ return this.i;
+ case 286:
+ return this.i;
+ case 287:
+ return this.i;
+ case 288:
+ return this.i;
+ case 289:
+ return this.i;
+ case 290:
+ return this.i;
+ case 291:
+ return this.i;
+ case 292:
+ return this.i;
+ case 293:
+ return this.i;
+ case 294:
+ return this.i;
+ case 295:
+ return this.i;
+ case 296:
+ return this.i;
+ case 297:
+ return this.i;
+ case 298:
+ return this.i;
+ case 299:
+ return this.i;
+ case 300:
+ return this.i;
+ case 301:
+ return this.i;
+ case 302:
+ return this.i;
+ case 303:
+ return this.i;
+ case 304:
+ return this.i;
+ case 305:
+ return this.i;
+ case 306:
+ return this.i;
+ case 307:
+ return this.i;
+ case 308:
+ return this.i;
+ case 309:
+ return this.i;
+ case 310:
+ return this.i;
+ case 311:
+ return this.i;
+ case 312:
+ return this.i;
+ case 313:
+ return this.i;
+ case 314:
+ return this.i;
+ case 315:
+ return this.i;
+ case 316:
+ return this.i;
+ case 317:
+ return this.i;
+ case 318:
+ return this.i;
+ case 319:
+ return this.i;
+ case 320:
+ return this.i;
+ case 321:
+ return this.i;
+ case 322:
+ return this.i;
+ case 323:
+ return this.i;
+ case 324:
+ return this.i;
+ case 325:
+ return this.i;
+ case 326:
+ return this.i;
+ case 327:
+ return this.i;
+ case 328:
+ return this.i;
+ case 329:
+ return this.i;
+ case 330:
+ return this.i;
+ case 331:
+ return this.i;
+ case 332:
+ return this.i;
+ case 333:
+ return this.i;
+ case 334:
+ return this.i;
+ case 335:
+ return this.i;
+ case 336:
+ return this.i;
+ case 337:
+ return this.i;
+ case 338:
+ return this.i;
+ case 339:
+ return this.i;
+ case 340:
+ return this.i;
+ case 341:
+ return this.i;
+ case 342:
+ return this.i;
+ case 343:
+ return this.i;
+ case 344:
+ return this.i;
+ case 345:
+ return this.i;
+ case 346:
+ return this.i;
+ case 347:
+ return this.i;
+ case 348:
+ return this.i;
+ case 349:
+ return this.i;
+ case 350:
+ return this.i;
+ case 351:
+ return this.i;
+ case 352:
+ return this.i;
+ case 353:
+ return this.i;
+ case 354:
+ return this.i;
+ case 355:
+ return this.i;
+ case 356:
+ return this.i;
+ case 357:
+ return this.i;
+ case 358:
+ return this.i;
+ case 359:
+ return this.i;
+ case 360:
+ return this.i;
+ case 361:
+ return this.i;
+ case 362:
+ return this.i;
+ case 363:
+ return this.i;
+ case 364:
+ return this.i;
+ case 365:
+ return this.i;
+ case 366:
+ return this.i;
+ case 367:
+ return this.i;
+ case 368:
+ return this.i;
+ case 369:
+ return this.i;
+ case 370:
+ return this.i;
+ case 371:
+ return this.i;
+ case 372:
+ return this.i;
+ case 373:
+ return this.i;
+ case 374:
+ return this.i;
+ case 375:
+ return this.i;
+ case 376:
+ return this.i;
+ case 377:
+ return this.i;
+ case 378:
+ return this.i;
+ case 379:
+ return this.i;
+ case 380:
+ return this.i;
+ case 381:
+ return this.i;
+ case 382:
+ return this.i;
+ case 383:
+ return this.i;
+ case 384:
+ return this.i;
+ case 385:
+ return this.i;
+ case 386:
+ return this.i;
+ case 387:
+ return this.i;
+ case 388:
+ return this.i;
+ case 389:
+ return this.i;
+ case 390:
+ return this.i;
+ case 391:
+ return this.i;
+ case 392:
+ return this.i;
+ case 393:
+ return this.i;
+ case 394:
+ return this.i;
+ case 395:
+ return this.i;
+ case 396:
+ return this.i;
+ case 397:
+ return this.i;
+ case 398:
+ return this.i;
+ case 399:
+ return this.i;
+ case 400:
+ return this.i;
+ case 401:
+ return this.i;
+ case 402:
+ return this.i;
+ case 403:
+ return this.i;
+ case 404:
+ return this.i;
+ case 405:
+ return this.i;
+ case 406:
+ return this.i;
+ case 407:
+ return this.i;
+ case 408:
+ return this.i;
+ case 409:
+ return this.i;
+ case 410:
+ return this.i;
+ case 411:
+ return this.i;
+ case 412:
+ return this.i;
+ case 413:
+ return this.i;
+ case 414:
+ return this.i;
+ case 415:
+ return this.i;
+ case 416:
+ return this.i;
+ case 417:
+ return this.i;
+ case 418:
+ return this.i;
+ case 419:
+ return this.i;
+ case 420:
+ return this.i;
+ case 421:
+ return this.i;
+ case 422:
+ return this.i;
+ case 423:
+ return this.i;
+ case 424:
+ return this.i;
+ case 425:
+ return this.i;
+ case 426:
+ return this.i;
+ case 427:
+ return this.i;
+ case 428:
+ return this.i;
+ case 429:
+ return this.i;
+ case 430:
+ return this.i;
+ case 431:
+ return this.i;
+ case 432:
+ return this.i;
+ case 433:
+ return this.i;
+ case 434:
+ return this.i;
+ case 435:
+ return this.i;
+ case 436:
+ return this.i;
+ case 437:
+ return this.i;
+ case 438:
+ return this.i;
+ case 439:
+ return this.i;
+ case 440:
+ return this.i;
+ case 441:
+ return this.i;
+ case 442:
+ return this.i;
+ case 443:
+ return this.i;
+ case 444:
+ return this.i;
+ case 445:
+ return this.i;
+ case 446:
+ return this.i;
+ case 447:
+ return this.i;
+ case 448:
+ return this.i;
+ case 449:
+ return this.i;
+ case 450:
+ return this.i;
+ case 451:
+ return this.i;
+ case 452:
+ return this.i;
+ case 453:
+ return this.i;
+ case 454:
+ return this.i;
+ case 455:
+ return this.i;
+ case 456:
+ return this.i;
+ case 457:
+ return this.i;
+ case 458:
+ return this.i;
+ case 459:
+ return this.i;
+ case 460:
+ return this.i;
+ case 461:
+ return this.i;
+ case 462:
+ return this.i;
+ case 463:
+ return this.i;
+ case 464:
+ return this.i;
+ case 465:
+ return this.i;
+ case 466:
+ return this.i;
+ case 467:
+ return this.i;
+ case 468:
+ return this.i;
+ case 469:
+ return this.i;
+ case 470:
+ return this.i;
+ case 471:
+ return this.i;
+ case 472:
+ return this.i;
+ case 473:
+ return this.i;
+ case 474:
+ return this.i;
+ case 475:
+ return this.i;
+ case 476:
+ return this.i;
+ case 477:
+ return this.i;
+ case 478:
+ return this.i;
+ case 479:
+ return this.i;
+ case 480:
+ return this.i;
+ case 481:
+ return this.i;
+ case 482:
+ return this.i;
+ case 483:
+ return this.i;
+ case 484:
+ return this.i;
+ case 485:
+ return this.i;
+ case 486:
+ return this.i;
+ case 487:
+ return this.i;
+ case 488:
+ return this.i;
+ case 489:
+ return this.i;
+ case 490:
+ return this.i;
+ case 491:
+ return this.i;
+ case 492:
+ return this.i;
+ case 493:
+ return this.i;
+ case 494:
+ return this.i;
+ case 495:
+ return this.i;
+ case 496:
+ return this.i;
+ case 497:
+ return this.i;
+ case 498:
+ return this.i;
+ case 499:
+ return this.i;
+ case 500:
+ return this.i;
+ case 501:
+ return this.i;
+ case 502:
+ return this.i;
+ case 503:
+ return this.i;
+ case 504:
+ return this.i;
+ case 505:
+ return this.i;
+ case 506:
+ return this.i;
+ case 507:
+ return this.i;
+ case 508:
+ return this.i;
+ case 509:
+ return this.i;
+ case 510:
+ return this.i;
+ case 511:
+ return this.i;
+ case 512:
+ return this.i;
+ case 513:
+ return this.i;
+ case 514:
+ return this.i;
+ case 515:
+ return this.i;
+ case 516:
+ return this.i;
+ case 517:
+ return this.i;
+ case 518:
+ return this.i;
+ case 519:
+ return this.i;
+ case 520:
+ return this.i;
+ case 521:
+ return this.i;
+ case 522:
+ return this.i;
+ case 523:
+ return this.i;
+ case 524:
+ return this.i;
+ case 525:
+ return this.i;
+ case 526:
+ return this.i;
+ case 527:
+ return this.i;
+ case 528:
+ return this.i;
+ case 529:
+ return this.i;
+ case 530:
+ return this.i;
+ case 531:
+ return this.i;
+ case 532:
+ return this.i;
+ case 533:
+ return this.i;
+ case 534:
+ return this.i;
+ case 535:
+ return this.i;
+ case 536:
+ return this.i;
+ case 537:
+ return this.i;
+ case 538:
+ return this.i;
+ case 539:
+ return this.i;
+ case 540:
+ return this.i;
+ case 541:
+ return this.i;
+ case 542:
+ return this.i;
+ case 543:
+ return this.i;
+ case 544:
+ return this.i;
+ case 545:
+ return this.i;
+ case 546:
+ return this.i;
+ case 547:
+ return this.i;
+ case 548:
+ return this.i;
+ case 549:
+ return this.i;
+ case 550:
+ return this.i;
+ case 551:
+ return this.i;
+ case 552:
+ return this.i;
+ case 553:
+ return this.i;
+ case 554:
+ return this.i;
+ case 555:
+ return this.i;
+ case 556:
+ return this.i;
+ case 557:
+ return this.i;
+ case 558:
+ return this.i;
+ case 559:
+ return this.i;
+ case 560:
+ return this.i;
+ case 561:
+ return this.i;
+ case 562:
+ return this.i;
+ case 563:
+ return this.i;
+ case 564:
+ return this.i;
+ case 565:
+ return this.i;
+ case 566:
+ return this.i;
+ case 567:
+ return this.i;
+ case 568:
+ return this.i;
+ case 569:
+ return this.i;
+ case 570:
+ return this.i;
+ case 571:
+ return this.i;
+ case 572:
+ return this.i;
+ case 573:
+ return this.i;
+ case 574:
+ return this.i;
+ case 575:
+ return this.i;
+ case 576:
+ return this.i;
+ case 577:
+ return this.i;
+ case 578:
+ return this.i;
+ case 579:
+ return this.i;
+ case 580:
+ return this.i;
+ case 581:
+ return this.i;
+ case 582:
+ return this.i;
+ case 583:
+ return this.i;
+ case 584:
+ return this.i;
+ case 585:
+ return this.i;
+ case 586:
+ return this.i;
+ case 587:
+ return this.i;
+ case 588:
+ return this.i;
+ case 589:
+ return this.i;
+ case 590:
+ return this.i;
+ case 591:
+ return this.i;
+ case 592:
+ return this.i;
+ case 593:
+ return this.i;
+ case 594:
+ return this.i;
+ case 595:
+ return this.i;
+ case 596:
+ return this.i;
+ case 597:
+ return this.i;
+ case 598:
+ return this.i;
+ case 599:
+ return this.i;
+ case 600:
+ return this.i;
+ case 601:
+ return this.i;
+ case 602:
+ return this.i;
+ case 603:
+ return this.i;
+ case 604:
+ return this.i;
+ case 605:
+ return this.i;
+ case 606:
+ return this.i;
+ case 607:
+ return this.i;
+ case 608:
+ return this.i;
+ case 609:
+ return this.i;
+ case 610:
+ return this.i;
+ case 611:
+ return this.i;
+ case 612:
+ return this.i;
+ case 613:
+ return this.i;
+ case 614:
+ return this.i;
+ case 615:
+ return this.i;
+ case 616:
+ return this.i;
+ case 617:
+ return this.i;
+ case 618:
+ return this.i;
+ case 619:
+ return this.i;
+ case 620:
+ return this.i;
+ case 621:
+ return this.i;
+ case 622:
+ return this.i;
+ case 623:
+ return this.i;
+ case 624:
+ return this.i;
+ case 625:
+ return this.i;
+ case 626:
+ return this.i;
+ case 627:
+ return this.i;
+ case 628:
+ return this.i;
+ case 629:
+ return this.i;
+ case 630:
+ return this.i;
+ case 631:
+ return this.i;
+ case 632:
+ return this.i;
+ case 633:
+ return this.i;
+ case 634:
+ return this.i;
+ case 635:
+ return this.i;
+ case 636:
+ return this.i;
+ case 637:
+ return this.i;
+ case 638:
+ return this.i;
+ case 639:
+ return this.i;
+ case 640:
+ return this.i;
+ case 641:
+ return this.i;
+ case 642:
+ return this.i;
+ case 643:
+ return this.i;
+ case 644:
+ return this.i;
+ case 645:
+ return this.i;
+ case 646:
+ return this.i;
+ case 647:
+ return this.i;
+ case 648:
+ return this.i;
+ case 649:
+ return this.i;
+ case 650:
+ return this.i;
+ case 651:
+ return this.i;
+ case 652:
+ return this.i;
+ case 653:
+ return this.i;
+ case 654:
+ return this.i;
+ case 655:
+ return this.i;
+ case 656:
+ return this.i;
+ case 657:
+ return this.i;
+ case 658:
+ return this.i;
+ case 659:
+ return this.i;
+ case 660:
+ return this.i;
+ case 661:
+ return this.i;
+ case 662:
+ return this.i;
+ case 663:
+ return this.i;
+ case 664:
+ return this.i;
+ case 665:
+ return this.i;
+ case 666:
+ return this.i;
+ case 667:
+ return this.i;
+ case 668:
+ return this.i;
+ case 669:
+ return this.i;
+ case 670:
+ return this.i;
+ case 671:
+ return this.i;
+ case 672:
+ return this.i;
+ case 673:
+ return this.i;
+ case 674:
+ return this.i;
+ case 675:
+ return this.i;
+ case 676:
+ return this.i;
+ case 677:
+ return this.i;
+ case 678:
+ return this.i;
+ case 679:
+ return this.i;
+ case 680:
+ return this.i;
+ case 681:
+ return this.i;
+ case 682:
+ return this.i;
+ case 683:
+ return this.i;
+ case 684:
+ return this.i;
+ case 685:
+ return this.i;
+ case 686:
+ return this.i;
+ case 687:
+ return this.i;
+ case 688:
+ return this.i;
+ case 689:
+ return this.i;
+ case 690:
+ return this.i;
+ case 691:
+ return this.i;
+ case 692:
+ return this.i;
+ case 693:
+ return this.i;
+ case 694:
+ return this.i;
+ case 695:
+ return this.i;
+ case 696:
+ return this.i;
+ case 697:
+ return this.i;
+ case 698:
+ return this.i;
+ case 699:
+ return this.i;
+ case 700:
+ return this.i;
+ case 701:
+ return this.i;
+ case 702:
+ return this.i;
+ case 703:
+ return this.i;
+ case 704:
+ return this.i;
+ case 705:
+ return this.i;
+ case 706:
+ return this.i;
+ case 707:
+ return this.i;
+ case 708:
+ return this.i;
+ case 709:
+ return this.i;
+ case 710:
+ return this.i;
+ case 711:
+ return this.i;
+ case 712:
+ return this.i;
+ case 713:
+ return this.i;
+ case 714:
+ return this.i;
+ case 715:
+ return this.i;
+ case 716:
+ return this.i;
+ case 717:
+ return this.i;
+ case 718:
+ return this.i;
+ case 719:
+ return this.i;
+ case 720:
+ return this.i;
+ case 721:
+ return this.i;
+ case 722:
+ return this.i;
+ case 723:
+ return this.i;
+ case 724:
+ return this.i;
+ case 725:
+ return this.i;
+ case 726:
+ return this.i;
+ case 727:
+ return this.i;
+ case 728:
+ return this.i;
+ case 729:
+ return this.i;
+ case 730:
+ return this.i;
+ case 731:
+ return this.i;
+ case 732:
+ return this.i;
+ case 733:
+ return this.i;
+ case 734:
+ return this.i;
+ case 735:
+ return this.i;
+ case 736:
+ return this.i;
+ case 737:
+ return this.i;
+ case 738:
+ return this.i;
+ case 739:
+ return this.i;
+ case 740:
+ return this.i;
+ case 741:
+ return this.i;
+ case 742:
+ return this.i;
+ case 743:
+ return this.i;
+ case 744:
+ return this.i;
+ case 745:
+ return this.i;
+ case 746:
+ return this.i;
+ case 747:
+ return this.i;
+ case 748:
+ return this.i;
+ case 749:
+ return this.i;
+ case 750:
+ return this.i;
+ case 751:
+ return this.i;
+ case 752:
+ return this.i;
+ case 753:
+ return this.i;
+ case 754:
+ return this.i;
+ case 755:
+ return this.i;
+ case 756:
+ return this.i;
+ case 757:
+ return this.i;
+ case 758:
+ return this.i;
+ case 759:
+ return this.i;
+ case 760:
+ return this.i;
+ case 761:
+ return this.i;
+ case 762:
+ return this.i;
+ case 763:
+ return this.i;
+ case 764:
+ return this.i;
+ case 765:
+ return this.i;
+ case 766:
+ return this.i;
+ case 767:
+ return this.i;
+ case 768:
+ return this.i;
+ case 769:
+ return this.i;
+ case 770:
+ return this.i;
+ case 771:
+ return this.i;
+ case 772:
+ return this.i;
+ case 773:
+ return this.i;
+ case 774:
+ return this.i;
+ case 775:
+ return this.i;
+ case 776:
+ return this.i;
+ case 777:
+ return this.i;
+ case 778:
+ return this.i;
+ case 779:
+ return this.i;
+ case 780:
+ return this.i;
+ case 781:
+ return this.i;
+ case 782:
+ return this.i;
+ case 783:
+ return this.i;
+ case 784:
+ return this.i;
+ case 785:
+ return this.i;
+ case 786:
+ return this.i;
+ case 787:
+ return this.i;
+ case 788:
+ return this.i;
+ case 789:
+ return this.i;
+ case 790:
+ return this.i;
+ case 791:
+ return this.i;
+ case 792:
+ return this.i;
+ case 793:
+ return this.i;
+ case 794:
+ return this.i;
+ case 795:
+ return this.i;
+ case 796:
+ return this.i;
+ case 797:
+ return this.i;
+ case 798:
+ return this.i;
+ case 799:
+ return this.i;
+ case 800:
+ return this.i;
+ case 801:
+ return this.i;
+ case 802:
+ return this.i;
+ case 803:
+ return this.i;
+ case 804:
+ return this.i;
+ case 805:
+ return this.i;
+ case 806:
+ return this.i;
+ case 807:
+ return this.i;
+ case 808:
+ return this.i;
+ case 809:
+ return this.i;
+ case 810:
+ return this.i;
+ case 811:
+ return this.i;
+ case 812:
+ return this.i;
+ case 813:
+ return this.i;
+ case 814:
+ return this.i;
+ case 815:
+ return this.i;
+ case 816:
+ return this.i;
+ case 817:
+ return this.i;
+ case 818:
+ return this.i;
+ case 819:
+ return this.i;
+ case 820:
+ return this.i;
+ case 821:
+ return this.i;
+ case 822:
+ return this.i;
+ case 823:
+ return this.i;
+ case 824:
+ return this.i;
+ case 825:
+ return this.i;
+ case 826:
+ return this.i;
+ case 827:
+ return this.i;
+ case 828:
+ return this.i;
+ case 829:
+ return this.i;
+ case 830:
+ return this.i;
+ case 831:
+ return this.i;
+ case 832:
+ return this.i;
+ case 833:
+ return this.i;
+ case 834:
+ return this.i;
+ case 835:
+ return this.i;
+ case 836:
+ return this.i;
+ case 837:
+ return this.i;
+ case 838:
+ return this.i;
+ case 839:
+ return this.i;
+ case 840:
+ return this.i;
+ case 841:
+ return this.i;
+ case 842:
+ return this.i;
+ case 843:
+ return this.i;
+ case 844:
+ return this.i;
+ case 845:
+ return this.i;
+ case 846:
+ return this.i;
+ case 847:
+ return this.i;
+ case 848:
+ return this.i;
+ case 849:
+ return this.i;
+ case 850:
+ return this.i;
+ case 851:
+ return this.i;
+ case 852:
+ return this.i;
+ case 853:
+ return this.i;
+ case 854:
+ return this.i;
+ case 855:
+ return this.i;
+ case 856:
+ return this.i;
+ case 857:
+ return this.i;
+ case 858:
+ return this.i;
+ case 859:
+ return this.i;
+ case 860:
+ return this.i;
+ case 861:
+ return this.i;
+ case 862:
+ return this.i;
+ case 863:
+ return this.i;
+ case 864:
+ return this.i;
+ case 865:
+ return this.i;
+ case 866:
+ return this.i;
+ case 867:
+ return this.i;
+ case 868:
+ return this.i;
+ case 869:
+ return this.i;
+ case 870:
+ return this.i;
+ case 871:
+ return this.i;
+ case 872:
+ return this.i;
+ case 873:
+ return this.i;
+ case 874:
+ return this.i;
+ case 875:
+ return this.i;
+ case 876:
+ return this.i;
+ case 877:
+ return this.i;
+ case 878:
+ return this.i;
+ case 879:
+ return this.i;
+ case 880:
+ return this.i;
+ case 881:
+ return this.i;
+ case 882:
+ return this.i;
+ case 883:
+ return this.i;
+ case 884:
+ return this.i;
+ case 885:
+ return this.i;
+ case 886:
+ return this.i;
+ case 887:
+ return this.i;
+ case 888:
+ return this.i;
+ case 889:
+ return this.i;
+ case 890:
+ return this.i;
+ case 891:
+ return this.i;
+ case 892:
+ return this.i;
+ case 893:
+ return this.i;
+ case 894:
+ return this.i;
+ case 895:
+ return this.i;
+ case 896:
+ return this.i;
+ case 897:
+ return this.i;
+ case 898:
+ return this.i;
+ case 899:
+ return this.i;
+ case 900:
+ return this.i;
+ case 901:
+ return this.i;
+ case 902:
+ return this.i;
+ case 903:
+ return this.i;
+ case 904:
+ return this.i;
+ case 905:
+ return this.i;
+ case 906:
+ return this.i;
+ case 907:
+ return this.i;
+ case 908:
+ return this.i;
+ case 909:
+ return this.i;
+ case 910:
+ return this.i;
+ case 911:
+ return this.i;
+ case 912:
+ return this.i;
+ case 913:
+ return this.i;
+ case 914:
+ return this.i;
+ case 915:
+ return this.i;
+ case 916:
+ return this.i;
+ case 917:
+ return this.i;
+ case 918:
+ return this.i;
+ case 919:
+ return this.i;
+ case 920:
+ return this.i;
+ case 921:
+ return this.i;
+ case 922:
+ return this.i;
+ case 923:
+ return this.i;
+ case 924:
+ return this.i;
+ case 925:
+ return this.i;
+ case 926:
+ return this.i;
+ case 927:
+ return this.i;
+ case 928:
+ return this.i;
+ case 929:
+ return this.i;
+ case 930:
+ return this.i;
+ case 931:
+ return this.i;
+ case 932:
+ return this.i;
+ case 933:
+ return this.i;
+ case 934:
+ return this.i;
+ case 935:
+ return this.i;
+ case 936:
+ return this.i;
+ case 937:
+ return this.i;
+ case 938:
+ return this.i;
+ case 939:
+ return this.i;
+ case 940:
+ return this.i;
+ case 941:
+ return this.i;
+ case 942:
+ return this.i;
+ case 943:
+ return this.i;
+ case 944:
+ return this.i;
+ case 945:
+ return this.i;
+ case 946:
+ return this.i;
+ case 947:
+ return this.i;
+ case 948:
+ return this.i;
+ case 949:
+ return this.i;
+ case 950:
+ return this.i;
+ case 951:
+ return this.i;
+ case 952:
+ return this.i;
+ case 953:
+ return this.i;
+ case 954:
+ return this.i;
+ case 955:
+ return this.i;
+ case 956:
+ return this.i;
+ case 957:
+ return this.i;
+ case 958:
+ return this.i;
+ case 959:
+ return this.i;
+ case 960:
+ return this.i;
+ case 961:
+ return this.i;
+ case 962:
+ return this.i;
+ case 963:
+ return this.i;
+ case 964:
+ return this.i;
+ case 965:
+ return this.i;
+ case 966:
+ return this.i;
+ case 967:
+ return this.i;
+ case 968:
+ return this.i;
+ case 969:
+ return this.i;
+ case 970:
+ return this.i;
+ case 971:
+ return this.i;
+ case 972:
+ return this.i;
+ case 973:
+ return this.i;
+ case 974:
+ return this.i;
+ case 975:
+ return this.i;
+ case 976:
+ return this.i;
+ case 977:
+ return this.i;
+ case 978:
+ return this.i;
+ case 979:
+ return this.i;
+ case 980:
+ return this.i;
+ case 981:
+ return this.i;
+ case 982:
+ return this.i;
+ case 983:
+ return this.i;
+ case 984:
+ return this.i;
+ case 985:
+ return this.i;
+ case 986:
+ return this.i;
+ case 987:
+ return this.i;
+ case 988:
+ return this.i;
+ case 989:
+ return this.i;
+ case 990:
+ return this.i;
+ case 991:
+ return this.i;
+ case 992:
+ return this.i;
+ case 993:
+ return this.i;
+ case 994:
+ return this.i;
+ case 995:
+ return this.i;
+ case 996:
+ return this.i;
+ case 997:
+ return this.i;
+ case 998:
+ return this.i;
+ case 999:
+ return this.i;
+ case 1000:
+ return this.i;
+ case 1001:
+ return this.i;
+ case 1002:
+ return this.i;
+ case 1003:
+ return this.i;
+ case 1004:
+ return this.i;
+ case 1005:
+ return this.i;
+ case 1006:
+ return this.i;
+ case 1007:
+ return this.i;
+ case 1008:
+ return this.i;
+ case 1009:
+ return this.i;
+ case 1010:
+ return this.i;
+ case 1011:
+ return this.i;
+ case 1012:
+ return this.i;
+ case 1013:
+ return this.i;
+ case 1014:
+ return this.i;
+ case 1015:
+ return this.i;
+ case 1016:
+ return this.i;
+ case 1017:
+ return this.i;
+ case 1018:
+ return this.i;
+ case 1019:
+ return this.i;
+ case 1020:
+ return this.i;
+ case 1021:
+ return this.i;
+ case 1022:
+ return this.i;
+ case 1023:
+ return this.i;
+ case 1024:
+ return this.i;
+ case 1025:
+ return this.i;
+ case 1026:
+ return this.i;
+ case 1027:
+ return this.i;
+ case 1028:
+ return this.i;
+ case 1029:
+ return this.i;
+ case 1030:
+ return this.i;
+ case 1031:
+ return this.i;
+ case 1032:
+ return this.i;
+ case 1033:
+ return this.i;
+ case 1034:
+ return this.i;
+ case 1035:
+ return this.i;
+ case 1036:
+ return this.i;
+ case 1037:
+ return this.i;
+ case 1038:
+ return this.i;
+ case 1039:
+ return this.i;
+ case 1040:
+ return this.i;
+ case 1041:
+ return this.i;
+ case 1042:
+ return this.i;
+ case 1043:
+ return this.i;
+ case 1044:
+ return this.i;
+ case 1045:
+ return this.i;
+ case 1046:
+ return this.i;
+ case 1047:
+ return this.i;
+ case 1048:
+ return this.i;
+ case 1049:
+ return this.i;
+ case 1050:
+ return this.i;
+ case 1051:
+ return this.i;
+ case 1052:
+ return this.i;
+ case 1053:
+ return this.i;
+ case 1054:
+ return this.i;
+ case 1055:
+ return this.i;
+ case 1056:
+ return this.i;
+ case 1057:
+ return this.i;
+ case 1058:
+ return this.i;
+ case 1059:
+ return this.i;
+ case 1060:
+ return this.i;
+ case 1061:
+ return this.i;
+ case 1062:
+ return this.i;
+ case 1063:
+ return this.i;
+ case 1064:
+ return this.i;
+ case 1065:
+ return this.i;
+ case 1066:
+ return this.i;
+ case 1067:
+ return this.i;
+ case 1068:
+ return this.i;
+ case 1069:
+ return this.i;
+ case 1070:
+ return this.i;
+ case 1071:
+ return this.i;
+ case 1072:
+ return this.i;
+ case 1073:
+ return this.i;
+ case 1074:
+ return this.i;
+ case 1075:
+ return this.i;
+ case 1076:
+ return this.i;
+ case 1077:
+ return this.i;
+ case 1078:
+ return this.i;
+ case 1079:
+ return this.i;
+ case 1080:
+ return this.i;
+ case 1081:
+ return this.i;
+ case 1082:
+ return this.i;
+ case 1083:
+ return this.i;
+ case 1084:
+ return this.i;
+ case 1085:
+ return this.i;
+ case 1086:
+ return this.i;
+ case 1087:
+ return this.i;
+ case 1088:
+ return this.i;
+ case 1089:
+ return this.i;
+ case 1090:
+ return this.i;
+ case 1091:
+ return this.i;
+ case 1092:
+ return this.i;
+ case 1093:
+ return this.i;
+ case 1094:
+ return this.i;
+ case 1095:
+ return this.i;
+ case 1096:
+ return this.i;
+ case 1097:
+ return this.i;
+ case 1098:
+ return this.i;
+ case 1099:
+ return this.i;
+ case 1100:
+ return this.i;
+ case 1101:
+ return this.i;
+ case 1102:
+ return this.i;
+ case 1103:
+ return this.i;
+ case 1104:
+ return this.i;
+ case 1105:
+ return this.i;
+ case 1106:
+ return this.i;
+ case 1107:
+ return this.i;
+ case 1108:
+ return this.i;
+ case 1109:
+ return this.i;
+ case 1110:
+ return this.i;
+ case 1111:
+ return this.i;
+ case 1112:
+ return this.i;
+ case 1113:
+ return this.i;
+ case 1114:
+ return this.i;
+ case 1115:
+ return this.i;
+ case 1116:
+ return this.i;
+ case 1117:
+ return this.i;
+ case 1118:
+ return this.i;
+ case 1119:
+ return this.i;
+ case 1120:
+ return this.i;
+ case 1121:
+ return this.i;
+ case 1122:
+ return this.i;
+ case 1123:
+ return this.i;
+ case 1124:
+ return this.i;
+ case 1125:
+ return this.i;
+ case 1126:
+ return this.i;
+ case 1127:
+ return this.i;
+ case 1128:
+ return this.i;
+ case 1129:
+ return this.i;
+ case 1130:
+ return this.i;
+ case 1131:
+ return this.i;
+ case 1132:
+ return this.i;
+ case 1133:
+ return this.i;
+ case 1134:
+ return this.i;
+ case 1135:
+ return this.i;
+ case 1136:
+ return this.i;
+ case 1137:
+ return this.i;
+ case 1138:
+ return this.i;
+ case 1139:
+ return this.i;
+ case 1140:
+ return this.i;
+ case 1141:
+ return this.i;
+ case 1142:
+ return this.i;
+ case 1143:
+ return this.i;
+ case 1144:
+ return this.i;
+ case 1145:
+ return this.i;
+ case 1146:
+ return this.i;
+ case 1147:
+ return this.i;
+ case 1148:
+ return this.i;
+ case 1149:
+ return this.i;
+ case 1150:
+ return this.i;
+ case 1151:
+ return this.i;
+ case 1152:
+ return this.i;
+ case 1153:
+ return this.i;
+ case 1154:
+ return this.i;
+ case 1155:
+ return this.i;
+ case 1156:
+ return this.i;
+ case 1157:
+ return this.i;
+ case 1158:
+ return this.i;
+ case 1159:
+ return this.i;
+ case 1160:
+ return this.i;
+ case 1161:
+ return this.i;
+ case 1162:
+ return this.i;
+ case 1163:
+ return this.i;
+ case 1164:
+ return this.i;
+ case 1165:
+ return this.i;
+ case 1166:
+ return this.i;
+ case 1167:
+ return this.i;
+ case 1168:
+ return this.i;
+ case 1169:
+ return this.i;
+ case 1170:
+ return this.i;
+ case 1171:
+ return this.i;
+ case 1172:
+ return this.i;
+ case 1173:
+ return this.i;
+ case 1174:
+ return this.i;
+ case 1175:
+ return this.i;
+ case 1176:
+ return this.i;
+ case 1177:
+ return this.i;
+ case 1178:
+ return this.i;
+ case 1179:
+ return this.i;
+ case 1180:
+ return this.i;
+ case 1181:
+ return this.i;
+ case 1182:
+ return this.i;
+ case 1183:
+ return this.i;
+ case 1184:
+ return this.i;
+ case 1185:
+ return this.i;
+ case 1186:
+ return this.i;
+ case 1187:
+ return this.i;
+ case 1188:
+ return this.i;
+ case 1189:
+ return this.i;
+ case 1190:
+ return this.i;
+ case 1191:
+ return this.i;
+ case 1192:
+ return this.i;
+ case 1193:
+ return this.i;
+ case 1194:
+ return this.i;
+ case 1195:
+ return this.i;
+ case 1196:
+ return this.i;
+ case 1197:
+ return this.i;
+ case 1198:
+ return this.i;
+ case 1199:
+ return this.i;
+ case 1200:
+ return this.i;
+ case 1201:
+ return this.i;
+ case 1202:
+ return this.i;
+ case 1203:
+ return this.i;
+ case 1204:
+ return this.i;
+ case 1205:
+ return this.i;
+ case 1206:
+ return this.i;
+ case 1207:
+ return this.i;
+ case 1208:
+ return this.i;
+ case 1209:
+ return this.i;
+ case 1210:
+ return this.i;
+ case 1211:
+ return this.i;
+ case 1212:
+ return this.i;
+ case 1213:
+ return this.i;
+ case 1214:
+ return this.i;
+ case 1215:
+ return this.i;
+ case 1216:
+ return this.i;
+ case 1217:
+ return this.i;
+ case 1218:
+ return this.i;
+ case 1219:
+ return this.i;
+ case 1220:
+ return this.i;
+ case 1221:
+ return this.i;
+ case 1222:
+ return this.i;
+ case 1223:
+ return this.i;
+ case 1224:
+ return this.i;
+ case 1225:
+ return this.i;
+ case 1226:
+ return this.i;
+ case 1227:
+ return this.i;
+ case 1228:
+ return this.i;
+ case 1229:
+ return this.i;
+ case 1230:
+ return this.i;
+ case 1231:
+ return this.i;
+ case 1232:
+ return this.i;
+ case 1233:
+ return this.i;
+ case 1234:
+ return this.i;
+ case 1235:
+ return this.i;
+ case 1236:
+ return this.i;
+ case 1237:
+ return this.i;
+ case 1238:
+ return this.i;
+ case 1239:
+ return this.i;
+ case 1240:
+ return this.i;
+ case 1241:
+ return this.i;
+ case 1242:
+ return this.i;
+ case 1243:
+ return this.i;
+ case 1244:
+ return this.i;
+ case 1245:
+ return this.i;
+ case 1246:
+ return this.i;
+ case 1247:
+ return this.i;
+ case 1248:
+ return this.i;
+ case 1249:
+ return this.i;
+ case 1250:
+ return this.i;
+ case 1251:
+ return this.i;
+ case 1252:
+ return this.i;
+ case 1253:
+ return this.i;
+ case 1254:
+ return this.i;
+ case 1255:
+ return this.i;
+ case 1256:
+ return this.i;
+ case 1257:
+ return this.i;
+ case 1258:
+ return this.i;
+ case 1259:
+ return this.i;
+ case 1260:
+ return this.i;
+ case 1261:
+ return this.i;
+ case 1262:
+ return this.i;
+ case 1263:
+ return this.i;
+ case 1264:
+ return this.i;
+ case 1265:
+ return this.i;
+ case 1266:
+ return this.i;
+ case 1267:
+ return this.i;
+ case 1268:
+ return this.i;
+ case 1269:
+ return this.i;
+ case 1270:
+ return this.i;
+ case 1271:
+ return this.i;
+ case 1272:
+ return this.i;
+ case 1273:
+ return this.i;
+ case 1274:
+ return this.i;
+ case 1275:
+ return this.i;
+ case 1276:
+ return this.i;
+ case 1277:
+ return this.i;
+ case 1278:
+ return this.i;
+ case 1279:
+ return this.i;
+ case 1280:
+ return this.i;
+ case 1281:
+ return this.i;
+ case 1282:
+ return this.i;
+ case 1283:
+ return this.i;
+ case 1284:
+ return this.i;
+ case 1285:
+ return this.i;
+ case 1286:
+ return this.i;
+ case 1287:
+ return this.i;
+ case 1288:
+ return this.i;
+ case 1289:
+ return this.i;
+ case 1290:
+ return this.i;
+ case 1291:
+ return this.i;
+ case 1292:
+ return this.i;
+ case 1293:
+ return this.i;
+ case 1294:
+ return this.i;
+ case 1295:
+ return this.i;
+ case 1296:
+ return this.i;
+ case 1297:
+ return this.i;
+ case 1298:
+ return this.i;
+ case 1299:
+ return this.i;
+ case 1300:
+ return this.i;
+ case 1301:
+ return this.i;
+ case 1302:
+ return this.i;
+ case 1303:
+ return this.i;
+ case 1304:
+ return this.i;
+ case 1305:
+ return this.i;
+ case 1306:
+ return this.i;
+ case 1307:
+ return this.i;
+ case 1308:
+ return this.i;
+ case 1309:
+ return this.i;
+ case 1310:
+ return this.i;
+ case 1311:
+ return this.i;
+ case 1312:
+ return this.i;
+ case 1313:
+ return this.i;
+ case 1314:
+ return this.i;
+ case 1315:
+ return this.i;
+ case 1316:
+ return this.i;
+ case 1317:
+ return this.i;
+ case 1318:
+ return this.i;
+ case 1319:
+ return this.i;
+ case 1320:
+ return this.i;
+ case 1321:
+ return this.i;
+ case 1322:
+ return this.i;
+ case 1323:
+ return this.i;
+ case 1324:
+ return this.i;
+ case 1325:
+ return this.i;
+ case 1326:
+ return this.i;
+ case 1327:
+ return this.i;
+ case 1328:
+ return this.i;
+ case 1329:
+ return this.i;
+ case 1330:
+ return this.i;
+ case 1331:
+ return this.i;
+ case 1332:
+ return this.i;
+ case 1333:
+ return this.i;
+ case 1334:
+ return this.i;
+ case 1335:
+ return this.i;
+ case 1336:
+ return this.i;
+ case 1337:
+ return this.i;
+ case 1338:
+ return this.i;
+ case 1339:
+ return this.i;
+ case 1340:
+ return this.i;
+ case 1341:
+ return this.i;
+ case 1342:
+ return this.i;
+ case 1343:
+ return this.i;
+ case 1344:
+ return this.i;
+ case 1345:
+ return this.i;
+ case 1346:
+ return this.i;
+ case 1347:
+ return this.i;
+ case 1348:
+ return this.i;
+ case 1349:
+ return this.i;
+ case 1350:
+ return this.i;
+ case 1351:
+ return this.i;
+ case 1352:
+ return this.i;
+ case 1353:
+ return this.i;
+ case 1354:
+ return this.i;
+ case 1355:
+ return this.i;
+ case 1356:
+ return this.i;
+ case 1357:
+ return this.i;
+ case 1358:
+ return this.i;
+ case 1359:
+ return this.i;
+ case 1360:
+ return this.i;
+ case 1361:
+ return this.i;
+ case 1362:
+ return this.i;
+ case 1363:
+ return this.i;
+ case 1364:
+ return this.i;
+ case 1365:
+ return this.i;
+ case 1366:
+ return this.i;
+ case 1367:
+ return this.i;
+ case 1368:
+ return this.i;
+ case 1369:
+ return this.i;
+ case 1370:
+ return this.i;
+ case 1371:
+ return this.i;
+ case 1372:
+ return this.i;
+ case 1373:
+ return this.i;
+ case 1374:
+ return this.i;
+ case 1375:
+ return this.i;
+ case 1376:
+ return this.i;
+ case 1377:
+ return this.i;
+ case 1378:
+ return this.i;
+ case 1379:
+ return this.i;
+ case 1380:
+ return this.i;
+ case 1381:
+ return this.i;
+ case 1382:
+ return this.i;
+ case 1383:
+ return this.i;
+ case 1384:
+ return this.i;
+ case 1385:
+ return this.i;
+ case 1386:
+ return this.i;
+ case 1387:
+ return this.i;
+ case 1388:
+ return this.i;
+ case 1389:
+ return this.i;
+ case 1390:
+ return this.i;
+ case 1391:
+ return this.i;
+ case 1392:
+ return this.i;
+ case 1393:
+ return this.i;
+ case 1394:
+ return this.i;
+ case 1395:
+ return this.i;
+ case 1396:
+ return this.i;
+ case 1397:
+ return this.i;
+ case 1398:
+ return this.i;
+ case 1399:
+ return this.i;
+ case 1400:
+ return this.i;
+ case 1401:
+ return this.i;
+ case 1402:
+ return this.i;
+ case 1403:
+ return this.i;
+ case 1404:
+ return this.i;
+ case 1405:
+ return this.i;
+ case 1406:
+ return this.i;
+ case 1407:
+ return this.i;
+ case 1408:
+ return this.i;
+ case 1409:
+ return this.i;
+ case 1410:
+ return this.i;
+ case 1411:
+ return this.i;
+ case 1412:
+ return this.i;
+ case 1413:
+ return this.i;
+ case 1414:
+ return this.i;
+ case 1415:
+ return this.i;
+ case 1416:
+ return this.i;
+ case 1417:
+ return this.i;
+ case 1418:
+ return this.i;
+ case 1419:
+ return this.i;
+ case 1420:
+ return this.i;
+ case 1421:
+ return this.i;
+ case 1422:
+ return this.i;
+ case 1423:
+ return this.i;
+ case 1424:
+ return this.i;
+ case 1425:
+ return this.i;
+ case 1426:
+ return this.i;
+ case 1427:
+ return this.i;
+ case 1428:
+ return this.i;
+ case 1429:
+ return this.i;
+ case 1430:
+ return this.i;
+ case 1431:
+ return this.i;
+ case 1432:
+ return this.i;
+ case 1433:
+ return this.i;
+ case 1434:
+ return this.i;
+ case 1435:
+ return this.i;
+ case 1436:
+ return this.i;
+ case 1437:
+ return this.i;
+ case 1438:
+ return this.i;
+ case 1439:
+ return this.i;
+ case 1440:
+ return this.i;
+ case 1441:
+ return this.i;
+ case 1442:
+ return this.i;
+ case 1443:
+ return this.i;
+ case 1444:
+ return this.i;
+ case 1445:
+ return this.i;
+ case 1446:
+ return this.i;
+ case 1447:
+ return this.i;
+ case 1448:
+ return this.i;
+ case 1449:
+ return this.i;
+ case 1450:
+ return this.i;
+ case 1451:
+ return this.i;
+ case 1452:
+ return this.i;
+ case 1453:
+ return this.i;
+ case 1454:
+ return this.i;
+ case 1455:
+ return this.i;
+ case 1456:
+ return this.i;
+ case 1457:
+ return this.i;
+ case 1458:
+ return this.i;
+ case 1459:
+ return this.i;
+ case 1460:
+ return this.i;
+ case 1461:
+ return this.i;
+ case 1462:
+ return this.i;
+ case 1463:
+ return this.i;
+ case 1464:
+ return this.i;
+ case 1465:
+ return this.i;
+ case 1466:
+ return this.i;
+ case 1467:
+ return this.i;
+ case 1468:
+ return this.i;
+ case 1469:
+ return this.i;
+ case 1470:
+ return this.i;
+ case 1471:
+ return this.i;
+ case 1472:
+ return this.i;
+ case 1473:
+ return this.i;
+ case 1474:
+ return this.i;
+ case 1475:
+ return this.i;
+ case 1476:
+ return this.i;
+ case 1477:
+ return this.i;
+ case 1478:
+ return this.i;
+ case 1479:
+ return this.i;
+ case 1480:
+ return this.i;
+ case 1481:
+ return this.i;
+ case 1482:
+ return this.i;
+ case 1483:
+ return this.i;
+ case 1484:
+ return this.i;
+ case 1485:
+ return this.i;
+ case 1486:
+ return this.i;
+ case 1487:
+ return this.i;
+ case 1488:
+ return this.i;
+ case 1489:
+ return this.i;
+ case 1490:
+ return this.i;
+ case 1491:
+ return this.i;
+ case 1492:
+ return this.i;
+ case 1493:
+ return this.i;
+ case 1494:
+ return this.i;
+ case 1495:
+ return this.i;
+ case 1496:
+ return this.i;
+ case 1497:
+ return this.i;
+ case 1498:
+ return this.i;
+ case 1499:
+ return this.i;
+ case 1500:
+ return this.i;
+ case 1501:
+ return this.i;
+ case 1502:
+ return this.i;
+ case 1503:
+ return this.i;
+ case 1504:
+ return this.i;
+ case 1505:
+ return this.i;
+ case 1506:
+ return this.i;
+ case 1507:
+ return this.i;
+ case 1508:
+ return this.i;
+ case 1509:
+ return this.i;
+ case 1510:
+ return this.i;
+ case 1511:
+ return this.i;
+ case 1512:
+ return this.i;
+ case 1513:
+ return this.i;
+ case 1514:
+ return this.i;
+ case 1515:
+ return this.i;
+ case 1516:
+ return this.i;
+ case 1517:
+ return this.i;
+ case 1518:
+ return this.i;
+ case 1519:
+ return this.i;
+ case 1520:
+ return this.i;
+ case 1521:
+ return this.i;
+ case 1522:
+ return this.i;
+ case 1523:
+ return this.i;
+ case 1524:
+ return this.i;
+ case 1525:
+ return this.i;
+ case 1526:
+ return this.i;
+ case 1527:
+ return this.i;
+ case 1528:
+ return this.i;
+ case 1529:
+ return this.i;
+ case 1530:
+ return this.i;
+ case 1531:
+ return this.i;
+ case 1532:
+ return this.i;
+ case 1533:
+ return this.i;
+ case 1534:
+ return this.i;
+ case 1535:
+ return this.i;
+ case 1536:
+ return this.i;
+ case 1537:
+ return this.i;
+ case 1538:
+ return this.i;
+ case 1539:
+ return this.i;
+ case 1540:
+ return this.i;
+ case 1541:
+ return this.i;
+ case 1542:
+ return this.i;
+ case 1543:
+ return this.i;
+ case 1544:
+ return this.i;
+ case 1545:
+ return this.i;
+ case 1546:
+ return this.i;
+ case 1547:
+ return this.i;
+ case 1548:
+ return this.i;
+ case 1549:
+ return this.i;
+ case 1550:
+ return this.i;
+ case 1551:
+ return this.i;
+ case 1552:
+ return this.i;
+ case 1553:
+ return this.i;
+ case 1554:
+ return this.i;
+ case 1555:
+ return this.i;
+ case 1556:
+ return this.i;
+ case 1557:
+ return this.i;
+ case 1558:
+ return this.i;
+ case 1559:
+ return this.i;
+ case 1560:
+ return this.i;
+ case 1561:
+ return this.i;
+ case 1562:
+ return this.i;
+ case 1563:
+ return this.i;
+ case 1564:
+ return this.i;
+ case 1565:
+ return this.i;
+ case 1566:
+ return this.i;
+ case 1567:
+ return this.i;
+ case 1568:
+ return this.i;
+ case 1569:
+ return this.i;
+ case 1570:
+ return this.i;
+ case 1571:
+ return this.i;
+ case 1572:
+ return this.i;
+ case 1573:
+ return this.i;
+ case 1574:
+ return this.i;
+ case 1575:
+ return this.i;
+ case 1576:
+ return this.i;
+ case 1577:
+ return this.i;
+ case 1578:
+ return this.i;
+ case 1579:
+ return this.i;
+ case 1580:
+ return this.i;
+ case 1581:
+ return this.i;
+ case 1582:
+ return this.i;
+ case 1583:
+ return this.i;
+ case 1584:
+ return this.i;
+ case 1585:
+ return this.i;
+ case 1586:
+ return this.i;
+ case 1587:
+ return this.i;
+ case 1588:
+ return this.i;
+ case 1589:
+ return this.i;
+ case 1590:
+ return this.i;
+ case 1591:
+ return this.i;
+ case 1592:
+ return this.i;
+ case 1593:
+ return this.i;
+ case 1594:
+ return this.i;
+ case 1595:
+ return this.i;
+ case 1596:
+ return this.i;
+ case 1597:
+ return this.i;
+ case 1598:
+ return this.i;
+ case 1599:
+ return this.i;
+ case 1600:
+ return this.i;
+ case 1601:
+ return this.i;
+ case 1602:
+ return this.i;
+ case 1603:
+ return this.i;
+ case 1604:
+ return this.i;
+ case 1605:
+ return this.i;
+ case 1606:
+ return this.i;
+ case 1607:
+ return this.i;
+ case 1608:
+ return this.i;
+ case 1609:
+ return this.i;
+ case 1610:
+ return this.i;
+ case 1611:
+ return this.i;
+ case 1612:
+ return this.i;
+ case 1613:
+ return this.i;
+ case 1614:
+ return this.i;
+ case 1615:
+ return this.i;
+ case 1616:
+ return this.i;
+ case 1617:
+ return this.i;
+ case 1618:
+ return this.i;
+ case 1619:
+ return this.i;
+ case 1620:
+ return this.i;
+ case 1621:
+ return this.i;
+ case 1622:
+ return this.i;
+ case 1623:
+ return this.i;
+ case 1624:
+ return this.i;
+ case 1625:
+ return this.i;
+ case 1626:
+ return this.i;
+ case 1627:
+ return this.i;
+ case 1628:
+ return this.i;
+ case 1629:
+ return this.i;
+ case 1630:
+ return this.i;
+ case 1631:
+ return this.i;
+ case 1632:
+ return this.i;
+ case 1633:
+ return this.i;
+ case 1634:
+ return this.i;
+ case 1635:
+ return this.i;
+ case 1636:
+ return this.i;
+ case 1637:
+ return this.i;
+ case 1638:
+ return this.i;
+ case 1639:
+ return this.i;
+ case 1640:
+ return this.i;
+ case 1641:
+ return this.i;
+ case 1642:
+ return this.i;
+ case 1643:
+ return this.i;
+ case 1644:
+ return this.i;
+ case 1645:
+ return this.i;
+ case 1646:
+ return this.i;
+ case 1647:
+ return this.i;
+ case 1648:
+ return this.i;
+ case 1649:
+ return this.i;
+ case 1650:
+ return this.i;
+ case 1651:
+ return this.i;
+ case 1652:
+ return this.i;
+ case 1653:
+ return this.i;
+ case 1654:
+ return this.i;
+ case 1655:
+ return this.i;
+ case 1656:
+ return this.i;
+ case 1657:
+ return this.i;
+ case 1658:
+ return this.i;
+ case 1659:
+ return this.i;
+ case 1660:
+ return this.i;
+ case 1661:
+ return this.i;
+ case 1662:
+ return this.i;
+ case 1663:
+ return this.i;
+ case 1664:
+ return this.i;
+ case 1665:
+ return this.i;
+ case 1666:
+ return this.i;
+ case 1667:
+ return this.i;
+ case 1668:
+ return this.i;
+ case 1669:
+ return this.i;
+ case 1670:
+ return this.i;
+ case 1671:
+ return this.i;
+ case 1672:
+ return this.i;
+ case 1673:
+ return this.i;
+ case 1674:
+ return this.i;
+ case 1675:
+ return this.i;
+ case 1676:
+ return this.i;
+ case 1677:
+ return this.i;
+ case 1678:
+ return this.i;
+ case 1679:
+ return this.i;
+ case 1680:
+ return this.i;
+ case 1681:
+ return this.i;
+ case 1682:
+ return this.i;
+ case 1683:
+ return this.i;
+ case 1684:
+ return this.i;
+ case 1685:
+ return this.i;
+ case 1686:
+ return this.i;
+ case 1687:
+ return this.i;
+ case 1688:
+ return this.i;
+ case 1689:
+ return this.i;
+ case 1690:
+ return this.i;
+ case 1691:
+ return this.i;
+ case 1692:
+ return this.i;
+ case 1693:
+ return this.i;
+ case 1694:
+ return this.i;
+ case 1695:
+ return this.i;
+ case 1696:
+ return this.i;
+ case 1697:
+ return this.i;
+ case 1698:
+ return this.i;
+ case 1699:
+ return this.i;
+ case 1700:
+ return this.i;
+ case 1701:
+ return this.i;
+ case 1702:
+ return this.i;
+ case 1703:
+ return this.i;
+ case 1704:
+ return this.i;
+ case 1705:
+ return this.i;
+ case 1706:
+ return this.i;
+ case 1707:
+ return this.i;
+ case 1708:
+ return this.i;
+ case 1709:
+ return this.i;
+ case 1710:
+ return this.i;
+ case 1711:
+ return this.i;
+ case 1712:
+ return this.i;
+ case 1713:
+ return this.i;
+ case 1714:
+ return this.i;
+ case 1715:
+ return this.i;
+ case 1716:
+ return this.i;
+ case 1717:
+ return this.i;
+ case 1718:
+ return this.i;
+ case 1719:
+ return this.i;
+ case 1720:
+ return this.i;
+ case 1721:
+ return this.i;
+ case 1722:
+ return this.i;
+ case 1723:
+ return this.i;
+ case 1724:
+ return this.i;
+ case 1725:
+ return this.i;
+ case 1726:
+ return this.i;
+ case 1727:
+ return this.i;
+ case 1728:
+ return this.i;
+ case 1729:
+ return this.i;
+ case 1730:
+ return this.i;
+ case 1731:
+ return this.i;
+ case 1732:
+ return this.i;
+ case 1733:
+ return this.i;
+ case 1734:
+ return this.i;
+ case 1735:
+ return this.i;
+ case 1736:
+ return this.i;
+ case 1737:
+ return this.i;
+ case 1738:
+ return this.i;
+ case 1739:
+ return this.i;
+ case 1740:
+ return this.i;
+ case 1741:
+ return this.i;
+ case 1742:
+ return this.i;
+ case 1743:
+ return this.i;
+ case 1744:
+ return this.i;
+ case 1745:
+ return this.i;
+ case 1746:
+ return this.i;
+ case 1747:
+ return this.i;
+ case 1748:
+ return this.i;
+ case 1749:
+ return this.i;
+ case 1750:
+ return this.i;
+ case 1751:
+ return this.i;
+ case 1752:
+ return this.i;
+ case 1753:
+ return this.i;
+ case 1754:
+ return this.i;
+ case 1755:
+ return this.i;
+ case 1756:
+ return this.i;
+ case 1757:
+ return this.i;
+ case 1758:
+ return this.i;
+ case 1759:
+ return this.i;
+ case 1760:
+ return this.i;
+ case 1761:
+ return this.i;
+ case 1762:
+ return this.i;
+ case 1763:
+ return this.i;
+ case 1764:
+ return this.i;
+ case 1765:
+ return this.i;
+ case 1766:
+ return this.i;
+ case 1767:
+ return this.i;
+ case 1768:
+ return this.i;
+ case 1769:
+ return this.i;
+ case 1770:
+ return this.i;
+ case 1771:
+ return this.i;
+ case 1772:
+ return this.i;
+ case 1773:
+ return this.i;
+ case 1774:
+ return this.i;
+ case 1775:
+ return this.i;
+ case 1776:
+ return this.i;
+ case 1777:
+ return this.i;
+ case 1778:
+ return this.i;
+ case 1779:
+ return this.i;
+ case 1780:
+ return this.i;
+ case 1781:
+ return this.i;
+ case 1782:
+ return this.i;
+ case 1783:
+ return this.i;
+ case 1784:
+ return this.i;
+ case 1785:
+ return this.i;
+ case 1786:
+ return this.i;
+ case 1787:
+ return this.i;
+ case 1788:
+ return this.i;
+ case 1789:
+ return this.i;
+ case 1790:
+ return this.i;
+ case 1791:
+ return this.i;
+ case 1792:
+ return this.i;
+ case 1793:
+ return this.i;
+ case 1794:
+ return this.i;
+ case 1795:
+ return this.i;
+ case 1796:
+ return this.i;
+ case 1797:
+ return this.i;
+ case 1798:
+ return this.i;
+ case 1799:
+ return this.i;
+ case 1800:
+ return this.i;
+ case 1801:
+ return this.i;
+ case 1802:
+ return this.i;
+ case 1803:
+ return this.i;
+ case 1804:
+ return this.i;
+ case 1805:
+ return this.i;
+ case 1806:
+ return this.i;
+ case 1807:
+ return this.i;
+ case 1808:
+ return this.i;
+ case 1809:
+ return this.i;
+ case 1810:
+ return this.i;
+ case 1811:
+ return this.i;
+ case 1812:
+ return this.i;
+ case 1813:
+ return this.i;
+ case 1814:
+ return this.i;
+ case 1815:
+ return this.i;
+ case 1816:
+ return this.i;
+ case 1817:
+ return this.i;
+ case 1818:
+ return this.i;
+ case 1819:
+ return this.i;
+ case 1820:
+ return this.i;
+ case 1821:
+ return this.i;
+ case 1822:
+ return this.i;
+ case 1823:
+ return this.i;
+ case 1824:
+ return this.i;
+ case 1825:
+ return this.i;
+ case 1826:
+ return this.i;
+ case 1827:
+ return this.i;
+ case 1828:
+ return this.i;
+ case 1829:
+ return this.i;
+ case 1830:
+ return this.i;
+ case 1831:
+ return this.i;
+ case 1832:
+ return this.i;
+ case 1833:
+ return this.i;
+ case 1834:
+ return this.i;
+ case 1835:
+ return this.i;
+ case 1836:
+ return this.i;
+ case 1837:
+ return this.i;
+ case 1838:
+ return this.i;
+ case 1839:
+ return this.i;
+ case 1840:
+ return this.i;
+ case 1841:
+ return this.i;
+ case 1842:
+ return this.i;
+ case 1843:
+ return this.i;
+ case 1844:
+ return this.i;
+ case 1845:
+ return this.i;
+ case 1846:
+ return this.i;
+ case 1847:
+ return this.i;
+ case 1848:
+ return this.i;
+ case 1849:
+ return this.i;
+ case 1850:
+ return this.i;
+ case 1851:
+ return this.i;
+ case 1852:
+ return this.i;
+ case 1853:
+ return this.i;
+ case 1854:
+ return this.i;
+ case 1855:
+ return this.i;
+ case 1856:
+ return this.i;
+ case 1857:
+ return this.i;
+ case 1858:
+ return this.i;
+ case 1859:
+ return this.i;
+ case 1860:
+ return this.i;
+ case 1861:
+ return this.i;
+ case 1862:
+ return this.i;
+ case 1863:
+ return this.i;
+ case 1864:
+ return this.i;
+ case 1865:
+ return this.i;
+ case 1866:
+ return this.i;
+ case 1867:
+ return this.i;
+ case 1868:
+ return this.i;
+ case 1869:
+ return this.i;
+ case 1870:
+ return this.i;
+ case 1871:
+ return this.i;
+ case 1872:
+ return this.i;
+ case 1873:
+ return this.i;
+ case 1874:
+ return this.i;
+ case 1875:
+ return this.i;
+ case 1876:
+ return this.i;
+ case 1877:
+ return this.i;
+ case 1878:
+ return this.i;
+ case 1879:
+ return this.i;
+ case 1880:
+ return this.i;
+ case 1881:
+ return this.i;
+ case 1882:
+ return this.i;
+ case 1883:
+ return this.i;
+ case 1884:
+ return this.i;
+ case 1885:
+ return this.i;
+ case 1886:
+ return this.i;
+ case 1887:
+ return this.i;
+ case 1888:
+ return this.i;
+ case 1889:
+ return this.i;
+ case 1890:
+ return this.i;
+ case 1891:
+ return this.i;
+ case 1892:
+ return this.i;
+ case 1893:
+ return this.i;
+ case 1894:
+ return this.i;
+ case 1895:
+ return this.i;
+ case 1896:
+ return this.i;
+ case 1897:
+ return this.i;
+ case 1898:
+ return this.i;
+ case 1899:
+ return this.i;
+ case 1900:
+ return this.i;
+ case 1901:
+ return this.i;
+ case 1902:
+ return this.i;
+ case 1903:
+ return this.i;
+ case 1904:
+ return this.i;
+ case 1905:
+ return this.i;
+ case 1906:
+ return this.i;
+ case 1907:
+ return this.i;
+ case 1908:
+ return this.i;
+ case 1909:
+ return this.i;
+ case 1910:
+ return this.i;
+ case 1911:
+ return this.i;
+ case 1912:
+ return this.i;
+ case 1913:
+ return this.i;
+ case 1914:
+ return this.i;
+ case 1915:
+ return this.i;
+ case 1916:
+ return this.i;
+ case 1917:
+ return this.i;
+ case 1918:
+ return this.i;
+ case 1919:
+ return this.i;
+ case 1920:
+ return this.i;
+ case 1921:
+ return this.i;
+ case 1922:
+ return this.i;
+ case 1923:
+ return this.i;
+ case 1924:
+ return this.i;
+ case 1925:
+ return this.i;
+ case 1926:
+ return this.i;
+ case 1927:
+ return this.i;
+ case 1928:
+ return this.i;
+ case 1929:
+ return this.i;
+ case 1930:
+ return this.i;
+ case 1931:
+ return this.i;
+ case 1932:
+ return this.i;
+ case 1933:
+ return this.i;
+ case 1934:
+ return this.i;
+ case 1935:
+ return this.i;
+ case 1936:
+ return this.i;
+ case 1937:
+ return this.i;
+ case 1938:
+ return this.i;
+ case 1939:
+ return this.i;
+ case 1940:
+ return this.i;
+ case 1941:
+ return this.i;
+ case 1942:
+ return this.i;
+ case 1943:
+ return this.i;
+ case 1944:
+ return this.i;
+ case 1945:
+ return this.i;
+ case 1946:
+ return this.i;
+ case 1947:
+ return this.i;
+ case 1948:
+ return this.i;
+ case 1949:
+ return this.i;
+ case 1950:
+ return this.i;
+ case 1951:
+ return this.i;
+ case 1952:
+ return this.i;
+ case 1953:
+ return this.i;
+ case 1954:
+ return this.i;
+ case 1955:
+ return this.i;
+ case 1956:
+ return this.i;
+ case 1957:
+ return this.i;
+ case 1958:
+ return this.i;
+ case 1959:
+ return this.i;
+ case 1960:
+ return this.i;
+ case 1961:
+ return this.i;
+ case 1962:
+ return this.i;
+ case 1963:
+ return this.i;
+ case 1964:
+ return this.i;
+ case 1965:
+ return this.i;
+ case 1966:
+ return this.i;
+ case 1967:
+ return this.i;
+ case 1968:
+ return this.i;
+ case 1969:
+ return this.i;
+ case 1970:
+ return this.i;
+ case 1971:
+ return this.i;
+ case 1972:
+ return this.i;
+ case 1973:
+ return this.i;
+ case 1974:
+ return this.i;
+ case 1975:
+ return this.i;
+ case 1976:
+ return this.i;
+ case 1977:
+ return this.i;
+ case 1978:
+ return this.i;
+ case 1979:
+ return this.i;
+ case 1980:
+ return this.i;
+ case 1981:
+ return this.i;
+ case 1982:
+ return this.i;
+ case 1983:
+ return this.i;
+ case 1984:
+ return this.i;
+ case 1985:
+ return this.i;
+ case 1986:
+ return this.i;
+ case 1987:
+ return this.i;
+ case 1988:
+ return this.i;
+ case 1989:
+ return this.i;
+ case 1990:
+ return this.i;
+ case 1991:
+ return this.i;
+ case 1992:
+ return this.i;
+ case 1993:
+ return this.i;
+ case 1994:
+ return this.i;
+ case 1995:
+ return this.i;
+ case 1996:
+ return this.i;
+ case 1997:
+ return this.i;
+ case 1998:
+ return this.i;
+ case 1999:
+ return this.i;
+ case 2000:
+ return this.i;
+ case 2001:
+ return this.i;
+ case 2002:
+ return this.i;
+ case 2003:
+ return this.i;
+ case 2004:
+ return this.i;
+ case 2005:
+ return this.i;
+ case 2006:
+ return this.i;
+ case 2007:
+ return this.i;
+ case 2008:
+ return this.i;
+ case 2009:
+ return this.i;
+ case 2010:
+ return this.i;
+ case 2011:
+ return this.i;
+ case 2012:
+ return this.i;
+ case 2013:
+ return this.i;
+ case 2014:
+ return this.i;
+ case 2015:
+ return this.i;
+ case 2016:
+ return this.i;
+ case 2017:
+ return this.i;
+ case 2018:
+ return this.i;
+ case 2019:
+ return this.i;
+ case 2020:
+ return this.i;
+ case 2021:
+ return this.i;
+ case 2022:
+ return this.i;
+ case 2023:
+ return this.i;
+ case 2024:
+ return this.i;
+ case 2025:
+ return this.i;
+ case 2026:
+ return this.i;
+ case 2027:
+ return this.i;
+ case 2028:
+ return this.i;
+ case 2029:
+ return this.i;
+ case 2030:
+ return this.i;
+ case 2031:
+ return this.i;
+ case 2032:
+ return this.i;
+ case 2033:
+ return this.i;
+ case 2034:
+ return this.i;
+ case 2035:
+ return this.i;
+ case 2036:
+ return this.i;
+ case 2037:
+ return this.i;
+ case 2038:
+ return this.i;
+ case 2039:
+ return this.i;
+ case 2040:
+ return this.i;
+ case 2041:
+ return this.i;
+ case 2042:
+ return this.i;
+ case 2043:
+ return this.i;
+ case 2044:
+ return this.i;
+ case 2045:
+ return this.i;
+ case 2046:
+ return this.i;
+ }
+}
+
+// Test if this is working in split array literal
+function hugeArrayLiteral() {
+ return [
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i,
+ this.i
+ ][30];
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8020356.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,2 @@
+20
+10
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8021122.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * JDK-8021122: Not all callables are handled for toString and other function valued properties
+ *
+ * @test
+ * @run
+ */
+
+var a = {}
+var obj = new java.util.HashMap();
+Object.bindProperties(a, obj);
+try {
+ print(a);
+} catch (e) {
+ print(e);
+}
+
+var a = {}
+var global = loadWithNewGlobal({ name:"xx", script: "this" });
+var obj = global.eval("({ toString: function() { return 'hello'; } })");
+Object.bindProperties(a, obj);
+try {
+ print(a);
+} catch (e) {
+ print(e);
+}
+
+function runLambdaTests() {
+ var r = new java.lang.Runnable() {
+ run: function() { print("I am runnable"); }
+ };
+
+ // call any @FunctionalInterface object as though it is a function
+ r();
+
+ var twice = new java.util.function.Function() {
+ apply: function(x) 2*x
+ };
+
+ print(twice(34));
+
+ var sum = new java.util.function.BiFunction() {
+ apply: function(x, y) x + y
+ };
+
+ print(sum(32, 12))
+
+ // make toString to be a @FunctionalInterface object
+ var a = {};
+ a.toString = new java.util.function.Supplier() {
+ get: function() { return "MyString"; }
+ };
+
+ try {
+ print(a);
+ } catch (e) {
+ print(e);
+ }
+}
+
+try {
+ // check for java.util.function.Function class
+ Java.type("java.util.function.Function");
+ runLambdaTests();
+} catch (e) {
+ // fake output to match .EXPECTED values
+ print("I am runnable");
+ print("68");
+ print("44");
+ print("MyString");
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8021122.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,6 @@
+{}
+hello
+I am runnable
+68
+44
+MyString
--- a/nashorn/test/script/basic/NASHORN-473.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/basic/NASHORN-473.js Mon Aug 12 09:29:06 2013 -0400
@@ -28,7 +28,7 @@
* @run
*/
-var boolArr = java.lang.reflect.Array.newInstance(java.lang.Boolean.TYPE, 2);
+var boolArr = new (Java.type("boolean[]"))(2);
boolArr[0] = true;
boolArr[1] = false;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/NASHORN-592-dual.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * NASHORN-592-dual: test all combos of field types and getters and setters
+ * This time use dual field representation
+ *
+ * @test
+ * @option -Dnashorn.fields.dual=true
+ * @fork
+ * @run/ignore-std-error
+ */
+
+load(__DIR__ + 'NASHORN-592.js');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/NASHORN-592-dual.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,44 @@
+0
+0
+NaN
+undefinedhej!
+17
+8
+34
+17hej!
+17
+8
+34.9422
+17.4711hej!
+0
+0
+NaN
+Fame and fortune Salamander Yahoo!hej!
+24
+11111
+23.23
+23
+23
+Have some pie!
+4711.17
+17172
+23
+23.23
+23
+23
+Have some pie!
+4711.17
+23
+111
+4711.16
+I like cake!
+0
+NaN
+0
+I like cake!
+17
+17.4711
+salamander
+4711.17
+axolotl
+lizard
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/classloader.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * Try to extend ClassLoader.
+ *
+ * @test
+ * @security
+ */
+
+try {
+ var l = new (Java.extend(java.lang.ClassLoader))({});
+ fail("should have thrown SecurityException");
+} catch (e) {
+ if (e instanceof java.lang.SecurityException) {
+ print(e);
+ } else {
+ fail("expected SecurityException, got " + e);
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/classloader.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,1 @@
+java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "createClassLoader")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/compile-octane-splitter.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * @test
+ * @option -Dnashorn.compiler.splitter.threshold=1000
+ * @fork
+ * @runif external.octane
+ */
+
+compile_only = true;
+load(__DIR__ + 'run-octane.js');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/compile-octane-splitter.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,13 @@
+Compiled OK: box2d
+Compiled OK: code-load
+Compiled OK: crypto
+Compiled OK: deltablue
+Compiled OK: earley-boyer
+Compiled OK: gbemu
+Compiled OK: mandreel
+Compiled OK: navier-stokes
+Compiled OK: pdfjs
+Compiled OK: raytrace
+Compiled OK: regexp
+Compiled OK: richards
+Compiled OK: splay
--- a/nashorn/test/script/basic/javaarray.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/basic/javaarray.js Mon Aug 12 09:29:06 2013 -0400
@@ -30,7 +30,7 @@
(function() {
var nargs = arguments.length;
- var args = java.lang.reflect.Array.newInstance(java.lang.Object.class, nargs);
+ var args = new (Java.type("java.lang.Object[]"))(nargs);
print(args.length);
for (var i = 0; i < nargs; i++) {
var arg = arguments[i];
@@ -41,7 +41,7 @@
var z; // undefined
-var intArray = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 1);
+var intArray = new (Java.type("int[]"))(1);
intArray[0] = 10;
print(intArray[0]);
print(intArray.length);
@@ -50,19 +50,19 @@
intArray[0] = 10.1;
print(intArray[0]);
-var boolArray = java.lang.reflect.Array.newInstance(java.lang.Boolean.TYPE, 2);
+var boolArray = new (Java.type("boolean[]"))(2);
boolArray[0] = true;
print(boolArray[0]);
print(boolArray[1]);
print(boolArray.length);
-var charArray = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1);
+var charArray = new (Java.type("char[]"))(1);
charArray[0] = 'j';
print(charArray[0]);
print(charArray.length);
-var doubleArray = java.lang.reflect.Array.newInstance(java.lang.Double.TYPE, 1)
+var doubleArray = new (Java.type("double[]"))(1)
doubleArray[0]=z
print(doubleArray[0])
doubleArray[0]=1
--- a/nashorn/test/script/basic/runsunspider.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/basic/runsunspider.js Mon Aug 12 09:29:06 2013 -0400
@@ -1,21 +1,21 @@
/*
* Copyright (c) 2010, 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.
@@ -33,7 +33,7 @@
function assertEq(a, b) {
if (a !== b) {
- throw "ASSERTION FAILED: " + a + " should be " + b;
+ throw "ASSERTION FAILED: " + a + " should be " + b;
}
}
@@ -44,19 +44,19 @@
function runbench(name) {
var filename = name.split("/").pop();
if (verbose_run) {
- print("Running " + filename);
+ print("Running " + filename);
}
var start = new Date;
for (var i = 0; i < iterations__; i++) {
- load(name);
+ load(name);
}
var stop = new Date - start;
total_time += stop;
-
+
if (verbose_run) {
- print(filename + " done in " + stop + " ms");
- }
+ print(filename + " done in " + stop + " ms");
+ }
runs++;
}
@@ -73,27 +73,23 @@
function runsuite(tests) {
var changed = false;
-
+
var oldRandom = Math.random;
Math.random = pseudorandom;
-
+
try {
- for (var n = 0; n < tests.length; n++) {
- runbench(tests[n].name);
- if (typeof tests[n].actual !== 'undefined') {
- assertEq(tests[n].actual(), tests[n].expected());
- }
- changed = true;
- }
- } catch (e) {
- print("error: " + e.printStackTrace());
- if (e.toString().indexOf(tests) == 1) {
- throw e;
- }
- // no scripting or something, silently fail
+ for (var n = 0; n < tests.length; n++) {
+ path = dir + '../external/sunspider/tests/sunspider-1.0/' + tests[n].name
+ runbench(path);
+ if (typeof tests[n].actual !== 'undefined') {
+ assertEq(tests[n].actual(), tests[n].expected());
+ }
+ changed = true;
+ }
+ // no scripting or something, silently fail
} finally {
- Math.random = oldRandom;
}
+ Math.random = oldRandom;
return changed;
}
@@ -103,211 +99,211 @@
var h = 0;
var off = 0;
for (var i = 0; i < s.length; i++) {
- h = 31 * h + s.charCodeAt(off++);
- h &= 0x7fffffff;
+ h = 31 * h + s.charCodeAt(off++);
+ h &= 0x7fffffff;
}
return h ^ s.length;
}
var tests = [
{ name: 'string-base64.js',
- actual: function() {
- return hash(str);
+ actual: function() {
+ return hash(str);
},
expected: function() {
- return 1544571068;
+ return 1544571068;
}
- },
+ },
{ name: 'string-validate-input.js',
- actual: function() {
- return hash(endResult);
+ actual: function() {
+ return hash(endResult);
},
expected: function() {
- return 2016572373;
+ return 2016572373;
}
- },
+ },
{ name: 'date-format-xparb.js',
- actual: function() {
- return shortFormat + longFormat;
+ actual: function() {
+ return shortFormat + longFormat;
},
expected: function() {
- return "2017-09-05Tuesday, September 05, 2017 8:43:48 AM";
+ return "2017-09-05Tuesday, September 05, 2017 8:43:48 AM";
}
- },
+ },
{ name: '3d-morph.js',
actual: function() {
- var acceptableDelta = 4e-15;
- return (testOutput - 6.394884621840902e-14) < acceptableDelta;
+ var acceptableDelta = 4e-15;
+ return (testOutput - 6.394884621840902e-14) < acceptableDelta;
},
expected: function() {
- return true;
+ return true;
}
- },
+ },
{ name: 'crypto-aes.js',
actual: function() {
- return plainText;
+ return plainText;
},
expected: function() {
- return decryptedText;
+ return decryptedText;
}
- },
+ },
{ name: 'crypto-md5.js',
actual: function() {
- return md5Output;
+ return md5Output;
},
expected: function() {
- return "a831e91e0f70eddcb70dc61c6f82f6cd";
+ return "a831e91e0f70eddcb70dc61c6f82f6cd";
}
- },
+ },
{ name: 'crypto-sha1.js',
actual: function() {
- return sha1Output;
+ return sha1Output;
},
expected: function() {
- return "2524d264def74cce2498bf112bedf00e6c0b796d";
+ return "2524d264def74cce2498bf112bedf00e6c0b796d";
}
- },
- { name: 'bitops-bitwise-and.js',
+ },
+ { name: 'bitops-bitwise-and.js',
actual: function() {
- return result;
+ return result;
},
expected: function() {
- return 0;
+ return 0;
}
- },
- { name: 'bitops-bits-in-byte.js',
+ },
+ { name: 'bitops-bits-in-byte.js',
actual: function() {
- return result;
+ return result;
},
expected: function() {
- return 358400;
+ return 358400;
}
- },
- { name: 'bitops-nsieve-bits.js',
+ },
+ { name: 'bitops-nsieve-bits.js',
actual: function() {
- var ret = 0;
- for (var i = 0; i < result.length; ++i) {
- ret += result[i];
- }
- ret += result.length;
- return ret;
+ var ret = 0;
+ for (var i = 0; i < result.length; ++i) {
+ ret += result[i];
+ }
+ ret += result.length;
+ return ret;
},
expected: function() {
- return -1286749539853;
+ return -1286749539853;
}
- },
- { name: 'bitops-3bit-bits-in-byte.js',
+ },
+ { name: 'bitops-3bit-bits-in-byte.js',
actual: function() {
- return sum;
+ return sum;
},
expected: function() {
- return 512000;
+ return 512000;
}
- },
- { name: 'access-nbody.js',
+ },
+ { name: 'access-nbody.js',
actual: function() {
- return ret;
+ return ret;
},
expected: function() {
- return -0.16906933525822856;
+ return -1.3524862408537381;
}
- },
- { name: 'access-binary-trees.js',
+ },
+ { name: 'access-binary-trees.js',
actual: function() {
- return ret;
+ return ret;
},
expected: function() {
- return -1;
+ return -4;
}
- },
+ },
{ name: 'access-fannkuch.js',
actual: function() {
- return ret;
+ return ret;
},
expected: function() {
- return 22;
+ return 22;
}
},
{ name: 'math-spectral-norm.js',
- actual: function() {
- var ret = '';
- for (var i = 6; i <= 48; i *= 2) {
- ret += spectralnorm(i) + ',';
- }
- return ret;
+ actual: function() {
+ var ret = '';
+ for (var i = 6; i <= 48; i *= 2) {
+ ret += spectralnorm(i) + ',';
+ }
+ return ret;
},
expected: function() {
- return "1.2657786149754053,1.2727355112619148,1.273989979775574,1.274190125290389,";
+ return "1.2657786149754053,1.2727355112619148,1.273989979775574,1.274190125290389,";
}
- },
+ },
{ name: '3d-raytrace.js',
actual: function() {
- return hash(testOutput);
+ return hash(testOutput);
},
expected: function() {
- return 230692593;
+ return 230692593;
}
- },
+ },
{ name: 'regexp-dna.js',
actual: function() {
- return dnaOutputString;
+ return dnaOutputString;
},
expected: function() {
- return "undefinedagggtaaa|tttaccct 0\n[cgt]gggtaaa|tttaccc[acg] 9\na[act]ggtaaa|tttacc[agt]t 27\nag[act]gtaaa|tttac[agt]ct 24\nagg[act]taaa|ttta[agt]cct 30\naggg[acg]aaa|ttt[cgt]ccct 9\nagggt[cgt]aa|tt[acg]accct 12\nagggta[cgt]a|t[acg]taccct 9\nagggtaa[cgt]|[acg]ttaccct 15\n";
+ return "agggtaaa|tttaccct 0\n[cgt]gggtaaa|tttaccc[acg] 9\na[act]ggtaaa|tttacc[agt]t 27\nag[act]gtaaa|tttac[agt]ct 24\nagg[act]taaa|ttta[agt]cct 30\naggg[acg]aaa|ttt[cgt]ccct 9\nagggt[cgt]aa|tt[acg]accct 12\nagggta[cgt]a|t[acg]taccct 9\nagggtaa[cgt]|[acg]ttaccct 15\n";
}
- },
+ },
{ name: 'math-cordic.js',
actual: function() {
- return total;
+ return total;
},
expected: function() {
- return 10362.570468755888;
+ return 10362.570468755888;
}
},
{ name: 'controlflow-recursive.js',
actual: function() {
- var ret = 0;
- for (var i = 3; i <= 5; i++) {
- ret += ack(3,i);
- ret += fib(17.0+i);
- ret += tak(3*i+3,2*i+2,i+1);
- }
- return ret;
+ var ret = 0;
+ for (var i = 3; i <= 5; i++) {
+ ret += ack(3,i);
+ ret += fib(17.0+i);
+ ret += tak(3*i+3,2*i+2,i+1);
+ }
+ return ret;
},
expected: function() {
- return 57775;
+ return 57775;
}
- },
+ },
{ name: 'date-format-tofte.js',
actual: function() {
- return shortFormat + longFormat;
+ return shortFormat + longFormat;
},
expected: function() {
- return "2008-05-01Thursday, May 01, 2008 6:31:22 PM";
+ return "2008-05-01Thursday, May 01, 2008 6:31:22 PM";
}
},
{ name: 'string-tagcloud.js',
actual: function() {
- // The result string embeds floating-point numbers, which can vary a bit on different platforms,
- // so we truncate them a bit before comparing.
- var tagcloud_norm = tagcloud.replace(/([0-9.]+)px/g, function(str, p1) { return p1.substr(0, 10) + 'px' })
- return tagcloud_norm.length;
+ // The result string embeds floating-point numbers, which can vary a bit on different platforms,
+ // so we truncate them a bit before comparing.
+ var tagcloud_norm = tagcloud.replace(/([0-9.]+)px/g, function(str, p1) { return p1.substr(0, 10) + 'px' })
+ return tagcloud_norm.length;
},
expected: function() {
- return 295906;
+ return 295906;
}
- },
+ },
{ name: 'string-unpack-code.js',
actual: function() {
- return decompressedMochiKit.length == 106415 &&
- decompressedMochiKit[2000] == '5' &&
- decompressedMochiKit[12000] == '_' &&
- decompressedMochiKit[82556] == '>';
+ return decompressedMochiKit.length == 106415 &&
+ decompressedMochiKit[2000] == '5' &&
+ decompressedMochiKit[12000] == '_' &&
+ decompressedMochiKit[82556] == '>';
},
expected: function() {
- return true;
+ return true;
}
- },
+ },
//TODO no easy way to sanity check result
{ name: 'string-fasta.js' },
//TODO no easy way to sanity check result
@@ -315,17 +311,13 @@
//TODO no easy way to sanity check result
{ name: 'access-nsieve.js' },
//TODO no easy way to sanity check result
- { name: '3d-cube.js' },
+ { name: '3d-cube.js' },
];
// handle the case this script may be run by a JS engine that doesn't
// support __DIR__ global variable.
var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
-for (i in tests) {
- tests[i].name = dir + '../external/sunspider/tests/sunspider-1.0/' + tests[i].name;
-}
-
var verbose_run = false;
var args = [];
@@ -333,12 +325,12 @@
args = $ARGS;
} else if (typeof arguments !== 'undefined' && arguments.length != 0) {
args = arguments;
-}
+}
for (i in args) {
if (args[i] === '--verbose') {
- verbose_run = true;
- break;
+ verbose_run = true;
+ break;
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/splitter.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * Test various scripts with low splitter threshold
+ *
+ * @test
+ * @option -Dnashorn.compiler.splitter.threshold=200
+ * @run
+ * @fork
+ */
+
+load(__DIR__ + 'prototype.js');
+load(__DIR__ + 'yui.js');
+load(__DIR__ + 'NASHORN-689.js');
+load(__DIR__ + 'NASHORN-58.js');
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/splitter.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,76 @@
+parsed and compiled ok prototype.js
+parsed and compiled ok yui-min.js
+parsed and compiled ok yui.js
+a=10
+a=9
+a=8
+a=7
+a=6
+a=5
+a=4
+a=3
+a=2
+a=1
+a=0
+10
+a=0
+a=1
+a=2
+a=3
+a=4
+a=5
+a=6
+a=7
+a=8
+a=9
+a=10
+ok
+a=0
+a=1
+a=2
+a=3
+a=4
+a=5
+a=6
+a=7
+a=8
+a=9
+a=10
+done
+no arg
+x=0
+x=1
+x=2
+x=3
+x=4
+x=5
+x=6
+x=7
+x=8
+x=9
+x=10
+ok
+done
+try
+finally
+3
+try
+finally
+2
+3
+1
+2
+3
+4
+5
+5
+6
+6
+1
+2
+3
+4
+6
+Error: testing
+finally
+SUCCESS
--- a/nashorn/test/script/representations/NASHORN-592a.js Mon Aug 12 09:03:51 2013 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 2010, 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.
- */
-
-/**
- * NASHORN-592a: test all combos of field types and getters and setters
- * This time use dual field representation
- *
- * @test
- * @option --dual-fields
- * @run
- */
-
-//fortype undefined
-var a;
-
-print(a & 0xff);
-print(a >>> 1);
-print(a * 2);
-print(a + "hej!");
-
-var b;
-b = 17; //set undefined->int
-
-print(b & 0xff);
-print(b >>> 1);
-print(b * 2);
-print(b + "hej!");
-
-var c;
-c = 17.4711 //set undefined->double
-
-print(c & 0xff);
-print(c >>> 1);
-print(c * 2);
-print(c + "hej!");
-
-var d; // set undefined->double
-d = "Fame and fortune Salamander Yahoo!";
-
-print(d & 0xff);
-print(d >>> 1);
-print(d * 2);
-print(d + "hej!");
-
-// now we have exhausted all getters and undefined->everything setters.
-
-
-var e = 23; // int to everything setters,
-e = 24; //int to int
-print(e);
-e = (22222 >>> 1); //int to long;
-print(e);
-e = 23.23; //int to double
-print(e);
-e = 23; //double to int - still double
-print(e);
-print(e & 0xff);
-e = "Have some pie!" //double to string
-print(e);
-e = 4711.17;
-print(e); //still an object not a double
-
-
-var f = (23222 >>> 1); // long to everything setters,
-f = 34344 >>> 1; //long to long
-print(f);
-f = 23; //long to int - still long
-print(f);
-f = 23.23; //long to double
-print(f);
-f = 23; //double to int - still double
-print(f);
-print(f & 0xff);
-f = "Have some pie!" //double to string
-print(f);
-f = 4711.17;
-print(f); //still an object not a double
-
-var g = 4811.16;
-g = 23; //still double
-print(g);
-g = (222 >>> 1); //still double
-print(g);
-g = 4711.16; //double->double
-print(g);
-g = "I like cake!";
-print(g); //object to various
-print(g & 0xff);
-print(g * 2);
-print(g >>> 2);
-print(g);
-
-var h = {x:17, y:17.4711, z:"salamander"};
-print(h.x);
-print(h.y);
-print(h.z);
-h.x = 4711.17;
-h.y = "axolotl";
-h.z = "lizard";
-print(h.x);
-print(h.y);
-print(h.z);
--- a/nashorn/test/script/sandbox/classloader.js.EXPECTED Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/sandbox/classloader.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -1,1 +1,1 @@
-java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "createClassLoader")
+java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "nashorn.JavaReflection")
--- a/nashorn/test/script/sandbox/nashorninternals.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/sandbox/nashorninternals.js Mon Aug 12 09:29:06 2013 -0400
@@ -44,17 +44,25 @@
// Not exhaustive - but a representative list of classes
checkClass("jdk.nashorn.internal.codegen.Compiler");
-checkClass("jdk.nashorn.internal.codegen.objects.MapCreator");
checkClass("jdk.nashorn.internal.codegen.types.Type");
checkClass("jdk.nashorn.internal.ir.Node");
checkClass("jdk.nashorn.internal.ir.FunctionNode");
checkClass("jdk.nashorn.internal.ir.debug.JSONWriter");
checkClass("jdk.nashorn.internal.ir.visitor.NodeVisitor");
+checkClass("jdk.nashorn.internal.lookup.MethodHandleFactory");
+checkClass("jdk.nashorn.internal.objects.Global");
checkClass("jdk.nashorn.internal.parser.AbstractParser");
checkClass("jdk.nashorn.internal.parser.Parser");
checkClass("jdk.nashorn.internal.parser.JSONParser");
checkClass("jdk.nashorn.internal.parser.Lexer");
checkClass("jdk.nashorn.internal.parser.Scanner");
+checkClass("jdk.nashorn.internal.runtime.Context");
+checkClass("jdk.nashorn.internal.runtime.arrays.ArrayData");
+checkClass("jdk.nashorn.internal.runtime.linker.Bootstrap");
+checkClass("jdk.nashorn.internal.runtime.options.Option");
+checkClass("jdk.nashorn.internal.runtime.regexp.RegExp");
+checkClass("jdk.nashorn.internal.scripts.JO");
+checkClass("jdk.nashorn.tools.Shell");
checkClass("jdk.internal.dynalink.CallSiteDescriptor");
checkClass("jdk.internal.dynalink.beans.StaticClass");
checkClass("jdk.internal.dynalink.linker.LinkRequest");
--- a/nashorn/test/script/sandbox/reflection.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/sandbox/reflection.js Mon Aug 12 09:29:06 2013 -0400
@@ -35,9 +35,8 @@
}
}
-var cl = java.lang.Class.class;
try {
- cl.getDeclaredMethods();
+ var cl = java.lang.Class.class;
} catch(e) {
check(e);
}
--- a/nashorn/test/script/trusted/JDK-8006529.js Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/script/trusted/JDK-8006529.js Mon Aug 12 09:29:06 2013 -0400
@@ -39,19 +39,21 @@
* and FunctionNode because of package-access check and so reflective calls.
*/
-var Parser = Java.type("jdk.nashorn.internal.parser.Parser")
-var Compiler = Java.type("jdk.nashorn.internal.codegen.Compiler")
-var Context = Java.type("jdk.nashorn.internal.runtime.Context")
-var ScriptEnvironment = Java.type("jdk.nashorn.internal.runtime.ScriptEnvironment")
-var Source = Java.type("jdk.nashorn.internal.runtime.Source")
-var FunctionNode = Java.type("jdk.nashorn.internal.ir.FunctionNode")
-var Block = Java.type("jdk.nashorn.internal.ir.Block")
-var VarNode = Java.type("jdk.nashorn.internal.ir.VarNode")
-var ExpressionStatement = Java.type("jdk.nashorn.internal.ir.ExpressionStatement")
-var UnaryNode = Java.type("jdk.nashorn.internal.ir.UnaryNode")
-var BinaryNode = Java.type("jdk.nashorn.internal.ir.BinaryNode")
-var ThrowErrorManager = Java.type("jdk.nashorn.internal.runtime.Context$ThrowErrorManager")
-var Debug = Java.type("jdk.nashorn.internal.runtime.Debug")
+var forName = java.lang.Class["forName(String)"];
+var Parser = forName("jdk.nashorn.internal.parser.Parser").static
+var Compiler = forName("jdk.nashorn.internal.codegen.Compiler").static
+var Context = forName("jdk.nashorn.internal.runtime.Context").static
+var ScriptEnvironment = forName("jdk.nashorn.internal.runtime.ScriptEnvironment").static
+var Source = forName("jdk.nashorn.internal.runtime.Source").static
+var FunctionNode = forName("jdk.nashorn.internal.ir.FunctionNode").static
+var Block = forName("jdk.nashorn.internal.ir.Block").static
+var VarNode = forName("jdk.nashorn.internal.ir.VarNode").static
+var ExpressionStatement = forName("jdk.nashorn.internal.ir.ExpressionStatement").static
+var UnaryNode = forName("jdk.nashorn.internal.ir.UnaryNode").static
+var BinaryNode = forName("jdk.nashorn.internal.ir.BinaryNode").static
+var ThrowErrorManager = forName("jdk.nashorn.internal.runtime.Context$ThrowErrorManager").static
+var ErrorManager = forName("jdk.nashorn.internal.runtime.ErrorManager").static
+var Debug = forName("jdk.nashorn.internal.runtime.Debug").static
var parseMethod = Parser.class.getMethod("parse");
var compileMethod = Compiler.class.getMethod("compile", FunctionNode.class);
@@ -111,18 +113,22 @@
var getContextMethod = Context.class.getMethod("getContext")
var getEnvMethod = Context.class.getMethod("getEnv")
+var SourceConstructor = Source.class.getConstructor(java.lang.String.class, java.lang.String.class)
+var ParserConstructor = Parser.class.getConstructor(ScriptEnvironment.class, Source.class, ErrorManager.class)
+var CompilerConstructor = Compiler.class.getConstructor(ScriptEnvironment.class)
+
// compile(script) -- compiles a script specified as a string with its
// source code, returns a jdk.nashorn.internal.ir.FunctionNode object
// representing it.
function compile(source) {
- var source = new Source("<no name>", source);
+ var source = SourceConstructor.newInstance("<no name>", source);
var env = getEnvMethod.invoke(getContextMethod.invoke(null))
- var parser = new Parser(env, source, new ThrowErrorManager());
+ var parser = ParserConstructor.newInstance(env, source, ThrowErrorManager.class.newInstance());
var func = parseMethod.invoke(parser);
- var compiler = new Compiler(env);
+ var compiler = CompilerConstructor.newInstance(env);
return compileMethod.invoke(compiler, func);
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/trusted/JDK-8020809.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * JDK-8020809: Java adapter should not allow overriding of caller sensitive methods
+ *
+ * @test
+ * @run
+ */
+
+// This test runs as trusted as we need the
+// "enableContextClassLoaderOverride" runtime permission.
+
+var T = Java.extend(java.lang.Thread, {
+ getContextClassLoader: function() {
+ // Since getContextClassLoader is caller sensitive, this won't
+ // actually act as an override; it will be ignored. If we could
+ // invoke it, it would be an error.
+ throw new Error()
+ }
+})
+
+// Retrieve the context ClassLoader on our Thread adapter, ensure the
+// method was not, in fact, overridden.
+var cl = (new T()).contextClassLoader
+
+print("cl is class loader: " + (cl instanceof java.lang.ClassLoader))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/trusted/JDK-8020809.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,1 @@
+cl is class loader: true
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/trusted/JDK-8021129.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * JDK-8021129: Test prevention of access to members of restricted classes.
+ * Note that even though the script runs as trusted, we still don't allow
+ * access to non-public portions of restricted classes.
+ *
+ * @test
+ * @run
+ */
+
+var InternalRunnableSuperclass = Java.type("jdk.nashorn.test.models.InternalRunnableSuperclass");
+var r1 = InternalRunnableSuperclass.makeInternalRunnable();
+r1.run() // Can execute method from an implemented non-restricted interface
+print(r1.toString()) // Can execute public method from a superclass
+
+print(r1.restrictedRun === undefined) // Can't see method from a restricted interface
+print(r1.canNotInvokeThis === undefined) // Can't see any other public methods
+print(r1.invisibleProperty === undefined) // Can't see any other properties
+print(r1.canSeeThisField === undefined) // Can't see fields from superclasses
+print(r1.canNotSeeThisField === undefined) // Can't see its own fields
+
+var r2 = new InternalRunnableSuperclass();
+print(r2.canSeeThisField) // Superclass field works fine on its own
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/trusted/JDK-8021129.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,9 @@
+InternalRunnable.run() executed!
+InternalRunnable.toString() executed!
+
+true
+true
+true
+true
+true
+19
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/trusted/JDK-8021189.js Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2010, 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.
+ */
+
+/**
+ * JDK-8021189: Prevent access to constructors of restricted classes
+ *
+ * @test
+ * @run
+ */
+var InternalRunnableSuperclass = Java.type("jdk.nashorn.test.models.InternalRunnableSuperclass");
+try {
+ new (InternalRunnableSuperclass.getInternalRunnableType())();
+} catch(e) {
+ print(e)
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/trusted/JDK-8021189.js.EXPECTED Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,1 @@
+java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.nashorn.internal.test.models")
--- a/nashorn/test/src/jdk/nashorn/api/javaaccess/BooleanAccessTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/api/javaaccess/BooleanAccessTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -72,7 +72,7 @@
e.eval("var p_boolean_array = o.publicBooleanArray;");
assertEquals(o.publicBooleanArray[0], e.eval("o.publicBooleanArray[0]"));
assertTrue(Arrays.equals(o.publicBooleanArray, (boolean[])e.get("p_boolean_array")));
- e.eval("var t_boolean_arr = java.lang.reflect.Array.newInstance(java.lang.Boolean.TYPE, 3);" +
+ e.eval("var t_boolean_arr = new (Java.type(\"boolean[]\"))(3);" +
"t_boolean_arr[0] = true;" +
"t_boolean_arr[1] = false;" +
"t_boolean_arr[2] = false;" +
@@ -96,7 +96,7 @@
e.eval("var ps_boolean_array = SharedObject.publicStaticBooleanArray;");
assertEquals(SharedObject.publicStaticBooleanArray[0], e.eval("SharedObject.publicStaticBooleanArray[0]"));
assertTrue(Arrays.equals(SharedObject.publicStaticBooleanArray, (boolean[])e.get("ps_boolean_array")));
- e.eval("var ts_boolean_arr = java.lang.reflect.Array.newInstance(java.lang.Boolean.TYPE, 3);" +
+ e.eval("var ts_boolean_arr = new (Java.type(\"boolean[]\"))(3);" +
"ts_boolean_arr[0] = true;" +
"ts_boolean_arr[1] = false;" +
"ts_boolean_arr[2] = true;" +
@@ -120,7 +120,7 @@
e.eval("var pf_boolean_array = o.publicFinalBooleanArray;");
assertEquals(o.publicFinalBooleanArray[0], e.eval("o.publicFinalBooleanArray[0]"));
assertTrue(Arrays.equals(o.publicFinalBooleanArray, (boolean[])e.get("pf_boolean_array")));
- e.eval("var tf_boolean_arr = java.lang.reflect.Array.newInstance(java.lang.Boolean.TYPE, 3);" +
+ e.eval("var tf_boolean_arr = new (Java.type(\"boolean[]\"))(3);" +
"tf_boolean_arr[0] = false;" +
"tf_boolean_arr[1] = false;" +
"tf_boolean_arr[2] = true;" +
@@ -144,7 +144,7 @@
e.eval("var psf_boolean_array = SharedObject.publicStaticFinalBooleanArray;");
assertEquals(SharedObject.publicStaticFinalBooleanArray[0], e.eval("SharedObject.publicStaticFinalBooleanArray[0]"));
assertTrue(Arrays.equals(SharedObject.publicStaticFinalBooleanArray, (boolean[])e.get("psf_boolean_array")));
- e.eval("var tsf_boolean_arr = java.lang.reflect.Array.newInstance(java.lang.Boolean.TYPE, 3);" +
+ e.eval("var tsf_boolean_arr = new (Java.type(\"boolean[]\"))(3);" +
"tsf_boolean_arr[0] = false;" +
"tsf_boolean_arr[1] = true;" +
"tsf_boolean_arr[2] = false;" +
--- a/nashorn/test/src/jdk/nashorn/api/javaaccess/NumberAccessTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/api/javaaccess/NumberAccessTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -73,7 +73,7 @@
e.eval("var p_long_array = o.publicLongArray;");
assertEquals(o.publicLongArray[0], e.eval("o.publicLongArray[0];"));
assertArrayEquals(o.publicLongArray, (long[])e.get("p_long_array"));
- e.eval("var t_long_arr = java.lang.reflect.Array.newInstance(java.lang.Long.TYPE, 3);" +
+ e.eval("var t_long_arr = new (Java.type(\"long[]\"))(3);" +
"t_long_arr[0] = -189009;" +
"t_long_arr[1] = 456;" +
"t_long_arr[2] = 600000001;" +
@@ -97,7 +97,7 @@
e.eval("var ps_long_array = SharedObject.publicStaticLongArray;");
assertEquals(SharedObject.publicStaticLongArray[0], e.eval("SharedObject.publicStaticLongArray[0];"));
assertArrayEquals(SharedObject.publicStaticLongArray, (long[])e.get("ps_long_array"));
- e.eval("var ts_long_arr = java.lang.reflect.Array.newInstance(java.lang.Long.TYPE, 3);" +
+ e.eval("var ts_long_arr = new (Java.type(\"long[]\"))(3);" +
"ts_long_arr[0] = -189009;" +
"ts_long_arr[1] = 456;" +
"ts_long_arr[2] = 600000001;" +
@@ -121,7 +121,7 @@
e.eval("var pf_long_array = o.publicFinalLongArray;");
assertEquals(o.publicFinalLongArray[0], e.eval("o.publicFinalLongArray[0];"));
assertArrayEquals(o.publicFinalLongArray, (long[])e.get("pf_long_array"));
- e.eval("var tf_long_arr = java.lang.reflect.Array.newInstance(java.lang.Long.TYPE, 3);" +
+ e.eval("var tf_long_arr = new (Java.type(\"long[]\"))(3);" +
"tf_long_arr[0] = -189009;" +
"tf_long_arr[1] = 456;" +
"tf_long_arr[2] = 600000001;" +
@@ -145,7 +145,7 @@
e.eval("var psf_long_array = SharedObject.publicStaticFinalLongArray;");
assertEquals(SharedObject.publicStaticFinalLongArray[0], e.eval("SharedObject.publicStaticFinalLongArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalLongArray, (long[])e.get("psf_long_array"));
- e.eval("var tsf_long_arr = java.lang.reflect.Array.newInstance(java.lang.Long.TYPE, 3);" +
+ e.eval("var tsf_long_arr = new (Java.type(\"long[]\"))(3);" +
"tsf_long_arr[0] = -189009;" +
"tsf_long_arr[1] = 456;" +
"tsf_long_arr[2] = 600000001;" +
@@ -171,7 +171,7 @@
e.eval("var p_int_array = o.publicIntArray;");
assertEquals(o.publicIntArray[0], e.eval("o.publicIntArray[0];"));
assertArrayEquals(o.publicIntArray, (int[])e.get("p_int_array"));
- e.eval("var t_int_arr = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 3);" +
+ e.eval("var t_int_arr = new (Java.type(\"int[]\"))(3);" +
"t_int_arr[0] = 4;" +
"t_int_arr[1] = 5;" +
"t_int_arr[2] = 6;" +
@@ -194,7 +194,7 @@
e.eval("var ps_int_array = SharedObject.publicStaticIntArray;");
assertEquals(SharedObject.publicStaticIntArray[0], e.eval("SharedObject.publicStaticIntArray[0];"));
assertArrayEquals(SharedObject.publicStaticIntArray, (int[])e.get("ps_int_array"));
- e.eval("var ts_int_arr = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 3);" +
+ e.eval("var ts_int_arr = new (Java.type(\"int[]\"))(3);" +
"ts_int_arr[0] = 4;" +
"ts_int_arr[1] = 5;" +
"ts_int_arr[2] = 6;" +
@@ -218,7 +218,7 @@
e.eval("var pf_int_array = o.publicFinalIntArray;");
assertEquals(o.publicFinalIntArray[0], e.eval("o.publicFinalIntArray[0];"));
assertArrayEquals(o.publicFinalIntArray, (int[])e.get("pf_int_array"));
- e.eval("var tf_int_arr = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 3);" +
+ e.eval("var tf_int_arr = new (Java.type(\"int[]\"))(3);" +
"tf_int_arr[0] = 4;" +
"tf_int_arr[1] = 5;" +
"tf_int_arr[2] = 6;" +
@@ -241,7 +241,7 @@
e.eval("var psf_int_array = SharedObject.publicStaticFinalIntArray;");
assertEquals(SharedObject.publicStaticFinalIntArray[0], e.eval("SharedObject.publicStaticFinalIntArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalIntArray, (int[])e.get("psf_int_array"));
- e.eval("var tsf_int_arr = java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 3);" +
+ e.eval("var tsf_int_arr = new (Java.type(\"int[]\"))(3);" +
"tsf_int_arr[0] = 4;" +
"tsf_int_arr[1] = 5;" +
"tsf_int_arr[2] = 6;" +
@@ -266,7 +266,7 @@
e.eval("var p_byte_array = o.publicByteArray;");
assertEquals(o.publicByteArray[0], e.eval("o.publicByteArray[0];"));
assertArrayEquals(o.publicByteArray, (byte[])e.get("p_byte_array"));
- e.eval("var t_byte_arr = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 3);" +
+ e.eval("var t_byte_arr = new (Java.type(\"byte[]\"))(3);" +
"t_byte_arr[0] = -18;" +
"t_byte_arr[1] = 56;" +
"t_byte_arr[2] = 60;" +
@@ -289,7 +289,7 @@
e.eval("var ps_byte_array = SharedObject.publicStaticByteArray;");
assertEquals(SharedObject.publicStaticByteArray[0], e.eval("SharedObject.publicStaticByteArray[0];"));
assertArrayEquals(SharedObject.publicStaticByteArray, (byte[])e.get("ps_byte_array"));
- e.eval("var ts_byte_arr = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 3);" +
+ e.eval("var ts_byte_arr = new (Java.type(\"byte[]\"))(3);" +
"ts_byte_arr[0] = -18;" +
"ts_byte_arr[1] = 56;" +
"ts_byte_arr[2] = 60;" +
@@ -312,7 +312,7 @@
e.eval("var pf_byte_array = o.publicFinalByteArray;");
assertEquals(o.publicFinalByteArray[0], e.eval("o.publicFinalByteArray[0];"));
assertArrayEquals(o.publicFinalByteArray, (byte[])e.get("pf_byte_array"));
- e.eval("var tf_byte_arr = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 3);" +
+ e.eval("var tf_byte_arr = new (Java.type(\"byte[]\"))(3);" +
"tf_byte_arr[0] = -18;" +
"tf_byte_arr[1] = 56;" +
"tf_byte_arr[2] = 60;" +
@@ -335,7 +335,7 @@
e.eval("var psf_byte_array = SharedObject.publicStaticFinalByteArray;");
assertEquals(SharedObject.publicStaticFinalByteArray[0], e.eval("SharedObject.publicStaticFinalByteArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalByteArray, (byte[])e.get("psf_byte_array"));
- e.eval("var tsf_byte_arr = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 3);" +
+ e.eval("var tsf_byte_arr = new (Java.type(\"byte[]\"))(3);" +
"tsf_byte_arr[0] = -18;" +
"tsf_byte_arr[1] = 56;" +
"tsf_byte_arr[2] = 60;" +
@@ -360,7 +360,7 @@
e.eval("var p_short_array = o.publicShortArray;");
assertEquals(o.publicShortArray[0], e.eval("o.publicShortArray[0];"));
assertArrayEquals(o.publicShortArray, (short[])e.get("p_short_array"));
- e.eval("var t_short_arr = java.lang.reflect.Array.newInstance(java.lang.Short.TYPE, 3);" +
+ e.eval("var t_short_arr = new (Java.type(\"short[]\"))(3);" +
"t_short_arr[0] = 90;" +
"t_short_arr[1] = 5;" +
"t_short_arr[2] = -6000;" +
@@ -383,7 +383,7 @@
e.eval("var ps_short_array = SharedObject.publicStaticShortArray;");
assertEquals(SharedObject.publicStaticShortArray[0], e.eval("SharedObject.publicStaticShortArray[0];"));
assertArrayEquals(SharedObject.publicStaticShortArray, (short[])e.get("ps_short_array"));
- e.eval("var ts_short_arr = java.lang.reflect.Array.newInstance(java.lang.Short.TYPE, 3);" +
+ e.eval("var ts_short_arr = new (Java.type(\"short[]\"))(3);" +
"ts_short_arr[0] = 90;" +
"ts_short_arr[1] = 5;" +
"ts_short_arr[2] = -6000;" +
@@ -406,7 +406,7 @@
e.eval("var pf_short_array = o.publicFinalShortArray;");
assertEquals(o.publicFinalShortArray[0], e.eval("o.publicFinalShortArray[0];"));
assertArrayEquals(o.publicFinalShortArray, (short[])e.get("pf_short_array"));
- e.eval("var tf_short_arr = java.lang.reflect.Array.newInstance(java.lang.Short.TYPE, 3);" +
+ e.eval("var tf_short_arr = new (Java.type(\"short[]\"))(3);" +
"tf_short_arr[0] = 90;" +
"tf_short_arr[1] = 5;" +
"tf_short_arr[2] = -6000;" +
@@ -429,7 +429,7 @@
e.eval("var psf_short_array = SharedObject.publicStaticFinalShortArray;");
assertEquals(SharedObject.publicStaticFinalShortArray[0], e.eval("SharedObject.publicStaticFinalShortArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalShortArray, (short[])e.get("psf_short_array"));
- e.eval("var tsf_short_arr = java.lang.reflect.Array.newInstance(java.lang.Short.TYPE, 3);" +
+ e.eval("var tsf_short_arr = new (Java.type(\"short[]\"))(3);" +
"tsf_short_arr[0] = 90;" +
"tsf_short_arr[1] = 5;" +
"tsf_short_arr[2] = -6000;" +
@@ -463,7 +463,7 @@
e.eval("var p_char_array = o.publicCharArray;");
assertEquals(o.publicCharArray[0], e.eval("o.publicCharArray[0];"));
assertArrayEquals(o.publicCharArray, (char[])e.get("p_char_array"));
- e.eval("var t_char_arr = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 3);" +
+ e.eval("var t_char_arr = new (Java.type(\"char[]\"))(3);" +
"t_char_arr[0] = 'F';" +
"t_char_arr[1] = 'o';" +
"t_char_arr[2] = 'o';" +
@@ -486,7 +486,7 @@
e.eval("var ps_char_array = SharedObject.publicStaticCharArray;");
assertEquals(SharedObject.publicStaticCharArray[0], e.eval("SharedObject.publicStaticCharArray[0];"));
assertArrayEquals(SharedObject.publicStaticCharArray, (char[])e.get("ps_char_array"));
- e.eval("var ts_char_arr = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 3);" +
+ e.eval("var ts_char_arr = new (Java.type(\"char[]\"))(3);" +
"ts_char_arr[0] = 'G';" +
"ts_char_arr[1] = 'o';" +
"ts_char_arr[2] = 'o';" +
@@ -509,7 +509,7 @@
e.eval("var pf_char_array = o.publicFinalCharArray;");
assertEquals(o.publicFinalCharArray[0], e.eval("o.publicFinalCharArray[0];"));
assertArrayEquals(o.publicFinalCharArray, (char[])e.get("pf_char_array"));
- e.eval("var tf_char_arr = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 3);" +
+ e.eval("var tf_char_arr = new (Java.type(\"char[]\"))(3);" +
"tf_char_arr[0] = 'F';" +
"tf_char_arr[1] = 'o';" +
"tf_char_arr[2] = 'o';" +
@@ -532,7 +532,7 @@
e.eval("var psf_char_array = SharedObject.publicStaticFinalCharArray;");
assertEquals(SharedObject.publicStaticFinalCharArray[0], e.eval("SharedObject.publicStaticFinalCharArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalCharArray, (char[])e.get("psf_char_array"));
- e.eval("var tsf_char_arr = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 3);" +
+ e.eval("var tsf_char_arr = new (Java.type(\"char[]\"))(3);" +
"tsf_char_arr[0] = 'Z';" +
"tsf_char_arr[1] = 'o';" +
"tsf_char_arr[2] = 'o';" +
@@ -569,7 +569,7 @@
e.eval("var p_float_array = o.publicFloatArray;");
assertEquals(o.publicFloatArray[0], e.eval("o.publicFloatArray[0];"));
assertArrayEquals(o.publicFloatArray, (float[])e.get("p_float_array"), 1e-10f);
- e.eval("var t_float_arr = java.lang.reflect.Array.newInstance(java.lang.Float.TYPE, 3);" +
+ e.eval("var t_float_arr = new (Java.type(\"float[]\"))(3);" +
"t_float_arr[0] = 9.0;" +
"t_float_arr[1] = 5.12345;" +
"t_float_arr[2] = -60.03;" +
@@ -604,7 +604,7 @@
e.eval("var ps_float_array = SharedObject.publicStaticFloatArray;");
assertEquals(SharedObject.publicStaticFloatArray[0], e.eval("SharedObject.publicStaticFloatArray[0];"));
assertArrayEquals(SharedObject.publicStaticFloatArray, (float[])e.get("ps_float_array"), 1e-10f);
- e.eval("var ts_float_arr = java.lang.reflect.Array.newInstance(java.lang.Float.TYPE, 3);" +
+ e.eval("var ts_float_arr = new (Java.type(\"float[]\"))(3);" +
"ts_float_arr[0] = 9.0;" +
"ts_float_arr[1] = 5.12345;" +
"ts_float_arr[2] = -60.03;" +
@@ -627,7 +627,7 @@
e.eval("var pf_float_array = o.publicFinalFloatArray;");
assertEquals(o.publicFinalFloatArray[0], e.eval("o.publicFinalFloatArray[0];"));
assertArrayEquals(o.publicFinalFloatArray, (float[])e.get("pf_float_array"), 1e-10f);
- e.eval("var tf_float_arr = java.lang.reflect.Array.newInstance(java.lang.Float.TYPE, 3);" +
+ e.eval("var tf_float_arr = new (Java.type(\"float[]\"))(3);" +
"tf_float_arr[0] = 9.0;" +
"tf_float_arr[1] = 5.12345;" +
"tf_float_arr[2] = -60.03;" +
@@ -650,7 +650,7 @@
e.eval("var psf_float_array = SharedObject.publicStaticFinalFloatArray;");
assertEquals(SharedObject.publicStaticFinalFloatArray[0], e.eval("SharedObject.publicStaticFinalFloatArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalFloatArray, (float[])e.get("psf_float_array"), 1e-10f);
- e.eval("var tsf_float_arr = java.lang.reflect.Array.newInstance(java.lang.Float.TYPE, 3);" +
+ e.eval("var tsf_float_arr = new (Java.type(\"float[]\"))(3);" +
"tsf_float_arr[0] = 9.0;" +
"tsf_float_arr[1] = 5.12345;" +
"tsf_float_arr[2] = -60.03;" +
@@ -687,7 +687,7 @@
e.eval("var p_double_array = o.publicDoubleArray;");
assertEquals(o.publicDoubleArray[0], e.eval("o.publicDoubleArray[0];"));
assertArrayEquals(o.publicDoubleArray, (double[])e.get("p_double_array"), 1e-10);
- e.eval("var t_double_arr = java.lang.reflect.Array.newInstance(java.lang.Double.TYPE, 3);" +
+ e.eval("var t_double_arr = new (Java.type(\"double[]\"))(3);" +
"t_double_arr[0] = 9e10;" +
"t_double_arr[1] = 0.677777;" +
"t_double_arr[2] = -0.0000001;" +
@@ -722,7 +722,7 @@
e.eval("var ps_double_array = SharedObject.publicStaticDoubleArray;");
assertEquals(SharedObject.publicStaticDoubleArray[0], e.eval("SharedObject.publicStaticDoubleArray[0];"));
assertArrayEquals(SharedObject.publicStaticDoubleArray, (double[])e.get("ps_double_array"), 1e-10);
- e.eval("var ts_double_arr = java.lang.reflect.Array.newInstance(java.lang.Double.TYPE, 3);" +
+ e.eval("var ts_double_arr = new (Java.type(\"double[]\"))(3);" +
"ts_double_arr[0] = 9e10;" +
"ts_double_arr[1] = 0.677777;" +
"ts_double_arr[2] = -0.0000001;" +
@@ -745,7 +745,7 @@
e.eval("var pf_double_array = o.publicFinalDoubleArray;");
assertEquals(o.publicFinalDoubleArray[0], e.eval("o.publicFinalDoubleArray[0];"));
assertArrayEquals(o.publicFinalDoubleArray, (double[])e.get("pf_double_array"), 1e-10);
- e.eval("var tf_double_arr = java.lang.reflect.Array.newInstance(java.lang.Double.TYPE, 3);" +
+ e.eval("var tf_double_arr = new (Java.type(\"double[]\"))(3);" +
"tf_double_arr[0] = 9e10;" +
"tf_double_arr[1] = 0.677777;" +
"tf_double_arr[2] = -0.0000001;" +
@@ -768,7 +768,7 @@
e.eval("var psf_double_array = SharedObject.publicStaticFinalDoubleArray;");
assertEquals(SharedObject.publicStaticFinalDoubleArray[0], e.eval("SharedObject.publicStaticFinalDoubleArray[0];"));
assertArrayEquals(SharedObject.publicStaticFinalDoubleArray, (double[])e.get("psf_double_array"), 1e-10);
- e.eval("var tsf_double_arr = java.lang.reflect.Array.newInstance(java.lang.Double.TYPE, 3);" +
+ e.eval("var tsf_double_arr = new (Java.type(\"double[]\"))(3);" +
"tsf_double_arr[0] = 9e10;" +
"tsf_double_arr[1] = 0.677777;" +
"tsf_double_arr[2] = -0.0000001;" +
--- a/nashorn/test/src/jdk/nashorn/api/javaaccess/ObjectAccessTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/api/javaaccess/ObjectAccessTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -72,7 +72,7 @@
e.eval("var p_object_array = o.publicObjectArray;");
assertEquals(o.publicObjectArray[0], e.eval("o.publicObjectArray[0]"));
assertArrayEquals(o.publicObjectArray, (Object[])e.get("p_object_array"));
- e.eval("var t_object_arr = java.lang.reflect.Array.newInstance(Person.class, 3);" +
+ e.eval("var t_object_arr = new (Java.type(\"jdk.nashorn.api.javaaccess.Person[]\"))(3);" +
"t_object_arr[0] = new Person(100);" +
"t_object_arr[1] = new Person(120);" +
"t_object_arr[2] = new Person(140);" +
@@ -96,7 +96,7 @@
e.eval("var ps_object_array = SharedObject.publicStaticObjectArray;");
assertEquals(SharedObject.publicStaticObjectArray[0], e.eval("SharedObject.publicStaticObjectArray[0]"));
assertArrayEquals(SharedObject.publicStaticObjectArray, (Object[])e.get("ps_object_array"));
- e.eval("var ts_object_arr = java.lang.reflect.Array.newInstance(Person.class, 3);" +
+ e.eval("var ts_object_arr = new (Java.type(\"jdk.nashorn.api.javaaccess.Person[]\"))(3);" +
"ts_object_arr[0] = new Person(100);" +
"ts_object_arr[1] = new Person(120);" +
"ts_object_arr[2] = new Person(140);" +
@@ -120,7 +120,7 @@
e.eval("var pf_object_array = o.publicFinalObjectArray;");
assertEquals(o.publicFinalObjectArray[0], e.eval("o.publicFinalObjectArray[0]"));
assertArrayEquals(o.publicFinalObjectArray, (Object[])e.get("pf_object_array"));
- e.eval("var tf_object_arr = java.lang.reflect.Array.newInstance(Person.class, 3);" +
+ e.eval("var tf_object_arr = new (Java.type(\"jdk.nashorn.api.javaaccess.Person[]\"))(3);" +
"tf_object_arr[0] = new Person(100);" +
"tf_object_arr[1] = new Person(120);" +
"tf_object_arr[2] = new Person(140);" +
@@ -144,7 +144,7 @@
e.eval("var psf_object_array = SharedObject.publicStaticFinalObjectArray;");
assertEquals(SharedObject.publicStaticFinalObjectArray[0], e.eval("SharedObject.publicStaticFinalObjectArray[0]"));
assertArrayEquals(SharedObject.publicStaticFinalObjectArray, (Object[])e.get("psf_object_array"));
- e.eval("var tsf_object_arr = java.lang.reflect.Array.newInstance(Person.class, 3);" +
+ e.eval("var tsf_object_arr = new (Java.type(\"jdk.nashorn.api.javaaccess.Person[]\"))(3);" +
"tsf_object_arr[0] = new Person(100);" +
"tsf_object_arr[1] = new Person(120);" +
"tsf_object_arr[2] = new Person(140);" +
--- a/nashorn/test/src/jdk/nashorn/api/javaaccess/StringAccessTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/api/javaaccess/StringAccessTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -71,7 +71,7 @@
e.eval("var p_string_array = o.publicStringArray;");
assertEquals(o.publicStringArray[0], e.eval("o.publicStringArray[0]"));
assertArrayEquals(o.publicStringArray, (String[])e.get("p_string_array"));
- e.eval("var t_string_arr = java.lang.reflect.Array.newInstance(java.lang.String.class, 3);" +
+ e.eval("var t_string_arr = new (Java.type(\"java.lang.String[]\"))(3);" +
"t_string_arr[0] = 'abc';" +
"t_string_arr[1] = '123';" +
"t_string_arr[2] = 'xyzzzz';" +
@@ -95,7 +95,7 @@
e.eval("var ps_string_array = SharedObject.publicStaticStringArray;");
assertEquals(SharedObject.publicStaticStringArray[0], e.eval("SharedObject.publicStaticStringArray[0]"));
assertArrayEquals(SharedObject.publicStaticStringArray, (String[])e.get("ps_string_array"));
- e.eval("var ts_string_arr = java.lang.reflect.Array.newInstance(java.lang.String.class, 3);" +
+ e.eval("var ts_string_arr = new (Java.type(\"java.lang.String[]\"))(3);" +
"ts_string_arr[0] = 'abc';" +
"ts_string_arr[1] = '123';" +
"ts_string_arr[2] = 'xyzzzz';" +
@@ -119,7 +119,7 @@
e.eval("var pf_string_array = o.publicFinalStringArray;");
assertEquals(o.publicFinalStringArray[0], e.eval("o.publicFinalStringArray[0]"));
assertArrayEquals(o.publicFinalStringArray, (String[])e.get("pf_string_array"));
- e.eval("var tf_string_arr = java.lang.reflect.Array.newInstance(java.lang.String.class, 3);" +
+ e.eval("var tf_string_arr = new (Java.type(\"java.lang.String[]\"))(3);" +
"tf_string_arr[0] = 'abc';" +
"tf_string_arr[1] = '123';" +
"tf_string_arr[2] = 'xyzzzz';" +
@@ -143,7 +143,7 @@
e.eval("var psf_string_array = SharedObject.publicStaticFinalStringArray;");
assertEquals(SharedObject.publicStaticFinalStringArray[0], e.eval("SharedObject.publicStaticFinalStringArray[0]"));
assertArrayEquals(SharedObject.publicStaticFinalStringArray, (String[])e.get("psf_string_array"));
- e.eval("var tsf_string_arr = java.lang.reflect.Array.newInstance(java.lang.String.class, 3);" +
+ e.eval("var tsf_string_arr = new (Java.type(\"java.lang.String[]\"))(3);" +
"tsf_string_arr[0] = 'abc';" +
"tsf_string_arr[1] = '123';" +
"tsf_string_arr[2] = 'xyzzzz';" +
--- a/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/api/scripting/ScriptEngineTest.java Mon Aug 12 09:29:06 2013 -0400
@@ -363,6 +363,90 @@
}
@Test
+ /**
+ * Check that we can get interface out of a script object even after
+ * switching to use different ScriptContext.
+ */
+ public void getInterfaceDifferentContext() {
+ ScriptEngineManager m = new ScriptEngineManager();
+ ScriptEngine e = m.getEngineByName("nashorn");
+ try {
+ Object obj = e.eval("({ run: function() { } })");
+
+ // change script context
+ ScriptContext ctxt = new SimpleScriptContext();
+ ctxt.setBindings(e.createBindings(), ScriptContext.ENGINE_SCOPE);
+ e.setContext(ctxt);
+
+ Runnable r = ((Invocable)e).getInterface(obj, Runnable.class);
+ r.run();
+ }catch (final Exception exp) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+
+ @Test
+ /**
+ * Check that getInterface on non-script object 'thiz' results in IllegalArgumentException.
+ */
+ public void getInterfaceNonScriptObjectThizTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ ((Invocable)e).getInterface(new Object(), Runnable.class);
+ fail("should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that getInterface on null 'thiz' results in IllegalArgumentException.
+ */
+ public void getInterfaceNullThizTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ ((Invocable)e).getInterface(null, Runnable.class);
+ fail("should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that calling getInterface on mirror created by another engine results in IllegalArgumentException.
+ */
+ public void getInterfaceMixEnginesTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine engine1 = m.getEngineByName("nashorn");
+ final ScriptEngine engine2 = m.getEngineByName("nashorn");
+
+ try {
+ Object obj = engine1.eval("({ run: function() {} })");
+ // pass object from engine1 to engine2 as 'thiz' for getInterface
+ ((Invocable)engine2).getInterface(obj, Runnable.class);
+ fail("should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
public void accessGlobalTest() {
final ScriptEngineManager m = new ScriptEngineManager();
final ScriptEngine e = m.getEngineByName("nashorn");
@@ -649,6 +733,133 @@
}
@Test
+ /**
+ * Check that we can call invokeMethod on an object that we got by evaluating
+ * script with different Context set.
+ */
+ public void invokeMethodDifferentContextTest() {
+ ScriptEngineManager m = new ScriptEngineManager();
+ ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ // define an object with method on it
+ Object obj = e.eval("({ hello: function() { return 'Hello World!'; } })");
+
+ final ScriptContext ctxt = new SimpleScriptContext();
+ ctxt.setBindings(e.createBindings(), ScriptContext.ENGINE_SCOPE);
+ e.setContext(ctxt);
+
+ // invoke 'func' on obj - but with current script context changed
+ final Object res = ((Invocable)e).invokeMethod(obj, "hello");
+ assertEquals(res, "Hello World!");
+ } catch (final Exception exp) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+
+ @Test
+ /**
+ * Check that invokeMethod throws NPE on null method name.
+ */
+ public void invokeMethodNullNameTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ final Object obj = e.eval("({})");
+ final Object res = ((Invocable)e).invokeMethod(obj, null);
+ fail("should have thrown NPE");
+ } catch (final Exception exp) {
+ if (! (exp instanceof NullPointerException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that invokeMethod throws NoSuchMethodException on missing method.
+ */
+ public void invokeMethodMissingTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ final Object obj = e.eval("({})");
+ final Object res = ((Invocable)e).invokeMethod(obj, "nonExistentMethod");
+ fail("should have thrown NoSuchMethodException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof NoSuchMethodException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that calling method on non-script object 'thiz' results in IllegalArgumentException.
+ */
+ public void invokeMethodNonScriptObjectThizTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ ((Invocable)e).invokeMethod(new Object(), "toString");
+ fail("should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that calling method on null 'thiz' results in IllegalArgumentException.
+ */
+ public void invokeMethodNullThizTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ ((Invocable)e).invokeMethod(null, "toString");
+ fail("should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+
+ @Test
+ /**
+ * Check that calling method on mirror created by another engine results in IllegalArgumentException.
+ */
+ public void invokeMethodMixEnginesTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine engine1 = m.getEngineByName("nashorn");
+ final ScriptEngine engine2 = m.getEngineByName("nashorn");
+
+ try {
+ Object obj = engine1.eval("({ run: function() {} })");
+ // pass object from engine1 to engine2 as 'thiz' for invokeMethod
+ ((Invocable)engine2).invokeMethod(obj, "run");
+ fail("should have thrown IllegalArgumentException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof IllegalArgumentException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
public void noEnumerablePropertiesTest() {
final ScriptEngineManager m = new ScriptEngineManager();
final ScriptEngine e = m.getEngineByName("nashorn");
@@ -767,6 +978,70 @@
}
@Test
+ /**
+ * check that null function name results in NPE.
+ */
+ public void invokeFunctionNullNameTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ final Object res = ((Invocable)e).invokeFunction(null);
+ fail("should have thrown NPE");
+ } catch (final Exception exp) {
+ if (! (exp instanceof NullPointerException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that attempt to call missing function results in NoSuchMethodException.
+ */
+ public void invokeFunctionMissingTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ final Object res = ((Invocable)e).invokeFunction("NonExistentFunc");
+ fail("should have thrown NoSuchMethodException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof NoSuchMethodException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
+ /**
+ * Check that invokeFunction calls functions only from current context's Bindings.
+ */
+ public void invokeFunctionDifferentContextTest() {
+ ScriptEngineManager m = new ScriptEngineManager();
+ ScriptEngine e = m.getEngineByName("nashorn");
+
+ try {
+ // define an object with method on it
+ Object obj = e.eval("function hello() { return 'Hello World!'; }");
+ final ScriptContext ctxt = new SimpleScriptContext();
+ ctxt.setBindings(e.createBindings(), ScriptContext.ENGINE_SCOPE);
+ // change engine's current context
+ e.setContext(ctxt);
+
+ ((Invocable)e).invokeFunction("hello"); // no 'hello' in new context!
+ fail("should have thrown NoSuchMethodException");
+ } catch (final Exception exp) {
+ if (! (exp instanceof NoSuchMethodException)) {
+ exp.printStackTrace();
+ fail(exp.getMessage());
+ }
+ }
+ }
+
+ @Test
public void invokeFunctionExceptionTest() {
final ScriptEngineManager m = new ScriptEngineManager();
final ScriptEngine e = m.getEngineByName("nashorn");
@@ -945,4 +1220,38 @@
Assert.assertEquals(itf.test1(42, "a", "b"), "i == 42, strings instanceof java.lang.String[] == true, strings == [a, b]");
Assert.assertEquals(itf.test2(44, "c", "d", "e"), "arguments[0] == 44, arguments[1] instanceof java.lang.String[] == true, arguments[1] == [c, d, e]");
}
+
+ @Test
+ // check that print function prints arg followed by newline char
+ public void printTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+ final StringWriter sw = new StringWriter();
+ e.getContext().setWriter(sw);
+ try {
+ e.eval("print('hello')");
+ } catch (final Throwable t) {
+ t.printStackTrace();
+ fail(t.getMessage());
+ }
+
+ assertEquals(sw.toString(), "hello\n");
+ }
+
+ @Test
+ // check that print prints all arguments (more than one)
+ public void printManyTest() {
+ final ScriptEngineManager m = new ScriptEngineManager();
+ final ScriptEngine e = m.getEngineByName("nashorn");
+ final StringWriter sw = new StringWriter();
+ e.getContext().setWriter(sw);
+ try {
+ e.eval("print(34, true, 'hello')");
+ } catch (final Throwable t) {
+ t.printStackTrace();
+ fail(t.getMessage());
+ }
+
+ assertEquals(sw.toString(), "34 true hello\n");
+ }
}
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/AbstractScriptRunnable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/AbstractScriptRunnable.java Mon Aug 12 09:29:06 2013 -0400
@@ -29,6 +29,7 @@
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_COMPARE;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_COMPILE_FAIL;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_RUN_FAIL;
+import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_FORK;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_IGNORE_STD_ERROR;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_RUN;
import static jdk.nashorn.internal.test.framework.TestConfig.TEST_JS_FAIL_LIST;
@@ -68,6 +69,8 @@
protected final boolean checkCompilerMsg;
// .EXPECTED file compared for this or test?
protected final boolean compare;
+ // should test run in a separate process?
+ protected final boolean fork;
// ignore stderr output?
protected final boolean ignoreStdError;
// Foo.js.OUTPUT file where test stdout messages go
@@ -98,6 +101,7 @@
this.checkCompilerMsg = testOptions.containsKey(OPTIONS_CHECK_COMPILE_MSG);
this.ignoreStdError = testOptions.containsKey(OPTIONS_IGNORE_STD_ERROR);
this.compare = testOptions.containsKey(OPTIONS_COMPARE);
+ this.fork = testOptions.containsKey(OPTIONS_FORK);
final String testName = testFile.getName();
this.outputFileName = buildDir + File.separator + testName + ".OUTPUT";
@@ -105,7 +109,6 @@
this.copyExpectedFileName = buildDir + File.separator + testName + ".EXPECTED";
this.expectedFileName = testFile.getPath() + ".EXPECTED";
- final String failListString = System.getProperty(TEST_JS_FAIL_LIST);
if (failListString != null) {
final String[] failedTests = failListString.split(" ");
for (final String failedTest : failedTests) {
@@ -147,10 +150,15 @@
}
// shared context or not?
- protected static final boolean sharedContext;
+ protected static final boolean sharedContext = Boolean.getBoolean(TEST_JS_SHARED_CONTEXT);
+ protected static final String failListString = System.getProperty(TEST_JS_FAIL_LIST);
+ // VM options when a @fork test is executed by a separate process
+ protected static final String[] forkJVMOptions;
static {
- sharedContext = Boolean.getBoolean(TEST_JS_SHARED_CONTEXT);
+ String vmOptions = System.getProperty(TestConfig.TEST_FORK_JVM_OPTIONS);
+ forkJVMOptions = (vmOptions != null)? vmOptions.split(" ") : new String[0];
}
+
private static ThreadLocal<ScriptEvaluator> evaluators = new ThreadLocal<>();
/**
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/ScriptRunnable.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/ScriptRunnable.java Mon Aug 12 09:29:06 2013 -0400
@@ -43,6 +43,8 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
+
+import jdk.nashorn.tools.Shell;
import org.testng.Assert;
import org.testng.ITest;
import org.testng.annotations.Test;
@@ -53,9 +55,6 @@
* corresponding .EXPECTED file.
*/
public final class ScriptRunnable extends AbstractScriptRunnable implements ITest {
- // when test is run in a separate process, this is the command line
- protected final ArrayList<String> separateProcessArgs;
-
public ScriptRunnable(final String framework, final File testFile, final List<String> engineOptions, final Map<String, String> testOptions, final List<String> scriptArguments) {
super(framework, testFile, engineOptions, testOptions, scriptArguments);
@@ -63,9 +62,6 @@
// add --dump-on-error option always so that we can get detailed error msg.
engineOptions.add("-doe");
}
-
- final String separateProcess = System.getProperty("test.js.separateprocess");
- this.separateProcessArgs = separateProcess == null ? null : new ArrayList<>(Arrays.asList(separateProcess.split(" ")));
}
@Override
@@ -81,7 +77,7 @@
@Override
protected void execute() {
- if (separateProcessArgs != null) {
+ if (fork) {
executeInNewProcess();
} else {
executeInThisProcess();
@@ -172,15 +168,24 @@
}
private void executeInNewProcess() {
- final List<String> args = separateProcessArgs;
+
+ final String separator = System.getProperty("file.separator");
+ final List<String> cmd = new ArrayList<>();
+
+ cmd.add(System.getProperty("java.home") + separator + "bin" + separator + "java");
+ cmd.add("-Djava.ext.dirs=dist");
+ for (String str : forkJVMOptions) {
+ cmd.add(str);
+ }
+ cmd.add(Shell.class.getName());
// now add the rest of the "in process" runtime arguments
- args.addAll(getRuntimeArgs());
+ cmd.addAll(getRuntimeArgs());
final File outputFileHandle = new File(outputFileName);
final File errorFileHandle = new File(errorFileName);
try {
- final ProcessBuilder pb = new ProcessBuilder(args);
+ final ProcessBuilder pb = new ProcessBuilder(cmd);
pb.redirectOutput(outputFileHandle);
pb.redirectError(errorFileHandle);
final Process process = pb.start();
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestConfig.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestConfig.java Mon Aug 12 09:29:06 2013 -0400
@@ -36,6 +36,7 @@
public static final String OPTIONS_EXPECT_RUN_FAIL = "expect-run-fail";
public static final String OPTIONS_IGNORE_STD_ERROR = "ignore-std-error";
public static final String OPTIONS_COMPARE = "compare";
+ public static final String OPTIONS_FORK = "fork";
// System property names used for various test configurations
@@ -73,6 +74,8 @@
// shared context mode or not
static final String TEST_JS_SHARED_CONTEXT = "test.js.shared.context";
+ static final String TEST_FORK_JVM_OPTIONS = "test.fork.jvm.options";
+
// file for storing last run's failed tests
static final String TEST_FAILED_LIST_FILE = "test.failed.list.file";
}
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestFinder.java Mon Aug 12 09:03:51 2013 -0400
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestFinder.java Mon Aug 12 09:29:06 2013 -0400
@@ -29,6 +29,7 @@
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_COMPARE;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_COMPILE_FAIL;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_EXPECT_RUN_FAIL;
+import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_FORK;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_IGNORE_STD_ERROR;
import static jdk.nashorn.internal.test.framework.TestConfig.OPTIONS_RUN;
import static jdk.nashorn.internal.test.framework.TestConfig.TEST_FAILED_LIST_FILE;
@@ -208,6 +209,7 @@
boolean checkCompilerMsg = false;
boolean noCompare = false;
boolean ignoreStdError = false;
+ boolean fork = false;
final List<String> engineOptions = new ArrayList<>();
final List<String> scriptArguments = new ArrayList<>();
@@ -284,6 +286,9 @@
case "@option":
engineOptions.add(scanner.next());
break;
+ case "@fork":
+ fork = true;
+ break;
}
// negative tests are expected to fail at runtime only
@@ -324,6 +329,9 @@
if (ignoreStdError) {
testOptions.put(OPTIONS_IGNORE_STD_ERROR, "true");
}
+ if (fork) {
+ testOptions.put(OPTIONS_FORK, "true");
+ }
tests.add(factory.createTest(framework, testFile.toFile(), engineOptions, testOptions, scriptArguments));
} else if (!isNotTest) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/internal/test/models/InternalRunnable.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.internal.test.models;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class InternalRunnable implements Runnable, RestrictedRunnable {
+
+ // This is a public field in a restricted class; scripts should not see it.
+ public final int canNotSeeThisField = 42;
+
+ private boolean runExecuted = false;
+
+ @Override
+ public void run() {
+ runExecuted = true;
+ }
+
+ @Override
+ public void restrictedRun() {
+ // This is a public method on a restricted interface; scripts should not see it.
+ throw new AssertionError();
+ }
+
+ @Override
+ public String toString() {
+ final StringWriter sw = new StringWriter();
+ final PrintWriter pw = new PrintWriter(sw);
+ if(runExecuted) {
+ pw.println("InternalRunnable.run() executed!");
+ }
+ pw.println("InternalRunnable.toString() executed!");
+ pw.flush();
+ return sw.toString();
+ }
+
+ public void canNotInvokeThis() {
+ // This is a public method in a restricted class; scripts should not see it.
+ throw new AssertionError();
+ }
+
+ public void getInvisibleProperty() {
+ // This is a public method in a restricted class; scripts should not see it.
+ throw new AssertionError();
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/internal/test/models/RestrictedRunnable.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.internal.test.models;
+
+/**
+ * Acts as a restricted interface implemented by a restricted class.
+ *
+ */
+public interface RestrictedRunnable {
+ public void restrictedRun();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/test/models/InternalRunnableSuperclass.java Mon Aug 12 09:29:06 2013 -0400
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.test.models;
+
+import jdk.internal.dynalink.beans.StaticClass;
+import jdk.nashorn.internal.test.models.InternalRunnable;
+
+/**
+ * Acts as a non-restricted superclass for a restricted class.
+ *
+ */
+public class InternalRunnableSuperclass {
+ public final int canSeeThisField = 19;
+
+ public static Object makeInternalRunnable() {
+ return new InternalRunnable();
+ }
+
+ public static StaticClass getInternalRunnableType() {
+ return StaticClass.forClass(InternalRunnable.class);
+ }
+}