Merge
This commit is contained in:
commit
4478af167f
1
.hgtags
1
.hgtags
@ -222,3 +222,4 @@ ea73f01b9053e7165e7ba80f242bafecbc6af712 jdk8-b96
|
||||
711eb4aa87de68de78250e0549980936bab53d54 jdk8-b98
|
||||
2d3875b0d18b3ad1c2bebf385a697e309e4005a4 jdk8-b99
|
||||
3d34036aae4ea90b2ca59712d5a69db3221f0875 jdk8-b100
|
||||
edb01c460d4cab21ff0ff13512df7b746efaa0e7 jdk8-b101
|
||||
|
@ -222,3 +222,4 @@ a1c1e8bf71f354f3aec0214cf13d6668811e021d jdk8-b97
|
||||
0d0c983a817bbe8518a5ff201306334a8de267f2 jdk8-b98
|
||||
59dc9da813794c924a0383c2a6241af94defdfed jdk8-b99
|
||||
d2dcb110e9dbaf9903c05b211df800e78e4b394e jdk8-b100
|
||||
9f74a220677dc265a724515d8e2617548cef62f1 jdk8-b101
|
||||
|
@ -222,3 +222,4 @@ c8286839d0df04aba819ec4bef12b86babccf30e jdk8-b90
|
||||
3370fb6146e47a6cc05a213fc213e12fc0a38d07 jdk8-b98
|
||||
3f67804ab61303782df57e54989ef5e0e4629beb jdk8-b99
|
||||
8d492f1dfd1b131a4c7886ee6b59528609f7e4fe jdk8-b100
|
||||
a013024b07475782f1fa8e196e950b34b4077663 jdk8-b101
|
||||
|
@ -363,3 +363,5 @@ c9dd82da51ed34a28f7c6b3245163ee962e94572 hs25-b40
|
||||
9f71e36a471ae4a668e08827d33035963ed10c08 hs25-b42
|
||||
5787fac72e760c6a5fd9efa113b0c75caf554136 jdk8-b100
|
||||
46487ba40ff225654d0c51787ed3839bafcbd9f3 hs25-b43
|
||||
f6921c876db192bba389cec062855a66372da01c jdk8-b101
|
||||
530fe88b3b2c710f42810b3580d86a0d83ad6c1c hs25-b44
|
||||
|
@ -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\"
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
||||
|
||||
HS_MAJOR_VER=25
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=43
|
||||
HS_BUILD_NUMBER=44
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
@ -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\"
|
||||
|
@ -42,7 +42,7 @@ define_pd_global(bool, ProfileInterpreter, false);
|
||||
#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);
|
||||
|
||||
|
@ -44,7 +44,7 @@ define_pd_global(bool, ProfileInterpreter, false);
|
||||
#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);
|
||||
|
||||
|
@ -299,7 +299,7 @@ class CompileReplay : public StackObj {
|
||||
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 @@ class CompileReplay : public StackObj {
|
||||
|
||||
// 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 @@ class CompileReplay : public StackObj {
|
||||
//
|
||||
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 @@ class CompileReplay : public StackObj {
|
||||
// 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;
|
||||
|
@ -122,6 +122,22 @@ class MarkRefsIntoClosure: public CMSOopsInGenClosure {
|
||||
}
|
||||
};
|
||||
|
||||
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 {
|
||||
|
@ -569,6 +569,7 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen,
|
||||
_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 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen,
|
||||
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::do_mark_sweep_work(bool clear_all_soft_refs,
|
||||
}
|
||||
|
||||
|
||||
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 @@ CMSPhaseAccounting::~CMSPhaseAccounting() {
|
||||
|
||||
// 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 @@ void CMSCollector::checkpointRootsInitialWork(bool asynch) {
|
||||
// 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 @@ void CMSCollector::preclean() {
|
||||
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 @@ void CMSCollector::sample_eden() {
|
||||
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 @@ void CMSCollector::checkpointRootsFinalWork(bool asynch,
|
||||
// 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 CMSCollector::checkpointRootsFinalWork(bool asynch,
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ class CMSParRemarkTask: public AbstractGangTask {
|
||||
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 @@ class CMSParRemarkTask: public AbstractGangTask {
|
||||
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 @@ class RemarkKlassClosure : public KlassClosure {
|
||||
}
|
||||
};
|
||||
|
||||
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 @@ void CMSParRemarkTask::work(uint worker_id) {
|
||||
// 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 @@ void CMSParRemarkTask::work(uint worker_id) {
|
||||
|
||||
// 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 @@ CMSParRemarkTask::do_work_steal(int i, Par_MarkRefsIntoAndScanClosure* cl,
|
||||
"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 @@ void CMSCollector::reset_survivor_plab_arrays() {
|
||||
|
||||
// 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 @@ void CMSCollector::merge_survivor_plab_arrays(ContiguousSpace* surv,
|
||||
}
|
||||
|
||||
// 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 obj) {
|
||||
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 @@ void ASConcurrentMarkSweepGeneration::shrink_by(size_t desired_bytes) {
|
||||
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 @@ TraceCMSMemoryManagerStats::TraceCMSMemoryManagerStats(CMSCollector::CollectorSt
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -515,6 +515,8 @@ class CMSCollector: public CHeapObj<mtGC> {
|
||||
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 @@ class CMSCollector: public CHeapObj<mtGC> {
|
||||
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 @@ class CMSCollector: public CHeapObj<mtGC> {
|
||||
|
||||
// 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 @@ class CMSCollector: public CHeapObj<mtGC> {
|
||||
|
||||
// Initialization errors
|
||||
bool completed_initialization() { return _completed_initialization; }
|
||||
|
||||
void print_eden_and_survivor_chunk_arrays();
|
||||
};
|
||||
|
||||
class CMSExpansionCause : public AllStatic {
|
||||
@ -1317,6 +1323,10 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
|
||||
//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;
|
||||
|
@ -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.") \
|
||||
\
|
||||
|
@ -314,6 +314,11 @@ void HeapRegion::setup_heap_region_size(uintx min_heap_size) {
|
||||
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);
|
||||
|
||||
|
@ -1033,6 +1033,9 @@ HeapWord* DefNewGeneration::allocate(size_t word_size,
|
||||
// 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 @@ HeapWord* DefNewGeneration::allocate(size_t word_size,
|
||||
// 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) {
|
||||
|
@ -455,6 +455,7 @@ class Generation: public CHeapObj<mtGC> {
|
||||
// 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.
|
||||
|
@ -2254,10 +2254,11 @@ ChunkIndex ChunkManager::list_index(size_t size) {
|
||||
|
||||
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.
|
||||
|
@ -65,7 +65,8 @@ SharedHeap::SharedHeap(CollectorPolicy* policy_) :
|
||||
}
|
||||
_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,
|
||||
|
@ -1891,6 +1891,10 @@ void Arguments::check_deprecated_gc_flags() {
|
||||
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
|
||||
|
@ -1689,6 +1689,9 @@ class CommandLineFlags {
|
||||
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 @@ class CommandLineFlags {
|
||||
"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)") \
|
||||
\
|
||||
|
64
hotspot/test/gc/arguments/TestG1HeapRegionSize.java
Normal file
64
hotspot/test/gc/arguments/TestG1HeapRegionSize.java
Normal file
@ -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];
|
||||
}
|
||||
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
* @bug 8014240
|
||||
* @summary Test output of G1PrintRegionRememberedSetInfo
|
||||
* @library /testlibrary
|
||||
* @build TestPrintRegionRememberedSetInfo
|
||||
* @run main TestPrintRegionRememberedSetInfo
|
||||
* @author thomas.schatzl@oracle.com
|
||||
*/
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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 @@ echo "TESTSRC=${TESTSRC}"
|
||||
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 @@ echo "VM type: ${VMTYPE}"
|
||||
# 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 $?
|
||||
|
@ -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 @@ OS=`uname -s`
|
||||
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 @@ THIS_DIR=.
|
||||
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
|
||||
|
||||
|
@ -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 @@ OS=`uname -s`
|
||||
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 @@ THIS_DIR=.
|
||||
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 \
|
||||
|
@ -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 @@ extern "C" {
|
||||
#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) {
|
||||
|
@ -222,3 +222,4 @@ b8c5f4b6f0fffb44618fc609a584953c4ed67c0b jdk8-b95
|
||||
15e5bb51bc0cd89304dc2f7f29b4c8002e632353 jdk8-b98
|
||||
adf49c3ef83c160d53ece623049b2cdccaf78fc7 jdk8-b99
|
||||
5d1974c1d7b9a86431bc253dc5a6a52d4586622e jdk8-b100
|
||||
0a7432f898e579ea35e8c51e3edab37f949168e4 jdk8-b101
|
||||
|
@ -112,7 +112,7 @@ public class SAXParserImpl extends javax.xml.parsers.SAXParser
|
||||
/** 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 @@ public class SAXParserImpl extends javax.xml.parsers.SAXParser
|
||||
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 @@ public class SAXParserImpl extends javax.xml.parsers.SAXParser
|
||||
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 @@ public class SAXParserImpl extends javax.xml.parsers.SAXParser
|
||||
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 @@ public class SAXParserImpl extends javax.xml.parsers.SAXParser
|
||||
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 @@ public class SAXParserImpl extends javax.xml.parsers.SAXParser
|
||||
// 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);
|
||||
|
@ -222,3 +222,4 @@ dcde7f049111353ad23175f54985a4f6bfea720c jdk8-b97
|
||||
b1fb4612a2caea52b5661b87509e560fa044b194 jdk8-b98
|
||||
8ef83d4b23c933935e28f59b282cea920b1b1f5f jdk8-b99
|
||||
4fd722afae5c02f00bbd44c3a34425ee474afb1c jdk8-b100
|
||||
60b623a361642a0f5aef5f06dad9e5f279b9d9a9 jdk8-b101
|
||||
|
@ -222,3 +222,4 @@ a2a2a91075ad85becbe10a39d7fd04ef9bea8df5 jdk8-b92
|
||||
c4908732fef5235f1b98cafe0ce507771ef7892c jdk8-b98
|
||||
6a099a36589bd933957272ba63e5263bede29971 jdk8-b99
|
||||
5be9c5bfcfe9b2a40412b4fb364377d49de014eb jdk8-b100
|
||||
6901612328239fbd471d20823113c1cf3fdaebee jdk8-b101
|
||||
|
@ -21,4 +21,4 @@
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
tzdata2013c
|
||||
tzdata2013d
|
||||
|
@ -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 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
|
||||
# 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 2019 - Apr lastSun 2:00 1:00 S
|
||||
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 -
|
||||
|
@ -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.
|
||||
|
@ -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 2011 only - Oct 2 2:00 0 S
|
||||
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 2006 only - Sep 22 0:00 0 -
|
||||
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...
|
||||
|
@ -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 @@ Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb
|
||||
# - 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 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
|
||||
# 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 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
|
||||
# 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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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 @@ Rule C-Eur 1944 only - Oct 2 2:00s 0 -
|
||||
# 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 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
|
||||
|
||||
# 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 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
|
||||
# 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:
|
||||
#
|
||||
|
@ -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.
|
||||
|
@ -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>
|
||||
# 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):
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
#
|
||||
# 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 @@ BL St Barthelemy
|
||||
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 @@ SR Suriname
|
||||
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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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 @@ Rule Brazil 2007 only - Feb 25 0:00 0 -
|
||||
# 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 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
|
||||
# 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
|
||||
|
@ -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.
|
||||
|
@ -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 -0002+10920 Asia/Pontianak west & central Borneo
|
||||
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
|
||||
|
100
jdk/make/tools/CharsetMapping/IBM290.c2b
Normal file
100
jdk/make/tools/CharsetMapping/IBM290.c2b
Normal file
@ -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
|
232
jdk/make/tools/CharsetMapping/IBM290.map
Normal file
232
jdk/make/tools/CharsetMapping/IBM290.map
Normal file
@ -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
|
50
jdk/make/tools/CharsetMapping/IBM300.c2b
Normal file
50
jdk/make/tools/CharsetMapping/IBM300.c2b
Normal file
@ -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
|
11644
jdk/make/tools/CharsetMapping/IBM300.map
Normal file
11644
jdk/make/tools/CharsetMapping/IBM300.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,7 @@ PCK x-PCK PCK basic sun.nio.cs.ext true 0x81 0xfc 0x40
|
||||
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
|
||||
|
@ -28,6 +28,7 @@ IBM278 IBM278 Cp278 false sun.nio.cs.ext
|
||||
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
|
||||
|
@ -196,11 +196,14 @@ public class DBCS {
|
||||
|
||||
// (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()) {
|
||||
|
@ -605,7 +605,23 @@ public class CLDRConverter {
|
||||
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)) {
|
||||
|
@ -31,7 +31,8 @@ import java.util.Locale;
|
||||
* 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 @@ enum CalendarType {
|
||||
{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 @@ enum CalendarType {
|
||||
|
||||
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;
|
||||
|
@ -31,6 +31,7 @@ import java.awt.peer.MenuComponentPeer;
|
||||
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 @@ class _AppMenuBarHandler {
|
||||
// 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 @@ class _AppMenuBarHandler {
|
||||
// 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 @@ class _AppMenuBarHandler {
|
||||
}
|
||||
|
||||
// grab the pointer to the CMenuBar, and retain it in native
|
||||
nativeSetDefaultMenuBar(((CMenuBar)peer).getNativeMenuBarPeer());
|
||||
*/
|
||||
nativeSetDefaultMenuBar(((CMenuBar)peer).getModel());
|
||||
}
|
||||
|
||||
void setAboutMenuItemVisible(final boolean present) {
|
||||
|
@ -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 java.util.*;
|
||||
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
// 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 @@ public class CStrike extends FontStrike {
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
return strikeMetrics;
|
||||
}
|
||||
|
||||
float getGlyphAdvance(int glyphCode) {
|
||||
return getScaledAdvanceForAdvance(getCachedNativeGlyphAdvance(glyphCode));
|
||||
@Override
|
||||
float getGlyphAdvance(final int glyphCode) {
|
||||
return 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);
|
||||
@Override
|
||||
float getCodePointAdvance(final int cp) {
|
||||
return getGlyphAdvance(nativeFont.getMapper().charToGlyph(cp));
|
||||
}
|
||||
|
||||
// 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
|
||||
Point2D.Float getCharMetrics(final char ch) {
|
||||
return getGlyphMetrics(nativeFont.getMapper().charToGlyph(ch));
|
||||
}
|
||||
|
||||
Point2D.Float getCharMetrics(char ch) {
|
||||
return getScaledPointForAdvance(getCachedNativeGlyphAdvance(nativeFont.getMapper().charToGlyph(ch)));
|
||||
}
|
||||
|
||||
Point2D.Float getGlyphMetrics(int glyphCode) {
|
||||
return getScaledPointForAdvance(getCachedNativeGlyphAdvance(glyphCode));
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
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 @@ public class CStrike extends FontStrike {
|
||||
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;
|
||||
|
@ -182,7 +182,11 @@ public class CDataTransferer extends DataTransferer {
|
||||
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);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public abstract class CMenuComponent implements MenuComponentPeer {
|
||||
return target;
|
||||
}
|
||||
|
||||
long getModel() {
|
||||
public long getModel() {
|
||||
return modelPtr;
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ import com.apple.laf.ClientPropertyApplicator.Property;
|
||||
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 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
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) {
|
||||
|
@ -103,7 +103,6 @@ NSDictionary *realmConfigsForRealms(SCDynamicStoreRef store, NSArray *realms) {
|
||||
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 @@ JNF_COCOA_ENTER(env);
|
||||
|
||||
SCDynamicStoreRef store = SCDynamicStoreCreate(NULL, CFSTR("java"), _SCDynamicStoreCallBack, NULL);
|
||||
if (store == NULL) {
|
||||
NSLog(@"Unable to load SCDynamicStore to install NotificationCallback");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -171,19 +169,11 @@ JNF_COCOA_ENTER(env);
|
||||
|
||||
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 @@ JNF_COCOA_ENTER(env);
|
||||
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);
|
||||
|
@ -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;
|
||||
|
@ -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 @@ static JNF_CLASS_CACHE(jc_CPlatformWindow, "sun/lwawt/macosx/CPlatformWindow");
|
||||
// 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 @@ AWT_NS_WINDOW_IMPLEMENTATION
|
||||
@synthesize javaMaxSize;
|
||||
@synthesize styleBits;
|
||||
@synthesize isEnabled;
|
||||
@synthesize ownerWindow;
|
||||
|
||||
- (void) updateMinMaxSize:(BOOL)resizable {
|
||||
if (resizable) {
|
||||
@ -201,6 +203,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
|
||||
}
|
||||
|
||||
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)platformWindow
|
||||
ownerWindow:owner
|
||||
styleBits:(jint)bits
|
||||
frameRect:(NSRect)rect
|
||||
contentView:(NSView *)view
|
||||
@ -245,6 +248,7 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
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 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
[self.javaPlatformWindow setJObject:nil withEnv:env];
|
||||
|
||||
self.nsWindow = nil;
|
||||
|
||||
self.ownerWindow = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@ -539,11 +543,27 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
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 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
[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 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
* 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 @@ JNF_COCOA_ENTER(env);
|
||||
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 @@ JNF_COCOA_ENTER(env);
|
||||
|
||||
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];
|
||||
}
|
||||
}];
|
||||
|
||||
|
@ -63,7 +63,7 @@ static BOOL sSetupHelpMenu = NO;
|
||||
if (excludingAppleMenu && ![currMenu isJavaMenu]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
[currItem setSubmenu:nil];
|
||||
[theMainMenu removeItemAtIndex:index];
|
||||
}
|
||||
|
||||
@ -154,7 +154,10 @@ static BOOL sSetupHelpMenu = NO;
|
||||
// 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;
|
||||
|
@ -70,9 +70,15 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
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 @@ JNF_COCOA_ENTER(env);
|
||||
eventKey = [NSString stringWithCharacters: &newChar length: 1];
|
||||
}
|
||||
|
||||
if ([menuKey isEqualToString:eventKey]) {
|
||||
NSWindow *keyWindow = [NSApp keyWindow];
|
||||
if ([menuKey isEqualToString:eventKey] && keyWindow != nil) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 @@ static CGAffineTransform sInverseTX = { 1, 0, 0, -1, 0, 0 };
|
||||
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 @@ Java_sun_font_CStrike_getNativeGlyphAdvance
|
||||
{
|
||||
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 @@ JNF_COCOA_ENTER(env);
|
||||
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;
|
||||
|
@ -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 @@ CGGI_ClearCanvas(CGGI_GlyphCanvas *canvas, GlyphInfo *info)
|
||||
#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 @@ CGGI_CreateNewGlyphInfoFrom(CGSize advance, CGRect bbox,
|
||||
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 @@ CGGI_CreateImageForUnicode
|
||||
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 @@ CGGI_CreateGlyphInfos(jlong *glyphInfos, const AWTStrike *strike,
|
||||
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 @@ CGGI_CreateGlyphInfos(jlong *glyphInfos, const AWTStrike *strike,
|
||||
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;
|
||||
|
@ -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}"
|
||||
|
||||
|
@ -499,7 +499,8 @@ public class WindowsComboBoxUI extends BasicComboBoxUI {
|
||||
|
||||
public void setItem(Object item) {
|
||||
super.setItem(item);
|
||||
if (editor.hasFocus()) {
|
||||
Object focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
|
||||
if ((focus == editor) || (focus == editor.getParent())) {
|
||||
editor.selectAll();
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ import org.w3c.dom.Element;
|
||||
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
|
||||
|
@ -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 javax.security.auth.PrivateCredentialPermission;
|
||||
|
||||
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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
* @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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
*
|
||||
* @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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
/**
|
||||
* 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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
* 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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
// 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 @@ public class PolicyFile extends javax.security.auth.Policy {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
class PolicyPermissions extends PermissionCollection {
|
||||
|
||||
private static final long serialVersionUID = -1954188373270545523L;
|
||||
|
@ -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.security.cert.Certificate;
|
||||
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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
});
|
||||
|
||||
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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
* <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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
* <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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
*/
|
||||
public boolean implies(CodeSource codesource) {
|
||||
|
||||
LinkedList<PolicyParser.PrincipalEntry> subjectList = null;
|
||||
LinkedList<PrincipalEntry> subjectList = null;
|
||||
|
||||
if (codesource == null ||
|
||||
!(codesource instanceof SubjectCodeSource) ||
|
||||
@ -197,20 +198,19 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
* <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 @@ class SubjectCodeSource extends CodeSource implements java.io.Serializable {
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
@ -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
|
||||
|
@ -151,7 +151,7 @@ function JavaClassProto() {
|
||||
while (tmp != null) {
|
||||
res[res.length] = tmp;
|
||||
tmp = tmp.superclass;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -263,16 +263,19 @@ function wrapJavaObject(thing) {
|
||||
|
||||
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 @@ function wrapJavaObject(thing) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return theJavaClassProto[name] != undefined;
|
||||
return false;
|
||||
},
|
||||
__get__ : function(name) {
|
||||
for (var i in fields) {
|
||||
@ -305,7 +308,7 @@ function wrapJavaObject(thing) {
|
||||
return wrapJavaValue(fields[i].value);
|
||||
}
|
||||
}
|
||||
return theJavaClassProto[name];
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,7 +325,12 @@ function wrapJavaObject(thing) {
|
||||
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 @@ function wrapJavaObject(thing) {
|
||||
__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 @@ function wrapJavaObject(thing) {
|
||||
__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 @@ function wrapJavaObject(thing) {
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
__call__: function(name) {
|
||||
if (name == 'toString') {
|
||||
return array.valueString(true);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return javaObject(thing);
|
||||
@ -673,34 +687,33 @@ function wrapHeapSnapshot(heap) {
|
||||
__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 @@ function toHtml(obj) {
|
||||
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 @@ function toHtml(obj) {
|
||||
}
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ bound to a JavaScript variable of the identifier name specified in <span class="
|
||||
<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 @@ bound to a JavaScript variable of the identifier name specified in <span class="
|
||||
<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 @@ Examples:
|
||||
<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 @@ Examples:
|
||||
<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 @@ refer to the following built-in variables.
|
||||
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 @@ Examples:
|
||||
<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 @@ Examples:
|
||||
<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 @@ and walk until parent is null using the callback function to map call.
|
||||
|
||||
<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) {
|
||||
|
@ -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 @@ public interface AppletContext {
|
||||
|
||||
/**
|
||||
* 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 @@ public interface AppletContext {
|
||||
* @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
|
||||
|
@ -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 @@ package java.awt;
|
||||
|
||||
|
||||
/**
|
||||
* Signals that an Absract Window Toolkit exception has occurred.
|
||||
* Signals that an Abstract Window Toolkit exception has occurred.
|
||||
*
|
||||
* @author Arthur van Hoff
|
||||
*/
|
||||
|
@ -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 @@ public interface AppletInitializer {
|
||||
* 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
|
||||
|
@ -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 @@ public class Beans {
|
||||
* <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 @@ public class Beans {
|
||||
* <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 @@ public class Beans {
|
||||
* 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 @@ public class Beans {
|
||||
* 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 @@ public class Beans {
|
||||
return Introspector.isSubclass(bean.getClass(), targetType);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test if we are in design-mode.
|
||||
*
|
||||
|
@ -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 @@ import static java.lang.annotation.RetentionPolicy.*;
|
||||
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
|
||||
*/
|
||||
|
@ -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 @@ public class DefaultPersistenceDelegate extends PersistenceDelegate {
|
||||
* 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.
|
||||
|
@ -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 @@ public class EventHandler implements InvocationHandler {
|
||||
*</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 @@ public class EventHandler implements InvocationHandler {
|
||||
*</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 @@ public class EventHandler implements InvocationHandler {
|
||||
* </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
|
||||
|
@ -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 @@ public class Expression extends Statement {
|
||||
* 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 @@ public class Expression extends Statement {
|
||||
* @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) {
|
||||
|
@ -207,6 +207,8 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
|
||||
* 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 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
|
||||
* 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 {
|
||||
|
@ -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 @@ import sun.reflect.misc.ReflectUtil;
|
||||
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 @@ public class Introspector {
|
||||
* 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
|
||||
|
@ -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 @@ public abstract class PersistenceDelegate {
|
||||
* 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.
|
||||
|
@ -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 @@ public class PropertyChangeSupport implements Serializable {
|
||||
* <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 @@ public class PropertyChangeSupport implements Serializable {
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*</pre>
|
||||
* }</pre>
|
||||
*
|
||||
* @see PropertyChangeListenerProxy
|
||||
* @return all of the <code>PropertyChangeListeners</code> added or an
|
||||
|
@ -243,6 +243,7 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
||||
* 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 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
||||
* 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 {
|
||||
|
@ -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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
* 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
* 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 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
@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;
|
||||
}
|
||||
|
@ -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 @@ import java.util.Map.Entry;
|
||||
* <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 @@ import java.util.Map.Entry;
|
||||
*
|
||||
* [...]
|
||||
* }
|
||||
* </pre>
|
||||
* }</pre>
|
||||
* <p>
|
||||
* A {@code VetoableChangeSupport} instance is thread-safe.
|
||||
* <p>
|
||||
@ -156,7 +156,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
* <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 @@ public class VetoableChangeSupport implements Serializable {
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*</pre>
|
||||
* }</pre>
|
||||
*
|
||||
* @see VetoableChangeListenerProxy
|
||||
* @return all of the <code>VetoableChangeListeners</code> added or an
|
||||
|
@ -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 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
|
||||
* 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 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
|
||||
* @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 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
|
||||
* @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 @@ public interface BeanContext extends BeanContextChild, Collection, DesignMode, V
|
||||
* 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);
|
||||
|
||||
|
@ -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 @@ public interface BeanContextChild {
|
||||
* </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;
|
||||
|
@ -78,6 +78,7 @@ public class BeanContextChildSupport implements BeanContextChild, BeanContextSer
|
||||
* 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 @@ public class BeanContextChildSupport implements BeanContextChild, BeanContextSer
|
||||
* 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 @@ public class BeanContextChildSupport implements BeanContextChild, BeanContextSer
|
||||
*/
|
||||
protected VetoableChangeSupport vcSupport;
|
||||
|
||||
/**
|
||||
* The bean context.
|
||||
*/
|
||||
protected transient BeanContext beanContext;
|
||||
|
||||
/**
|
||||
|
@ -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 @@ public class BeanContextMembershipEvent extends BeanContextEvent {
|
||||
* 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);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user