--- a/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -307,3 +307,4 @@
e7dbbef69d12b6a74dfad331b7188e7f893e8d29 jdk9-b62
989253a902c34dcb7564695161c9200a5fbb7412 jdk9-b63
8ffdeabc7c2b9a8280bf46cae026ac46b4d31c26 jdk9-b64
+4915246064b2f89d5f00c96e758686b7fdad36a6 jdk9-b65
--- a/.hgtags-top-repo Fri May 22 09:14:18 2015 +0200
+++ b/.hgtags-top-repo Fri May 29 12:49:31 2015 +0200
@@ -307,3 +307,4 @@
105d045a69174d870b69bfe471b3f2d05a9f8ecc jdk9-b62
0b32ed628fa60e4ab99fb0b5866d648e16231f17 jdk9-b63
82cf9aab9a83e41c8194ba01af9666afdb856cbe jdk9-b64
+7c31f9d7b932f7924f1258d52885b1c7c3e078c2 jdk9-b65
--- a/common/bin/compare_exceptions.sh.incl Fri May 22 09:14:18 2015 +0200
+++ b/common/bin/compare_exceptions.sh.incl Fri May 29 12:49:31 2015 +0200
@@ -83,7 +83,6 @@
./bin/jcmd
./bin/jconsole
./bin/jdb
-./bin/jhat
./bin/jimage
./bin/jinfo
./bin/jjs
@@ -163,7 +162,6 @@
./bin/jcmd
./bin/jconsole
./bin/jdb
-./bin/jhat
./bin/jimage
./bin/jinfo
./bin/jjs
@@ -284,7 +282,6 @@
./bin/jcmd
./bin/jconsole
./bin/jdb
-./bin/jhat
./bin/jimage
./bin/jinfo
./bin/jjs
@@ -420,7 +417,6 @@
./bin/jcmd
./bin/jconsole
./bin/jdb
-./bin/jhat
./bin/jimage
./bin/jinfo
./bin/jjs
@@ -499,7 +495,6 @@
./bin/jcmd.exe
./bin/jconsole.exe
./bin/jdb.exe
-./bin/jhat.exe
./bin/jimage.exe
./bin/jinfo.exe
./bin/jjs.exe
@@ -579,7 +574,6 @@
./bin/jcmd
./bin/jconsole
./bin/jdb
-./bin/jhat
./bin/jimage
./bin/jinfo
./bin/jjs
--- a/corba/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/corba/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -307,3 +307,4 @@
d27f7e0a7aca129969de23e9934408a31b4abf4c jdk9-b62
0acac6937de7a0868f8c6f88b7d036d780abeee6 jdk9-b63
0a5e5a7c3539e8bde73d9fe55750e49a49cb8dac jdk9-b64
+afc1e295c4bf83f9a5dd539c29914edd4a754a3f jdk9-b65
--- a/hotspot/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -467,3 +467,4 @@
1eab877142cce6ca06e556e2ad0af688f993f00b jdk9-b62
2ac9b6b36689b50d1562627067c92d51781b5684 jdk9-b63
bf92b8db249cdfa5651ef954b6c0743a7e0ea4cd jdk9-b64
+e7ae94c4f35e940ea423fc1dd260435df34a77c0 jdk9-b65
--- a/hotspot/make/sa.files Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/make/sa.files Fri May 29 12:49:31 2015 +0200
@@ -79,8 +79,10 @@
$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windows/x86/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windows/amd64/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/x86/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/cms/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/g1/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/parallel/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/serial/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/gc/shared/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/interpreter/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/jdi/*.java \
--- a/hotspot/src/os/windows/vm/os_windows.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/os/windows/vm/os_windows.cpp Fri May 29 12:49:31 2015 +0200
@@ -3768,7 +3768,7 @@
return NULL;
}
-#define EXIT_TIMEOUT PRODUCT_ONLY(1000) NOT_PRODUCT(4000) /* 1 sec in product, 4 sec in debug */
+#define EXIT_TIMEOUT 300000 /* 5 minutes */
static BOOL CALLBACK init_crit_sect_call(PINIT_ONCE, PVOID pcrit_sect, PVOID*) {
InitializeCriticalSection((CRITICAL_SECTION*)pcrit_sect);
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp Fri May 29 12:49:31 2015 +0200
@@ -1469,7 +1469,9 @@
} else {
guarantee(in_bytes(PtrQueue::byte_width_of_active()) == 1,
"Assumption");
- flag_type = T_BYTE;
+ // Use unsigned type T_BOOLEAN here rather than signed T_BYTE since some platforms, eg. ARM,
+ // need to use unsigned instructions to use the large offset to load the satb_mark_queue.
+ flag_type = T_BOOLEAN;
}
LIR_Opr thrd = getThreadPointer();
LIR_Address* mark_active_flag_addr =
--- a/hotspot/src/share/vm/gc/cms/cmsOopClosures.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/cmsOopClosures.hpp Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,7 @@
#define SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
#include "gc/shared/genOopClosures.hpp"
+#include "gc/shared/taskqueue.hpp"
#include "memory/iterator.hpp"
/////////////////////////////////////////////////////////////////
--- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp Fri May 29 12:49:31 2015 +0200
@@ -641,6 +641,7 @@
class FreeListSpace_DCTOC : public Filtering_DCTOC {
CompactibleFreeListSpace* _cfls;
CMSCollector* _collector;
+ bool _parallel;
protected:
// Override.
#define walk_mem_region_with_cl_DECL(ClosureType) \
@@ -661,9 +662,10 @@
CMSCollector* collector,
ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary) :
+ HeapWord* boundary,
+ bool parallel) :
Filtering_DCTOC(sp, cl, precision, boundary),
- _cfls(sp), _collector(collector) {}
+ _cfls(sp), _collector(collector), _parallel(parallel) {}
};
// We de-virtualize the block-related calls below, since we know that our
@@ -674,10 +676,7 @@
HeapWord* bottom, \
HeapWord* top, \
ClosureType* cl) { \
- bool is_par = GenCollectedHeap::heap()->n_par_threads() > 0; \
- if (is_par) { \
- assert(GenCollectedHeap::heap()->n_par_threads() == \
- GenCollectedHeap::heap()->workers()->active_workers(), "Mismatch"); \
+ if (_parallel) { \
walk_mem_region_with_cl_par(mr, bottom, top, cl); \
} else { \
walk_mem_region_with_cl_nopar(mr, bottom, top, cl); \
@@ -747,8 +746,9 @@
DirtyCardToOopClosure*
CompactibleFreeListSpace::new_dcto_cl(ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary) {
- return new FreeListSpace_DCTOC(this, _collector, cl, precision, boundary);
+ HeapWord* boundary,
+ bool parallel) {
+ return new FreeListSpace_DCTOC(this, _collector, cl, precision, boundary, parallel);
}
@@ -1897,11 +1897,9 @@
assert(chunk->is_free() && ffc->is_free(), "Error");
_bt.split_block((HeapWord*)chunk, chunk->size(), new_size);
if (rem_sz < SmallForDictionary) {
- bool is_par = (GenCollectedHeap::heap()->n_par_threads() > 0);
+ // The freeList lock is held, but multiple GC task threads might be executing in parallel.
+ bool is_par = Thread::current()->is_GC_task_thread();
if (is_par) _indexedFreeListParLocks[rem_sz]->lock();
- assert(!is_par ||
- (GenCollectedHeap::heap()->n_par_threads() ==
- GenCollectedHeap::heap()->workers()->active_workers()), "Mismatch");
returnChunkToFreeList(ffc);
split(size, rem_sz);
if (is_par) _indexedFreeListParLocks[rem_sz]->unlock();
@@ -1972,8 +1970,6 @@
bool CompactibleFreeListSpace::no_allocs_since_save_marks() {
assert(_promoInfo.tracking(), "No preceding save_marks?");
- assert(GenCollectedHeap::heap()->n_par_threads() == 0,
- "Shouldn't be called if using parallel gc.");
return _promoInfo.noPromotions();
}
@@ -1981,8 +1977,6 @@
\
void CompactibleFreeListSpace:: \
oop_since_save_marks_iterate##nv_suffix(OopClosureType* blk) { \
- assert(GenCollectedHeap::heap()->n_par_threads() == 0, \
- "Shouldn't be called (yet) during parallel part of gc."); \
_promoInfo.promoted_oops_iterate##nv_suffix(blk); \
/* \
* This also restores any displaced headers and removes the elements from \
--- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.hpp Fri May 29 12:49:31 2015 +0200
@@ -438,7 +438,8 @@
// Override: provides a DCTO_CL specific to this kind of space.
DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary);
+ HeapWord* boundary,
+ bool parallel);
void blk_iterate(BlkClosure* cl);
void blk_iterate_careful(BlkClosureCareful* cl);
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp Fri May 29 12:49:31 2015 +0200
@@ -2428,14 +2428,18 @@
MarkRefsIntoClosure notOlder(_span, verification_mark_bm());
gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
- gch->gen_process_roots(_cmsGen->level(),
- true, // younger gens are roots
- true, // activate StrongRootsScope
- GenCollectedHeap::ScanningOption(roots_scanning_options()),
- should_unload_classes(),
- ¬Older,
- NULL,
- NULL); // SSS: Provide correct closure
+ {
+ StrongRootsScope srs(1);
+
+ gch->gen_process_roots(&srs,
+ _cmsGen->level(),
+ true, // younger gens are roots
+ GenCollectedHeap::ScanningOption(roots_scanning_options()),
+ should_unload_classes(),
+ ¬Older,
+ NULL,
+ NULL);
+ }
// Now mark from the roots
MarkFromRootsClosure markFromRootsClosure(this, _span,
@@ -2496,14 +2500,18 @@
gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
- gch->gen_process_roots(_cmsGen->level(),
- true, // younger gens are roots
- true, // activate StrongRootsScope
- GenCollectedHeap::ScanningOption(roots_scanning_options()),
- should_unload_classes(),
- ¬Older,
- NULL,
- &cld_closure);
+ {
+ StrongRootsScope srs(1);
+
+ gch->gen_process_roots(&srs,
+ _cmsGen->level(),
+ true, // younger gens are roots
+ GenCollectedHeap::ScanningOption(roots_scanning_options()),
+ should_unload_classes(),
+ ¬Older,
+ NULL,
+ &cld_closure);
+ }
// Now mark from the roots
MarkFromRootsVerifyClosure markFromRootsClosure(this, _span,
@@ -2913,10 +2921,11 @@
// Parallel initial mark task
class CMSParInitialMarkTask: public CMSParMarkTask {
+ StrongRootsScope* _strong_roots_scope;
public:
- CMSParInitialMarkTask(CMSCollector* collector, uint n_workers) :
- CMSParMarkTask("Scan roots and young gen for initial mark in parallel",
- collector, n_workers) {}
+ CMSParInitialMarkTask(CMSCollector* collector, StrongRootsScope* strong_roots_scope, uint n_workers) :
+ CMSParMarkTask("Scan roots and young gen for initial mark in parallel", collector, n_workers),
+ _strong_roots_scope(strong_roots_scope) {}
void work(uint worker_id);
};
@@ -3004,24 +3013,26 @@
FlexibleWorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
uint n_workers = workers->active_workers();
- CMSParInitialMarkTask tsk(this, n_workers);
- gch->set_par_threads(n_workers);
+
+ StrongRootsScope srs(n_workers);
+
+ CMSParInitialMarkTask tsk(this, &srs, n_workers);
initialize_sequential_subtasks_for_young_gen_rescan(n_workers);
if (n_workers > 1) {
- StrongRootsScope srs;
workers->run_task(&tsk);
} else {
- StrongRootsScope srs;
tsk.work(0);
}
- gch->set_par_threads(0);
} else {
// The serial version.
CLDToOopClosure cld_closure(¬Older, true);
gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
- gch->gen_process_roots(_cmsGen->level(),
+
+ StrongRootsScope srs(1);
+
+ gch->gen_process_roots(&srs,
+ _cmsGen->level(),
true, // younger gens are roots
- true, // activate StrongRootsScope
GenCollectedHeap::ScanningOption(roots_scanning_options()),
should_unload_classes(),
¬Older,
@@ -4452,9 +4463,9 @@
CLDToOopClosure cld_closure(&par_mri_cl, true);
- gch->gen_process_roots(_collector->_cmsGen->level(),
+ gch->gen_process_roots(_strong_roots_scope,
+ _collector->_cmsGen->level(),
false, // yg was scanned above
- false, // this is parallel code
GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
_collector->should_unload_classes(),
&par_mri_cl,
@@ -4478,6 +4489,7 @@
// The per-thread work queues, available here for stealing.
OopTaskQueueSet* _task_queues;
ParallelTaskTerminator _term;
+ StrongRootsScope* _strong_roots_scope;
public:
// A value of 0 passed to n_workers will cause the number of
@@ -4485,12 +4497,14 @@
CMSParRemarkTask(CMSCollector* collector,
CompactibleFreeListSpace* cms_space,
uint n_workers, FlexibleWorkGang* workers,
- OopTaskQueueSet* task_queues):
+ OopTaskQueueSet* task_queues,
+ StrongRootsScope* strong_roots_scope):
CMSParMarkTask("Rescan roots and grey objects in parallel",
collector, n_workers),
_cms_space(cms_space),
_task_queues(task_queues),
- _term(n_workers, task_queues) { }
+ _term(n_workers, task_queues),
+ _strong_roots_scope(strong_roots_scope) { }
OopTaskQueueSet* task_queues() { return _task_queues; }
@@ -4588,9 +4602,9 @@
// ---------- remaining roots --------------
_timer.reset();
_timer.start();
- gch->gen_process_roots(_collector->_cmsGen->level(),
+ gch->gen_process_roots(_strong_roots_scope,
+ _collector->_cmsGen->level(),
false, // yg was scanned above
- false, // this is parallel code
GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
_collector->should_unload_classes(),
&par_mrias_cl,
@@ -5058,22 +5072,15 @@
FlexibleWorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
// Choose to use the number of GC workers most recently set
- // into "active_workers". If active_workers is not set, set it
- // to ParallelGCThreads.
+ // into "active_workers".
uint n_workers = workers->active_workers();
- if (n_workers == 0) {
- assert(n_workers > 0, "Should have been set during scavenge");
- n_workers = ParallelGCThreads;
- workers->set_active_workers(n_workers);
- }
+
CompactibleFreeListSpace* cms_space = _cmsGen->cmsSpace();
- CMSParRemarkTask tsk(this,
- cms_space,
- n_workers, workers, task_queues());
-
- // Set up for parallel process_roots work.
- gch->set_par_threads(n_workers);
+ StrongRootsScope srs(n_workers);
+
+ CMSParRemarkTask tsk(this, cms_space, n_workers, workers, task_queues(), &srs);
+
// We won't be iterating over the cards in the card table updating
// the younger_gen cards, so we shouldn't call the following else
// the verification code as well as subsequent younger_refs_iterate
@@ -5105,15 +5112,12 @@
// necessarily be so, since it's possible that we are doing
// ST marking.
ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), true);
- StrongRootsScope srs;
workers->run_task(&tsk);
} else {
ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), false);
- StrongRootsScope srs;
tsk.work(0);
}
- gch->set_par_threads(0); // 0 ==> non-parallel.
// restore, single-threaded for now, any preserved marks
// as a result of work_q overflow
restore_preserved_marks_if_any();
@@ -5177,11 +5181,11 @@
verify_work_stacks_empty();
gch->rem_set()->prepare_for_younger_refs_iterate(false); // Not parallel.
- StrongRootsScope srs;
-
- gch->gen_process_roots(_cmsGen->level(),
+ StrongRootsScope srs(1);
+
+ gch->gen_process_roots(&srs,
+ _cmsGen->level(),
true, // younger gens as roots
- false, // use the local StrongRootsScope
GenCollectedHeap::ScanningOption(roots_scanning_options()),
should_unload_classes(),
&mrias_cl,
@@ -5254,18 +5258,14 @@
CMSBitMap* mark_bit_map,
AbstractWorkGang* workers,
OopTaskQueueSet* task_queues):
- // XXX Should superclass AGTWOQ also know about AWG since it knows
- // about the task_queues used by the AWG? Then it could initialize
- // the terminator() object. See 6984287. The set_for_termination()
- // below is a temporary band-aid for the regression in 6984287.
AbstractGangTaskWOopQueues("Process referents by policy in parallel",
- task_queues),
+ task_queues,
+ workers->active_workers()),
_task(task),
_collector(collector), _span(span), _mark_bit_map(mark_bit_map)
{
assert(_collector->_span.equals(_span) && !_span.is_empty(),
"Inconsistency in _span");
- set_for_termination(workers->active_workers());
}
OopTaskQueueSet* task_queues() { return queues(); }
--- a/hotspot/src/share/vm/gc/cms/parCardTableModRefBS.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/parCardTableModRefBS.cpp Fri May 29 12:49:31 2015 +0200
@@ -39,16 +39,11 @@
void CardTableModRefBS::non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
OopsInGenClosure* cl,
CardTableRS* ct,
- int n_threads) {
- assert(n_threads > 0, "Error: expected n_threads > 0");
- assert((n_threads == 1 && ParallelGCThreads == 0) ||
- n_threads <= (int)ParallelGCThreads,
- "# worker threads != # requested!");
- assert(!Thread::current()->is_VM_thread() || (n_threads == 1), "There is only 1 VM thread");
- assert(UseDynamicNumberOfGCThreads ||
- !FLAG_IS_DEFAULT(ParallelGCThreads) ||
- n_threads == (int)ParallelGCThreads,
- "# worker threads != # requested!");
+ uint n_threads) {
+ assert(n_threads > 0, "expected n_threads > 0");
+ assert(n_threads <= ParallelGCThreads,
+ err_msg("n_threads: %u > ParallelGCThreads: " UINTX_FORMAT, n_threads, ParallelGCThreads));
+
// Make sure the LNC array is valid for the space.
jbyte** lowest_non_clean;
uintptr_t lowest_non_clean_base_chunk_index;
@@ -66,7 +61,8 @@
uint stride = 0;
while (!pst->is_task_claimed(/* reference */ stride)) {
- process_stride(sp, mr, stride, n_strides, cl, ct,
+ process_stride(sp, mr, stride, n_strides,
+ cl, ct,
lowest_non_clean,
lowest_non_clean_base_chunk_index,
lowest_non_clean_chunk_size);
@@ -132,9 +128,13 @@
assert(chunk_mr.word_size() > 0, "[chunk_card_start > used_end)");
assert(used.contains(chunk_mr), "chunk_mr should be subset of used");
+ // This function is used by the parallel card table iteration.
+ const bool parallel = true;
+
DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(),
- cl->gen_boundary());
- ClearNoncleanCardWrapper clear_cl(dcto_cl, ct);
+ cl->gen_boundary(),
+ parallel);
+ ClearNoncleanCardWrapper clear_cl(dcto_cl, ct, parallel);
// Process the chunk.
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp Fri May 29 12:49:31 2015 +0200
@@ -567,23 +567,15 @@
}
ParNewGenTask::ParNewGenTask(ParNewGeneration* gen, Generation* old_gen,
- HeapWord* young_old_boundary, ParScanThreadStateSet* state_set) :
+ HeapWord* young_old_boundary, ParScanThreadStateSet* state_set,
+ StrongRootsScope* strong_roots_scope) :
AbstractGangTask("ParNewGeneration collection"),
_gen(gen), _old_gen(old_gen),
_young_old_boundary(young_old_boundary),
- _state_set(state_set)
+ _state_set(state_set),
+ _strong_roots_scope(strong_roots_scope)
{}
-// Reset the terminator for the given number of
-// active threads.
-void ParNewGenTask::set_for_termination(uint active_workers) {
- _state_set->reset(active_workers, _gen->promotion_failed());
- // Should the heap be passed in? There's only 1 for now so
- // grab it instead.
- GenCollectedHeap* gch = GenCollectedHeap::heap();
- gch->set_n_termination(active_workers);
-}
-
void ParNewGenTask::work(uint worker_id) {
GenCollectedHeap* gch = GenCollectedHeap::heap();
// Since this is being done in a separate thread, need new resource
@@ -603,10 +595,10 @@
false);
par_scan_state.start_strong_roots();
- gch->gen_process_roots(_gen->level(),
+ gch->gen_process_roots(_strong_roots_scope,
+ _gen->level(),
true, // Process younger gens, if any,
// as strong roots.
- false, // no scope; this is parallel code
GenCollectedHeap::SO_ScavengeCodeCache,
GenCollectedHeap::StrongAndWeakRoots,
&par_scan_state.to_space_root_closure(),
@@ -759,9 +751,6 @@
private:
virtual void work(uint worker_id);
- virtual void set_for_termination(uint active_workers) {
- _state_set.terminator()->reset_for_reuse(active_workers);
- }
private:
ParNewGeneration& _gen;
ProcessTask& _task;
@@ -838,7 +827,6 @@
{
_state_set.flush();
GenCollectedHeap* gch = GenCollectedHeap::heap();
- gch->set_par_threads(0); // 0 ==> non-parallel.
gch->save_marks();
}
@@ -939,33 +927,35 @@
to()->clear(SpaceDecorator::Mangle);
gch->save_marks();
- assert(workers != NULL, "Need parallel worker threads.");
- uint n_workers = active_workers;
// Set the correct parallelism (number of queues) in the reference processor
- ref_processor()->set_active_mt_degree(n_workers);
+ ref_processor()->set_active_mt_degree(active_workers);
// Always set the terminator for the active number of workers
// because only those workers go through the termination protocol.
- ParallelTaskTerminator _term(n_workers, task_queues());
- ParScanThreadStateSet thread_state_set(workers->active_workers(),
+ ParallelTaskTerminator _term(active_workers, task_queues());
+ ParScanThreadStateSet thread_state_set(active_workers,
*to(), *this, *_old_gen, *task_queues(),
_overflow_stacks, desired_plab_sz(), _term);
- ParNewGenTask tsk(this, _old_gen, reserved().end(), &thread_state_set);
- gch->set_par_threads(n_workers);
- gch->rem_set()->prepare_for_younger_refs_iterate(true);
- // It turns out that even when we're using 1 thread, doing the work in a
- // separate thread causes wide variance in run times. We can't help this
- // in the multi-threaded case, but we special-case n=1 here to get
- // repeatable measurements of the 1-thread overhead of the parallel code.
- if (n_workers > 1) {
- StrongRootsScope srs;
- workers->run_task(&tsk);
- } else {
- StrongRootsScope srs;
- tsk.work(0);
+ thread_state_set.reset(active_workers, promotion_failed());
+
+ {
+ StrongRootsScope srs(active_workers);
+
+ ParNewGenTask tsk(this, _old_gen, reserved().end(), &thread_state_set, &srs);
+ gch->rem_set()->prepare_for_younger_refs_iterate(true);
+ // It turns out that even when we're using 1 thread, doing the work in a
+ // separate thread causes wide variance in run times. We can't help this
+ // in the multi-threaded case, but we special-case n=1 here to get
+ // repeatable measurements of the 1-thread overhead of the parallel code.
+ if (active_workers > 1) {
+ workers->run_task(&tsk);
+ } else {
+ tsk.work(0);
+ }
}
+
thread_state_set.reset(0 /* Bad value in debug if not reset */,
promotion_failed());
@@ -995,7 +985,6 @@
_gc_timer, _gc_tracer.gc_id());
} else {
thread_state_set.flush();
- gch->set_par_threads(0); // 0 ==> non-parallel.
gch->save_marks();
stats = rp->process_discovered_references(&is_alive, &keep_alive,
&evacuate_followers, NULL,
@@ -1033,7 +1022,7 @@
to()->set_concurrent_iteration_safe_limit(to()->top());
if (ResizePLAB) {
- plab_stats()->adjust_desired_plab_sz(n_workers);
+ plab_stats()->adjust_desired_plab_sz(active_workers);
}
if (PrintGC && !PrintGCDetails) {
@@ -1477,9 +1466,9 @@
_ref_processor =
new ReferenceProcessor(_reserved, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
- (int) ParallelGCThreads, // mt processing degree
+ (uint) ParallelGCThreads, // mt processing degree
refs_discovery_is_mt(), // mt discovery
- (int) ParallelGCThreads, // mt discovery degree
+ (uint) ParallelGCThreads, // mt discovery degree
refs_discovery_is_atomic(), // atomic_discovery
NULL); // is_alive_non_header
}
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.hpp Fri May 29 12:49:31 2015 +0200
@@ -39,6 +39,7 @@
class ParRootScanWithoutBarrierClosure;
class ParRootScanWithBarrierTwoGensClosure;
class ParEvacuateFollowersClosure;
+class StrongRootsScope;
// It would be better if these types could be kept local to the .cpp file,
// but they must be here to allow ParScanClosure::do_oop_work to be defined
@@ -237,20 +238,18 @@
Generation* _old_gen;
HeapWord* _young_old_boundary;
class ParScanThreadStateSet* _state_set;
+ StrongRootsScope* _strong_roots_scope;
public:
ParNewGenTask(ParNewGeneration* gen,
Generation* old_gen,
HeapWord* young_old_boundary,
- ParScanThreadStateSet* state_set);
+ ParScanThreadStateSet* state_set,
+ StrongRootsScope* strong_roots_scope);
HeapWord* young_old_boundary() { return _young_old_boundary; }
void work(uint worker_id);
-
- // Reset the terminator in ParScanThreadStateSet for
- // "active_workers" threads.
- virtual void set_for_termination(uint active_workers);
};
class KeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
--- a/hotspot/src/share/vm/gc/cms/parOopClosures.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/parOopClosures.hpp Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,7 @@
#define SHARE_VM_GC_CMS_PAROOPCLOSURES_HPP
#include "gc/shared/genOopClosures.hpp"
+#include "gc/shared/taskqueue.hpp"
#include "memory/padded.hpp"
// Closures for ParNewGeneration
--- a/hotspot/src/share/vm/gc/cms/yieldingWorkgroup.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/yieldingWorkgroup.hpp Fri May 29 12:49:31 2015 +0200
@@ -147,6 +147,13 @@
bool completed() const { return _status == COMPLETED; }
bool aborted() const { return _status == ABORTED; }
bool active() const { return _status == ACTIVE; }
+
+ // This method configures the task for proper termination.
+ // Some tasks do not have any requirements on termination
+ // and may inherit this method that does nothing. Some
+ // tasks do some coordination on termination and override
+ // this method to implement that coordination.
+ virtual void set_for_termination(uint active_workers) {}
};
// Class YieldingWorkGang: A subclass of WorkGang.
// In particular, a YieldingWorkGang is made up of
--- a/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp Fri May 29 12:49:31 2015 +0200
@@ -158,20 +158,10 @@
hr->calc_gc_efficiency();
}
-void CollectionSetChooser::prepare_for_par_region_addition(uint n_regions,
+void CollectionSetChooser::prepare_for_par_region_addition(uint n_threads,
+ uint n_regions,
uint chunk_size) {
_first_par_unreserved_idx = 0;
- uint n_threads = (uint) ParallelGCThreads;
- if (UseDynamicNumberOfGCThreads) {
- assert(G1CollectedHeap::heap()->workers()->active_workers() > 0,
- "Should have been set earlier");
- // This is defensive code. As the assertion above says, the number
- // of active threads should be > 0, but in case there is some path
- // or some improperly initialized variable with leads to no
- // active threads, protect against that in a product build.
- n_threads = MAX2(G1CollectedHeap::heap()->workers()->active_workers(),
- 1U);
- }
uint max_waste = n_threads * chunk_size;
// it should be aligned with respect to chunk_size
uint aligned_n_regions = (n_regions + chunk_size - 1) / chunk_size * chunk_size;
--- a/hotspot/src/share/vm/gc/g1/collectionSetChooser.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/collectionSetChooser.hpp Fri May 29 12:49:31 2015 +0200
@@ -121,7 +121,7 @@
// Must be called before calls to claim_array_chunk().
// n_regions is the number of regions, chunk_size the chunk size.
- void prepare_for_par_region_addition(uint n_regions, uint chunk_size);
+ void prepare_for_par_region_addition(uint n_threads, uint n_regions, uint chunk_size);
// Returns the first index in a contiguous chunk of chunk_size indexes
// that the calling thread has reserved. These must be set by the
// calling thread using set_region() (to NULL if necessary).
--- a/hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/concurrentG1Refine.cpp Fri May 29 12:49:31 2015 +0200
@@ -35,7 +35,7 @@
{
// Ergonomically select initial concurrent refinement parameters
if (FLAG_IS_DEFAULT(G1ConcRefinementGreenZone)) {
- FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, MAX2<int>(ParallelGCThreads, 1));
+ FLAG_SET_DEFAULT(G1ConcRefinementGreenZone, (intx)ParallelGCThreads);
}
set_green_zone(G1ConcRefinementGreenZone);
--- a/hotspot/src/share/vm/gc/g1/concurrentMark.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/concurrentMark.cpp Fri May 29 12:49:31 2015 +0200
@@ -518,7 +518,7 @@
_markStack(this),
// _finger set in set_non_marking_state
- _max_worker_id(MAX2((uint)ParallelGCThreads, 1U)),
+ _max_worker_id((uint)ParallelGCThreads),
// _active_tasks set in set_non_marking_state
// _tasks set inside the constructor
_task_queues(new CMTaskQueueSet((int) _max_worker_id)),
@@ -1218,15 +1218,13 @@
"Maximum number of marking threads exceeded");
uint active_workers = MAX2(1U, parallel_marking_threads());
+ assert(active_workers > 0, "Should have been set");
// Parallel task terminator is set in "set_concurrency_and_phase()"
set_concurrency_and_phase(active_workers, true /* concurrent */);
CMConcurrentMarkingTask markingTask(this, cmThread());
_parallel_workers->set_active_workers(active_workers);
- // Don't set _n_par_threads because it affects MT in process_roots()
- // and the decisions on that MT processing is made elsewhere.
- assert(_parallel_workers->active_workers() > 0, "Should have been set");
_parallel_workers->run_task(&markingTask);
print_stats();
}
@@ -1761,28 +1759,20 @@
}
};
-class G1ParNoteEndTask;
-
class G1NoteEndOfConcMarkClosure : public HeapRegionClosure {
G1CollectedHeap* _g1;
- size_t _max_live_bytes;
- uint _regions_claimed;
size_t _freed_bytes;
FreeRegionList* _local_cleanup_list;
HeapRegionSetCount _old_regions_removed;
HeapRegionSetCount _humongous_regions_removed;
HRRSCleanupTask* _hrrs_cleanup_task;
- double _claimed_region_time;
- double _max_region_time;
public:
G1NoteEndOfConcMarkClosure(G1CollectedHeap* g1,
FreeRegionList* local_cleanup_list,
HRRSCleanupTask* hrrs_cleanup_task) :
_g1(g1),
- _max_live_bytes(0), _regions_claimed(0),
_freed_bytes(0),
- _claimed_region_time(0.0), _max_region_time(0.0),
_local_cleanup_list(local_cleanup_list),
_old_regions_removed(),
_humongous_regions_removed(),
@@ -1799,10 +1789,7 @@
// We use a claim value of zero here because all regions
// were claimed with value 1 in the FinalCount task.
_g1->reset_gc_time_stamps(hr);
- double start = os::elapsedTime();
- _regions_claimed++;
hr->note_end_of_marking();
- _max_live_bytes += hr->max_live_bytes();
if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young()) {
_freed_bytes += hr->used();
@@ -1819,18 +1806,8 @@
hr->rem_set()->do_cleanup_work(_hrrs_cleanup_task);
}
- double region_time = (os::elapsedTime() - start);
- _claimed_region_time += region_time;
- if (region_time > _max_region_time) {
- _max_region_time = region_time;
- }
return false;
}
-
- size_t max_live_bytes() { return _max_live_bytes; }
- uint regions_claimed() { return _regions_claimed; }
- double claimed_region_time_sec() { return _claimed_region_time; }
- double max_region_time_sec() { return _max_region_time; }
};
class G1ParNoteEndTask: public AbstractGangTask {
@@ -1838,14 +1815,12 @@
protected:
G1CollectedHeap* _g1h;
- size_t _max_live_bytes;
- size_t _freed_bytes;
FreeRegionList* _cleanup_list;
HeapRegionClaimer _hrclaimer;
public:
G1ParNoteEndTask(G1CollectedHeap* g1h, FreeRegionList* cleanup_list, uint n_workers) :
- AbstractGangTask("G1 note end"), _g1h(g1h), _max_live_bytes(0), _freed_bytes(0), _cleanup_list(cleanup_list), _hrclaimer(n_workers) {
+ AbstractGangTask("G1 note end"), _g1h(g1h), _cleanup_list(cleanup_list), _hrclaimer(n_workers) {
}
void work(uint worker_id) {
@@ -1861,8 +1836,6 @@
{
MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
_g1h->decrement_summary_bytes(g1_note_end.freed_bytes());
- _max_live_bytes += g1_note_end.max_live_bytes();
- _freed_bytes += g1_note_end.freed_bytes();
// If we iterate over the global cleanup list at the end of
// cleanup to do this printing we will not guarantee to only
@@ -1887,8 +1860,6 @@
HeapRegionRemSet::finish_cleanup_task(&hrrs_cleanup_task);
}
}
- size_t max_live_bytes() { return _max_live_bytes; }
- size_t freed_bytes() { return _freed_bytes; }
};
class G1ParScrubRemSetTask: public AbstractGangTask {
@@ -1938,18 +1909,10 @@
HeapRegionRemSet::reset_for_cleanup_tasks();
- uint n_workers;
-
// Do counting once more with the world stopped for good measure.
G1ParFinalCountTask g1_par_count_task(g1h, &_region_bm, &_card_bm);
- g1h->set_par_threads();
- n_workers = g1h->n_par_threads();
- assert(g1h->n_par_threads() == n_workers,
- "Should not have been reset");
g1h->workers()->run_task(&g1_par_count_task);
- // Done with the parallel phase so reset to 0.
- g1h->set_par_threads(0);
if (VerifyDuringGC) {
// Verify that the counting data accumulated during marking matches
@@ -1965,10 +1928,7 @@
&expected_region_bm,
&expected_card_bm);
- g1h->set_par_threads((int)n_workers);
g1h->workers()->run_task(&g1_par_verify_task);
- // Done with the parallel phase so reset to 0.
- g1h->set_par_threads(0);
guarantee(g1_par_verify_task.failures() == 0, "Unexpected accounting failures");
}
@@ -1990,11 +1950,11 @@
g1h->reset_gc_time_stamp();
+ uint n_workers = _g1h->workers()->active_workers();
+
// Note end of marking in all heap regions.
G1ParNoteEndTask g1_par_note_end_task(g1h, &_cleanup_list, n_workers);
- g1h->set_par_threads((int)n_workers);
g1h->workers()->run_task(&g1_par_note_end_task);
- g1h->set_par_threads(0);
g1h->check_gc_time_stamps();
if (!cleanup_list_is_empty()) {
@@ -2009,9 +1969,7 @@
if (G1ScrubRemSets) {
double rs_scrub_start = os::elapsedTime();
G1ParScrubRemSetTask g1_par_scrub_rs_task(g1h, &_region_bm, &_card_bm, n_workers);
- g1h->set_par_threads((int)n_workers);
g1h->workers()->run_task(&g1_par_scrub_rs_task);
- g1h->set_par_threads(0);
double rs_scrub_end = os::elapsedTime();
double this_rs_scrub_time = (rs_scrub_end - rs_scrub_start);
@@ -2020,7 +1978,7 @@
// this will also free any regions totally full of garbage objects,
// and sort the regions.
- g1h->g1_policy()->record_concurrent_mark_cleanup_end((int)n_workers);
+ g1h->g1_policy()->record_concurrent_mark_cleanup_end();
// Statistics.
double end = os::elapsedTime();
@@ -2312,9 +2270,7 @@
// and overflow handling in CMTask::do_marking_step() knows
// how many workers to wait for.
_cm->set_concurrency(_active_workers);
- _g1h->set_par_threads(_active_workers);
_workers->run_task(&proc_task_proxy);
- _g1h->set_par_threads(0);
}
class G1CMRefEnqueueTaskProxy: public AbstractGangTask {
@@ -2344,9 +2300,7 @@
// and overflow handling in CMTask::do_marking_step() knows
// how many workers to wait for.
_cm->set_concurrency(_active_workers);
- _g1h->set_par_threads(_active_workers);
_workers->run_task(&enq_task_proxy);
- _g1h->set_par_threads(0);
}
void ConcurrentMark::weakRefsWorkParallelPart(BoolObjectClosure* is_alive, bool purged_classes) {
@@ -2608,27 +2562,23 @@
g1h->ensure_parsability(false);
- StrongRootsScope srs;
// this is remark, so we'll use up all active threads
uint active_workers = g1h->workers()->active_workers();
- if (active_workers == 0) {
- assert(active_workers > 0, "Should have been set earlier");
- active_workers = (uint) ParallelGCThreads;
- g1h->workers()->set_active_workers(active_workers);
- }
set_concurrency_and_phase(active_workers, false /* concurrent */);
// Leave _parallel_marking_threads at it's
// value originally calculated in the ConcurrentMark
// constructor and pass values of the active workers
// through the gang in the task.
- CMRemarkTask remarkTask(this, active_workers);
- // We will start all available threads, even if we decide that the
- // active_workers will be fewer. The extra ones will just bail out
- // immediately.
- g1h->set_par_threads(active_workers);
- g1h->workers()->run_task(&remarkTask);
- g1h->set_par_threads(0);
+ {
+ StrongRootsScope srs(active_workers);
+
+ CMRemarkTask remarkTask(this, active_workers);
+ // We will start all available threads, even if we decide that the
+ // active_workers will be fewer. The extra ones will just bail out
+ // immediately.
+ g1h->workers()->run_task(&remarkTask);
+ }
SATBMarkQueueSet& satb_mq_set = JavaThread::satb_mark_queue_set();
guarantee(has_overflown() ||
@@ -3001,9 +2951,7 @@
G1AggregateCountDataTask g1_par_agg_task(_g1h, this, &_card_bm,
_max_worker_id, n_workers);
- _g1h->set_par_threads(n_workers);
_g1h->workers()->run_task(&g1_par_agg_task);
- _g1h->set_par_threads(0);
}
// Clear the per-worker arrays used to store the per-region counting data
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Fri May 29 12:49:31 2015 +0200
@@ -1326,27 +1326,10 @@
AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
workers()->active_workers(),
Threads::number_of_non_daemon_threads());
- assert(UseDynamicNumberOfGCThreads ||
- n_workers == workers()->total_workers(),
- "If not dynamic should be using all the workers");
workers()->set_active_workers(n_workers);
- // Set parallel threads in the heap (_n_par_threads) only
- // before a parallel phase and always reset it to 0 after
- // the phase so that the number of parallel threads does
- // no get carried forward to a serial phase where there
- // may be code that is "possibly_parallel".
- set_par_threads(n_workers);
ParRebuildRSTask rebuild_rs_task(this);
- assert(UseDynamicNumberOfGCThreads ||
- workers()->active_workers() == workers()->total_workers(),
- "Unless dynamic should use total workers");
- // Use the most recent number of active workers
- assert(workers()->active_workers() > 0,
- "Active workers not properly set");
- set_par_threads(workers()->active_workers());
workers()->run_task(&rebuild_rs_task);
- set_par_threads(0);
// Rebuild the strong code root lists for each region
rebuild_strong_code_roots();
@@ -1769,7 +1752,7 @@
_allocator = G1Allocator::create_allocator(this);
_humongous_object_threshold_in_words = HeapRegion::GrainWords / 2;
- int n_queues = MAX2((int)ParallelGCThreads, 1);
+ int n_queues = (int)ParallelGCThreads;
_task_queues = new RefToScanQueueSet(n_queues);
uint n_rem_sets = HeapRegionRemSet::num_par_rem_sets();
@@ -2081,11 +2064,11 @@
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1),
// mt processing
- (int) ParallelGCThreads,
+ (uint) ParallelGCThreads,
// degree of mt processing
(ParallelGCThreads > 1) || (ConcGCThreads > 1),
// mt discovery
- (int) MAX2(ParallelGCThreads, ConcGCThreads),
+ (uint) MAX2(ParallelGCThreads, ConcGCThreads),
// degree of mt discovery
false,
// Reference discovery is not atomic
@@ -2098,11 +2081,11 @@
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1),
// mt processing
- MAX2((int)ParallelGCThreads, 1),
+ (uint) ParallelGCThreads,
// degree of mt processing
(ParallelGCThreads > 1),
// mt discovery
- MAX2((int)ParallelGCThreads, 1),
+ (uint) ParallelGCThreads,
// degree of mt discovery
true,
// Reference discovery is atomic
@@ -2502,8 +2485,7 @@
assert(_worker_cset_start_region != NULL, "sanity");
assert(_worker_cset_start_region_time_stamp != NULL, "sanity");
- int n_queues = MAX2((int)ParallelGCThreads, 1);
- for (int i = 0; i < n_queues; i++) {
+ for (uint i = 0; i < ParallelGCThreads; i++) {
_worker_cset_start_region[i] = NULL;
_worker_cset_start_region_time_stamp[i] = 0;
}
@@ -2541,9 +2523,6 @@
result = g1_policy()->collection_set();
uint cs_size = g1_policy()->cset_region_length();
uint active_workers = workers()->active_workers();
- assert(UseDynamicNumberOfGCThreads ||
- active_workers == workers()->total_workers(),
- "Unless dynamic should use total workers");
uint end_ind = (cs_size * worker_i) / active_workers;
uint start_ind = 0;
@@ -3021,7 +3000,7 @@
G1VerifyCodeRootBlobClosure blobsCl(&codeRootsCl);
{
- G1RootProcessor root_processor(this);
+ G1RootProcessor root_processor(this, 1);
root_processor.process_all_roots(&rootsCl,
&cldCl,
&blobsCl);
@@ -3042,13 +3021,7 @@
if (GCParallelVerificationEnabled && ParallelGCThreads > 1) {
G1ParVerifyTask task(this, vo);
- assert(UseDynamicNumberOfGCThreads ||
- workers()->active_workers() == workers()->total_workers(),
- "If not dynamic should be using all the workers");
- uint n_workers = workers()->active_workers();
- set_par_threads(n_workers);
workers()->run_task(&task);
- set_par_threads(0);
if (task.failures()) {
failures = true;
}
@@ -3572,6 +3545,10 @@
};
#endif // ASSERT
+uint G1CollectedHeap::num_task_queues() const {
+ return _task_queues->size();
+}
+
#if TASKQUEUE_STATS
void G1CollectedHeap::print_taskqueue_stats_hdr(outputStream* const st) {
st->print_raw_cr("GC Task Stats");
@@ -3583,7 +3560,7 @@
print_taskqueue_stats_hdr(st);
TaskQueueStats totals;
- const uint n = workers()->total_workers();
+ const uint n = num_task_queues();
for (uint i = 0; i < n; ++i) {
st->print("%3u ", i); task_queue(i)->stats.print(st); st->cr();
totals += task_queue(i)->stats;
@@ -3594,7 +3571,7 @@
}
void G1CollectedHeap::reset_taskqueue_stats() {
- const uint n = workers()->total_workers();
+ const uint n = num_task_queues();
for (uint i = 0; i < n; ++i) {
task_queue(i)->stats.reset();
}
@@ -3696,9 +3673,6 @@
uint active_workers = AdaptiveSizePolicy::calc_active_workers(workers()->total_workers(),
workers()->active_workers(),
Threads::number_of_non_daemon_threads());
- assert(UseDynamicNumberOfGCThreads ||
- active_workers == workers()->total_workers(),
- "If not dynamic should be using all the workers");
workers()->set_active_workers(active_workers);
double pause_start_sec = os::elapsedTime();
@@ -3873,8 +3847,7 @@
if (evacuation_failed()) {
_allocator->set_used(recalculate_used());
- uint n_queues = MAX2((int)ParallelGCThreads, 1);
- for (uint i = 0; i < n_queues; i++) {
+ for (uint i = 0; i < ParallelGCThreads; i++) {
if (_evacuation_failed_info_array[i].has_failed()) {
_gc_tracer_stw->report_evacuation_failed(_evacuation_failed_info_array[i]);
}
@@ -4041,10 +4014,8 @@
void G1CollectedHeap::remove_self_forwarding_pointers() {
double remove_self_forwards_start = os::elapsedTime();
- set_par_threads();
G1ParRemoveSelfForwardPtrsTask rsfp_task(this);
workers()->run_task(&rsfp_task);
- set_par_threads(0);
// Now restore saved marks, if any.
assert(_objs_with_preserved_marks.size() ==
@@ -4308,12 +4279,13 @@
Mutex* stats_lock() { return &_stats_lock; }
public:
- G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues, G1RootProcessor* root_processor)
+ G1ParTask(G1CollectedHeap* g1h, RefToScanQueueSet *task_queues, G1RootProcessor* root_processor, uint n_workers)
: AbstractGangTask("G1 collection"),
_g1h(g1h),
_queues(task_queues),
_root_processor(root_processor),
- _terminator(0, _queues),
+ _terminator(n_workers, _queues),
+ _n_workers(n_workers),
_stats_lock(Mutex::leaf, "parallel G1 stats lock", true)
{}
@@ -4325,12 +4297,6 @@
ParallelTaskTerminator* terminator() { return &_terminator; }
- virtual void set_for_termination(uint active_workers) {
- _root_processor->set_num_workers(active_workers);
- terminator()->reset_for_reuse(active_workers);
- _n_workers = active_workers;
- }
-
// Helps out with CLD processing.
//
// During InitialMark we need to:
@@ -4811,19 +4777,14 @@
G1ParallelCleaningTask g1_unlink_task(is_alive, process_strings, process_symbols,
n_workers, class_unloading_occurred);
- set_par_threads(n_workers);
workers()->run_task(&g1_unlink_task);
- set_par_threads(0);
}
void G1CollectedHeap::unlink_string_and_symbol_table(BoolObjectClosure* is_alive,
bool process_strings, bool process_symbols) {
{
- uint n_workers = workers()->active_workers();
G1StringSymbolTableUnlinkTask g1_unlink_task(is_alive, process_strings, process_symbols);
- set_par_threads(n_workers);
workers()->run_task(&g1_unlink_task);
- set_par_threads(0);
}
if (G1StringDedup::is_enabled()) {
@@ -4851,13 +4812,9 @@
void G1CollectedHeap::redirty_logged_cards() {
double redirty_logged_cards_start = os::elapsedTime();
- uint n_workers = workers()->active_workers();
-
G1RedirtyLoggedCardsTask redirty_task(&dirty_card_queue_set());
dirty_card_queue_set().reset_for_par_iteration();
- set_par_threads(n_workers);
workers()->run_task(&redirty_task);
- set_par_threads(0);
DirtyCardQueueSet& dcq = JavaThread::dirty_card_queue_set();
dcq.merge_bufferlists(&dirty_card_queue_set());
@@ -5093,9 +5050,7 @@
ParallelTaskTerminator terminator(_active_workers, _queues);
G1STWRefProcTaskProxy proc_task_proxy(proc_task, _g1h, _queues, &terminator);
- _g1h->set_par_threads(_active_workers);
_workers->run_task(&proc_task_proxy);
- _g1h->set_par_threads(0);
}
// Gang task for parallel reference enqueueing.
@@ -5124,9 +5079,7 @@
G1STWRefEnqueueTaskProxy enq_task_proxy(enq_task);
- _g1h->set_par_threads(_active_workers);
_workers->run_task(&enq_task_proxy);
- _g1h->set_par_threads(0);
}
// End of weak reference support closures
@@ -5219,7 +5172,7 @@
};
// Weak Reference processing during an evacuation pause (part 1).
-void G1CollectedHeap::process_discovered_references(uint no_of_gc_workers) {
+void G1CollectedHeap::process_discovered_references() {
double ref_proc_start = os::elapsedTime();
ReferenceProcessor* rp = _ref_processor_stw;
@@ -5246,17 +5199,14 @@
// referents points to another object which is also referenced by an
// object discovered by the STW ref processor.
- assert(no_of_gc_workers == workers()->active_workers(), "Need to reset active GC workers");
-
- set_par_threads(no_of_gc_workers);
+ uint no_of_gc_workers = workers()->active_workers();
+
G1ParPreserveCMReferentsTask keep_cm_referents(this,
no_of_gc_workers,
_task_queues);
workers()->run_task(&keep_cm_referents);
- set_par_threads(0);
-
// Closure to test whether a referent is alive.
G1STWIsAliveClosure is_alive(this);
@@ -5330,7 +5280,7 @@
}
// Weak Reference processing during an evacuation pause (part 2).
-void G1CollectedHeap::enqueue_discovered_references(uint no_of_gc_workers) {
+void G1CollectedHeap::enqueue_discovered_references() {
double ref_enq_start = os::elapsedTime();
ReferenceProcessor* rp = _ref_processor_stw;
@@ -5344,12 +5294,12 @@
} else {
// Parallel reference enqueueing
- assert(no_of_gc_workers == workers()->active_workers(),
- "Need to reset active workers");
- assert(rp->num_q() == no_of_gc_workers, "sanity");
- assert(no_of_gc_workers <= rp->max_num_q(), "sanity");
-
- G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, no_of_gc_workers);
+ uint n_workers = workers()->active_workers();
+
+ assert(rp->num_q() == n_workers, "sanity");
+ assert(n_workers <= rp->max_num_q(), "sanity");
+
+ G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, n_workers);
rp->enqueue_discovered_references(&par_task_executor);
}
@@ -5380,11 +5330,6 @@
hot_card_cache->set_use_cache(false);
const uint n_workers = workers()->active_workers();
- assert(UseDynamicNumberOfGCThreads ||
- n_workers == workers()->total_workers(),
- "If not dynamic should be using all the workers");
- set_par_threads(n_workers);
-
init_for_evac_failure(NULL);
@@ -5393,19 +5338,16 @@
double end_par_time_sec;
{
- G1RootProcessor root_processor(this);
- G1ParTask g1_par_task(this, _task_queues, &root_processor);
+ G1RootProcessor root_processor(this, n_workers);
+ G1ParTask g1_par_task(this, _task_queues, &root_processor, n_workers);
// InitialMark needs claim bits to keep track of the marked-through CLDs.
if (g1_policy()->during_initial_mark_pause()) {
ClassLoaderDataGraph::clear_claimed_marks();
}
- // The individual threads will set their evac-failure closures.
- if (PrintTerminationStats) G1ParScanThreadState::print_termination_stats_hdr();
- // These tasks use ShareHeap::_process_strong_tasks
- assert(UseDynamicNumberOfGCThreads ||
- workers()->active_workers() == workers()->total_workers(),
- "If not dynamic should be using all the workers");
+ // The individual threads will set their evac-failure closures.
+ if (PrintTerminationStats) G1ParScanThreadState::print_termination_stats_hdr();
+
workers()->run_task(&g1_par_task);
end_par_time_sec = os::elapsedTime();
@@ -5425,14 +5367,12 @@
(os::elapsedTime() - end_par_time_sec) * 1000.0;
phase_times->record_code_root_fixup_time(code_root_fixup_time_ms);
- set_par_threads(0);
-
// Process any discovered reference objects - we have
// to do this _before_ we retire the GC alloc regions
// as we may have to copy some 'reachable' referent
// objects (and their reachable sub-graphs) that were
// not copied during the pause.
- process_discovered_references(n_workers);
+ process_discovered_references();
if (G1StringDedup::is_enabled()) {
double fixup_start = os::elapsedTime();
@@ -5474,7 +5414,7 @@
// will log these updates (and dirty their associated
// cards). We need these updates logged to update any
// RSets.
- enqueue_discovered_references(n_workers);
+ enqueue_discovered_references();
redirty_logged_cards();
COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
@@ -5779,9 +5719,7 @@
// Iterate over the dirty cards region list.
G1ParCleanupCTTask cleanup_task(ct_bs, this);
- set_par_threads();
workers()->run_task(&cleanup_task);
- set_par_threads(0);
#ifndef PRODUCT
if (G1VerifyCTCleanup || VerifyAfterGC) {
G1VerifyCardTableCleanup cleanup_verifier(this, ct_bs);
@@ -6314,21 +6252,6 @@
g1mm()->update_eden_size();
}
-void G1CollectedHeap::set_par_threads() {
- // Don't change the number of workers. Use the value previously set
- // in the workgroup.
- uint n_workers = workers()->active_workers();
- assert(UseDynamicNumberOfGCThreads ||
- n_workers == workers()->total_workers(),
- "Otherwise should be using the total number of workers");
- if (n_workers == 0) {
- assert(false, "Should have been set in prior evacuation pause.");
- n_workers = ParallelGCThreads;
- workers()->set_active_workers(n_workers);
- }
- set_par_threads(n_workers);
-}
-
// Methods for the GC alloc regions
HeapRegion* G1CollectedHeap::new_gc_alloc_region(size_t word_size,
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp Fri May 29 12:49:31 2015 +0200
@@ -606,11 +606,11 @@
// Process any reference objects discovered during
// an incremental evacuation pause.
- void process_discovered_references(uint no_of_gc_workers);
+ void process_discovered_references();
// Enqueue any remaining discovered references
// after processing.
- void enqueue_discovered_references(uint no_of_gc_workers);
+ void enqueue_discovered_references();
public:
FlexibleWorkGang* workers() const { return _workers; }
@@ -981,6 +981,8 @@
RefToScanQueue *task_queue(uint i) const;
+ uint num_task_queues() const;
+
// A set of cards where updates happened during the GC
DirtyCardQueueSet& dirty_card_queue_set() { return _dirty_card_queue_set; }
@@ -1012,11 +1014,6 @@
// Initialize weak reference processing.
void ref_processing_init();
- // Explicitly import set_par_threads into this scope
- using CollectedHeap::set_par_threads;
- // Set _n_par_threads according to a policy TBD.
- void set_par_threads();
-
virtual Name kind() const {
return CollectedHeap::G1CollectedHeap;
}
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.cpp Fri May 29 12:49:31 2015 +0200
@@ -1587,14 +1587,17 @@
}
void
-G1CollectorPolicy::record_concurrent_mark_cleanup_end(uint n_workers) {
+G1CollectorPolicy::record_concurrent_mark_cleanup_end() {
_collectionSetChooser->clear();
+ FlexibleWorkGang* workers = _g1->workers();
+ uint n_workers = workers->active_workers();
+
uint n_regions = _g1->num_regions();
uint chunk_size = calculate_parallel_work_chunk_size(n_workers, n_regions);
- _collectionSetChooser->prepare_for_par_region_addition(n_regions, chunk_size);
+ _collectionSetChooser->prepare_for_par_region_addition(n_workers, n_regions, chunk_size);
ParKnownGarbageTask par_known_garbage_task(_collectionSetChooser, chunk_size, n_workers);
- _g1->workers()->run_task(&par_known_garbage_task);
+ workers->run_task(&par_known_garbage_task);
_collectionSetChooser->sort_regions();
--- a/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1CollectorPolicy.hpp Fri May 29 12:49:31 2015 +0200
@@ -692,7 +692,7 @@
// Record start, end, and completion of cleanup.
void record_concurrent_mark_cleanup_start();
- void record_concurrent_mark_cleanup_end(uint n_workers);
+ void record_concurrent_mark_cleanup_end();
void record_concurrent_mark_cleanup_completed();
// Records the information about the heap size for reporting in
--- a/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp Fri May 29 12:49:31 2015 +0200
@@ -127,7 +127,7 @@
MarkingCodeBlobClosure follow_code_closure(&GenMarkSweep::follow_root_closure, !CodeBlobToOopClosure::FixRelocations);
{
- G1RootProcessor root_processor(g1h);
+ G1RootProcessor root_processor(g1h, 1);
root_processor.process_strong_roots(&GenMarkSweep::follow_root_closure,
&GenMarkSweep::follow_cld_closure,
&follow_code_closure);
@@ -237,7 +237,7 @@
CodeBlobToOopClosure adjust_code_closure(&GenMarkSweep::adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
{
- G1RootProcessor root_processor(g1h);
+ G1RootProcessor root_processor(g1h, 1);
root_processor.process_all_roots(&GenMarkSweep::adjust_pointer_closure,
&GenMarkSweep::adjust_cld_closure,
&adjust_code_closure);
--- a/hotspot/src/share/vm/gc/g1/g1OopClosures.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1OopClosures.cpp Fri May 29 12:49:31 2015 +0200
@@ -50,8 +50,8 @@
_par_scan_state = par_scan_state;
_worker_id = par_scan_state->queue_num();
- assert(_worker_id < MAX2((uint)ParallelGCThreads, 1u),
- err_msg("The given worker id %u must be less than the number of threads %u", _worker_id, MAX2((uint)ParallelGCThreads, 1u)));
+ assert(_worker_id < ParallelGCThreads,
+ err_msg("The given worker id %u must be less than the number of threads " UINTX_FORMAT, _worker_id, ParallelGCThreads));
}
// Generate G1 specialized oop_oop_iterate functions.
--- a/hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RootProcessor.cpp Fri May 29 12:49:31 2015 +0200
@@ -90,11 +90,10 @@
void G1RootProcessor::worker_has_discovered_all_strong_classes() {
- uint n_workers = _g1h->n_par_threads();
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
- if (new_value == n_workers) {
+ if (new_value == n_workers()) {
// This thread is last. Notify the others.
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
_lock.notify_all();
@@ -102,21 +101,20 @@
}
void G1RootProcessor::wait_until_all_strong_classes_discovered() {
- uint n_workers = _g1h->n_par_threads();
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
- if ((uint)_n_workers_discovered_strong_classes != n_workers) {
+ if ((uint)_n_workers_discovered_strong_classes != n_workers()) {
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
- while ((uint)_n_workers_discovered_strong_classes != n_workers) {
+ while ((uint)_n_workers_discovered_strong_classes != n_workers()) {
_lock.wait(Mutex::_no_safepoint_check_flag, 0, false);
}
}
}
-G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h) :
+G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) :
_g1h(g1h),
_process_strong_tasks(new SubTasksDone(G1RP_PS_NumElements)),
- _srs(),
+ _srs(n_workers),
_lock(Mutex::leaf, "G1 Root Scanning barrier lock", false, Monitor::_safepoint_check_never),
_n_workers_discovered_strong_classes(0) {}
@@ -206,7 +204,7 @@
}
}
- _process_strong_tasks->all_tasks_completed();
+ _process_strong_tasks->all_tasks_completed(n_workers());
}
void G1RootProcessor::process_strong_roots(OopClosure* oops,
@@ -216,7 +214,7 @@
process_java_roots(oops, clds, clds, NULL, blobs, NULL, 0);
process_vm_roots(oops, NULL, NULL, 0);
- _process_strong_tasks->all_tasks_completed();
+ _process_strong_tasks->all_tasks_completed(n_workers());
}
void G1RootProcessor::process_all_roots(OopClosure* oops,
@@ -230,7 +228,7 @@
CodeCache::blobs_do(blobs);
}
- _process_strong_tasks->all_tasks_completed();
+ _process_strong_tasks->all_tasks_completed(n_workers());
}
void G1RootProcessor::process_java_roots(OopClosure* strong_roots,
@@ -253,7 +251,7 @@
{
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ThreadRoots, worker_i);
- bool is_par = _g1h->n_par_threads() > 0;
+ bool is_par = n_workers() > 1;
Threads::possibly_parallel_oops_do(is_par, strong_roots, thread_stack_clds, strong_code);
}
}
@@ -329,6 +327,6 @@
_g1h->g1_rem_set()->oops_into_collection_set_do(scan_rs, &scavenge_cs_nmethods, worker_i);
}
-void G1RootProcessor::set_num_workers(uint active_workers) {
- _process_strong_tasks->set_n_threads(active_workers);
+uint G1RootProcessor::n_workers() const {
+ return _srs.n_threads();
}
--- a/hotspot/src/share/vm/gc/g1/g1RootProcessor.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1RootProcessor.hpp Fri May 29 12:49:31 2015 +0200
@@ -85,7 +85,7 @@
uint worker_i);
public:
- G1RootProcessor(G1CollectedHeap* g1h);
+ G1RootProcessor(G1CollectedHeap* g1h, uint n_workers);
// Apply closures to the strongly and weakly reachable roots in the system
// in a single pass.
@@ -114,8 +114,8 @@
OopClosure* scan_non_heap_weak_roots,
uint worker_i);
- // Inform the root processor about the number of worker threads
- void set_num_workers(uint active_workers);
+ // Number of worker threads used by the root processor.
+ uint n_workers() const;
};
#endif // SHARE_VM_GC_G1_G1ROOTPROCESSOR_HPP
--- a/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp Fri May 29 12:49:31 2015 +0200
@@ -153,9 +153,7 @@
G1StringDedupUnlinkOrOopsDoTask task(is_alive, keep_alive, allow_resize_and_rehash, phase_times);
G1CollectedHeap* g1h = G1CollectedHeap::heap();
- g1h->set_par_threads();
g1h->workers()->run_task(&task);
- g1h->set_par_threads(0);
}
void G1StringDedup::threads_do(ThreadClosure* tc) {
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp Fri May 29 12:49:31 2015 +0200
@@ -42,7 +42,7 @@
_cancel(false),
_empty(true),
_dropped(0) {
- _nqueues = MAX2(ParallelGCThreads, (size_t)1);
+ _nqueues = ParallelGCThreads;
_queues = NEW_C_HEAP_ARRAY(G1StringDedupWorkerQueue, _nqueues, mtGC);
for (size_t i = 0; i < _nqueues; i++) {
new (_queues + i) G1StringDedupWorkerQueue(G1StringDedupWorkerQueue::default_segment_size(), _max_cache_size, _max_size);
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupTable.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupTable.cpp Fri May 29 12:49:31 2015 +0200
@@ -112,7 +112,7 @@
};
G1StringDedupEntryCache::G1StringDedupEntryCache() {
- _nlists = MAX2(ParallelGCThreads, (size_t)1);
+ _nlists = ParallelGCThreads;
_lists = PaddedArray<G1StringDedupEntryFreeList, mtGC>::create_unfreeable((uint)_nlists);
}
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp Fri May 29 12:49:31 2015 +0200
@@ -832,9 +832,9 @@
_ref_processor =
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
- (int) ParallelGCThreads, // mt processing degree
+ (uint) ParallelGCThreads, // mt processing degree
true, // mt discovery
- (int) ParallelGCThreads, // mt discovery degree
+ (uint) ParallelGCThreads, // mt discovery degree
true, // atomic_discovery
&_is_alive_closure); // non-header is alive closure
_counters = new CollectorCounters("PSParallelCompact", 1);
@@ -2029,7 +2029,6 @@
// Set the number of GC threads to be used in this collection
gc_task_manager()->set_active_gang();
gc_task_manager()->task_idle_workers();
- heap->set_par_threads(gc_task_manager()->active_workers());
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer.gc_id());
--- a/hotspot/src/share/vm/gc/parallel/psScavenge.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/parallel/psScavenge.cpp Fri May 29 12:49:31 2015 +0200
@@ -382,7 +382,6 @@
// Get the active number of workers here and use that value
// throughout the methods.
uint active_workers = gc_task_manager()->active_workers();
- heap->set_par_threads(active_workers);
PSPromotionManager::pre_scavenge();
@@ -846,9 +845,9 @@
_ref_processor =
new ReferenceProcessor(mr, // span
ParallelRefProcEnabled && (ParallelGCThreads > 1), // mt processing
- (int) ParallelGCThreads, // mt processing degree
+ (uint) ParallelGCThreads, // mt processing degree
true, // mt discovery
- (int) ParallelGCThreads, // mt discovery degree
+ (uint) ParallelGCThreads, // mt discovery degree
true, // atomic_discovery
NULL); // header provides liveness info
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp Fri May 29 12:49:31 2015 +0200
@@ -38,6 +38,7 @@
#include "gc/shared/referencePolicy.hpp"
#include "gc/shared/space.inline.hpp"
#include "gc/shared/spaceDecorator.hpp"
+#include "gc/shared/strongRootsScope.hpp"
#include "memory/iterator.hpp"
#include "oops/instanceRefKlass.hpp"
#include "oops/oop.inline.hpp"
@@ -454,7 +455,7 @@
}
}
-void DefNewGeneration::younger_refs_iterate(OopsInGenClosure* cl) {
+void DefNewGeneration::younger_refs_iterate(OopsInGenClosure* cl, uint n_threads) {
assert(false, "NYI -- are you sure you want to call this?");
}
@@ -625,15 +626,22 @@
assert(gch->no_allocs_since_save_marks(0),
"save marks have not been newly set.");
- gch->gen_process_roots(_level,
- true, // Process younger gens, if any,
- // as strong roots.
- true, // activate StrongRootsScope
- GenCollectedHeap::SO_ScavengeCodeCache,
- GenCollectedHeap::StrongAndWeakRoots,
- &fsc_with_no_gc_barrier,
- &fsc_with_gc_barrier,
- &cld_scan_closure);
+ {
+ // DefNew needs to run with n_threads == 0, to make sure the serial
+ // version of the card table scanning code is used.
+ // See: CardTableModRefBS::non_clean_card_iterate_possibly_parallel.
+ StrongRootsScope srs(0);
+
+ gch->gen_process_roots(&srs,
+ _level,
+ true, // Process younger gens, if any,
+ // as strong roots.
+ GenCollectedHeap::SO_ScavengeCodeCache,
+ GenCollectedHeap::StrongAndWeakRoots,
+ &fsc_with_no_gc_barrier,
+ &fsc_with_gc_barrier,
+ &cld_scan_closure);
+ }
// "evacuate followers".
evacuate_followers.do_void();
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.hpp Fri May 29 12:49:31 2015 +0200
@@ -255,7 +255,7 @@
// Iteration
void object_iterate(ObjectClosure* blk);
- void younger_refs_iterate(OopsInGenClosure* cl);
+ void younger_refs_iterate(OopsInGenClosure* cl, uint n_threads);
void space_iterate(SpaceClosure* blk, bool usedOnly = false);
--- a/hotspot/src/share/vm/gc/serial/genMarkSweep.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/serial/genMarkSweep.cpp Fri May 29 12:49:31 2015 +0200
@@ -40,6 +40,7 @@
#include "gc/shared/modRefBarrierSet.hpp"
#include "gc/shared/referencePolicy.hpp"
#include "gc/shared/space.hpp"
+#include "gc/shared/strongRootsScope.hpp"
#include "oops/instanceRefKlass.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
@@ -200,14 +201,18 @@
// Need new claim bits before marking starts.
ClassLoaderDataGraph::clear_claimed_marks();
- gch->gen_process_roots(level,
- false, // Younger gens are not roots.
- true, // activate StrongRootsScope
- GenCollectedHeap::SO_None,
- GenCollectedHeap::StrongRootsOnly,
- &follow_root_closure,
- &follow_root_closure,
- &follow_cld_closure);
+ {
+ StrongRootsScope srs(1);
+
+ gch->gen_process_roots(&srs,
+ level,
+ false, // Younger gens are not roots.
+ GenCollectedHeap::SO_None,
+ GenCollectedHeap::StrongRootsOnly,
+ &follow_root_closure,
+ &follow_root_closure,
+ &follow_cld_closure);
+ }
// Process reference objects found during marking
{
@@ -284,14 +289,18 @@
assert(level == 1, "We don't use mark-sweep on young generations.");
adjust_pointer_closure.set_orig_generation(gch->old_gen());
- gch->gen_process_roots(level,
- false, // Younger gens are not roots.
- true, // activate StrongRootsScope
- GenCollectedHeap::SO_AllCodeCache,
- GenCollectedHeap::StrongAndWeakRoots,
- &adjust_pointer_closure,
- &adjust_pointer_closure,
- &adjust_cld_closure);
+ {
+ StrongRootsScope srs(1);
+
+ gch->gen_process_roots(&srs,
+ level,
+ false, // Younger gens are not roots.
+ GenCollectedHeap::SO_AllCodeCache,
+ GenCollectedHeap::StrongAndWeakRoots,
+ &adjust_pointer_closure,
+ &adjust_pointer_closure,
+ &adjust_cld_closure);
+ }
gch->gen_process_weak_roots(&adjust_pointer_closure);
--- a/hotspot/src/share/vm/gc/shared/adaptiveSizePolicy.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/adaptiveSizePolicy.cpp Fri May 29 12:49:31 2015 +0200
@@ -161,7 +161,7 @@
}
_debug_perturbation = !_debug_perturbation;
}
- assert((new_active_workers <= (uintx) ParallelGCThreads) &&
+ assert((new_active_workers <= ParallelGCThreads) &&
(new_active_workers >= min_workers),
"Jiggled active workers too much");
}
--- a/hotspot/src/share/vm/gc/shared/cardGeneration.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardGeneration.cpp Fri May 29 12:49:31 2015 +0200
@@ -353,8 +353,8 @@
blk->do_space(space());
}
-void CardGeneration::younger_refs_iterate(OopsInGenClosure* blk) {
+void CardGeneration::younger_refs_iterate(OopsInGenClosure* blk, uint n_threads) {
blk->set_generation(this);
- younger_refs_in_space_iterate(space(), blk);
+ younger_refs_in_space_iterate(space(), blk, n_threads);
blk->reset_generation();
}
--- a/hotspot/src/share/vm/gc/shared/cardGeneration.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardGeneration.hpp Fri May 29 12:49:31 2015 +0200
@@ -89,7 +89,7 @@
void space_iterate(SpaceClosure* blk, bool usedOnly = false);
- void younger_refs_iterate(OopsInGenClosure* blk);
+ void younger_refs_iterate(OopsInGenClosure* blk, uint n_threads);
bool is_in(const void* p) const;
--- a/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardTableModRefBS.cpp Fri May 29 12:49:31 2015 +0200
@@ -440,31 +440,11 @@
void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp,
MemRegion mr,
OopsInGenClosure* cl,
- CardTableRS* ct) {
+ CardTableRS* ct,
+ uint n_threads) {
if (!mr.is_empty()) {
- // Caller (process_roots()) claims that all GC threads
- // execute this call. With UseDynamicNumberOfGCThreads now all
- // active GC threads execute this call. The number of active GC
- // threads needs to be passed to par_non_clean_card_iterate_work()
- // to get proper partitioning and termination.
- //
- // This is an example of where n_par_threads() is used instead
- // of workers()->active_workers(). n_par_threads can be set to 0 to
- // turn off parallelism. For example when this code is called as
- // part of verification during root processing then n_par_threads()
- // may have been set to 0. active_workers is not overloaded with
- // the meaning that it is a switch to disable parallelism and so keeps
- // the meaning of the number of active gc workers. If parallelism has
- // not been shut off by setting n_par_threads to 0, then n_par_threads
- // should be equal to active_workers. When a different mechanism for
- // shutting off parallelism is used, then active_workers can be used in
- // place of n_par_threads.
- int n_threads = GenCollectedHeap::heap()->n_par_threads();
- bool is_par = n_threads > 0;
- if (is_par) {
+ if (n_threads > 0) {
#if INCLUDE_ALL_GCS
- assert(GenCollectedHeap::heap()->n_par_threads() ==
- GenCollectedHeap::heap()->workers()->active_workers(), "Mismatch");
non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads);
#else // INCLUDE_ALL_GCS
fatal("Parallel gc not supported here.");
@@ -472,8 +452,11 @@
} else {
// clear_cl finds contiguous dirty ranges of cards to process and clear.
- DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(), cl->gen_boundary());
- ClearNoncleanCardWrapper clear_cl(dcto_cl, ct);
+ // This is the single-threaded version used by DefNew.
+ const bool parallel = false;
+
+ DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(), cl->gen_boundary(), parallel);
+ ClearNoncleanCardWrapper clear_cl(dcto_cl, ct, parallel);
clear_cl.do_MemRegion(mr);
}
--- a/hotspot/src/share/vm/gc/shared/cardTableModRefBS.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardTableModRefBS.hpp Fri May 29 12:49:31 2015 +0200
@@ -178,14 +178,15 @@
// region mr in the given space and apply cl to any dirty sub-regions
// of mr. Clears the dirty cards as they are processed.
void non_clean_card_iterate_possibly_parallel(Space* sp, MemRegion mr,
- OopsInGenClosure* cl, CardTableRS* ct);
+ OopsInGenClosure* cl, CardTableRS* ct,
+ uint n_threads);
private:
// Work method used to implement non_clean_card_iterate_possibly_parallel()
// above in the parallel case.
void non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
OopsInGenClosure* cl, CardTableRS* ct,
- int n_threads);
+ uint n_threads);
protected:
// Dirty the bytes corresponding to "mr" (not all of which must be
--- a/hotspot/src/share/vm/gc/shared/cardTableRS.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardTableRS.cpp Fri May 29 12:49:31 2015 +0200
@@ -102,9 +102,10 @@
}
void CardTableRS::younger_refs_iterate(Generation* g,
- OopsInGenClosure* blk) {
+ OopsInGenClosure* blk,
+ uint n_threads) {
_last_cur_val_in_gen[g->level()+1] = cur_youngergen_card_val();
- g->younger_refs_iterate(blk);
+ g->younger_refs_iterate(blk, n_threads);
}
inline bool ClearNoncleanCardWrapper::clear_card(jbyte* entry) {
@@ -164,15 +165,8 @@
}
ClearNoncleanCardWrapper::ClearNoncleanCardWrapper(
- DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct) :
- _dirty_card_closure(dirty_card_closure), _ct(ct) {
- // Cannot yet substitute active_workers for n_par_threads
- // in the case where parallelism is being turned off by
- // setting n_par_threads to 0.
- _is_par = (GenCollectedHeap::heap()->n_par_threads() > 0);
- assert(!_is_par ||
- (GenCollectedHeap::heap()->n_par_threads() ==
- GenCollectedHeap::heap()->workers()->active_workers()), "Mismatch");
+ DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct, bool is_par) :
+ _dirty_card_closure(dirty_card_closure), _ct(ct), _is_par(is_par) {
}
bool ClearNoncleanCardWrapper::is_word_aligned(jbyte* entry) {
@@ -272,7 +266,8 @@
}
void CardTableRS::younger_refs_in_space_iterate(Space* sp,
- OopsInGenClosure* cl) {
+ OopsInGenClosure* cl,
+ uint n_threads) {
const MemRegion urasm = sp->used_region_at_save_marks();
#ifdef ASSERT
// Convert the assertion check to a warning if we are running
@@ -301,7 +296,7 @@
ShouldNotReachHere();
}
#endif
- _ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this);
+ _ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
}
void CardTableRS::clear_into_younger(Generation* old_gen) {
--- a/hotspot/src/share/vm/gc/shared/cardTableRS.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/cardTableRS.hpp Fri May 29 12:49:31 2015 +0200
@@ -56,7 +56,7 @@
CardTableModRefBSForCTRS* _ct_bs;
- virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
+ virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl, uint n_threads);
void verify_space(Space* s, HeapWord* gen_start);
@@ -116,7 +116,7 @@
// Card table entries are cleared before application; "blk" is
// responsible for dirtying if the oop is still older-to-younger after
// closure application.
- void younger_refs_iterate(Generation* g, OopsInGenClosure* blk);
+ void younger_refs_iterate(Generation* g, OopsInGenClosure* blk, uint n_threads);
void inline_write_ref_field_gc(void* field, oop new_val) {
jbyte* byte = _ct_bs->byte_for(field);
@@ -183,7 +183,7 @@
bool is_word_aligned(jbyte* entry);
public:
- ClearNoncleanCardWrapper(DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct);
+ ClearNoncleanCardWrapper(DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct, bool is_par);
void do_MemRegion(MemRegion mr);
};
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Fri May 29 12:49:31 2015 +0200
@@ -160,8 +160,7 @@
// Memory state functions.
-CollectedHeap::CollectedHeap() : _n_par_threads(0)
-{
+CollectedHeap::CollectedHeap() {
const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT));
const size_t elements_per_word = HeapWordSize / sizeof(jint);
_filler_array_max_size = align_object_size(filler_array_hdr_size() +
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.hpp Fri May 29 12:49:31 2015 +0200
@@ -101,7 +101,6 @@
protected:
BarrierSet* _barrier_set;
bool _is_gc_active;
- uint _n_par_threads;
unsigned int _total_collections; // ... started
unsigned int _total_full_collections; // ... started
@@ -291,12 +290,6 @@
}
GCCause::Cause gc_cause() { return _gc_cause; }
- // Number of threads currently working on GC tasks.
- uint n_par_threads() { return _n_par_threads; }
-
- // May be overridden to set additional parallelism.
- virtual void set_par_threads(uint t) { _n_par_threads = t; };
-
// General obj/array allocation facilities.
inline static oop obj_allocate(KlassHandle klass, int size, TRAPS);
inline static oop array_allocate(KlassHandle klass, int size, int length, TRAPS);
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.cpp Fri May 29 12:49:31 2015 +0200
@@ -561,16 +561,6 @@
return collector_policy()->satisfy_failed_allocation(size, is_tlab);
}
-void GenCollectedHeap::set_par_threads(uint t) {
- assert(t == 0 || !UseSerialGC, "Cannot have parallel threads");
- CollectedHeap::set_par_threads(t);
- set_n_termination(t);
-}
-
-void GenCollectedHeap::set_n_termination(uint t) {
- _process_strong_tasks->set_n_threads(t);
-}
-
#ifdef ASSERT
class AssertNonScavengableClosure: public OopClosure {
public:
@@ -582,15 +572,13 @@
static AssertNonScavengableClosure assert_is_non_scavengable_closure;
#endif
-void GenCollectedHeap::process_roots(bool activate_scope,
+void GenCollectedHeap::process_roots(StrongRootsScope* scope,
ScanningOption so,
OopClosure* strong_roots,
OopClosure* weak_roots,
CLDClosure* strong_cld_closure,
CLDClosure* weak_cld_closure,
CodeBlobClosure* code_roots) {
- StrongRootsScope srs(activate_scope);
-
// General roots.
assert(Threads::thread_claim_parity() != 0, "must have called prologue code");
assert(code_roots != NULL, "code root closure should always be set");
@@ -609,7 +597,7 @@
// Only process code roots from thread stacks if we aren't visiting the entire CodeCache anyway
CodeBlobClosure* roots_from_code_p = (so & SO_AllCodeCache) ? NULL : code_roots;
- bool is_par = n_par_threads() > 0;
+ bool is_par = scope->n_threads() > 1;
Threads::possibly_parallel_oops_do(is_par, strong_roots, roots_from_clds_p, roots_from_code_p);
if (!_process_strong_tasks->is_task_claimed(GCH_PS_Universe_oops_do)) {
@@ -669,9 +657,9 @@
}
-void GenCollectedHeap::gen_process_roots(int level,
+void GenCollectedHeap::gen_process_roots(StrongRootsScope* scope,
+ int level,
bool younger_gens_as_roots,
- bool activate_scope,
ScanningOption so,
bool only_strong_roots,
OopsInGenClosure* not_older_gens,
@@ -689,7 +677,7 @@
OopsInGenClosure* weak_roots = only_strong_roots ? NULL : not_older_gens;
CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
- process_roots(activate_scope, so,
+ process_roots(scope, so,
not_older_gens, weak_roots,
cld_closure, weak_cld_closure,
&mark_code_closure);
@@ -707,11 +695,11 @@
// older-gen scanning.
if (level == 0) {
older_gens->set_generation(_old_gen);
- rem_set()->younger_refs_iterate(_old_gen, older_gens);
+ rem_set()->younger_refs_iterate(_old_gen, older_gens, scope->n_threads());
older_gens->reset_generation();
}
- _process_strong_tasks->all_tasks_completed();
+ _process_strong_tasks->all_tasks_completed(scope->n_threads());
}
--- a/hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/genCollectedHeap.hpp Fri May 29 12:49:31 2015 +0200
@@ -30,8 +30,9 @@
#include "gc/shared/collectorPolicy.hpp"
#include "gc/shared/generation.hpp"
+class FlexibleWorkGang;
+class StrongRootsScope;
class SubTasksDone;
-class FlexibleWorkGang;
// A "GenCollectedHeap" is a CollectedHeap that uses generational
// collection. It has two generations, young and old.
@@ -363,9 +364,6 @@
// asserted to be this type.
static GenCollectedHeap* heap();
- void set_par_threads(uint t);
- void set_n_termination(uint t);
-
// Invoke the "do_oop" method of one of the closures "not_older_gens"
// or "older_gens" on root locations for the generation at
// "level". (The "older_gens" closure is used for scanning references
@@ -385,7 +383,7 @@
};
private:
- void process_roots(bool activate_scope,
+ void process_roots(StrongRootsScope* scope,
ScanningOption so,
OopClosure* strong_roots,
OopClosure* weak_roots,
@@ -393,24 +391,13 @@
CLDClosure* weak_cld_closure,
CodeBlobClosure* code_roots);
- void gen_process_roots(int level,
- bool younger_gens_as_roots,
- bool activate_scope,
- ScanningOption so,
- OopsInGenClosure* not_older_gens,
- OopsInGenClosure* weak_roots,
- OopsInGenClosure* older_gens,
- CLDClosure* cld_closure,
- CLDClosure* weak_cld_closure,
- CodeBlobClosure* code_closure);
-
public:
static const bool StrongAndWeakRoots = false;
static const bool StrongRootsOnly = true;
- void gen_process_roots(int level,
+ void gen_process_roots(StrongRootsScope* scope,
+ int level,
bool younger_gens_as_roots,
- bool activate_scope,
ScanningOption so,
bool only_strong_roots,
OopsInGenClosure* not_older_gens,
--- a/hotspot/src/share/vm/gc/shared/genOopClosures.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/genOopClosures.hpp Fri May 29 12:49:31 2015 +0200
@@ -35,11 +35,6 @@
class DefNewGeneration;
class KlassRemSet;
-template<class E, MEMFLAGS F, unsigned int N> class GenericTaskQueue;
-typedef GenericTaskQueue<oop, mtGC, TASKQUEUE_SIZE> OopTaskQueue;
-template<class T, MEMFLAGS F> class GenericTaskQueueSet;
-typedef GenericTaskQueueSet<OopTaskQueue, mtGC> OopTaskQueueSet;
-
// Closure for iterating roots from a particular generation
// Note: all classes deriving from this MUST call this do_barrier
// method at the end of their own do_oop method!
--- a/hotspot/src/share/vm/gc/shared/genRemSet.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/genRemSet.hpp Fri May 29 12:49:31 2015 +0200
@@ -77,10 +77,11 @@
// 1) that are in objects allocated in "g" at the time of the last call
// to "save_Marks", and
// 2) that point to objects in younger generations.
- virtual void younger_refs_iterate(Generation* g, OopsInGenClosure* blk) = 0;
+ virtual void younger_refs_iterate(Generation* g, OopsInGenClosure* blk, uint n_threads) = 0;
virtual void younger_refs_in_space_iterate(Space* sp,
- OopsInGenClosure* cl) = 0;
+ OopsInGenClosure* cl,
+ uint n_threads) = 0;
// This method is used to notify the remembered set that "new_val" has
// been written into "field" by the garbage collector.
--- a/hotspot/src/share/vm/gc/shared/generation.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/generation.cpp Fri May 29 12:49:31 2015 +0200
@@ -293,9 +293,10 @@
}
void Generation::younger_refs_in_space_iterate(Space* sp,
- OopsInGenClosure* cl) {
+ OopsInGenClosure* cl,
+ uint n_threads) {
GenRemSet* rs = GenCollectedHeap::heap()->rem_set();
- rs->younger_refs_in_space_iterate(sp, cl);
+ rs->younger_refs_in_space_iterate(sp, cl, n_threads);
}
class GenerationObjIterateClosure : public SpaceClosure {
--- a/hotspot/src/share/vm/gc/shared/generation.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/generation.hpp Fri May 29 12:49:31 2015 +0200
@@ -122,7 +122,7 @@
// The iteration is only over objects allocated at the start of the
// iterations; objects allocated as a result of applying the closure are
// not included.
- void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
+ void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl, uint n_threads);
public:
// The set of possible generation kinds.
@@ -526,7 +526,7 @@
// in the current generation that contain pointers to objects in younger
// generations. Objects allocated since the last "save_marks" call are
// excluded.
- virtual void younger_refs_iterate(OopsInGenClosure* cl) = 0;
+ virtual void younger_refs_iterate(OopsInGenClosure* cl, uint n_threads) = 0;
// Inform a generation that it longer contains references to objects
// in any younger generation. [e.g. Because younger gens are empty,
--- a/hotspot/src/share/vm/gc/shared/space.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/space.cpp Fri May 29 12:49:31 2015 +0200
@@ -181,7 +181,8 @@
DirtyCardToOopClosure* Space::new_dcto_cl(ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary) {
+ HeapWord* boundary,
+ bool parallel) {
return new DirtyCardToOopClosure(this, cl, precision, boundary);
}
@@ -260,7 +261,8 @@
DirtyCardToOopClosure*
ContiguousSpace::new_dcto_cl(ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary) {
+ HeapWord* boundary,
+ bool parallel) {
return new ContiguousSpaceDCTOC(this, cl, precision, boundary);
}
--- a/hotspot/src/share/vm/gc/shared/space.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/space.hpp Fri May 29 12:49:31 2015 +0200
@@ -183,7 +183,8 @@
// operate. ResourceArea allocated.
virtual DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary = NULL);
+ HeapWord* boundary,
+ bool parallel);
// If "p" is in the space, returns the address of the start of the
// "block" that contains "p". We say "block" instead of "object" since
@@ -629,7 +630,8 @@
// Override.
DirtyCardToOopClosure* new_dcto_cl(ExtendedOopClosure* cl,
CardTableModRefBS::PrecisionStyle precision,
- HeapWord* boundary = NULL);
+ HeapWord* boundary,
+ bool parallel);
// Apply "blk->do_oop" to the addresses of all reference fields in objects
// starting with the _saved_mark_word, which was noted during a generation's
--- a/hotspot/src/share/vm/gc/shared/strongRootsScope.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/strongRootsScope.cpp Fri May 29 12:49:31 2015 +0200
@@ -28,24 +28,18 @@
#include "gc/shared/strongRootsScope.hpp"
#include "runtime/thread.hpp"
-MarkScope::MarkScope(bool activate) : _active(activate) {
- if (_active) {
- nmethod::oops_do_marking_prologue();
- }
+MarkScope::MarkScope() {
+ nmethod::oops_do_marking_prologue();
}
MarkScope::~MarkScope() {
- if (_active) {
- nmethod::oops_do_marking_epilogue();
- }
+ nmethod::oops_do_marking_epilogue();
}
-StrongRootsScope::StrongRootsScope(bool activate) : MarkScope(activate) {
- if (_active) {
- Threads::change_thread_claim_parity();
- // Zero the claimed high water mark in the StringTable
- StringTable::clear_parallel_claimed_index();
- }
+StrongRootsScope::StrongRootsScope(uint n_threads) : _n_threads(n_threads) {
+ Threads::change_thread_claim_parity();
+ // Zero the claimed high water mark in the StringTable
+ StringTable::clear_parallel_claimed_index();
}
StrongRootsScope::~StrongRootsScope() {
--- a/hotspot/src/share/vm/gc/shared/strongRootsScope.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/strongRootsScope.hpp Fri May 29 12:49:31 2015 +0200
@@ -29,18 +29,21 @@
class MarkScope : public StackObj {
protected:
- bool _active;
- public:
- MarkScope(bool activate = true);
+ MarkScope();
~MarkScope();
};
// Sets up and tears down the required state for parallel root processing.
class StrongRootsScope : public MarkScope {
+ // Number of threads participating in the roots processing.
+ const uint _n_threads;
+
public:
- StrongRootsScope(bool activate = true);
+ StrongRootsScope(uint n_threads);
~StrongRootsScope();
+
+ uint n_threads() const { return _n_threads; }
};
#endif // SHARE_VM_GC_SHARED_STRONGROOTSSCOPE_HPP
--- a/hotspot/src/share/vm/gc/shared/taskqueue.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/taskqueue.hpp Fri May 29 12:49:31 2015 +0200
@@ -382,6 +382,8 @@
bool steal(uint queue_num, int* seed, E& t);
bool peek();
+
+ uint size() const { return _n; }
};
template<class T, MEMFLAGS F> void
--- a/hotspot/src/share/vm/gc/shared/workgroup.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/workgroup.cpp Fri May 29 12:49:31 2015 +0200
@@ -133,8 +133,6 @@
}
void WorkGang::run_task(AbstractGangTask* task, uint no_of_parallel_workers) {
- task->set_for_termination(no_of_parallel_workers);
-
// This thread is executed by the VM thread which does not block
// on ordinary MutexLocker's.
MutexLockerEx ml(monitor(), Mutex::_no_safepoint_check_flag);
@@ -434,7 +432,7 @@
// SubTasksDone functions.
SubTasksDone::SubTasksDone(uint n) :
- _n_tasks(n), _n_threads(1), _tasks(NULL) {
+ _n_tasks(n), _tasks(NULL) {
_tasks = NEW_C_HEAP_ARRAY(uint, n, mtInternal);
guarantee(_tasks != NULL, "alloc failure");
clear();
@@ -444,12 +442,6 @@
return _tasks != NULL;
}
-void SubTasksDone::set_n_threads(uint t) {
- assert(_claimed == 0 || _threads_completed == _n_threads,
- "should not be called while tasks are being processed!");
- _n_threads = (t == 0 ? 1 : t);
-}
-
void SubTasksDone::clear() {
for (uint i = 0; i < _n_tasks; i++) {
_tasks[i] = 0;
@@ -477,7 +469,7 @@
return res;
}
-void SubTasksDone::all_tasks_completed() {
+void SubTasksDone::all_tasks_completed(uint n_threads) {
jint observed = _threads_completed;
jint old;
do {
@@ -485,7 +477,10 @@
observed = Atomic::cmpxchg(old+1, &_threads_completed, old);
} while (observed != old);
// If this was the last thread checking in, clear the tasks.
- if (observed+1 == (jint)_n_threads) clear();
+ uint adjusted_thread_count = (n_threads == 0 ? 1 : n_threads);
+ if (observed + 1 == (jint)adjusted_thread_count) {
+ clear();
+ }
}
--- a/hotspot/src/share/vm/gc/shared/workgroup.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp Fri May 29 12:49:31 2015 +0200
@@ -59,13 +59,6 @@
// The argument tells you which member of the gang you are.
virtual void work(uint worker_id) = 0;
- // This method configures the task for proper termination.
- // Some tasks do not have any requirements on termination
- // and may inherit this method that does nothing. Some
- // tasks do some coordination on termination and override
- // this method to implement that coordination.
- virtual void set_for_termination(uint active_workers) {};
-
// Debugging accessor for the name.
const char* name() const PRODUCT_RETURN_(return NULL;);
int counter() { return _counter; }
@@ -99,12 +92,9 @@
OopTaskQueueSet* _queues;
ParallelTaskTerminator _terminator;
public:
- AbstractGangTaskWOopQueues(const char* name, OopTaskQueueSet* queues) :
- AbstractGangTask(name), _queues(queues), _terminator(0, _queues) {}
+ AbstractGangTaskWOopQueues(const char* name, OopTaskQueueSet* queues, uint n_threads) :
+ AbstractGangTask(name), _queues(queues), _terminator(n_threads, _queues) {}
ParallelTaskTerminator* terminator() { return &_terminator; }
- virtual void set_for_termination(uint active_workers) {
- terminator()->reset_for_reuse(active_workers);
- }
OopTaskQueueSet* queues() { return _queues; }
};
@@ -315,16 +305,20 @@
uint _active_workers;
public:
// Constructor and destructor.
- // Initialize active_workers to a minimum value. Setting it to
- // the parameter "workers" will initialize it to a maximum
- // value which is not desirable.
FlexibleWorkGang(const char* name, uint workers,
bool are_GC_task_threads,
bool are_ConcurrentGC_threads) :
WorkGang(name, workers, are_GC_task_threads, are_ConcurrentGC_threads),
- _active_workers(UseDynamicNumberOfGCThreads ? 1U : ParallelGCThreads) {}
- // Accessors for fields
- virtual uint active_workers() const { return _active_workers; }
+ _active_workers(UseDynamicNumberOfGCThreads ? 1U : workers) {}
+
+ // Accessors for fields.
+ virtual uint active_workers() const {
+ assert(_active_workers <= _total_workers,
+ err_msg("_active_workers: %u > _total_workers: %u", _active_workers, _total_workers));
+ assert(UseDynamicNumberOfGCThreads || _active_workers == _total_workers,
+ "Unless dynamic should use total workers");
+ return _active_workers;
+ }
void set_active_workers(uint v) {
assert(v <= _total_workers,
"Trying to set more workers active than there are");
@@ -390,12 +384,6 @@
class SubTasksDone: public CHeapObj<mtInternal> {
uint* _tasks;
uint _n_tasks;
- // _n_threads is used to determine when a sub task is done.
- // It does not control how many threads will execute the subtask
- // but must be initialized to the number that do execute the task
- // in order to correctly decide when the subtask is done (all the
- // threads working on the task have finished).
- uint _n_threads;
uint _threads_completed;
#ifdef ASSERT
volatile uint _claimed;
@@ -413,11 +401,6 @@
// True iff the object is in a valid state.
bool valid();
- // Get/set the number of parallel threads doing the tasks to "t". Can only
- // be called before tasks start or after they are complete.
- uint n_threads() { return _n_threads; }
- void set_n_threads(uint t);
-
// Returns "false" if the task "t" is unclaimed, and ensures that task is
// claimed. The task "t" is required to be within the range of "this".
bool is_task_claimed(uint t);
@@ -426,7 +409,9 @@
// tasks that it will try to claim. Every thread in the parallel task
// must execute this. (When the last thread does so, the task array is
// cleared.)
- void all_tasks_completed();
+ //
+ // n_threads - Number of threads executing the sub-tasks.
+ void all_tasks_completed(uint n_threads);
// Destructor.
~SubTasksDone();
--- a/hotspot/src/share/vm/memory/iterator.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/memory/iterator.hpp Fri May 29 12:49:31 2015 +0200
@@ -381,9 +381,4 @@
template <class OopClosureType> static bool do_metadata(OopClosureType* closure);
};
-// Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions.
-#define nvs_nv_to_bool true
-#define nvs_v_to_bool false
-#define nvs_to_bool(nv_suffix) nvs##nv_suffix##_to_bool
-
#endif // SHARE_VM_MEMORY_ITERATOR_HPP
--- a/hotspot/src/share/vm/oops/arrayKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/arrayKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -144,4 +144,36 @@
void oop_verify_on(oop obj, outputStream* st);
};
+// Array oop iteration macros for declarations.
+// Used to generate the declarations in the *ArrayKlass header files.
+
+#define OOP_OOP_ITERATE_DECL_RANGE(OopClosureType, nv_suffix) \
+ int oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end);
+
+#if INCLUDE_ALL_GCS
+// Named NO_BACKWARDS because the definition used by *ArrayKlass isn't reversed, see below.
+#define OOP_OOP_ITERATE_DECL_NO_BACKWARDS(OopClosureType, nv_suffix) \
+ int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
+#endif // INCLUDE_ALL_GCS
+
+
+// Array oop iteration macros for definitions.
+// Used to generate the definitions in the *ArrayKlass.inline.hpp files.
+
+#define OOP_OOP_ITERATE_DEFN_RANGE(KlassType, OopClosureType, nv_suffix) \
+ \
+int KlassType::oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end) { \
+ return oop_oop_iterate_range<nvs_to_bool(nv_suffix)>(obj, closure, start, end); \
+}
+
+#if INCLUDE_ALL_GCS
+#define OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(KlassType, OopClosureType, nv_suffix) \
+int KlassType::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
+ /* No reverse implementation ATM. */ \
+ return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
+}
+#else
+#define OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(KlassType, OopClosureType, nv_suffix)
+#endif
+
#endif // SHARE_VM_OOPS_ARRAYKLASS_HPP
--- a/hotspot/src/share/vm/oops/instanceClassLoaderKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceClassLoaderKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -87,19 +87,12 @@
public:
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \
- int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
#if INCLUDE_ALL_GCS
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
#endif // INCLUDE_ALL_GCS
};
--- a/hotspot/src/share/vm/oops/instanceClassLoaderKlass.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceClassLoaderKlass.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -78,33 +78,9 @@
return size;
}
-
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- \
-int InstanceClassLoaderKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
- \
-int InstanceClassLoaderKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-#else
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
- \
-int InstanceClassLoaderKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) { \
- return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr); \
-}
-
#define ALL_INSTANCE_CLASS_LOADER_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN( OopClosureType, nv_suffix) \
- InstanceClassLoaderKlass_OOP_OOP_ITERATE_DEFN_m( OopClosureType, nv_suffix) \
- InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+ OOP_OOP_ITERATE_DEFN( InstanceClassLoaderKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BOUNDED( InstanceClassLoaderKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceClassLoaderKlass, OopClosureType, nv_suffix)
#endif // SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -1087,19 +1087,12 @@
public:
-#define InstanceKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure); \
- int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
#if INCLUDE_ALL_GCS
-#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
#endif // INCLUDE_ALL_GCS
u2 idnum_allocated_count() const { return _idnum_allocated_count; }
--- a/hotspot/src/share/vm/oops/instanceKlass.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceKlass.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
#include "memory/iterator.hpp"
#include "oops/instanceKlass.hpp"
+#include "oops/klass.hpp"
#include "oops/oop.inline.hpp"
#include "utilities/debug.hpp"
#include "utilities/globalDefinitions.hpp"
@@ -187,29 +188,9 @@
#undef INLINE
-
-#define InstanceKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
-int InstanceKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
-int InstanceKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-#else
-#define InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-#define InstanceKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
-int InstanceKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) { \
- return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr); \
-}
-
#define ALL_INSTANCE_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- InstanceKlass_OOP_OOP_ITERATE_DEFN( OopClosureType, nv_suffix) \
- InstanceKlass_OOP_OOP_ITERATE_DEFN_m( OopClosureType, nv_suffix) \
- InstanceKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+ OOP_OOP_ITERATE_DEFN( InstanceKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BOUNDED( InstanceKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceKlass, OopClosureType, nv_suffix)
#endif // SHARE_VM_OOPS_INSTANCEKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/instanceMirrorKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceMirrorKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -149,19 +149,12 @@
public:
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \
- int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
#if INCLUDE_ALL_GCS
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
#endif // INCLUDE_ALL_GCS
};
--- a/hotspot/src/share/vm/oops/instanceMirrorKlass.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceMirrorKlass.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
#include "classfile/javaClasses.hpp"
#include "oops/instanceKlass.inline.hpp"
#include "oops/instanceMirrorKlass.hpp"
+#include "oops/klass.hpp"
#include "oops/oop.inline.hpp"
#include "utilities/debug.hpp"
#include "utilities/globalDefinitions.hpp"
@@ -132,33 +133,9 @@
return oop_size(obj);
}
-
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- \
-int InstanceMirrorKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
- \
-int InstanceMirrorKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-#else
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
- \
-int InstanceMirrorKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) { \
- return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr); \
-}
-
#define ALL_INSTANCE_MIRROR_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN( OopClosureType, nv_suffix) \
- InstanceMirrorKlass_OOP_OOP_ITERATE_DEFN_m( OopClosureType, nv_suffix) \
- InstanceMirrorKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+ OOP_OOP_ITERATE_DEFN( InstanceMirrorKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BOUNDED( InstanceMirrorKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceMirrorKlass, OopClosureType, nv_suffix)
#endif // SHARE_VM_OOPS_INSTANCEMIRRORKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/instanceRefKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -119,19 +119,12 @@
public:
-#define InstanceRefKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure); \
- int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
#if INCLUDE_ALL_GCS
-#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_BACKWARDS)
#endif // INCLUDE_ALL_GCS
static void release_and_notify_pending_list_lock(BasicLock *pending_list_basic_lock);
--- a/hotspot/src/share/vm/oops/instanceRefKlass.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/instanceRefKlass.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -141,34 +141,9 @@
// Macro to define InstanceRefKlass::oop_oop_iterate for virtual/nonvirtual for
// all closures. Macros calling macros above for each oop size.
-
-#define InstanceRefKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- \
-int InstanceRefKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-
-#if INCLUDE_ALL_GCS
-#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
- \
-int InstanceRefKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-#else
-#define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
- \
-int InstanceRefKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) { \
- return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr); \
-}
-
#define ALL_INSTANCE_REF_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- InstanceRefKlass_OOP_OOP_ITERATE_DEFN( OopClosureType, nv_suffix) \
- InstanceRefKlass_OOP_OOP_ITERATE_DEFN_m( OopClosureType, nv_suffix) \
- InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-
+ OOP_OOP_ITERATE_DEFN( InstanceRefKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BOUNDED( InstanceRefKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BACKWARDS(InstanceRefKlass, OopClosureType, nv_suffix)
#endif // SHARE_VM_OOPS_INSTANCEREFKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/klass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/klass.hpp Fri May 29 12:49:31 2015 +0200
@@ -583,20 +583,20 @@
// Iterators specialized to particular subtypes
// of ExtendedOopClosure, to avoid closure virtual calls.
-#define Klass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- virtual int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) = 0; \
- /* Iterates "closure" over all the oops in "obj" (of type "this") within "mr". */ \
- virtual int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) = 0;
+#define Klass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
+ virtual int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) = 0; \
+ /* Iterates "closure" over all the oops in "obj" (of type "this") within "mr". */ \
+ virtual int oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr) = 0;
ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL)
ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL)
#if INCLUDE_ALL_GCS
-#define Klass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
+#define Klass_OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix) \
virtual int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) = 0;
- ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(Klass_OOP_OOP_ITERATE_DECL_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(Klass_OOP_OOP_ITERATE_DECL_BACKWARDS)
#endif // INCLUDE_ALL_GCS
virtual void array_klasses_do(void f(Klass* k)) {}
@@ -651,4 +651,44 @@
void klass_update_barrier_set_pre(oop* p, oop v);
};
+// Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions.
+#define nvs_nv_to_bool true
+#define nvs_v_to_bool false
+#define nvs_to_bool(nv_suffix) nvs##nv_suffix##_to_bool
+
+// Oop iteration macros for declarations.
+// Used to generate declarations in the *Klass header files.
+
+#define OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
+ int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure); \
+ int oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr);
+
+#if INCLUDE_ALL_GCS
+#define OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix) \
+ int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
+#endif // INCLUDE_ALL_GCS
+
+
+// Oop iteration macros for definitions.
+// Used to generate definitions in the *Klass.inline.hpp files.
+
+#define OOP_OOP_ITERATE_DEFN(KlassType, OopClosureType, nv_suffix) \
+int KlassType::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
+ return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
+}
+
+#if INCLUDE_ALL_GCS
+#define OOP_OOP_ITERATE_DEFN_BACKWARDS(KlassType, OopClosureType, nv_suffix) \
+int KlassType::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
+ return oop_oop_iterate_reverse<nvs_to_bool(nv_suffix)>(obj, closure); \
+}
+#else
+#define OOP_OOP_ITERATE_DEFN_BACKWARDS(KlassType, OopClosureType, nv_suffix)
+#endif
+
+#define OOP_OOP_ITERATE_DEFN_BOUNDED(KlassType, OopClosureType, nv_suffix) \
+int KlassType::oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr) { \
+ return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr); \
+}
+
#endif // SHARE_VM_OOPS_KLASS_HPP
--- a/hotspot/src/share/vm/oops/objArrayKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/objArrayKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -163,22 +163,14 @@
public:
-#define ObjArrayKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \
- int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, \
- MemRegion mr); \
- int oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* blk, \
- int start, int end);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayKlass_OOP_OOP_ITERATE_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayKlass_OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_RANGE)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_RANGE)
#if INCLUDE_ALL_GCS
-#define ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
#endif // INCLUDE_ALL_GCS
// JVM support
--- a/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,8 @@
#include "memory/memRegion.hpp"
#include "memory/iterator.inline.hpp"
+#include "oops/arrayKlass.hpp"
+#include "oops/klass.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
@@ -149,41 +151,10 @@
return size;
}
-
-#define ObjArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- \
-int ObjArrayKlass::oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-
-#if INCLUDE_ALL_GCS
-#define ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
-int ObjArrayKlass::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
- /* No reverse implementation ATM. */ \
- return oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
-}
-#else
-#define ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-#define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
- \
-int ObjArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) { \
- return oop_oop_iterate_bounded<nvs_to_bool(nv_suffix)>(obj, closure, mr); \
-}
-
-#define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r(OopClosureType, nv_suffix) \
- \
-int ObjArrayKlass::oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end) { \
- return oop_oop_iterate_range<nvs_to_bool(nv_suffix)>(obj, closure, start, end); \
-}
-
-
-#define ALL_OBJ_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- ObjArrayKlass_OOP_OOP_ITERATE_DEFN( OopClosureType, nv_suffix) \
- ObjArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
- ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m( OopClosureType, nv_suffix) \
- ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r( OopClosureType, nv_suffix)
-
+#define ALL_OBJ_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN( ObjArrayKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BOUNDED( ObjArrayKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_RANGE( ObjArrayKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(ObjArrayKlass, OopClosureType, nv_suffix)
#endif // SHARE_VM_OOPS_OBJARRAYKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/oops/oop.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -741,7 +741,7 @@
} \
\
inline int oopDesc::oop_iterate(OopClosureType* blk, MemRegion mr) { \
- return klass()->oop_oop_iterate##nv_suffix##_m(this, blk, mr); \
+ return klass()->oop_oop_iterate_bounded##nv_suffix(this, blk, mr); \
}
--- a/hotspot/src/share/vm/oops/typeArrayKlass.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.hpp Fri May 29 12:49:31 2015 +0200
@@ -92,24 +92,24 @@
// The implementation used by all oop_oop_iterate functions in TypeArrayKlasses.
inline int oop_oop_iterate_impl(oop obj, ExtendedOopClosure* closure);
+ // Wraps oop_oop_iterate_impl to conform to macros.
+ template <bool nv, typename OopClosureType>
+ inline int oop_oop_iterate(oop obj, OopClosureType* closure);
+
+ // Wraps oop_oop_iterate_impl to conform to macros.
+ template <bool nv, typename OopClosureType>
+ inline int oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
+
public:
-#define TypeArrayKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure); \
- int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, \
- MemRegion mr); \
- int oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, \
- int start, int end);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(TypeArrayKlass_OOP_OOP_ITERATE_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(TypeArrayKlass_OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_RANGE)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_RANGE)
#if INCLUDE_ALL_GCS
-#define TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
- int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
-
- ALL_OOP_OOP_ITERATE_CLOSURES_1(TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
- ALL_OOP_OOP_ITERATE_CLOSURES_2(TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
+ ALL_OOP_OOP_ITERATE_CLOSURES_1(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
+ ALL_OOP_OOP_ITERATE_CLOSURES_2(OOP_OOP_ITERATE_DECL_NO_BACKWARDS)
#endif // INCLUDE_ALL_GCS
--- a/hotspot/src/share/vm/oops/typeArrayKlass.inline.hpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.inline.hpp Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,8 @@
#ifndef SHARE_VM_OOPS_TYPEARRAYKLASS_INLINE_HPP
#define SHARE_VM_OOPS_TYPEARRAYKLASS_INLINE_HPP
+#include "oops/arrayKlass.hpp"
+#include "oops/klass.hpp"
#include "oops/oop.inline.hpp"
#include "oops/typeArrayKlass.hpp"
#include "oops/typeArrayOop.hpp"
@@ -39,35 +41,19 @@
return t->object_size();
}
-#define TypeArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- \
-int TypeArrayKlass:: \
-oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate_impl(obj, closure); \
+template <bool nv, typename OopClosureType>
+int TypeArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
+ return oop_oop_iterate_impl(obj, closure);
}
-#if INCLUDE_ALL_GCS
-#define TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix) \
- \
-int TypeArrayKlass:: \
-oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
- return oop_oop_iterate_impl(obj, closure); \
-}
-#else
-#define TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
-#endif
-
-
-#define TypeArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix) \
- \
-int TypeArrayKlass:: \
-oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* closure, MemRegion mr) { \
- return oop_oop_iterate_impl(obj, closure); \
+template <bool nv, typename OopClosureType>
+int TypeArrayKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr) {
+ return oop_oop_iterate_impl(obj, closure);
}
-#define ALL_TYPE_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
- TypeArrayKlass_OOP_OOP_ITERATE_DEFN( OopClosureType, nv_suffix) \
- TypeArrayKlass_OOP_OOP_ITERATE_DEFN_m( OopClosureType, nv_suffix) \
- TypeArrayKlass_OOP_OOP_ITERATE_BACKWARDS_DEFN(OopClosureType, nv_suffix)
+#define ALL_TYPE_ARRAY_KLASS_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN( TypeArrayKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_BOUNDED( TypeArrayKlass, OopClosureType, nv_suffix) \
+ OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(TypeArrayKlass, OopClosureType, nv_suffix)
#endif // SHARE_VM_OOPS_TYPEARRAYKLASS_INLINE_HPP
--- a/hotspot/src/share/vm/runtime/arguments.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri May 29 12:49:31 2015 +0200
@@ -1278,10 +1278,8 @@
// Preferred young gen size for "short" pauses:
// upper bound depends on # of threads and NewRatio.
- const uintx parallel_gc_threads =
- (ParallelGCThreads == 0 ? 1 : ParallelGCThreads);
const size_t preferred_max_new_size_unaligned =
- MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * parallel_gc_threads));
+ MIN2(max_heap/(NewRatio+1), ScaleForWordSize(young_gen_per_worker * ParallelGCThreads));
size_t preferred_max_new_size =
align_size_up(preferred_max_new_size_unaligned, os::vm_page_size());
--- a/hotspot/src/share/vm/utilities/elfFile.cpp Fri May 22 09:14:18 2015 +0200
+++ b/hotspot/src/share/vm/utilities/elfFile.cpp Fri May 29 12:49:31 2015 +0200
@@ -261,7 +261,12 @@
}
}
}
+// AARCH64 defaults to noexecstack. All others default to execstack.
+#ifdef AARCH64
+ return true;
+#else
return false;
+#endif
}
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/sa/TestClassLoaderStats.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.Platform;
+import jdk.test.lib.ProcessTools;
+import jdk.test.lib.OutputAnalyzer;
+
+/*
+ * @test
+ * @library /testlibrary
+ * @build jdk.test.lib.*
+ * @run main TestClassLoaderStats
+ */
+public class TestClassLoaderStats {
+
+ public static void main(String[] args) throws Exception {
+ if (!Platform.shouldSAAttach()) {
+ System.out.println("SA attach not expected to work - test skipped.");
+ return;
+ }
+
+ ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
+ "-XX:+UsePerfData",
+ "sun.jvm.hotspot.tools.ClassLoaderStats",
+ Integer.toString(ProcessTools.getProcessId()));
+ OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
+ System.out.println(output.getOutput());
+
+ output.shouldHaveExitValue(0);
+ output.shouldContain("Debugger attached successfully.");
+ // The class loader stats header needs to be presented in the output:
+ output.shouldMatch("class_loader\\W+classes\\W+bytes\\W+parent_loader\\W+alive?\\W+type");
+ output.stderrShouldNotMatch("[E|e]xception");
+ output.stderrShouldNotMatch("[E|e]rror");
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/sa/TestStackTrace.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.Platform;
+import jdk.test.lib.ProcessTools;
+
+/*
+ * @test
+ * @library /testlibrary
+ * @build jdk.test.lib.*
+ * @run main TestStackTrace
+ */
+public class TestStackTrace {
+
+ public static void main(String[] args) throws Exception {
+ if (!Platform.shouldSAAttach()) {
+ System.out.println("SA attach not expected to work - test skipped.");
+ return;
+ }
+
+ ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
+ "-XX:+UsePerfData",
+ "sun.jvm.hotspot.tools.StackTrace",
+ Integer.toString(ProcessTools.getProcessId()));
+ OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
+ System.out.println(output.getOutput());
+
+ output.shouldHaveExitValue(0);
+ output.shouldContain("Debugger attached successfully.");
+ output.stderrShouldNotMatch("[E|e]xception");
+ output.stderrShouldNotMatch("[E|e]rror");
+ }
+
+}
--- a/jaxp/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -307,3 +307,4 @@
3bcf83c1bbc1b7663e930d72c133a9bd86c7618d jdk9-b62
4a8f895f0317dcc90479cb7cc97014312e69edf7 jdk9-b63
6f91749b5aaef1a171ec2254163233438d1071d1 jdk9-b64
+ae7406e82828fe1c245ac7507a9da5fd5b1c9529 jdk9-b65
--- a/jaxp/test/javax/xml/jaxp/TEST.properties Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# jaxp test uses TestNG
-TestNG.dirs = unittest
-
--- a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionController.java Fri May 29 12:49:31 2015 +0200
@@ -22,8 +22,8 @@
*/
package test.auctionportal;
-import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_LANGUAGE;
-import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_SOURCE;
+import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_LANGUAGE;
+import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_SOURCE;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
--- a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionItemRepository.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/AuctionItemRepository.java Fri May 29 12:49:31 2015 +0200
@@ -22,10 +22,10 @@
*/
package test.auctionportal;
-import static com.sun.org.apache.xerces.internal.impl.Constants.SP_ENTITY_EXPANSION_LIMIT;
-import static com.sun.org.apache.xerces.internal.impl.Constants.SP_MAX_OCCUR_LIMIT;
-import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_LANGUAGE;
-import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_SOURCE;
+import static test.auctionportal.HiBidConstants.SP_ENTITY_EXPANSION_LIMIT;
+import static test.auctionportal.HiBidConstants.SP_MAX_OCCUR_LIMIT;
+import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_LANGUAGE;
+import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_SOURCE;
import static org.testng.Assert.assertTrue;
import java.io.File;
import java.io.FileInputStream;
--- a/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/UserController.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/functional/test/auctionportal/UserController.java Fri May 29 12:49:31 2015 +0200
@@ -22,7 +22,7 @@
*/
package test.auctionportal;
-import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_LANGUAGE;
+import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_LANGUAGE;
import static org.testng.Assert.assertFalse;
import java.io.FileOutputStream;
import java.nio.file.Files;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/TEST.properties Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+# jaxp test uses TestNG
+TestNG.dirs = javax/xml/common/bug6979306 javax/xml/parsers/bug8003147 javax/xml/transform/bug6551616 javax/xml/transform/cli
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/javax/xml/common/bug6979306/Bug6979306Test.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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
+ * @modules java.xml/com.sun.org.apache.xerces.internal.impl
+ * java.xml/com.sun.org.apache.xalan.internal
+ * java.xml/com.sun.org.apache.xalan.internal.xslt
+ * @bug 6979306
+ * @summary Test JAXP component version.
+ */
+
+import org.testng.annotations.Test;
+
+import com.sun.org.apache.xalan.internal.xslt.EnvironmentCheck;
+
+public class Bug6979306Test {
+
+ @Test
+ public void test() {
+ String[] input = {};
+ EnvironmentCheck.main(input);
+ com.sun.org.apache.xerces.internal.impl.Version.main(input);
+ com.sun.org.apache.xalan.internal.Version._main(input);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/javax/xml/parsers/bug8003147/Bug8003147Test.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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
+ * @modules java.xml/com.sun.org.apache.bcel.internal.classfile
+ * java.xml/com.sun.org.apache.bcel.internal.generic
+ * @bug 8003147
+ * @summary Test port fix for BCEL bug 39695.
+ */
+
+import java.io.FileOutputStream;
+import java.util.ArrayList;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import com.sun.org.apache.bcel.internal.classfile.ClassParser;
+import com.sun.org.apache.bcel.internal.classfile.ConstantClass;
+import com.sun.org.apache.bcel.internal.classfile.ConstantPool;
+import com.sun.org.apache.bcel.internal.classfile.ConstantUtf8;
+import com.sun.org.apache.bcel.internal.classfile.JavaClass;
+import com.sun.org.apache.bcel.internal.classfile.Method;
+import com.sun.org.apache.bcel.internal.generic.ClassGen;
+import com.sun.org.apache.bcel.internal.generic.MethodGen;
+
+public class Bug8003147Test {
+
+ @Test
+ public void test() throws Exception {
+ String classfile = getClass().getResource("Bug8003147Test.class").getPath();
+ JavaClass jc = new ClassParser(classfile).parse();
+ // rename class
+ ConstantPool cp = jc.getConstantPool();
+ int cpIndex = ((ConstantClass) cp.getConstant(jc.getClassNameIndex())).getNameIndex();
+ cp.setConstant(cpIndex, new ConstantUtf8("Bug8003147TestPrime"));
+ ClassGen gen = new ClassGen(jc);
+ Method[] methods = jc.getMethods();
+ int index;
+ for (index = 0; index < methods.length; index++) {
+ if (methods[index].getName().equals("doSomething")) {
+ break;
+ }
+ }
+ Method m = methods[index];
+ MethodGen mg = new MethodGen(m, gen.getClassName(), gen.getConstantPool());
+ gen.replaceMethod(m, mg.getMethod());
+ String path = classfile.replace("Bug8003147Test", "Bug8003147TestPrime");
+ gen.getJavaClass().dump(new FileOutputStream(path));
+
+ try {
+ Class.forName("Bug8003147TestPrime");
+ } catch (ClassFormatError cfe) {
+ cfe.printStackTrace();
+ Assert.fail("modified version of class does not pass verification");
+ }
+ }
+
+ public void doSomething(double d, ArrayList<Integer> list) {
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/javax/xml/transform/bug6551616/Bug6551616.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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
+ * @modules java.xml/com.sun.org.apache.xalan.internal.xsltc.trax
+ * @bug 6551616
+ * @summary Test SAX2StAXEventWriter.
+ */
+
+import java.io.InputStream;
+import java.io.StringBufferInputStream;
+
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLOutputFactory;
+
+import org.testng.annotations.Test;
+
+import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter;
+
+public class Bug6551616 {
+ String _cache = "";
+
+
+ @Test
+ public void test() throws Exception {
+ final String XML = "" + "<?xml version='1.0'?>" + "<doc xmlns:foo='http://example.com/foo/' xml:lang='us-en'><p>Test</p></doc>";
+
+ javax.xml.parsers.SAXParserFactory saxFactory = javax.xml.parsers.SAXParserFactory.newInstance();
+
+ javax.xml.parsers.SAXParser parser = saxFactory.newSAXParser();
+
+ XMLOutputFactory outFactory = XMLOutputFactory.newInstance();
+ XMLEventWriter writer = outFactory.createXMLEventWriter(System.out);
+
+ SAX2StAXEventWriter handler = new SAX2StAXEventWriter(writer);
+
+ InputStream is = new StringBufferInputStream(XML);
+
+ parser.parse(is, handler);
+
+ // if it doesn't blow up, it succeeded.
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/javax/xml/transform/cli/CLITest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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
+ * @modules java.xml/com.sun.org.apache.xalan.internal.xslt
+ * @summary Test internal transform CLI.
+ */
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class CLITest {
+
+ @Test
+ public void testCLI() {
+ try {
+ String[] args = new String[] { "-XSLTC", "-XSL", getClass().getResource("tigertest.xsl").toString(), "-IN",
+ getClass().getResource("tigertest-in.xml").toString(), };
+ com.sun.org.apache.xalan.internal.xslt.Process._main(args);
+ } catch (Exception e) {
+ Assert.fail(e.getMessage());
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/javax/xml/transform/cli/tigertest-in.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" office:class="text" office:version="1.0">
+ <office:styles>
+ <style:default-style style:family="graphics"/>
+ <style:default-style style:family="paragraph"/>
+ </office:styles>
+</office:document>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/internaltest/javax/xml/transform/cli/tigertest.xsl Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style">
+
+ <xsl:output method="xml" encoding="UTF-8"/>
+
+ <xsl:template match="/">
+ <xsl:variable name="copyData">
+ <xsl:call-template name="copy-by-template" />
+ </xsl:variable>
+ <test>
+ <xsl:copy-of select="$copyData"/>
+ </test>
+ </xsl:template>
+
+ <xsl:template name="copy-by-template">
+ <xsl:copy-of select="/"/>
+ </xsl:template>
+</xsl:stylesheet>
--- a/jaxp/test/javax/xml/jaxp/libs/test/auctionportal/HiBidConstants.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/libs/test/auctionportal/HiBidConstants.java Fri May 29 12:49:31 2015 +0200
@@ -42,4 +42,24 @@
* Name space for account operation.
*/
public static final String PORTAL_ACCOUNT_NS = "http://www.auctionportal.org/Accounts";
+
+ /**
+ * JAXP schema language property name.
+ */
+ public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
+
+ /**
+ * JAXP schema source property name.
+ */
+ public static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
+
+ /**
+ * Name of system property JDK entity expansion limit
+ */
+ public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit";
+
+ /**
+ * Name of system property JDK maxOccur limit
+ */
+ public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit";
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/TEST.properties Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+# jaxp test uses TestNG
+TestNG.dirs = .
+
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6979306Test.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.common;
-
-import org.testng.annotations.Test;
-
-import com.sun.org.apache.xalan.internal.xslt.EnvironmentCheck;
-
-/*
- * @bug 6979306
- * @summary Test JAXP component version.
- */
-public class Bug6979306Test {
-
- @Test
- public void test() {
- String[] input = {};
- EnvironmentCheck.main(input);
- com.sun.org.apache.xerces.internal.impl.Version.main(input);
- com.sun.org.apache.xalan.internal.Version._main(input);
- }
-
-}
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug7143711Test.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug7143711Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@
}
- @Test
+ @Test(enabled=false) //skipped due to bug JDK-8080097
public void testTransform_DOM_withSM() {
System.out.println("Transform using DOM Source; Security Manager is set:");
@@ -89,7 +89,7 @@
TransformerFactory factory = TransformerFactory.newInstance("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl",
TransformerFactory.class.getClassLoader());
factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, true);
- if (((com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl) factory).useServicesMechnism()) {
+ if ((boolean) factory.getFeature(ORACLE_FEATURE_SERVICE_MECHANISM)) {
Assert.fail("should not override in secure mode");
}
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug8003147Test.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.parsers;
-
-import java.io.FileOutputStream;
-import java.util.ArrayList;
-
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-import com.sun.org.apache.bcel.internal.classfile.ClassParser;
-import com.sun.org.apache.bcel.internal.classfile.ConstantClass;
-import com.sun.org.apache.bcel.internal.classfile.ConstantPool;
-import com.sun.org.apache.bcel.internal.classfile.ConstantUtf8;
-import com.sun.org.apache.bcel.internal.classfile.JavaClass;
-import com.sun.org.apache.bcel.internal.classfile.Method;
-import com.sun.org.apache.bcel.internal.generic.ClassGen;
-import com.sun.org.apache.bcel.internal.generic.MethodGen;
-
-/*
- * @bug 8003147
- * @summary Test port fix for BCEL bug 39695.
- */
-public class Bug8003147Test {
-
- @Test
- public void test() throws Exception {
- String classfile = getClass().getResource("Bug8003147Test.class").getPath();
- JavaClass jc = new ClassParser(classfile).parse();
- // rename class
- ConstantPool cp = jc.getConstantPool();
- int cpIndex = ((ConstantClass) cp.getConstant(jc.getClassNameIndex())).getNameIndex();
- cp.setConstant(cpIndex, new ConstantUtf8("javax/xml/parsers/Bug8003147TestPrime"));
- ClassGen gen = new ClassGen(jc);
- Method[] methods = jc.getMethods();
- int index;
- for (index = 0; index < methods.length; index++) {
- if (methods[index].getName().equals("doSomething")) {
- break;
- }
- }
- Method m = methods[index];
- MethodGen mg = new MethodGen(m, gen.getClassName(), gen.getConstantPool());
- gen.replaceMethod(m, mg.getMethod());
- String path = classfile.replace("Bug8003147Test", "Bug8003147TestPrime");
- gen.getJavaClass().dump(new FileOutputStream(path));
-
- try {
- Class.forName("javax.xml.parsers.Bug8003147TestPrime");
- } catch (ClassFormatError cfe) {
- cfe.printStackTrace();
- Assert.fail("modified version of class does not pass verification");
- }
- }
-
- public void doSomething(double d, ArrayList<Integer> list) {
- }
-}
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NamespaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/stream/XMLStreamWriterTest/NamespaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,20 +24,16 @@
package javax.xml.stream.XMLStreamWriterTest;
import java.io.ByteArrayOutputStream;
-import java.io.IOException;
import javax.xml.XMLConstants;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.stream.StreamResult;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl;
-
/*
* @summary Test the writing of Namespaces.
*/
@@ -80,15 +76,10 @@
private void resetWriter() {
// reset the Writer
try {
- xmlStreamWriter.flush();
- xmlStreamWriter.close();
- ((XMLStreamWriterImpl) xmlStreamWriter).reset();
byteArrayOutputStream.reset();
- ((XMLStreamWriterImpl) xmlStreamWriter).setOutput(new StreamResult(byteArrayOutputStream), "utf-8");
+ xmlStreamWriter = xmlOutputFactory.createXMLStreamWriter(byteArrayOutputStream, "utf-8");
} catch (XMLStreamException xmlStreamException) {
Assert.fail(xmlStreamException.toString());
- } catch (IOException ioException) {
- Assert.fail(ioException.toString());
}
}
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/Bug6551616.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.transform;
-
-import java.io.File;
-import java.io.InputStream;
-import java.io.StringBufferInputStream;
-import java.security.Policy;
-
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLOutputFactory;
-
-import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter;
-
-import org.testng.annotations.Test;
-
-/*
- * @bug 6551616
- * @summary Test SAX2StAXEventWriter.
- */
-public class Bug6551616 {
- String _cache = "";
-
-
- @Test
- public void test() throws Exception {
- final String XML = "" + "<?xml version='1.0'?>" + "<doc xmlns:foo='http://example.com/foo/' xml:lang='us-en'><p>Test</p></doc>";
-
- javax.xml.parsers.SAXParserFactory saxFactory = javax.xml.parsers.SAXParserFactory.newInstance();
-
- javax.xml.parsers.SAXParser parser = saxFactory.newSAXParser();
-
- XMLOutputFactory outFactory = XMLOutputFactory.newInstance();
- XMLEventWriter writer = outFactory.createXMLEventWriter(System.out);
-
- SAX2StAXEventWriter handler = new SAX2StAXEventWriter(writer);
-
- InputStream is = new StringBufferInputStream(XML);
-
- parser.parse(is, handler);
-
- // if it doesn't blow up, it succeeded.
- }
-}
--- a/jaxp/test/javax/xml/jaxp/unittest/javax/xml/transform/CLITest.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.transform;
-
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-/*
- * @summary Test internal transform CLI.
- */
-public class CLITest {
-
- @Test
- public void testCLI() {
- try {
- String[] args = new String[] { "-XSLTC", "-XSL", getClass().getResource("tigertest.xsl").toString(), "-IN",
- getClass().getResource("tigertest-in.xml").toString(), };
- com.sun.org.apache.xalan.internal.xslt.Process._main(args);
- } catch (Exception e) {
- Assert.fail(e.getMessage());
- }
- }
-}
--- a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSSerializerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/ls/LSSerializerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -42,12 +42,12 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
-import com.sun.org.apache.xerces.internal.impl.Constants;
/*
* @summary Test LSSerializer.
*/
public class LSSerializerTest {
+ private static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print";
class DOMErrorHandlerImpl implements DOMErrorHandler {
@@ -192,47 +192,47 @@
DOMConfiguration domConfiguration = lsSerializer.getDomConfig();
// query current configuration
- Boolean defaultFormatPrettyPrint = (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT);
- Boolean canSetFormatPrettyPrintFalse = (Boolean) domConfiguration.canSetParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
- Boolean canSetFormatPrettyPrintTrue = (Boolean) domConfiguration.canSetParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
+ Boolean defaultFormatPrettyPrint = (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT);
+ Boolean canSetFormatPrettyPrintFalse = (Boolean) domConfiguration.canSetParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
+ Boolean canSetFormatPrettyPrintTrue = (Boolean) domConfiguration.canSetParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
- System.out.println(Constants.DOM_FORMAT_PRETTY_PRINT + " default/can set false/can set true = " + defaultFormatPrettyPrint + "/"
+ System.out.println(DOM_FORMAT_PRETTY_PRINT + " default/can set false/can set true = " + defaultFormatPrettyPrint + "/"
+ canSetFormatPrettyPrintFalse + "/" + canSetFormatPrettyPrintTrue);
// test values
- Assert.assertEquals(defaultFormatPrettyPrint, Boolean.FALSE, "Default value of " + Constants.DOM_FORMAT_PRETTY_PRINT + " should be " + Boolean.FALSE);
+ Assert.assertEquals(defaultFormatPrettyPrint, Boolean.FALSE, "Default value of " + DOM_FORMAT_PRETTY_PRINT + " should be " + Boolean.FALSE);
- Assert.assertEquals(canSetFormatPrettyPrintFalse, Boolean.TRUE, "Can set " + Constants.DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.FALSE + " should be "
+ Assert.assertEquals(canSetFormatPrettyPrintFalse, Boolean.TRUE, "Can set " + DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.FALSE + " should be "
+ Boolean.TRUE);
- Assert.assertEquals(canSetFormatPrettyPrintTrue, Boolean.TRUE, "Can set " + Constants.DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.TRUE + " should be "
+ Assert.assertEquals(canSetFormatPrettyPrintTrue, Boolean.TRUE, "Can set " + DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.TRUE + " should be "
+ Boolean.TRUE);
// get default serialization
String prettyPrintDefault = lsSerializer.writeToString(document);
- System.out.println("(default) " + Constants.DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT)
+ System.out.println("(default) " + DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT)
+ ": \n\"" + prettyPrintDefault + "\"");
- Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintDefault, "Invalid serialization with default value, " + Constants.DOM_FORMAT_PRETTY_PRINT + "=="
- + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT));
+ Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintDefault, "Invalid serialization with default value, " + DOM_FORMAT_PRETTY_PRINT + "=="
+ + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT));
// configure LSSerializer to not format-pretty-print
- domConfiguration.setParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
+ domConfiguration.setParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
String prettyPrintFalse = lsSerializer.writeToString(document);
- System.out.println("(FALSE) " + Constants.DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT)
+ System.out.println("(FALSE) " + DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT)
+ ": \n\"" + prettyPrintFalse + "\"");
- Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintFalse, "Invalid serialization with FALSE value, " + Constants.DOM_FORMAT_PRETTY_PRINT + "=="
- + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT));
+ Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintFalse, "Invalid serialization with FALSE value, " + DOM_FORMAT_PRETTY_PRINT + "=="
+ + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT));
// configure LSSerializer to format-pretty-print
- domConfiguration.setParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
+ domConfiguration.setParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
String prettyPrintTrue = lsSerializer.writeToString(document);
- System.out.println("(TRUE) " + Constants.DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT)
+ System.out.println("(TRUE) " + DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT)
+ ": \n\"" + prettyPrintTrue + "\"");
- Assert.assertEquals(XML_DOCUMENT_PRETTY_PRINT, prettyPrintTrue, "Invalid serialization with TRUE value, " + Constants.DOM_FORMAT_PRETTY_PRINT + "=="
- + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT));
+ Assert.assertEquals(XML_DOCUMENT_PRETTY_PRINT, prettyPrintTrue, "Invalid serialization with TRUE value, " + DOM_FORMAT_PRETTY_PRINT + "=="
+ + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT));
}
@Test
--- a/jaxws/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/jaxws/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -310,3 +310,4 @@
cd0cf72b2cbf4adb778a02505fb065bb2292688c jdk9-b62
b5c22d09b1c91dd49b006f38d8ba9c4397517ccc jdk9-b63
df100399ed27d0eaa57c137ca99819a0fee66178 jdk9-b64
+45ef73bb85c12ec1b291835c1d40e342a454e3f0 jdk9-b65
--- a/jdk/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/jdk/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -307,3 +307,4 @@
49118e68fbd4cc0044e718c47db681946d5efd69 jdk9-b62
fd3281c400347088b36aeb16273aa679d53a81a4 jdk9-b63
7de8d036ad0980d988d1b9b4b4e6be555d9fbf98 jdk9-b64
+ed94f3e7ba6bbfec0772de6d24e39543e13f6d88 jdk9-b65
--- a/jdk/make/CompileDemos.gmk Fri May 22 09:14:18 2015 +0200
+++ b/jdk/make/CompileDemos.gmk Fri May 29 12:49:31 2015 +0200
@@ -30,6 +30,7 @@
include JavaCompilation.gmk
include NativeCompilation.gmk
include SetupJavaCompilers.gmk
+include TextFileProcessing.gmk
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
@@ -49,6 +50,15 @@
##################################################################################################
+# This rule will be depended on due to the MANIFEST line
+$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
+ SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+ OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
+ REPLACEMENTS := \
+ @@RELEASE@@ => $(RELEASE) ; \
+ @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
+))
+
define SetupAppletDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
SETUP := GENERATE_USINGJDKBYTECODE, \
@@ -122,7 +132,7 @@
COPY := $(PATTERNS_TO_COPY) $(10), \
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
JARMAIN := $4, \
- MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+ MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
EXTRA_MANIFEST_ATTR := $(11), \
SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
EXCLUDE_FILES := $9, \
@@ -290,7 +300,7 @@
COPY := $(PATTERNS_TO_COPY), \
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
EXTRA_MANIFEST_ATTR := Main-Class: \n, \
- MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
+ MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf))
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
endif
@@ -382,7 +392,7 @@
BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
- MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+ MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
COPY := README.txt Poller.c, \
JARMAIN := Client))
--- a/jdk/make/launcher/Launcher-jdk.dev.gmk Fri May 22 09:14:18 2015 +0200
+++ b/jdk/make/launcher/Launcher-jdk.dev.gmk Fri May 29 12:49:31 2015 +0200
@@ -33,9 +33,6 @@
$(eval $(call SetupLauncher,jimage,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.tools.jimage.Main"$(COMMA) }'))
-$(eval $(call SetupLauncher,jhat, \
- -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
-
$(eval $(call SetupLauncher,native2ascii, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
--- a/jdk/make/lib/Lib-jdk.attach.gmk Fri May 22 09:14:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.attach.gmk Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,12 @@
################################################################################
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ # In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
+ # a binary that is compatible with windows versions older than 7/2008R2.
+ # See MSDN documentation for GetProcessMemoryInfo for more information.
+ LIBATTACH_CFLAGS := -DPSAPI_VERSION=1
+endif
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBRARY := attach, \
@@ -35,7 +41,7 @@
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
- $(LIBJAVA_HEADER_FLAGS), \
+ $(LIBJAVA_HEADER_FLAGS) $(LIBATTACH_CFLAGS), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
--- a/jdk/make/lib/Lib-jdk.management.gmk Fri May 22 09:14:18 2015 +0200
+++ b/jdk/make/lib/Lib-jdk.management.gmk Fri May 29 12:49:31 2015 +0200
@@ -39,10 +39,12 @@
$(LIBJAVA_HEADER_FLAGS) \
#
-# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
-# a binary that is compatible with windows versions older than 7/2008R2.
-# See MSDN documentation for GetProcessMemoryInfo for more information.
-BUILD_LIBMANAGEMENT_EXT_CFLAGS += -DPSAPI_VERSION=1
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ # In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
+ # a binary that is compatible with windows versions older than 7/2008R2.
+ # See MSDN documentation for GetProcessMemoryInfo for more information.
+ LIBMANAGEMENT_EXT_CFLAGS += -DPSAPI_VERSION=1
+endif
LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
--- a/jdk/make/src/classes/build/tools/module/boot.modules Fri May 22 09:14:18 2015 +0200
+++ b/jdk/make/src/classes/build/tools/module/boot.modules Fri May 29 12:49:31 2015 +0200
@@ -24,6 +24,7 @@
jdk.jfr
jdk.management
jdk.management.cmm
+jdk.management.resource
jdk.naming.rmi
jdk.sctp
jdk.security.auth
--- a/jdk/src/demo/share/applets.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/demo/share/applets.html Fri May 29 12:49:31 2015 +0200
@@ -56,8 +56,7 @@
</TR>
<TR>
-<TD ALIGN=RIGHT COLSPAN="2"><!-- page headline --><!-------------------------------><!--EDIT THE PAGE HEADLINE HERE--><!------------BEGIN-HEADLINE-----><FONT SIZE=+2>JAVA</FONT><SUP><FONT SIZE=-2>TM</FONT></SUP><FONT SIZE=+2>
-PLUG-IN</FONT>
+<TD ALIGN=RIGHT COLSPAN="2"><!-- page headline --><!-------------------------------><!--EDIT THE PAGE HEADLINE HERE--><!------------BEGIN-HEADLINE-----><FONT SIZE=+2>JAVA™ PLUG-IN</FONT>
<BR><B>Demonstration Applets</B>
<BR><!-------------END-HEADLINE------><!-- END OF PAGE HEADLINE --><!-------------------------------></TD>
</TR>
--- a/jdk/src/demo/share/jvmti/index.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/demo/share/jvmti/index.html Fri May 29 12:49:31 2015 +0200
@@ -5,7 +5,7 @@
<p>
The
-Java<sup><font size=-2>TM</font></sup> Virtual Machine Tools Interface (JVM TI)
+Java™ Virtual Machine Tools Interface (JVM TI)
is a native tool interface provided in JDK 5.0 and newer.
Native libraries that use JVM TI and are loaded into the
Java Virtual Machine
--- a/jdk/src/java.base/share/classes/java/lang/Boolean.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Boolean.java Fri May 29 12:49:31 2015 +0200
@@ -230,13 +230,12 @@
}
/**
- * Returns {@code true} if and only if the system property
- * named by the argument exists and is equal to the string
- * {@code "true"}. (Beginning with version 1.0.2 of the
- * Java<small><sup>TM</sup></small> platform, the test of
- * this string is case insensitive.) A system property is accessible
- * through {@code getProperty}, a method defined by the
- * {@code System} class.
+ * Returns {@code true} if and only if the system property named
+ * by the argument exists and is equal to the string {@code
+ * "true"}. (Beginning with version 1.0.2 of the Java™
+ * platform, the test of this string is case insensitive.) A
+ * system property is accessible through {@code getProperty}, a
+ * method defined by the {@code System} class.
* <p>
* If there is no property with the specified name, or if the specified
* name is empty or null, then {@code false} is returned.
--- a/jdk/src/java.base/share/classes/java/lang/Character.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Character.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -645,8 +645,14 @@
* @since 1.2
*/
public static final class UnicodeBlock extends Subset {
-
- private static Map<String, UnicodeBlock> map = new HashMap<>(256);
+ /**
+ * 510 - the expected number of enteties
+ * 0.75 - the default load factor of HashMap
+ */
+ private static final int INITIAL_CAPACITY =
+ (int)(510 / 0.75f + 1.0f);
+ private static Map<String, UnicodeBlock> map =
+ new HashMap<>(INITIAL_CAPACITY);
/**
* Creates a UnicodeBlock with the given identifier name.
--- a/jdk/src/java.base/share/classes/java/lang/Long.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/Long.java Fri May 29 12:49:31 2015 +0200
@@ -1708,7 +1708,7 @@
* @since 1.5
*/
public static int bitCount(long i) {
- // HD, Figure 5-14
+ // HD, Figure 5-2
i = i - ((i >>> 1) & 0x5555555555555555L);
i = (i & 0x3333333333333333L) + ((i >>> 2) & 0x3333333333333333L);
i = (i + (i >>> 4)) & 0x0f0f0f0f0f0f0f0fL;
--- a/jdk/src/java.base/share/classes/java/lang/String.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/lang/String.java Fri May 29 12:49:31 2015 +0200
@@ -179,7 +179,7 @@
* not affect the newly created string.
*
* @param value
- * Array that is the source of characters
+ * Array that is the source of characters
*
* @param offset
* The initial offset
@@ -208,7 +208,7 @@
if (offset > value.length - count) {
throw new StringIndexOutOfBoundsException(offset + count);
}
- this.value = Arrays.copyOfRange(value, offset, offset+count);
+ this.value = Arrays.copyOfRange(value, offset, offset + count);
}
/**
@@ -262,11 +262,11 @@
// Pass 1: Compute precise size of char[]
int n = count;
for (int i = offset; i < end; i++) {
- int c = codePoints[i];
- if (Character.isBmpCodePoint(c))
- continue;
- else if (Character.isValidCodePoint(c))
- n++;
+ int c = codePoints[i];
+ if (Character.isBmpCodePoint(c))
+ continue;
+ else if (Character.isValidCodePoint(c))
+ n++;
else throw new IllegalArgumentException(Integer.toString(c));
}
@@ -327,7 +327,7 @@
@Deprecated
public String(byte ascii[], int hibyte, int offset, int count) {
checkBounds(ascii, offset, count);
- char value[] = new char[count];
+ char[] value = new char[count];
if (hibyte == 0) {
for (int i = count; i-- > 0;) {
@@ -465,7 +465,7 @@
if (charset == null)
throw new NullPointerException("charset");
checkBounds(bytes, offset, length);
- this.value = StringCoding.decode(charset, bytes, offset, length);
+ this.value = StringCoding.decode(charset, bytes, offset, length);
}
/**
@@ -567,7 +567,7 @@
*
* @since 1.1
*/
- public String(byte bytes[]) {
+ public String(byte[] bytes) {
this(bytes, 0, bytes.length);
}
@@ -983,11 +983,10 @@
return true;
}
if (anObject instanceof String) {
- String anotherString = (String)anObject;
- int n = value.length;
- if (n == anotherString.value.length) {
- char v1[] = value;
- char v2[] = anotherString.value;
+ char[] v1 = value;
+ char[] v2 = ((String)anObject).value;
+ int n = v1.length;
+ if (n == v2.length) {
int i = 0;
while (n-- != 0) {
if (v1[i] != v2[i])
@@ -1020,8 +1019,8 @@
}
private boolean nonSyncContentEquals(AbstractStringBuilder sb) {
- char v1[] = value;
- char v2[] = sb.getValue();
+ char[] v1 = value;
+ char[] v2 = sb.getValue();
int n = v1.length;
if (n != sb.length()) {
return false;
@@ -1066,7 +1065,7 @@
return equals(cs);
}
// Argument is a generic CharSequence
- char v1[] = value;
+ char[] v1 = value;
int n = v1.length;
if (n != cs.length()) {
return false;
@@ -1156,20 +1155,18 @@
* lexicographically greater than the string argument.
*/
public int compareTo(String anotherString) {
- int len1 = value.length;
- int len2 = anotherString.value.length;
+ char[] v1 = value;
+ char[] v2 = anotherString.value;
+ int len1 = v1.length;
+ int len2 = v2.length;
int lim = Math.min(len1, len2);
- char v1[] = value;
- char v2[] = anotherString.value;
- int k = 0;
- while (k < lim) {
+ for (int k = 0; k < lim; k++) {
char c1 = v1[k];
char c2 = v2[k];
if (c1 != c2) {
return c1 - c2;
}
- k++;
}
return len1 - len2;
}
@@ -1278,14 +1275,14 @@
*/
public boolean regionMatches(int toffset, String other, int ooffset,
int len) {
- char ta[] = value;
+ char[] ta = value;
int to = toffset;
- char pa[] = other.value;
+ char[] pa = other.value;
int po = ooffset;
// Note: toffset, ooffset, or len might be near -1>>>1.
if ((ooffset < 0) || (toffset < 0)
- || (toffset > (long)value.length - len)
- || (ooffset > (long)other.value.length - len)) {
+ || (toffset > (long)ta.length - len)
+ || (ooffset > (long)pa.length - len)) {
return false;
}
while (len-- > 0) {
@@ -1348,14 +1345,14 @@
*/
public boolean regionMatches(boolean ignoreCase, int toffset,
String other, int ooffset, int len) {
- char ta[] = value;
+ char[] ta = value;
int to = toffset;
- char pa[] = other.value;
+ char[] pa = other.value;
int po = ooffset;
// Note: toffset, ooffset, or len might be near -1>>>1.
if ((ooffset < 0) || (toffset < 0)
- || (toffset > (long)value.length - len)
- || (ooffset > (long)other.value.length - len)) {
+ || (toffset > (long)ta.length - len)
+ || (ooffset > (long)pa.length - len)) {
return false;
}
while (len-- > 0) {
@@ -1405,13 +1402,13 @@
* </pre>
*/
public boolean startsWith(String prefix, int toffset) {
- char ta[] = value;
+ char[] ta = value;
int to = toffset;
- char pa[] = prefix.value;
+ char[] pa = prefix.value;
int po = 0;
- int pc = prefix.value.length;
+ int pc = pa.length;
// Note: toffset might be near -1>>>1.
- if ((toffset < 0) || (toffset > value.length - pc)) {
+ if ((toffset < 0) || (toffset > ta.length - pc)) {
return false;
}
while (--pc >= 0) {
@@ -1473,7 +1470,9 @@
for (char v : value) {
h = 31 * h + v;
}
- hash = h;
+ if (h != 0) {
+ hash = h;
+ }
}
return h;
}
@@ -1928,14 +1927,17 @@
* length of this {@code String} object.
*/
public String substring(int beginIndex) {
- if (beginIndex < 0) {
- throw new StringIndexOutOfBoundsException(beginIndex);
+ if (beginIndex <= 0) {
+ if (beginIndex < 0) {
+ throw new StringIndexOutOfBoundsException(beginIndex);
+ }
+ return this;
}
int subLen = value.length - beginIndex;
if (subLen < 0) {
throw new StringIndexOutOfBoundsException(subLen);
}
- return (beginIndex == 0) ? this : new String(value, beginIndex, subLen);
+ return new String(value, beginIndex, subLen);
}
/**
@@ -1961,8 +1963,13 @@
* {@code endIndex}.
*/
public String substring(int beginIndex, int endIndex) {
- if (beginIndex < 0) {
- throw new StringIndexOutOfBoundsException(beginIndex);
+ if (beginIndex <= 0) {
+ if (beginIndex < 0) {
+ throw new StringIndexOutOfBoundsException(beginIndex);
+ }
+ if (endIndex == value.length) {
+ return this;
+ }
}
if (endIndex > value.length) {
throw new StringIndexOutOfBoundsException(endIndex);
@@ -1971,8 +1978,7 @@
if (subLen < 0) {
throw new StringIndexOutOfBoundsException(subLen);
}
- return ((beginIndex == 0) && (endIndex == value.length)) ? this
- : new String(value, beginIndex, subLen);
+ return new String(value, beginIndex, subLen);
}
/**
@@ -2034,7 +2040,7 @@
return this;
}
int len = value.length;
- char buf[] = Arrays.copyOf(value, len + otherLen);
+ char[] buf = Arrays.copyOf(value, len + otherLen);
str.getChars(buf, len);
return new String(buf, true);
}
@@ -2070,9 +2076,9 @@
*/
public String replace(char oldChar, char newChar) {
if (oldChar != newChar) {
- int len = value.length;
+ char[] val = value; /* avoid getfield opcode */
+ int len = val.length;
int i = -1;
- char[] val = value; /* avoid getfield opcode */
while (++i < len) {
if (val[i] == oldChar) {
@@ -2080,7 +2086,7 @@
}
}
if (i < len) {
- char buf[] = new char[len];
+ char[] buf = new char[len];
for (int j = 0; j < i; j++) {
buf[j] = val[j];
}
@@ -2876,17 +2882,17 @@
* trailing white space.
*/
public String trim() {
- int len = value.length;
- int st = 0;
char[] val = value; /* avoid getfield opcode */
+ int end = val.length;
+ int beg = 0;
- while ((st < len) && (val[st] <= ' ')) {
- st++;
+ while ((beg < end) && (val[beg] <= ' ')) {
+ beg++;
}
- while ((st < len) && (val[len - 1] <= ' ')) {
- len--;
+ while ((beg < end) && (val[end - 1] <= ' ')) {
+ end--;
}
- return ((st > 0) || (len < value.length)) ? substring(st, len) : this;
+ return substring(beg, end);
}
/**
@@ -3081,7 +3087,7 @@
*/
public char[] toCharArray() {
// Cannot use Arrays.copyOf because of class initialization order issues
- char result[] = new char[value.length];
+ char[] result = new char[value.length];
System.arraycopy(value, 0, result, 0, value.length);
return result;
}
@@ -3266,8 +3272,7 @@
* as its single character the argument {@code c}.
*/
public static String valueOf(char c) {
- char data[] = {c};
- return new String(data, true);
+ return new String(new char[]{c}, true);
}
/**
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java Fri May 29 12:49:31 2015 +0200
@@ -25,23 +25,24 @@
package java.security;
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
+import java.util.concurrent.ConcurrentHashMap;
+import sun.misc.JavaSecurityAccess;
import sun.misc.JavaSecurityProtectionDomainAccess;
import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
+import sun.misc.SharedSecrets;
import sun.security.util.Debug;
import sun.security.util.SecurityConstants;
-import sun.misc.JavaSecurityAccess;
-import sun.misc.SharedSecrets;
/**
- *
- *<p>
- * This ProtectionDomain class encapsulates the characteristics of a domain,
+ * The ProtectionDomain class encapsulates the characteristics of a domain,
* which encloses a set of classes whose instances are granted a set
* of permissions when being executed on behalf of a given set of Principals.
* <p>
@@ -58,6 +59,7 @@
*/
public class ProtectionDomain {
+
private static class JavaSecurityAccessImpl implements JavaSecurityAccess {
private JavaSecurityAccessImpl() {
@@ -86,18 +88,33 @@
AccessController.getContext(), context);
}
- private static AccessControlContext getCombinedACC(AccessControlContext context, AccessControlContext stack) {
- AccessControlContext acc = new AccessControlContext(context, stack.getCombiner(), true);
+ private static AccessControlContext getCombinedACC(
+ AccessControlContext context, AccessControlContext stack) {
+ AccessControlContext acc =
+ new AccessControlContext(context, stack.getCombiner(), true);
return new AccessControlContext(stack.getContext(), acc).optimize();
}
}
static {
- // Set up JavaSecurityAccess in SharedSecrets
+ // setup SharedSecrets to allow access to doIntersectionPrivilege
+ // methods and ProtectionDomain cache
SharedSecrets.setJavaSecurityAccess(new JavaSecurityAccessImpl());
+ SharedSecrets.setJavaSecurityProtectionDomainAccess(
+ new JavaSecurityProtectionDomainAccess() {
+ @Override
+ public ProtectionDomainCache getProtectionDomainCache() {
+ return new PDCache();
+ }
+ });
}
+ /**
+ * Used for storing ProtectionDomains as keys in a Map.
+ */
+ static final class Key {}
+
/* CodeSource */
private CodeSource codesource ;
@@ -451,40 +468,104 @@
}
/**
- * Used for storing ProtectionDomains as keys in a Map.
+ * A cache of ProtectionDomains and their Permissions.
+ *
+ * This class stores ProtectionDomains as weak keys in a ConcurrentHashMap
+ * with additional support for checking and removing weak keys that are no
+ * longer in use.
*/
- final static class Key {}
-
- // A cache of ProtectionDomains and their Permissions
private static class PDCache implements ProtectionDomainCache {
- // We must wrap the PermissionCollection in a WeakReference as there
- // are some PermissionCollections which contain strong references
- // back to a ProtectionDomain and otherwise would never be removed
- // from the WeakHashMap
- private final Map<Key, WeakReference<PermissionCollection>>
- map = new WeakHashMap<>();
+ private final ConcurrentHashMap<WeakProtectionDomainKey,
+ PermissionCollection>
+ pdMap = new ConcurrentHashMap<>();
+ private final ReferenceQueue<Key> queue = new ReferenceQueue<>();
@Override
- public synchronized void put(ProtectionDomain pd,
- PermissionCollection pc) {
- map.put(pd == null ? null : pd.key, new WeakReference<>(pc));
+ public void put(ProtectionDomain pd, PermissionCollection pc) {
+ processQueue(queue, pdMap);
+ WeakProtectionDomainKey weakPd =
+ new WeakProtectionDomainKey(pd, queue);
+ pdMap.putIfAbsent(weakPd, pc);
}
@Override
- public synchronized PermissionCollection get(ProtectionDomain pd) {
- WeakReference<PermissionCollection> ref =
- map.get(pd == null ? null : pd.key);
- return ref == null ? null : ref.get();
+ public PermissionCollection get(ProtectionDomain pd) {
+ processQueue(queue, pdMap);
+ WeakProtectionDomainKey weakPd =
+ new WeakProtectionDomainKey(pd, queue);
+ return pdMap.get(weakPd);
+ }
+
+ /**
+ * Removes weak keys from the map that have been enqueued
+ * on the reference queue and are no longer in use.
+ */
+ private static void processQueue(ReferenceQueue<Key> queue,
+ ConcurrentHashMap<? extends
+ WeakReference<Key>, ?> pdMap) {
+ Reference<? extends Key> ref;
+ while ((ref = queue.poll()) != null) {
+ pdMap.remove(ref);
+ }
}
}
- static {
- SharedSecrets.setJavaSecurityProtectionDomainAccess(
- new JavaSecurityProtectionDomainAccess() {
- @Override
- public ProtectionDomainCache getProtectionDomainCache() {
- return new PDCache();
- }
- });
+ /**
+ * A weak key for a ProtectionDomain.
+ */
+ private static class WeakProtectionDomainKey extends WeakReference<Key> {
+ /**
+ * Saved value of the referent's identity hash code, to maintain
+ * a consistent hash code after the referent has been cleared
+ */
+ private final int hash;
+
+ /**
+ * A key representing a null ProtectionDomain.
+ */
+ private static final Key NULL_KEY = new Key();
+
+ /**
+ * Create a new WeakProtectionDomain with the specified domain and
+ * registered with a queue.
+ */
+ WeakProtectionDomainKey(ProtectionDomain pd, ReferenceQueue<Key> rq) {
+ this((pd == null ? NULL_KEY : pd.key), rq);
+ }
+
+ private WeakProtectionDomainKey(Key key, ReferenceQueue<Key> rq) {
+ super(key, rq);
+ hash = key.hashCode();
+ }
+
+ /**
+ * Returns the identity hash code of the original referent.
+ */
+ @Override
+ public int hashCode() {
+ return hash;
+ }
+
+ /**
+ * Returns true if the given object is an identical
+ * WeakProtectionDomainKey instance, or, if this object's referent
+ * has not been cleared and the given object is another
+ * WeakProtectionDomainKey instance with an identical non-null
+ * referent as this one.
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+
+ if (obj instanceof WeakProtectionDomainKey) {
+ Object referent = get();
+ return (referent != null) &&
+ (referent == ((WeakProtectionDomainKey)obj).get());
+ } else {
+ return false;
+ }
+ }
}
}
--- a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java Fri May 29 12:49:31 2015 +0200
@@ -490,7 +490,7 @@
}
/**
- * Equality comparision between two
+ * Equality comparison between two
*/
public boolean equals(Object obj) {
if (obj == null) return false;
--- a/jdk/src/java.base/share/classes/java/util/ArrayPrefixHelpers.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/ArrayPrefixHelpers.java Fri May 29 12:49:31 2015 +0200
@@ -85,7 +85,7 @@
*
* As usual for this sort of utility, there are 4 versions, that
* are simple copy/paste/adapt variants of each other. (The
- * double and int versions differ from long version soley by
+ * double and int versions differ from long version solely by
* replacing "long" (with case-matching)).
*/
--- a/jdk/src/java.base/share/classes/java/util/Calendar.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/Calendar.java Fri May 29 12:49:31 2015 +0200
@@ -1172,7 +1172,7 @@
* {@code fieldValuePairs} that are pairs of a field and its value.
* For example,
* <pre>
- * setFeilds(Calendar.YEAR, 2013,
+ * setFields(Calendar.YEAR, 2013,
* Calendar.MONTH, Calendar.DECEMBER,
* Calendar.DAY_OF_MONTH, 23);</pre>
* is equivalent to the sequence of the following
@@ -1298,7 +1298,7 @@
/**
* Sets the time zone parameter to the given {@code zone}. If no time
- * zone parameter is given to this {@code Caledar.Builder}, the
+ * zone parameter is given to this {@code Calendar.Builder}, the
* {@linkplain TimeZone#getDefault() default
* <code>TimeZone</code>} will be used in the {@link #build() build}
* method.
@@ -3316,7 +3316,7 @@
* @param field the calendar field
* @return the calendar field name
* @exception IndexOutOfBoundsException if <code>field</code> is negative,
- * equal to or greater then <code>FIELD_COUNT</code>.
+ * equal to or greater than {@code FIELD_COUNT}.
*/
static String getFieldName(int field) {
return FIELD_NAME[field];
--- a/jdk/src/java.base/share/classes/java/util/Collection.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/Collection.java Fri May 29 12:49:31 2015 +0200
@@ -537,7 +537,7 @@
* @implSpec
* The default implementation creates a
* <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
- * from the collections's {@code Iterator}. The spliterator inherits the
+ * from the collection's {@code Iterator}. The spliterator inherits the
* <em>fail-fast</em> properties of the collection's iterator.
* <p>
* The created {@code Spliterator} reports {@link Spliterator#SIZED}.
--- a/jdk/src/java.base/share/classes/java/util/Locale.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/Locale.java Fri May 29 12:49:31 2015 +0200
@@ -719,7 +719,7 @@
* created and cached.
*
* @param language lowercase 2 to 8 language code.
- * @param country uppercase two-letter ISO-3166 code and numric-3 UN M.49 area code.
+ * @param country uppercase two-letter ISO-3166 code and numeric-3 UN M.49 area code.
* @param variant vendor and browser specific code. See class description.
* @return the <code>Locale</code> instance requested
* @exception NullPointerException if any argument is null.
@@ -1236,7 +1236,7 @@
/**
* Package private method returning the Locale's LocaleExtensions,
* used by ResourceBundle.
- * @return locale exnteions of this Locale,
+ * @return locale extensions of this Locale,
* or {@code null} if no extensions are defined
*/
LocaleExtensions getLocaleExtensions() {
@@ -2609,7 +2609,7 @@
* href="./Locale.html#def_locale_extension">well-formed</a> or an exception
* is thrown.
*
- * <p>Attribute comparision for removal is case-insensitive.
+ * <p>Attribute comparison for removal is case-insensitive.
*
* @param attribute the attribute
* @return This builder.
--- a/jdk/src/java.base/share/classes/java/util/TimeZone.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/TimeZone.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -293,6 +293,7 @@
throw new NullPointerException();
}
this.ID = ID;
+ this.zoneId = null; // invalidate cache
}
/**
@@ -544,7 +545,23 @@
* @since 1.8
*/
public ZoneId toZoneId() {
+ ZoneId zId = zoneId;
+ if (zId == null) {
+ zoneId = zId = toZoneId0();
+ }
+ return zId;
+ }
+
+ private ZoneId toZoneId0() {
String id = getID();
+ TimeZone defaultZone = defaultTimeZone;
+ // are we not defaultTimeZone but our id is equal to default's?
+ if (defaultZone != this &&
+ defaultZone != null && id.equals(defaultZone.getID())) {
+ // delegate to default TZ which is effectively immutable
+ return defaultZone.toZoneId();
+ }
+ // derive it ourselves
if (ZoneInfoFile.useOldMapping() && id.length() == 3) {
if ("EST".equals(id))
return ZoneId.of("America/New_York");
@@ -710,7 +727,12 @@
sm.checkPermission(new PropertyPermission
("user.timezone", "write"));
}
- defaultTimeZone = zone;
+ // by saving a defensive clone and returning a clone in getDefault() too,
+ // the defaultTimeZone instance is isolated from user code which makes it
+ // effectively immutable. This is important to avoid races when the
+ // following is evaluated in ZoneId.systemDefault():
+ // TimeZone.getDefault().toZoneId().
+ defaultTimeZone = (zone == null) ? null : (TimeZone) zone.clone();
}
/**
@@ -735,9 +757,7 @@
public Object clone()
{
try {
- TimeZone other = (TimeZone) super.clone();
- other.ID = ID;
- return other;
+ return super.clone();
} catch (CloneNotSupportedException e) {
throw new InternalError(e);
}
@@ -759,6 +779,12 @@
* @serial
*/
private String ID;
+
+ /**
+ * Cached {@link ZoneId} for this TimeZone
+ */
+ private transient ZoneId zoneId;
+
private static volatile TimeZone defaultTimeZone;
static final String GMT_ID = "GMT";
--- a/jdk/src/java.base/share/classes/java/util/TreeMap.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/TreeMap.java Fri May 29 12:49:31 2015 +0200
@@ -859,7 +859,7 @@
* Returns a {@link Set} view of the mappings contained in this map.
*
* <p>The set's iterator returns the entries in ascending key order. The
- * sets's spliterator is
+ * set's spliterator is
* <em><a href="Spliterator.html#binding">late-binding</a></em>,
* <em>fail-fast</em>, and additionally reports {@link Spliterator#SORTED} and
* {@link Spliterator#ORDERED} with an encounter order that is ascending key
@@ -2643,7 +2643,7 @@
* child, also serving as origin for the split-off spliterator.
* Left-hands are symmetric. Descending versions place the origin
* at the end and invert ascending split rules. This base class
- * is non-commital about directionality, or whether the top-level
+ * is non-committal about directionality, or whether the top-level
* spliterator covers the whole tree. This means that the actual
* split mechanics are located in subclasses. Some of the subclass
* trySplit methods are identical (except for return types), but
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java Fri May 29 12:49:31 2015 +0200
@@ -481,7 +481,7 @@
*
* Maintaining API and serialization compatibility with previous
* versions of this class introduces several oddities. Mainly: We
- * leave untouched but unused constructor arguments refering to
+ * leave untouched but unused constructor arguments referring to
* concurrencyLevel. We accept a loadFactor constructor argument,
* but apply it only to initial table capacity (which is the only
* time that we can guarantee to honor it.) We also declare an
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListMap.java Fri May 29 12:49:31 2015 +0200
@@ -2710,7 +2710,7 @@
}
/**
- * Returns lowest absolute key (ignoring directonality).
+ * Returns lowest absolute key (ignoring directionality).
*/
K lowestKey() {
Comparator<? super K> cmp = m.comparator;
@@ -2722,7 +2722,7 @@
}
/**
- * Returns highest absolute key (ignoring directonality).
+ * Returns highest absolute key (ignoring directionality).
*/
K highestKey() {
Comparator<? super K> cmp = m.comparator;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java Fri May 29 12:49:31 2015 +0200
@@ -1328,13 +1328,16 @@
/**
* Number of times to spin-wait before blocking. The spins (in
* awaitRunStateLock and awaitWork) currently use randomized
- * spins. If/when MWAIT-like intrinsics becomes available, they
- * may allow quieter spinning. The value of SPINS must be a power
- * of two, at least 4. The current value causes spinning for a
- * small fraction of typical context-switch times, well worthwhile
- * given the typical likelihoods that blocking is not necessary.
+ * spins. Currently set to zero to reduce CPU usage.
+ *
+ * If greater than zero the value of SPINS must be a power
+ * of two, at least 4. A value of 2048 causes spinning for a
+ * small fraction of typical context-switch times.
+ *
+ * If/when MWAIT-like intrinsics becomes available, they
+ * may allow quieter spinning.
*/
- private static final int SPINS = 1 << 11;
+ private static final int SPINS = 0;
/**
* Increment for seed generators. See class ThreadLocal for
--- a/jdk/src/java.base/share/classes/javax/crypto/interfaces/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/javax/crypto/interfaces/package.html Fri May 29 12:49:31 2015 +0200
@@ -47,8 +47,7 @@
<ul>
<li><a href=
"{@docRoot}/../technotes/guides/security/crypto/HowToImplAProvider.html">
- <b>How to Implement a Provider for the
- Java<FONT SIZE=-2><SUP>TM</SUP></FONT> Cryptography Architecture
+ <b>How to Implement a Provider for the Java™ Cryptography Architecture
</b></a></li>
</ul>
@@ -66,8 +65,7 @@
<li>
<a href=
"{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
- <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
- Cryptography Architecture API Specification and Reference
+ <b>Java™ Cryptography Architecture API Specification and Reference
</b></a></li>
</ul>
--- a/jdk/src/java.base/share/classes/javax/crypto/spec/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/javax/crypto/spec/package.html Fri May 29 12:49:31 2015 +0200
@@ -62,14 +62,13 @@
<li>
<a href=
"{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
- <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
- Cryptography Architecture API Specification and Reference
+ <b>Java™ Cryptography Architecture API Specification and Reference
</b></a></li>
<li>
<a href=
"{@docRoot}/../technotes/guides/security/crypto/HowToImplAProvider.html">
<b>How to Implement a Provider for the
- Java<FONT SIZE=-2><SUP>TM</SUP></FONT> Cryptography Architecture
+ Java™ Cryptography Architecture
</b></a></li>
</ul>
--- a/jdk/src/java.base/share/classes/javax/net/ssl/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/package.html Fri May 29 12:49:31 2015 +0200
@@ -38,8 +38,7 @@
<ul>
<li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
- <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
- Cryptography Architecture Standard Algorithm Name
+ <b>Java™ Cryptography Architecture Standard Algorithm Name
Documentation</b></a></li>
</ul>
--- a/jdk/src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/jdk/internal/util/xml/impl/Parser.java Fri May 29 12:49:31 2015 +0200
@@ -145,12 +145,12 @@
/**
* ASCII character type array.
*
- * This array maps an ASCII (7 bit) character to the character type.<br />
- * Possible character type values are:<br /> - ' ' for any kind of white
- * space character;<br /> - 'a' for any lower case alphabetical character
- * value;<br /> - 'A' for any upper case alphabetical character value;<br />
- * - 'd' for any decimal digit character value;<br /> - 'z' for any
- * character less then ' ' except '\t', '\n', '\r';<br /> An ASCII (7 bit)
+ * This array maps an ASCII (7 bit) character to the character type.<br>
+ * Possible character type values are:<br> - ' ' for any kind of white
+ * space character;<br> - 'a' for any lower case alphabetical character
+ * value;<br> - 'A' for any upper case alphabetical character value;<br>
+ * - 'd' for any decimal digit character value;<br> - 'z' for any
+ * character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit)
* character which does not fall in any category listed above is mapped to
* it self.
*/
@@ -158,11 +158,11 @@
/**
* NMTOKEN character type array.
*
- * This array maps an ASCII (7 bit) character to the character type.<br />
- * Possible character type values are:<br /> - 0 for underscore ('_') or any
- * lower and upper case alphabetical character value;<br /> - 1 for colon
- * (':') character;<br /> - 2 for dash ('-') and dot ('.') or any decimal
- * digit character value;<br /> - 3 for any kind of white space character<br
+ * This array maps an ASCII (7 bit) character to the character type.<br>
+ * Possible character type values are:<br> - 0 for underscore ('_') or any
+ * lower and upper case alphabetical character value;<br> - 1 for colon
+ * (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal
+ * digit character value;<br> - 3 for any kind of white space character<br
* /> An ASCII (7 bit) character which does not fall in any category listed
* above is mapped to 0xff.
*/
@@ -1841,10 +1841,12 @@
/**
* Reads an attribute value.
*
- * The grammar which this method can read is:<br />
- * <code>eqstr := S "=" qstr</code><br />
- * <code>qstr := S ("'" string "'") |
- * ('"' string '"')</code><br /> This method resolves entities
+ * The grammar this method can read is:
+ * <pre>{@code
+ * eqstr := S "=" qstr
+ * qstr := S ("'" string "'") | ('"' string '"')
+ * }</pre>
+ * This method resolves entities
* inside a string unless the parser parses DTD.
*
* @param flag The '=' character forces the method to accept the '='
@@ -2633,7 +2635,7 @@
* Reports characters and empties the parser's buffer. This method is called
* only if parser is going to return control to the main loop. This means
* that this method may use parser buffer to report white space without
- * copeing characters to temporary buffer.
+ * copying characters to temporary buffer.
*/
protected abstract void bflash()
throws Exception;
@@ -2642,7 +2644,7 @@
* Reports white space characters and empties the parser's buffer. This
* method is called only if parser is going to return control to the main
* loop. This means that this method may use parser buffer to report white
- * space without copeing characters to temporary buffer.
+ * space without copying characters to temporary buffer.
*/
protected abstract void bflash_ws()
throws Exception;
@@ -3290,16 +3292,20 @@
}
/**
- * Maps a character to it's type.
+ * Maps a character to its type.
*
- * Possible character type values are:<br /> - ' ' for any kind of white
- * space character;<br /> - 'a' for any lower case alphabetical character
- * value;<br /> - 'A' for any upper case alphabetical character value;<br />
- * - 'd' for any decimal digit character value;<br /> - 'z' for any
- * character less then ' ' except '\t', '\n', '\r';<br /> - 'X' for any not
- * ASCII character;<br /> - 'Z' for EOS character.<br /> An ASCII (7 bit)
- * character which does not fall in any category listed above is mapped to
- * it self.
+ * Possible character type values are:
+ * <ul>
+ * <li>' ' - for any kind of whitespace character;</li>
+ * <li>'a' - for any lower case alphabetical character value;</li>
+ * <li>'A' - for any upper case alphabetical character value;</li>
+ * <li>'d' - for any decimal digit character value;</li>
+ * <li>'z' - for any character less than ' ' except '\t', '\n', '\r';</li>
+ * <li>'X' - for any not ASCII character;</li>
+ * <li>'Z' - for EOS character.</li>
+ * </ul>
+ * An ASCII (7 bit) character which does not fall in any category
+ * listed above is mapped to itself.
*
* @param ch The character to map.
* @return The type of character.
--- a/jdk/src/java.base/share/classes/jdk/internal/util/xml/impl/ParserSAX.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/jdk/internal/util/xml/impl/ParserSAX.java Fri May 29 12:49:31 2015 +0200
@@ -649,7 +649,7 @@
* Reports characters and empties the parser's buffer. This method is called
* only if parser is going to return control to the main loop. This means
* that this method may use parser buffer to report white space without
- * copeing characters to temporary buffer.
+ * copying characters to temporary buffer.
*/
protected void bflash() throws SAXException {
if (mBuffIdx >= 0) {
@@ -663,7 +663,7 @@
* Reports white space characters and empties the parser's buffer. This
* method is called only if parser is going to return control to the main
* loop. This means that this method may use parser buffer to report white
- * space without copeing characters to temporary buffer.
+ * space without copying characters to temporary buffer.
*/
protected void bflash_ws() throws SAXException {
if (mBuffIdx >= 0) {
--- a/jdk/src/java.base/share/classes/sun/misc/Cache.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/Cache.java Fri May 29 12:49:31 2015 +0200
@@ -196,8 +196,8 @@
/**
* Gets the object associated with the specified key in the Cache.
* @param key the key in the hash table
- * @returns the element for the key or null if the key
- * is not defined in the hash table.
+ * @return the element for the key or null if the key
+ * is not defined in the hash table.
* @see Cache#put
*/
public synchronized Object get(Object key) {
--- a/jdk/src/java.base/share/classes/sun/misc/CharacterDecoder.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/CharacterDecoder.java Fri May 29 12:49:31 2015 +0200
@@ -120,7 +120,7 @@
/**
* This method does an actual decode. It takes the decoded bytes and
* writes them to the OutputStream. The integer <i>l</i> tells the
- * method how many bytes are required. This is always <= bytesPerAtom().
+ * method how many bytes are required. This is always {@literal <=} bytesPerAtom().
*/
protected void decodeAtom(PushbackInputStream aStream, OutputStream bStream, int l) throws IOException {
throw new CEStreamExhausted();
--- a/jdk/src/java.base/share/classes/sun/misc/CharacterEncoder.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/CharacterEncoder.java Fri May 29 12:49:31 2015 +0200
@@ -68,7 +68,7 @@
* referenced in the See Also list below.
*
* @author Chuck McManis
- * @see CharacterDecoder;
+ * @see CharacterDecoder
* @see UCEncoder
* @see UUEncoder
* @see BASE64Encoder
@@ -107,7 +107,7 @@
/**
* Encode the suffix that ends every output line. By default
- * this method just prints a <newline> into the output stream.
+ * this method just prints a newline into the output stream.
*/
protected void encodeLineSuffix(OutputStream aStream) throws IOException {
pStream.println();
--- a/jdk/src/java.base/share/classes/sun/misc/ConditionLock.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/ConditionLock.java Fri May 29 12:49:31 2015 +0200
@@ -34,7 +34,7 @@
* with the lock() and unlock() methods. However if there is a thread
* waiting for the state variable to become a particular value and you
* simply call Unlock(), that thread will not be able to acquire the
- * lock until the state variable equals its desired value. <p>
+ * lock until the state variable equals its desired value.
*
* @author Peter King
*/
--- a/jdk/src/java.base/share/classes/sun/misc/ExtensionDependency.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/ExtensionDependency.java Fri May 29 12:49:31 2015 +0200
@@ -45,26 +45,26 @@
import sun.net.www.ParseUtil;
/**
- * <p>
* This class checks dependent extensions a particular jar file may have
* declared through its manifest attributes.
- * </p>
+ * <p>
* Jar file declared dependent extensions through the extension-list
* attribute. The extension-list contains a list of keys used to
* fetch the other attributes describing the required extension.
* If key is the extension key declared in the extension-list
* attribute, the following describing attribute can be found in
- * the manifest :
- * key-Extension-Name: (Specification package name)
- * key-Specification-Version: (Specification-Version)
- * key-Implementation-Version: (Implementation-Version)
- * key-Implementation-Vendor-Id: (Imlementation-Vendor-Id)
- * key-Implementation-Version: (Implementation version)
- * key-Implementation-URL: (URL to download the requested extension)
+ * the manifest:
+ * <ul>
+ * <li>key-Extension-Name: (Specification package name)</li>
+ * <li>key-Specification-Version: (Specification-Version)</li>
+ * <li>key-Implementation-Version: (Implementation-Version)</li>
+ * <li>key-Implementation-Vendor-Id: (Imlementation-Vendor-Id)</li>
+ * <li>key-Implementation-Version: (Implementation version)</li>
+ * <li>key-Implementation-URL: (URL to download the requested extension)</li>
+ * </ul>
* <p>
* This class also maintain versioning consistency of installed
* extensions dependencies declared in jar file manifest.
- * </p>
*
* @deprecated this class will be removed in a future release.
* @author Jerome Dochez
@@ -76,10 +76,9 @@
private static Vector<ExtensionInstallationProvider> providers;
/**
- * <p>
* Register an ExtensionInstallationProvider. The provider is responsible
* for handling the installation (upgrade) of any missing extensions.
- * </p>
+ *
* @param eip ExtensionInstallationProvider implementation
*/
public synchronized static void addExtensionInstallationProvider
@@ -92,9 +91,7 @@
}
/**
- * <p>
* Unregister a previously installed installation provider
- * </p>
*/
public synchronized static void removeExtensionInstallationProvider
(ExtensionInstallationProvider eip)
@@ -103,10 +100,9 @@
}
/**
- * <p>
* Checks the dependencies of the jar file on installed extension.
- * </p>
- * @param jarFile containing the attriutes declaring the dependencies
+ *
+ * @param jar containing the attributes declaring the dependencies
*/
public static boolean checkExtensionsDependencies(JarFile jar)
{
@@ -182,9 +178,8 @@
/*
- * <p>
* Check that a particular dependency on an extension is satisfied.
- * </p>
+ *
* @param extensionName is the key used for the attributes in the manifest
* @param attr is the attributes of the manifest file
*
@@ -204,10 +199,9 @@
}
/*
- * <p>
* Check if a particular extension is part of the currently installed
* extensions.
- * </p>
+ *
* @param extensionName is the key for the attributes in the manifest
* @param attr is the attributes of the manifest
*
@@ -262,11 +256,9 @@
}
/*
- * <p>
* Check if the requested extension described by the attributes
* in the manifest under the key extensionName is compatible with
* the jar file.
- * </p>
*
* @param extensionName key in the attribute list
* @param attr manifest file attributes
@@ -337,10 +329,8 @@
}
/*
- * <p>
* An required extension is missing, if an ExtensionInstallationProvider is
* registered, delegate the installation of that particular extension to it.
- * </p>
*
* @param reqInfo Missing extension information
* @param instInfo Older installed version information
@@ -380,11 +370,9 @@
}
/**
- * <p>
* Checks if the extension, that is specified in the extension-list in
* the applet jar manifest, is already installed (i.e. exists in the
* extension directory).
- * </p>
*
* @param extensionName extension name in the extension-list
*
@@ -428,9 +416,7 @@
}
/**
- * <p>
* @return the java.ext.dirs property as a list of directory
- * </p>
*/
private static File[] getExtDirs() {
String s = java.security.AccessController.doPrivileged(
@@ -456,9 +442,8 @@
}
/*
- * <p>
* Scan the directories and return all files installed in those
- * </p>
+ *
* @param dirs list of directories to scan
*
* @return the list of files installed in all the directories
@@ -483,9 +468,7 @@
}
/*
- * <p>
* @return the list of installed extensions jar files
- * </p>
*/
private File[] getInstalledExtensions() throws IOException {
return AccessController.doPrivileged(
@@ -503,9 +486,7 @@
}
/*
- * <p>
* Add the newly installed jar file to the extension class loader.
- * </p>
*
* @param cl the current installed extension class loader
*
--- a/jdk/src/java.base/share/classes/sun/misc/ExtensionInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/ExtensionInfo.java Fri May 29 12:49:31 2015 +0200
@@ -45,9 +45,7 @@
public class ExtensionInfo {
/**
- * <p>
* public static values returned by the isCompatible method
- * </p>
*/
public static final int COMPATIBLE = 0;
public static final int REQUIRE_SPECIFICATION_UPGRADE = 1;
@@ -56,10 +54,8 @@
public static final int INCOMPATIBLE = 4;
/**
- * <p>
* attributes fully describer an extension. The underlying described
* extension may be installed and requested.
- * <p>
*/
public String title;
public String name;
@@ -76,15 +72,12 @@
/**
- * <p>
* Create a new uninitialized extension information object
- * </p>
*/
public ExtensionInfo() {
}
/**
- * <p>
* Create and initialize an extension information object.
* The initialization uses the attributes passed as being
* the content of a manifest file to load the extension
@@ -93,7 +86,7 @@
* extension they may depend on, the extension key parameter
* is prepanded to the attribute name to make the key used
* to retrieve the attribute from the manifest file
- * <p>
+ *
* @param extensionKey unique extension key in the manifest
* @param attr Attributes of a manifest file
*/
@@ -149,13 +142,11 @@
}
/**
- * <p>
* @return true if the extension described by this extension information
* is compatible with the extension described by the extension
* information passed as a parameter
- * </p>
*
- * @param the requested extension information to compare to
+ * @param ei the requested extension information to compare to
*/
public int isCompatibleWith(ExtensionInfo ei) {
@@ -204,10 +195,8 @@
}
/**
- * <p>
* helper method to print sensible information on the undelying described
* extension
- * </p>
*/
public String toString() {
return "Extension : title(" + title + "), name(" + name + "), spec vendor(" +
@@ -217,15 +206,15 @@
}
/*
- * <p>
* helper method to compare two versions.
* version are in the x.y.z.t pattern.
- * </p>
+ *
* @param source version to compare to
* @param target version used to compare against
- * @return < 0 if source < version
- * > 0 if source > version
- * = 0 if source = version
+ * @return <pre>{@code
+ * < 0 if source < version
+ * > 0 if source > version
+ * = 0 if source = version}</pre>
*/
private int compareExtensionVersion(String source, String target)
throws NumberFormatException
@@ -238,15 +227,15 @@
/*
- * <p>
* helper method to compare two versions.
* version are in the x.y.z.t pattern.
- * </p>
+ *
* @param source version to compare to
* @param target version used to compare against
- * @return < 0 if source < version
- * > 0 if source > version
- * = 0 if source = version
+ * @return <pre>{@code
+ * < 0 if source < version
+ * > 0 if source > version
+ * = 0 if source = version}</pre>
*/
private int strictCompareExtensionVersion(String source, String target)
throws NumberFormatException
--- a/jdk/src/java.base/share/classes/sun/misc/FDBigInteger.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/FDBigInteger.java Fri May 29 12:49:31 2015 +0200
@@ -384,8 +384,8 @@
* Retrieves the normalization bias of the <code>FDBigIntger</code>. The
* normalization bias is a left shift such that after it the highest word
* of the value will have the 4 highest bits equal to zero:
- * <code>(highestWord & 0xf0000000) == 0</code>, but the next bit should be 1
- * <code>(highestWord & 0x08000000) != 0</code>.
+ * {@code (highestWord & 0xf0000000) == 0}, but the next bit should be 1
+ * {@code (highestWord & 0x08000000) != 0}.
*
* @return The normalization bias.
*/
@@ -546,9 +546,9 @@
* We assume that S has been normalized, as above, and that
* "this" has been left-shifted accordingly.
* Also assumed, of course, is that the result, q, can be expressed
- * as an integer, 0 <= q < 10.
+ * as an integer, {@code 0 <= q < 10}.
*
- * @param The divisor of this <code>FDBigInteger</code>.
+ * @param S The divisor of this <code>FDBigInteger</code>.
* @return <code>q = (int)(this / S)</code>.
*/
/*@
@@ -685,7 +685,7 @@
*
* @param p5 The exponent of the power-of-five factor.
* @param p2 The exponent of the power-of-two factor.
- * @return
+ * @return The multiplication result.
*/
/*@
@ requires this.value() == 0 || p5 == 0 && p2 == 0;
@@ -931,11 +931,11 @@
/**
* Compares the parameter with this <code>FDBigInteger</code>. Returns an
* integer accordingly as:
- * <pre>
- * >0: this > other
- * 0: this == other
- * <0: this < other
- * </pre>
+ * <pre>{@code
+ * > 0: this > other
+ * 0: this == other
+ * < 0: this < other
+ * }</pre>
*
* @param other The <code>FDBigInteger</code> to compare.
* @return A negative value, zero, or a positive value according to the
@@ -974,11 +974,11 @@
* Compares this <code>FDBigInteger</code> with
* <code>5<sup>p5</sup> * 2<sup>p2</sup></code>.
* Returns an integer accordingly as:
- * <pre>
- * >0: this > other
- * 0: this == other
- * <0: this < other
- * </pre>
+ * <pre>{@code
+ * > 0: this > other
+ * 0: this == other
+ * < 0: this < other
+ * }</pre>
* @param p5 The exponent of the power-of-five factor.
* @param p2 The exponent of the power-of-two factor.
* @return A negative value, zero, or a positive value according to the
@@ -1011,11 +1011,11 @@
/**
* Compares this <code>FDBigInteger</code> with <code>x + y</code>. Returns a
* value according to the comparison as:
- * <pre>
+ * <pre>{@code
* -1: this < x + y
* 0: this == x + y
* 1: this > x + y
- * </pre>
+ * }</pre>
* @param x The first addend of the sum to compare.
* @param y The second addend of the sum to compare.
* @return -1, 0, or 1 according to the result of the comparison.
--- a/jdk/src/java.base/share/classes/sun/misc/FloatingDecimal.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/FloatingDecimal.java Fri May 29 12:49:31 2015 +0200
@@ -154,7 +154,7 @@
/**
* Indicates the sign of the value.
- * @return <code>value < 0.0</code>.
+ * @return {@code value < 0.0}.
*/
public boolean isNegative();
--- a/jdk/src/java.base/share/classes/sun/misc/IOUtils.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/IOUtils.java Fri May 29 12:49:31 2015 +0200
@@ -39,7 +39,7 @@
/**
* Read up to <code>length</code> of bytes from <code>in</code>
* until EOF is detected.
- * @param in input stream, must not be null
+ * @param is input stream, must not be null
* @param length number of bytes to read, -1 or Integer.MAX_VALUE means
* read as much as possible
* @param readAll if true, an EOFException will be thrown if not enough
--- a/jdk/src/java.base/share/classes/sun/misc/JarFilter.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/JarFilter.java Fri May 29 12:49:31 2015 +0200
@@ -29,10 +29,8 @@
import java.io.FilenameFilter;
/**
- * <p>
* This class checks that only jar and zip files are included in the file list.
* This class is used in extension installation support (ExtensionDependency).
- * <p>
*
* @deprecated this class will be removed in a future release.
* @author Michael Colburn
--- a/jdk/src/java.base/share/classes/sun/misc/JavaLangAccess.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/JavaLangAccess.java Fri May 29 12:49:31 2015 +0200
@@ -91,14 +91,14 @@
* may be added to the delete on exit list by the application shutdown
* hooks.
*
- * @params slot the slot in the shutdown hook array, whose element
- * will be invoked in order during shutdown
- * @params registerShutdownInProgress true to allow the hook
- * to be registered even if the shutdown is in progress.
- * @params hook the hook to be registered
+ * @param slot the slot in the shutdown hook array, whose element
+ * will be invoked in order during shutdown
+ * @param registerShutdownInProgress true to allow the hook
+ * to be registered even if the shutdown is in progress.
+ * @param hook the hook to be registered
*
- * @throw IllegalStateException if shutdown is in progress and
- * the slot is not valid to register.
+ * @throws IllegalStateException if shutdown is in progress and
+ * the slot is not valid to register.
*/
void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
--- a/jdk/src/java.base/share/classes/sun/misc/Perf.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/Perf.java Fri May 29 12:49:31 2015 +0200
@@ -67,13 +67,13 @@
* <code>AccessController.doPrivileged(PrivilegedAction)</code>.
* <p> Here is a suggested idiom for use of this class:
*
- * <blockquote><pre>
+ * <blockquote><pre>{@code
* class MyTrustedClass {
* private static final Perf perf =
* AccessController.doPrivileged(new Perf.GetPerfAction<Perf>());
* ...
* }
- * </pre></blockquote>
+ * }</pre></blockquote>
* <p>
* In the presence of a security manager, the <code>MyTrustedClass</code>
* class in the above example will need to be granted the
@@ -171,8 +171,7 @@
* The attach mode specifies the access permissions requested for the
* instrumentation buffer of the target virtual machine. The permitted
* access permissions are:
- * <p>
- * <bl>
+ * <ul>
* <li>"r" - Read only access. This Java virtual machine has only
* read access to the instrumentation buffer for the target Java
* virtual machine.
@@ -180,7 +179,7 @@
* write access to the instrumentation buffer for the target Java virtual
* machine. This mode is currently not supported and is reserved for
* future enhancements.
- * </bl>
+ * </ul>
*
* @param lvmid an integer that uniquely identifies the
* target local Java virtual machine.
--- a/jdk/src/java.base/share/classes/sun/misc/PerfCounter.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/PerfCounter.java Fri May 29 12:49:31 2015 +0200
@@ -37,7 +37,7 @@
* The perf counters will be created in the jvmstat perf buffer
* that the HotSpot VM creates. The default size is 32K and thus
* the number of counters is bounded. You can alter the size
- * with -XX:PerfDataMemorySize=<bytes> option. If there is
+ * with {@code -XX:PerfDataMemorySize=<bytes>} option. If there is
* insufficient memory in the jvmstat perf buffer, the C heap memory
* will be used and thus the application will continue to run if
* the counters added exceeds the buffer size but the counters
--- a/jdk/src/java.base/share/classes/sun/misc/PerformanceLogger.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/PerformanceLogger.java Fri May 29 12:49:31 2015 +0200
@@ -51,10 +51,12 @@
* <P>
* To automatically track startup performance in an app or applet,
* use the command-line parameter sun.perflog as follows:<BR>
+ * <pre>{@code
* -Dsun.perflog[=file:<filename>]
+ * }</pre>
* <BR>
* where simply using the parameter with no value will enable output
- * to the console and a value of "file:<filename>" will cause
+ * to the console and a value of "{@code file:<filename>}" will cause
* that given filename to be created and used for all output.
* <P>
* By default, times are measured using System.currentTimeMillis(). To use
--- a/jdk/src/java.base/share/classes/sun/misc/Resource.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/Resource.java Fri May 29 12:49:31 2015 +0200
@@ -154,7 +154,8 @@
/**
* Returns the Resource data as a ByteBuffer, but only if the input stream
- * was implemented on top of a ByteBuffer. Return <tt>null</tt> otherwise.
+ * was implemented on top of a ByteBuffer. Return {@code null} otherwise.
+ * @return Resource data or null.
*/
public ByteBuffer getByteBuffer() throws IOException {
InputStream in = cachedInputStream();
--- a/jdk/src/java.base/share/classes/sun/misc/Signal.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/Signal.java Fri May 29 12:49:31 2015 +0200
@@ -50,7 +50,7 @@
* Signal objects are created based on their names. For example:
* <blockquote><pre>
* new Signal("INT");
- * </blockquote></pre>
+ * </pre></blockquote>
* constructs a signal object corresponding to <code>SIGINT</code>, which is
* typically produced when the user presses <code>Ctrl-C</code> at the command line.
* The <code>Signal</code> constructor throws <code>IllegalArgumentException</code>
@@ -64,7 +64,7 @@
* }
* };
* Signal.handle(new Signal("INT"), handler);
- * </blockquote></pre>
+ * </pre></blockquote>
*
* @author Sheng Liang
* @author Bill Shannon
@@ -149,7 +149,7 @@
*
* @param sig a signal
* @param handler the handler to be registered with the given signal.
- * @result the old handler
+ * @return the old handler
* @exception IllegalArgumentException the signal is in use by the VM
* @see sun.misc.Signal#raise(Signal sig)
* @see sun.misc.SignalHandler
--- a/jdk/src/java.base/share/classes/sun/misc/Unsafe.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/Unsafe.java Fri May 29 12:49:31 2015 +0200
@@ -641,9 +641,9 @@
* <li>String: any object (not just a java.lang.String)
* <li>InterfaceMethodRef: (NYI) a method handle to invoke on that call site's arguments
* </ul>
- * @params hostClass context for linkage, access control, protection domain, and class loader
- * @params data bytes of a class file
- * @params cpPatches where non-null entries exist, they replace corresponding CP entries in data
+ * @param hostClass context for linkage, access control, protection domain, and class loader
+ * @param data bytes of a class file
+ * @param cpPatches where non-null entries exist, they replace corresponding CP entries in data
*/
public native Class<?> defineAnonymousClass(Class<?> hostClass, byte[] data, Object[] cpPatches);
@@ -808,9 +808,9 @@
* The system imposes a maximum of 3 samples, representing
* averages over the last 1, 5, and 15 minutes, respectively.
*
- * @params loadavg an array of double of size nelems
- * @params nelems the number of samples to be retrieved and
- * must be 1 to 3.
+ * @param loadavg an array of double of size nelems
+ * @param nelems the number of samples to be retrieved and
+ * must be 1 to 3.
*
* @return the number of samples actually retrieved; or -1
* if the load average is unobtainable.
@@ -1108,7 +1108,6 @@
* <p>
* 8-byte atomicity is only guaranteed on platforms on which
* support atomic accesses to longs.
- * <p>
*
* @param o Java heap object in which the value resides, if any, else
* null
--- a/jdk/src/java.base/share/classes/sun/misc/VM.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/VM.java Fri May 29 12:49:31 2015 +0200
@@ -315,7 +315,7 @@
}
/*
- * Add <tt>n</tt> to the objects pending for finalization count.
+ * Add {@code n} to the objects pending for finalization count.
*
* @param n an integer value to be added to the objects pending
* for finalization count
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_de.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_de.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_de extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_es.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_es.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_es extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_fr.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_fr.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_fr extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_it.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_it.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_it extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_ja.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_ja.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_ja extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_ko.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_ko.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_ko extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_pt_BR.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_pt_BR.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_pt_BR extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_sv.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_sv.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_sv extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_zh_CN.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_zh_CN.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_zh_CN extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/misc/resources/Messages_zh_TW.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/misc/resources/Messages_zh_TW.java Fri May 29 12:49:31 2015 +0200
@@ -26,7 +26,7 @@
package sun.misc.resources;
/**
- * <p> This class represents the <code>ResourceBundle</code>
+ * This class represents the {@code ResourceBundle}
* for sun.misc.
*
* @author Michael Colburn
@@ -35,9 +35,9 @@
public class Messages_zh_TW extends java.util.ListResourceBundle {
/**
- * Returns the contents of this <code>ResourceBundle</code>.
- * <p>
- * @return the contents of this <code>ResourceBundle</code>.
+ * Returns the contents of this {@code ResourceBundle}.
+ *
+ * @return the contents of this {@code ResourceBundle}.
*/
public Object[][] getContents() {
return contents;
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Fri May 29 12:49:31 2015 +0200
@@ -983,7 +983,7 @@
SocketPermission p = URLtoSocketPermission(this.url);
if (p != null) {
try {
- AccessController.doPrivileged(
+ AccessController.doPrivilegedWithCombiner(
new PrivilegedExceptionAction<>() {
public Void run() throws IOException {
plainConnect0();
@@ -1244,7 +1244,7 @@
if (p != null) {
try {
- return AccessController.doPrivileged(
+ return AccessController.doPrivilegedWithCombiner(
new PrivilegedExceptionAction<>() {
public OutputStream run() throws IOException {
return getOutputStream0();
@@ -1422,7 +1422,7 @@
if (p != null) {
try {
- return AccessController.doPrivileged(
+ return AccessController.doPrivilegedWithCombiner(
new PrivilegedExceptionAction<>() {
public InputStream run() throws IOException {
return getInputStream0();
@@ -2565,7 +2565,7 @@
if (p != null) {
try {
- return AccessController.doPrivileged(
+ return AccessController.doPrivilegedWithCombiner(
new PrivilegedExceptionAction<>() {
public Boolean run() throws IOException {
return followRedirect0(loc, stat, locUrl0);
--- a/jdk/src/java.base/share/classes/sun/nio/cs/HKSCS.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/HKSCS.java Fri May 29 12:49:31 2015 +0200
@@ -378,7 +378,6 @@
dst[dp++] = repl[1];
continue;
}
- sp++;
}
if (bb > MAX_SINGLEBYTE) { // DoubleByte
dst[dp++] = (byte)(bb >> 8);
--- a/jdk/src/java.base/share/classes/sun/nio/cs/Surrogate.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/nio/cs/Surrogate.java Fri May 29 12:49:31 2015 +0200
@@ -175,10 +175,10 @@
* @param in The source buffer, from which one more character
* will be consumed if c is a high surrogate
*
- * @returns Either a parsed UCS-4 character, in which case the isPair()
- * and increment() methods will return meaningful values, or
- * -1, in which case error() will return a descriptive result
- * object
+ * @return Either a parsed UCS-4 character, in which case the isPair()
+ * and increment() methods will return meaningful values, or
+ * -1, in which case error() will return a descriptive result
+ * object
*/
public int parse(char c, CharBuffer in) {
if (Character.isHighSurrogate(c)) {
@@ -216,10 +216,10 @@
* @param ip The input index
* @param il The input limit
*
- * @returns Either a parsed UCS-4 character, in which case the isPair()
- * and increment() methods will return meaningful values, or
- * -1, in which case error() will return a descriptive result
- * object
+ * @return Either a parsed UCS-4 character, in which case the isPair()
+ * and increment() methods will return meaningful values, or
+ * -1, in which case error() will return a descriptive result
+ * object
*/
public int parse(char c, char[] ia, int ip, int il) {
assert (ia[ip] == c);
@@ -280,9 +280,9 @@
* @param dst The destination buffer, to which one or two UTF-16
* characters will be written
*
- * @returns Either a positive count of the number of UTF-16 characters
- * written to the destination buffer, or -1, in which case
- * error() will return a descriptive result object
+ * @return Either a positive count of the number of UTF-16 characters
+ * written to the destination buffer, or -1, in which case
+ * error() will return a descriptive result object
*/
public int generate(int uc, int len, CharBuffer dst) {
if (Character.isBmpCodePoint(uc)) {
@@ -325,9 +325,9 @@
* @param dp The destination position
* @param dl The destination limit
*
- * @returns Either a positive count of the number of UTF-16 characters
- * written to the destination buffer, or -1, in which case
- * error() will return a descriptive result object
+ * @return Either a positive count of the number of UTF-16 characters
+ * written to the destination buffer, or -1, in which case
+ * error() will return a descriptive result object
*/
public int generate(int uc, int len, char[] da, int dp, int dl) {
if (Character.isBmpCodePoint(uc)) {
--- a/jdk/src/java.base/share/classes/sun/security/x509/AVA.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/AVA.java Fri May 29 12:49:31 2015 +0200
@@ -454,7 +454,7 @@
if (embeddedHex.size() > 0) {
// add space(s) before embedded hex bytes
for (int i = 0; i < spaceCount; i++) {
- temp.append(" ");
+ temp.append(' ');
}
spaceCount = 0;
@@ -472,7 +472,7 @@
} else {
// add space(s)
for (int i = 0; i < spaceCount; i++) {
- temp.append(" ");
+ temp.append(' ');
}
spaceCount = 0;
temp.append((char)c);
@@ -853,7 +853,7 @@
}
sbuffer.append(c);
}
- typeAndValue.append(sbuffer.toString());
+ typeAndValue.append(sbuffer);
}
return typeAndValue.toString();
}
@@ -1039,7 +1039,7 @@
StringBuilder retval = new StringBuilder(40);
retval.append(keyword);
- retval.append("=");
+ retval.append('=');
try {
String valStr = value.getAsString();
@@ -1147,9 +1147,11 @@
// Emit the string ... quote it if needed
// if string is already quoted, don't re-quote
if (!alreadyQuoted && quoteNeeded) {
- retval.append("\"" + sbuffer.toString() + "\"");
+ retval.append('\"')
+ .append(sbuffer)
+ .append('\"');
} else {
- retval.append(sbuffer.toString());
+ retval.append(sbuffer);
}
}
} catch (IOException e) {
--- a/jdk/src/java.base/share/classes/sun/security/x509/AuthorityKeyIdentifierExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/AuthorityKeyIdentifierExtension.java Fri May 29 12:49:31 2015 +0200
@@ -196,17 +196,20 @@
* Return the object as a string.
*/
public String toString() {
- String s = super.toString() + "AuthorityKeyIdentifier [\n";
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("AuthorityKeyIdentifier [\n");
if (id != null) {
- s += id.toString(); // id already has a newline
+ sb.append(id); // id already has a newline
}
if (names != null) {
- s += names.toString() + "\n";
+ sb.append(names).append('\n');
}
if (serialNum != null) {
- s += serialNum.toString() + "\n";
+ sb.append(serialNum).append('\n');
}
- return (s + "]\n");
+ sb.append("]\n");
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/BasicConstraintsExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/BasicConstraintsExtension.java Fri May 29 12:49:31 2015 +0200
@@ -171,15 +171,11 @@
* Return user readable form of extension.
*/
public String toString() {
- String s = super.toString() + "BasicConstraints:[\n";
-
- s += ((ca) ? (" CA:true") : (" CA:false")) + "\n";
- if (pathLen >= 0) {
- s += " PathLen:" + pathLen + "\n";
- } else {
- s += " PathLen: undefined\n";
- }
- return (s + "]\n");
+ return super.toString() +
+ "BasicConstraints:[\n CA:" + ca +
+ "\n PathLen:" +
+ ((pathLen >= 0) ? String.valueOf(pathLen) : " undefined") +
+ "\n]\n";
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/CRLDistributionPointsExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/CRLDistributionPointsExtension.java Fri May 29 12:49:31 2015 +0200
@@ -231,8 +231,8 @@
distributionPoints = (List<DistributionPoint>)obj;
} else {
throw new IOException("Attribute name [" + name +
- "] not recognized by " +
- "CertAttrSet:" + extensionName + ".");
+ "] not recognized by " +
+ "CertAttrSet:" + extensionName + '.');
}
encodeThis();
}
@@ -245,8 +245,8 @@
return distributionPoints;
} else {
throw new IOException("Attribute name [" + name +
- "] not recognized by " +
- "CertAttrSet:" + extensionName + ".");
+ "] not recognized by " +
+ "CertAttrSet:" + extensionName + '.');
}
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/CRLNumberExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/CRLNumberExtension.java Fri May 29 12:49:31 2015 +0200
@@ -146,8 +146,8 @@
}
crlNumber = (BigInteger)obj;
} else {
- throw new IOException("Attribute name not recognized by"
- + " CertAttrSet:" + extensionName + ".");
+ throw new IOException("Attribute name not recognized by" +
+ " CertAttrSet:" + extensionName + '.');
}
encodeThis();
}
@@ -172,8 +172,8 @@
if (name.equalsIgnoreCase(NUMBER)) {
crlNumber = null;
} else {
- throw new IOException("Attribute name not recognized by"
- + " CertAttrSet:" + extensionName + ".");
+ throw new IOException("Attribute name not recognized by" +
+ " CertAttrSet:" + extensionName + '.');
}
encodeThis();
}
@@ -182,10 +182,15 @@
* Returns a printable representation of the CRLNumberExtension.
*/
public String toString() {
- String s = super.toString() + extensionLabel + ": " +
- ((crlNumber == null) ? "" : Debug.toHexString(crlNumber))
- + "\n";
- return (s);
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append(extensionLabel)
+ .append(": ");
+ if (crlNumber != null) {
+ sb.append(Debug.toHexString(crlNumber));
+ }
+ sb.append('\n');
+ return sb.toString();
}
/**
@@ -195,7 +200,7 @@
* @exception IOException on encoding errors.
*/
public void encode(OutputStream out) throws IOException {
- DerOutputStream tmp = new DerOutputStream();
+ DerOutputStream tmp = new DerOutputStream();
encode(out, PKIXExtensions.CRLNumber_Id, true);
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/CertException.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/CertException.java Fri May 29 12:49:31 2015 +0200
@@ -158,7 +158,7 @@
*/
public String toString()
{
- return "[Certificate Exception: " + getMessage() + "]";
+ return "[Certificate Exception: " + getMessage() + ']';
}
/**
@@ -168,6 +168,6 @@
{
return getVerfDescription()
+ ( (moreData != null)
- ? ( "\n (" + moreData + ")" ) : "" );
+ ? ( "\n (" + moreData + ')' ) : "" );
}
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/CertificatePoliciesExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/CertificatePoliciesExtension.java Fri May 29 12:49:31 2015 +0200
@@ -160,10 +160,12 @@
if (certPolicies == null) {
return "";
}
- StringBuilder sb = new StringBuilder(super.toString());
- sb.append("CertificatePolicies [\n");
+
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("CertificatePolicies [\n");
for (PolicyInformation info : certPolicies) {
- sb.append(info.toString());
+ sb.append(info);
}
sb.append("]\n");
return sb.toString();
--- a/jdk/src/java.base/share/classes/sun/security/x509/CertificateValidity.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/CertificateValidity.java Fri May 29 12:49:31 2015 +0200
@@ -134,8 +134,8 @@
public String toString() {
if (notBefore == null || notAfter == null)
return "";
- return ("Validity: [From: " + notBefore.toString() +
- ",\n To: " + notAfter.toString() + "]");
+ return "Validity: [From: " + notBefore +
+ ",\n To: " + notAfter + ']';
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/DistributionPoint.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/DistributionPoint.java Fri May 29 12:49:31 2015 +0200
@@ -380,23 +380,29 @@
*/
public String toString() {
StringBuilder sb = new StringBuilder();
+ sb.append("DistributionPoint:\n ");
if (fullName != null) {
- sb.append("DistributionPoint:\n " + fullName + "\n");
+ sb.append(fullName);
}
if (relativeName != null) {
- sb.append("DistributionPoint:\n " + relativeName + "\n");
+ sb.append(relativeName);
}
+ sb.append('\n');
if (reasonFlags != null) {
sb.append(" ReasonFlags:\n");
for (int i = 0; i < reasonFlags.length; i++) {
if (reasonFlags[i]) {
- sb.append(" " + reasonToString(i) + "\n");
+ sb.append(" ")
+ .append(reasonToString(i))
+ .append('\n');
}
}
}
if (crlIssuer != null) {
- sb.append(" CRLIssuer:" + crlIssuer + "\n");
+ sb.append(" CRLIssuer:")
+ .append(crlIssuer)
+ .append('\n');
}
return sb.toString();
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/DistributionPointName.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/DistributionPointName.java Fri May 29 12:49:31 2015 +0200
@@ -230,13 +230,13 @@
*/
public String toString() {
StringBuilder sb = new StringBuilder();
+ sb.append("DistributionPointName:\n ");
if (fullName != null) {
- sb.append("DistributionPointName:\n " + fullName + "\n");
-
+ sb.append(fullName);
} else {
- sb.append("DistributionPointName:\n " + relativeName + "\n");
+ sb.append(relativeName);
}
-
+ sb.append('\n');
return sb.toString();
}
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/EDIPartyName.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/EDIPartyName.java Fri May 29 12:49:31 2015 +0200
@@ -209,10 +209,15 @@
* Return the printable string.
*/
public String toString() {
- return ("EDIPartyName: " +
- ((assigner == null) ? "" :
- (" nameAssigner = " + assigner + ","))
- + " partyName = " + party);
+ StringBuilder sb = new StringBuilder("EDIPartyName: ");
+ if (assigner != null) {
+ sb.append(" nameAssigner = ")
+ .append(assigner)
+ .append(',');
+ }
+ sb.append(" partyName = ")
+ .append(party);
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/Extension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/Extension.java Fri May 29 12:49:31 2015 +0200
@@ -219,13 +219,8 @@
* Returns the Extension in user readable form.
*/
public String toString() {
- String s = "ObjectId: " + extensionId.toString();
- if (critical) {
- s += " Criticality=true\n";
- } else {
- s += " Criticality=false\n";
- }
- return (s);
+ return "ObjectId: " + extensionId +
+ " Criticality=" + critical + '\n';
}
// Value to mix up the hash
--- a/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtree.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtree.java Fri May 29 12:49:31 2015 +0200
@@ -127,15 +127,22 @@
* Return a printable string of the GeneralSubtree.
*/
public String toString() {
- String s = "\n GeneralSubtree: [\n" +
- " GeneralName: " + ((name == null) ? "" : name.toString()) +
- "\n Minimum: " + minimum;
- if (maximum == -1) {
- s += "\t Maximum: undefined";
- } else
- s += "\t Maximum: " + maximum;
- s += " ]\n";
- return (s);
+ StringBuilder sb = new StringBuilder();
+ sb.append("\n GeneralSubtree: [")
+ .append("\n GeneralName: ");
+ if (name != null) {
+ sb.append(name);
+ }
+ sb.append("\n Minimum: ")
+ .append(minimum)
+ .append("\n Maximum: ");
+ if (maximum == -1) {
+ sb.append("undefined");
+ } else {
+ sb.append(maximum);
+ }
+ sb.append(" ]\n");
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java Fri May 29 12:49:31 2015 +0200
@@ -124,8 +124,7 @@
* Return a printable string of the GeneralSubtree.
*/
public String toString() {
- String s = " GeneralSubtrees:\n" + trees.toString() + "\n";
- return s;
+ return " GeneralSubtrees:\n" + trees + '\n';
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/IPAddressName.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/IPAddressName.java Fri May 29 12:49:31 2015 +0200
@@ -263,7 +263,7 @@
if (address.length == 8) {
byte[] mask = new byte[4];
System.arraycopy(address, 4, mask, 0, 4);
- name = name + "/" +
+ name = name + '/' +
InetAddress.getByAddress(mask).getHostAddress();
}
} else {
@@ -285,7 +285,7 @@
if (!ba.get(i))
break;
}
- name = name + "/" + i;
+ name = name + '/' + i;
// Verify remaining bits 0
for (; i < 16*8; i++) {
if (ba.get(i)) {
--- a/jdk/src/java.base/share/classes/sun/security/x509/IssuerAlternativeNameExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/IssuerAlternativeNameExtension.java Fri May 29 12:49:31 2015 +0200
@@ -140,17 +140,20 @@
* Returns a printable representation of the IssuerAlternativeName.
*/
public String toString() {
-
- String result = super.toString() + "IssuerAlternativeName [\n";
- if(names == null) {
- result += " null\n";
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("IssuerAlternativeName [\n");
+ if (names == null) {
+ sb.append(" null\n");
} else {
- for(GeneralName name: names.names()) {
- result += " "+name+"\n";
+ for (GeneralName name : names.names()) {
+ sb.append(" ")
+ .append(name)
+ .append('\n');
}
}
- result += "]\n";
- return result;
+ sb.append("]\n");
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java Fri May 29 12:49:31 2015 +0200
@@ -441,9 +441,9 @@
* Returns the extension as user readable string.
*/
public String toString() {
-
- StringBuilder sb = new StringBuilder(super.toString());
- sb.append("IssuingDistributionPoint [\n ");
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("IssuingDistributionPoint [\n ");
if (distributionPoint != null) {
sb.append(distributionPoint);
@@ -453,23 +453,18 @@
sb.append(revocationReasons);
}
- sb.append((hasOnlyUserCerts)
- ? (" Only contains user certs: true")
- : (" Only contains user certs: false")).append("\n");
-
- sb.append((hasOnlyCACerts)
- ? (" Only contains CA certs: true")
- : (" Only contains CA certs: false")).append("\n");
-
- sb.append((hasOnlyAttributeCerts)
- ? (" Only contains attribute certs: true")
- : (" Only contains attribute certs: false")).append("\n");
-
- sb.append((isIndirectCRL)
- ? (" Indirect CRL: true")
- : (" Indirect CRL: false")).append("\n");
-
- sb.append("]\n");
+ sb.append(" Only contains user certs: ")
+ .append(hasOnlyUserCerts)
+ .append('\n')
+ .append(" Only contains CA certs: ")
+ .append(hasOnlyCACerts)
+ .append('\n')
+ .append(" Only contains attribute certs: ")
+ .append(hasOnlyAttributeCerts)
+ .append('\n')
+ .append(" Indirect CRL: ")
+ .append(isIndirectCRL)
+ .append("\n]\n");
return sb.toString();
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/NameConstraintsExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/NameConstraintsExtension.java Fri May 29 12:49:31 2015 +0200
@@ -214,12 +214,19 @@
* Return the printable string.
*/
public String toString() {
- return (super.toString() + "NameConstraints: [" +
- ((permitted == null) ? "" :
- ("\n Permitted:" + permitted.toString())) +
- ((excluded == null) ? "" :
- ("\n Excluded:" + excluded.toString()))
- + " ]\n");
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("NameConstraints: [");
+ if (permitted != null) {
+ sb.append("\n Permitted:")
+ .append(permitted);
+ }
+ if (excluded != null) {
+ sb.append("\n Excluded:")
+ .append(excluded);
+ }
+ sb.append(" ]\n");
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/PolicyConstraintsExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/PolicyConstraintsExtension.java Fri May 29 12:49:31 2015 +0200
@@ -175,19 +175,24 @@
* Return the extension as user readable string.
*/
public String toString() {
- String s;
- s = super.toString() + "PolicyConstraints: [" + " Require: ";
- if (require == -1)
- s += "unspecified;";
- else
- s += require + ";";
- s += "\tInhibit: ";
- if (inhibit == -1)
- s += "unspecified";
- else
- s += inhibit;
- s += " ]\n";
- return s;
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("PolicyConstraints: [")
+ .append(" Require: ");
+ if (require == -1) {
+ sb.append("unspecified;");
+ } else {
+ sb.append(require)
+ .append(';');
+ }
+ sb.append("\tInhibit: ");
+ if (inhibit == -1) {
+ sb.append("unspecified");
+ } else {
+ sb.append(inhibit);
+ }
+ sb.append(" ]\n");
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/PolicyInformation.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/PolicyInformation.java Fri May 29 12:49:31 2015 +0200
@@ -258,9 +258,7 @@
* Return a printable representation of the PolicyInformation.
*/
public String toString() {
- StringBuilder s = new StringBuilder(" [" + policyIdentifier.toString());
- s.append(policyQualifiers + " ]\n");
- return s.toString();
+ return " [" + policyIdentifier + policyQualifiers + " ]\n";
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/PrivateKeyUsageExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/PrivateKeyUsageExtension.java Fri May 29 12:49:31 2015 +0200
@@ -175,11 +175,22 @@
* Return the printable string.
*/
public String toString() {
- return(super.toString() +
- "PrivateKeyUsage: [\n" +
- ((notBefore == null) ? "" : "From: " + notBefore.toString() + ", ")
- + ((notAfter == null) ? "" : "To: " + notAfter.toString())
- + "]\n");
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString())
+ .append("PrivateKeyUsage: [\n");
+ if (notBefore != null) {
+ sb.append("From: ")
+ .append(notBefore);
+ if (notAfter != null) {
+ sb.append(", ");
+ }
+ }
+ if (notAfter != null) {
+ sb.append("To: ")
+ .append(notAfter);
+ }
+ sb.append("]\n");
+ return sb.toString();
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/RDN.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/RDN.java Fri May 29 12:49:31 2015 +0200
@@ -348,14 +348,11 @@
return assertion[0].toString();
}
- StringBuilder sb = new StringBuilder();
+ StringJoiner sj = new StringJoiner(" + ");
for (int i = 0; i < assertion.length; i++) {
- if (i != 0) {
- sb.append(" + ");
- }
- sb.append(assertion[i].toString());
+ sj.add(assertion[i].toString());
}
- return sb.toString();
+ return sj.toString();
}
/*
@@ -376,14 +373,11 @@
return assertion[0].toRFC1779String(oidMap);
}
- StringBuilder sb = new StringBuilder();
+ StringJoiner sj = new StringJoiner(" + ");
for (int i = 0; i < assertion.length; i++) {
- if (i != 0) {
- sb.append(" + ");
- }
- sb.append(assertion[i].toRFC1779String(oidMap));
+ sj.add(assertion[i].toRFC1779String(oidMap));
}
- return sb.toString();
+ return sj.toString();
}
/*
--- a/jdk/src/java.base/share/classes/sun/security/x509/SerialNumber.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/SerialNumber.java Fri May 29 12:49:31 2015 +0200
@@ -101,7 +101,7 @@
* Return the SerialNumber as user readable string.
*/
public String toString() {
- return ("SerialNumber: [" + Debug.toHexString(serialNum) + "]");
+ return "SerialNumber: [" + Debug.toHexString(serialNum) + ']';
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/SubjectInfoAccessExtension.java Fri May 29 12:49:31 2015 +0200
@@ -238,8 +238,8 @@
* Return the extension as user readable string.
*/
public String toString() {
- return super.toString() + "SubjectInfoAccess [\n "
- + accessDescriptions + "\n]\n";
+ return super.toString() +
+ "SubjectInfoAccess [\n " + accessDescriptions + "\n]\n";
}
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/SubjectKeyIdentifierExtension.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/SubjectKeyIdentifierExtension.java Fri May 29 12:49:31 2015 +0200
@@ -115,8 +115,8 @@
* Returns a printable representation.
*/
public String toString() {
- return super.toString() + "SubjectKeyIdentifier [\n"
- + String.valueOf(id) + "]\n";
+ return super.toString() +
+ "SubjectKeyIdentifier [\n" + id + "]\n";
}
/**
--- a/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/X500Name.java Fri May 29 12:49:31 2015 +0200
@@ -31,6 +31,7 @@
import java.security.AccessController;
import java.security.Principal;
import java.util.*;
+import java.util.StringJoiner;
import sun.security.util.*;
import javax.security.auth.x500.X500Principal;
@@ -689,14 +690,11 @@
* The encodings of adjoining RelativeDistinguishedNames are separated
* by a comma character (',' ASCII 44).
*/
- StringBuilder fullname = new StringBuilder(48);
+ StringJoiner sj = new StringJoiner(",");
for (int i = names.length - 1; i >= 0; i--) {
- if (i < names.length - 1) {
- fullname.append(',');
- }
- fullname.append(names[i].toRFC2253String(oidMap));
+ sj.add(names[i].toRFC2253String(oidMap));
}
- return fullname.toString();
+ return sj.toString();
}
public String getRFC2253CanonicalName() {
@@ -722,14 +720,11 @@
* The encodings of adjoining RelativeDistinguishedNames are separated
* by a comma character (',' ASCII 44).
*/
- StringBuilder fullname = new StringBuilder(48);
+ StringJoiner sj = new StringJoiner(",");
for (int i = names.length - 1; i >= 0; i--) {
- if (i < names.length - 1) {
- fullname.append(',');
- }
- fullname.append(names[i].toRFC2253String(true));
+ sj.add(names[i].toRFC2253String(true));
}
- canonicalDn = fullname.toString();
+ canonicalDn = sj.toString();
return canonicalDn;
}
@@ -1064,16 +1059,16 @@
return;
}
- StringBuilder sb = new StringBuilder(48);
- if (names != null) {
- for (int i = names.length - 1; i >= 0; i--) {
- if (i != names.length - 1) {
- sb.append(", ");
- }
- sb.append(names[i].toString());
- }
+ if (names == null) {
+ dn = "";
+ return;
}
- dn = sb.toString();
+
+ StringJoiner sj = new StringJoiner(", ");
+ for (int i = names.length - 1; i >= 0; i--) {
+ sj.add(names[i].toString());
+ }
+ dn = sj.toString();
}
/*
@@ -1090,16 +1085,15 @@
return names[0].toRFC1779String(oidMap);
}
- StringBuilder sb = new StringBuilder(48);
- if (names != null) {
- for (int i = names.length - 1; i >= 0; i--) {
- if (i != names.length - 1) {
- sb.append(", ");
- }
- sb.append(names[i].toRFC1779String(oidMap));
- }
+ if (names == null) {
+ return "";
}
- return sb.toString();
+
+ StringJoiner sj = new StringJoiner(", ");
+ for (int i = names.length - 1; i >= 0; i--) {
+ sj.add(names[i].toRFC1779String(oidMap));
+ }
+ return sj.toString();
}
/****************************************************************/
--- a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLEntryImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLEntryImpl.java Fri May 29 12:49:31 2015 +0200
@@ -291,40 +291,47 @@
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append(serialNumber.toString());
- sb.append(" On: " + revocationDate.toString());
+ sb.append(serialNumber)
+ .append(" On: ")
+ .append(revocationDate);
if (certIssuer != null) {
- sb.append("\n Certificate issuer: " + certIssuer);
+ sb.append("\n Certificate issuer: ")
+ .append(certIssuer);
}
if (extensions != null) {
Collection<Extension> allEntryExts = extensions.getAllExtensions();
Extension[] exts = allEntryExts.toArray(new Extension[0]);
- sb.append("\n CRL Entry Extensions: " + exts.length);
+ sb.append("\n CRL Entry Extensions: ")
+ .append(exts.length);
for (int i = 0; i < exts.length; i++) {
- sb.append("\n [" + (i+1) + "]: ");
+ sb.append("\n [")
+ .append(i+1)
+ .append("]: ");
Extension ext = exts[i];
try {
if (OIDMap.getClass(ext.getExtensionId()) == null) {
- sb.append(ext.toString());
+ sb.append(ext);
byte[] extValue = ext.getExtensionValue();
if (extValue != null) {
DerOutputStream out = new DerOutputStream();
out.putOctetString(extValue);
extValue = out.toByteArray();
HexDumpEncoder enc = new HexDumpEncoder();
- sb.append("Extension unknown: "
- + "DER encoded OCTET string =\n"
- + enc.encodeBuffer(extValue) + "\n");
+ sb.append("Extension unknown: ")
+ .append("DER encoded OCTET string =\n")
+ .append(enc.encodeBuffer(extValue))
+ .append('\n');
}
- } else
- sb.append(ext.toString()); //sub-class exists
+ } else {
+ sb.append(ext); //sub-class exists
+ }
} catch (Exception e) {
sb.append(", Error parsing this extension");
}
}
}
- sb.append("\n");
+ sb.append('\n');
return sb.toString();
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java Fri May 29 12:49:31 2015 +0200
@@ -537,47 +537,65 @@
*/
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("X.509 CRL v" + (version+1) + "\n");
+ sb.append("X.509 CRL v")
+ .append(version+1)
+ .append('\n');
if (sigAlgId != null)
- sb.append("Signature Algorithm: " + sigAlgId.toString() +
- ", OID=" + (sigAlgId.getOID()).toString() + "\n");
+ sb.append("Signature Algorithm: ")
+ .append(sigAlgId)
+ .append(", OID=")
+ .append(sigAlgId.getOID())
+ .append('\n');
if (issuer != null)
- sb.append("Issuer: " + issuer.toString() + "\n");
+ sb.append("Issuer: ")
+ .append(issuer)
+ .append('\n');
if (thisUpdate != null)
- sb.append("\nThis Update: " + thisUpdate.toString() + "\n");
+ sb.append("\nThis Update: ")
+ .append(thisUpdate)
+ .append('\n');
if (nextUpdate != null)
- sb.append("Next Update: " + nextUpdate.toString() + "\n");
+ sb.append("Next Update: ")
+ .append(nextUpdate)
+ .append('\n');
if (revokedList.isEmpty())
sb.append("\nNO certificates have been revoked\n");
else {
- sb.append("\nRevoked Certificates: " + revokedList.size());
+ sb.append("\nRevoked Certificates: ")
+ .append(revokedList.size());
int i = 1;
for (X509CRLEntry entry: revokedList) {
- sb.append("\n[" + i++ + "] " + entry.toString());
+ sb.append("\n[")
+ .append(i++)
+ .append("] ")
+ .append(entry);
}
}
if (extensions != null) {
Collection<Extension> allExts = extensions.getAllExtensions();
Object[] objs = allExts.toArray();
- sb.append("\nCRL Extensions: " + objs.length);
+ sb.append("\nCRL Extensions: ")
+ .append(objs.length);
for (int i = 0; i < objs.length; i++) {
- sb.append("\n[" + (i+1) + "]: ");
+ sb.append("\n[").append(i+1).append("]: ");
Extension ext = (Extension)objs[i];
try {
- if (OIDMap.getClass(ext.getExtensionId()) == null) {
- sb.append(ext.toString());
- byte[] extValue = ext.getExtensionValue();
- if (extValue != null) {
- DerOutputStream out = new DerOutputStream();
- out.putOctetString(extValue);
- extValue = out.toByteArray();
- HexDumpEncoder enc = new HexDumpEncoder();
- sb.append("Extension unknown: "
- + "DER encoded OCTET string =\n"
- + enc.encodeBuffer(extValue) + "\n");
- }
- } else
- sb.append(ext.toString()); // sub-class exists
+ if (OIDMap.getClass(ext.getExtensionId()) == null) {
+ sb.append(ext);
+ byte[] extValue = ext.getExtensionValue();
+ if (extValue != null) {
+ DerOutputStream out = new DerOutputStream();
+ out.putOctetString(extValue);
+ extValue = out.toByteArray();
+ HexDumpEncoder enc = new HexDumpEncoder();
+ sb.append("Extension unknown: ")
+ .append("DER encoded OCTET string =\n")
+ .append(enc.encodeBuffer(extValue))
+ .append('\n');
+ }
+ } else {
+ sb.append(ext); // sub-class exists
+ }
} catch (Exception e) {
sb.append(", Error parsing this extension");
}
@@ -585,10 +603,12 @@
}
if (signature != null) {
HexDumpEncoder encoder = new HexDumpEncoder();
- sb.append("\nSignature:\n" + encoder.encodeBuffer(signature)
- + "\n");
- } else
+ sb.append("\nSignature:\n")
+ .append(encoder.encodeBuffer(signature))
+ .append('\n');
+ } else {
sb.append("NOT signed yet\n");
+ }
return sb.toString();
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/X509CertImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CertImpl.java Fri May 29 12:49:31 2015 +0200
@@ -81,7 +81,7 @@
private static final long serialVersionUID = -3457612960190864406L;
- private static final String DOT = ".";
+ private static final char DOT = '.';
/**
* Public attribute names.
*/
@@ -799,17 +799,10 @@
if (info == null || algId == null || signature == null)
return "";
- StringBuilder sb = new StringBuilder();
-
- sb.append("[\n");
- sb.append(info.toString() + "\n");
- sb.append(" Algorithm: [" + algId.toString() + "]\n");
-
HexDumpEncoder encoder = new HexDumpEncoder();
- sb.append(" Signature:\n" + encoder.encodeBuffer(signature));
- sb.append("\n]");
-
- return sb.toString();
+ return "[\n" + info + '\n' +
+ " Algorithm: [" + algId + "]\n" +
+ " Signature:\n" + encoder.encodeBuffer(signature) + "\n]";
}
// the strongly typed gets, as per java.security.cert.X509Certificate
@@ -1941,31 +1934,30 @@
* only contains 0-9 and A-F. No small case, no colon.
*/
private String getCertificateFingerPrint(String mdAlg) {
- String fingerPrint = "";
try {
byte[] encCertInfo = getEncoded();
MessageDigest md = MessageDigest.getInstance(mdAlg);
byte[] digest = md.digest(encCertInfo);
- StringBuffer buf = new StringBuffer();
+ StringBuilder sb = new StringBuilder(digest.length * 2);
for (int i = 0; i < digest.length; i++) {
- byte2hex(digest[i], buf);
+ byte2hex(digest[i], sb);
}
- fingerPrint = buf.toString();
+ return sb.toString();
} catch (NoSuchAlgorithmException | CertificateEncodingException e) {
// ignored
}
- return fingerPrint;
+ return "";
}
/**
- * Converts a byte to hex digit and writes to the supplied buffer
+ * Converts a byte to hex digit and writes to the supplied builder
*/
- private static void byte2hex(byte b, StringBuffer buf) {
+ private static void byte2hex(byte b, StringBuilder buf) {
char[] hexChars = { '0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', 'A', 'B', 'C', 'D', 'E', 'F' };
int high = ((b & 0xf0) >> 4);
int low = (b & 0x0f);
- buf.append(hexChars[high]);
- buf.append(hexChars[low]);
+ buf.append(hexChars[high])
+ .append(hexChars[low]);
}
}
--- a/jdk/src/java.base/share/classes/sun/security/x509/X509CertInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/x509/X509CertInfo.java Fri May 29 12:49:31 2015 +0200
@@ -299,55 +299,60 @@
}
StringBuilder sb = new StringBuilder();
- sb.append("[\n");
- sb.append(" " + version.toString() + "\n");
- sb.append(" Subject: " + subject.toString() + "\n");
- sb.append(" Signature Algorithm: " + algId.toString() + "\n");
- sb.append(" Key: " + pubKey.toString() + "\n");
- sb.append(" " + interval.toString() + "\n");
- sb.append(" Issuer: " + issuer.toString() + "\n");
- sb.append(" " + serialNum.toString() + "\n");
+ sb.append("[\n")
+ .append(" ").append(version).append('\n')
+ .append(" Subject: ").append(subject).append('\n')
+ .append(" Signature Algorithm: ").append(algId).append('\n')
+ .append(" Key: ").append(pubKey).append('\n')
+ .append(" ").append(interval).append('\n')
+ .append(" Issuer: ").append(issuer).append('\n')
+ .append(" ").append(serialNum).append('\n');
// optional v2, v3 extras
if (issuerUniqueId != null) {
- sb.append(" Issuer Id:\n" + issuerUniqueId.toString() + "\n");
+ sb.append(" Issuer Id:\n").append(issuerUniqueId).append('\n');
}
if (subjectUniqueId != null) {
- sb.append(" Subject Id:\n" + subjectUniqueId.toString() + "\n");
+ sb.append(" Subject Id:\n").append(subjectUniqueId).append('\n');
}
if (extensions != null) {
Collection<Extension> allExts = extensions.getAllExtensions();
Extension[] exts = allExts.toArray(new Extension[0]);
- sb.append("\nCertificate Extensions: " + exts.length);
+ sb.append("\nCertificate Extensions: ").append(exts.length);
for (int i = 0; i < exts.length; i++) {
- sb.append("\n[" + (i+1) + "]: ");
+ sb.append("\n[").append(i+1).append("]: ");
Extension ext = exts[i];
try {
if (OIDMap.getClass(ext.getExtensionId()) == null) {
- sb.append(ext.toString());
+ sb.append(ext);
byte[] extValue = ext.getExtensionValue();
if (extValue != null) {
DerOutputStream out = new DerOutputStream();
out.putOctetString(extValue);
extValue = out.toByteArray();
HexDumpEncoder enc = new HexDumpEncoder();
- sb.append("Extension unknown: "
- + "DER encoded OCTET string =\n"
- + enc.encodeBuffer(extValue) + "\n");
+ sb.append("Extension unknown: ")
+ .append("DER encoded OCTET string =\n")
+ .append(enc.encodeBuffer(extValue))
+ .append('\n');
}
- } else
- sb.append(ext.toString()); //sub-class exists
+ } else {
+ sb.append(ext); //sub-class exists
+ }
} catch (Exception e) {
sb.append(", Error parsing this extension");
}
}
Map<String,Extension> invalid = extensions.getUnparseableExtensions();
if (invalid.isEmpty() == false) {
- sb.append("\nUnparseable certificate extensions: " + invalid.size());
+ sb.append("\nUnparseable certificate extensions: ")
+ .append(invalid.size());
int i = 1;
for (Extension ext : invalid.values()) {
- sb.append("\n[" + (i++) + "]: ");
- sb.append(ext);
+ sb.append("\n[")
+ .append(i++)
+ .append("]: ")
+ .append(ext);
}
}
}
--- a/jdk/src/java.base/share/classes/sun/text/CompactByteArray.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/CompactByteArray.java Fri May 29 12:49:31 2015 +0200
@@ -49,7 +49,7 @@
* Han ideographs have the same value. However, lookup is much faster than a
* hash table.
* A compact array of any primitive data type serves two purposes:
- * <UL type = round>
+ * <UL type = circle>
* <LI>Fast access of the indexed values.
* <LI>Smaller memory footprint.
* </UL>
--- a/jdk/src/java.base/share/classes/sun/text/ComposedCharIter.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/ComposedCharIter.java Fri May 29 12:49:31 2015 +0200
@@ -50,7 +50,7 @@
}
/**
- * Construct a new <tt>ComposedCharIter</tt>. The iterator will return
+ * Construct a new {@code ComposedCharIter}. The iterator will return
* all Unicode characters with canonical decompositions, excluding Korean
* Hangul characters.
*/
@@ -58,10 +58,10 @@
/**
* Returns the next precomposed Unicode character.
- * Repeated calls to <tt>next</tt> return all of the precomposed characters defined
+ * Repeated calls to {@code next} return all of the precomposed characters defined
* by Unicode, in ascending order. After all precomposed characters have
- * been returned, {@link #hasNext} will return <tt>false</tt> and further calls
- * to <tt>next</tt> will return {@link #DONE}.
+ * been returned, {@link #hasNext} will return {@code false} and further calls
+ * to {@code next} will return {@link #DONE}.
*/
public int next() {
if (curChar == decompNum - 1) {
--- a/jdk/src/java.base/share/classes/sun/text/Normalizer.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/Normalizer.java Fri May 29 12:49:31 2015 +0200
@@ -32,7 +32,7 @@
* This Normalizer is for Unicode 3.2 support for IDNA only.
* Developers should not use this class.
*
- * @ since 1.6
+ * @since 1.6
*/
public final class Normalizer {
--- a/jdk/src/java.base/share/classes/sun/text/bidi/BidiBase.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/bidi/BidiBase.java Fri May 29 12:49:31 2015 +0200
@@ -81,14 +81,13 @@
*
* <h3>General remarks about the API:</h3>
*
- * The "limit" of a sequence of characters is the position just after
+ * The "limit" of a sequence of characters is the position just after
* their last character, i.e., one more than that position.
* <p>
*
- * Some of the API methods provide access to "runs". Such a
- * "run" is defined as a sequence of characters that are at the same
+ * Some of the API methods provide access to "runs". Such a
+ * "run" is defined as a sequence of characters that are at the same
* embedding level after performing the Bidi algorithm.
- * <p>
*
* <h3>Basic concept: paragraph</h3>
* A piece of text can be divided into several paragraphs by characters
@@ -141,7 +140,8 @@
* these special values are designed that way. Also, the implementation
* assumes that MAX_EXPLICIT_LEVEL is odd.
*
- * <ul><b>See Also:</b>
+ * <p><b>See Also:</b>
+ * <ul>
* <li>{@link #LEVEL_DEFAULT_LTR}
* <li>{@link #LEVEL_DEFAULT_RTL}
* <li>{@link #LEVEL_OVERRIDE}
@@ -153,7 +153,8 @@
* Reordering mode values indicate which variant of the Bidi algorithm to
* use.
*
- * <ul><b>See Also:</b>
+ * <p><b>See Also:</b>
+ * <ul>
* <li>{@link #setReorderingMode}
* <li>{@link #REORDER_DEFAULT}
* <li>{@link #REORDER_NUMBERS_SPECIAL}
@@ -166,7 +167,8 @@
*
* <h3>Basic concept: Reordering Options</h3>
* Reordering options can be applied during Bidi text transformations.
- * <ul><b>See Also:</b>
+ * <p><b>See Also:</b>
+ * <ul>
* <li>{@link #setReorderingOptions}
* <li>{@link #OPTION_DEFAULT}
* <li>{@link #OPTION_INSERT_MARKS}
@@ -202,7 +204,7 @@
* and therefore its implementation omitted from this sample code.</li>
* </ul>
*
- * <pre>
+ * <pre>{@code
*
* package com.ibm.icu.dev.test.bidi;
*
@@ -451,7 +453,7 @@
* }
* }
*
- * </pre>
+ * }</pre>
*/
public class BidiBase {
@@ -2419,9 +2421,9 @@
* (same index) character if the level has the
* <code>LEVEL_OVERRIDE</code> bit set.<br><br>
* Except for that bit, it must be
- * <code>paraLevel<=embeddingLevels[]<=MAX_EXPLICIT_LEVEL</code>,
+ * {@code paraLevel<=embeddingLevels[]<=MAX_EXPLICIT_LEVEL},
* with one exception: a level of zero may be specified for a
- * paragraph separator even if <code>paraLevel>0</code> when multiple
+ * paragraph separator even if {@code paraLevel > 0} when multiple
* paragraphs are submitted in the same call to <code>setPara()</code>.<br><br>
* <strong>Caution: </strong>A reference to this array, not a copy
* of the levels, will be stored in the <code>Bidi</code> object;
@@ -2680,7 +2682,7 @@
* For example, in pure LTR text with numbers the numbers would get
* a resolved level of 2 higher than the surrounding text according to
* the algorithm. This implementation may set all resolved levels to
- * the same value in such a case.<p>
+ * the same value in such a case.
*
* @param paragraph a paragraph of text with optional character and
* paragraph attribute information
@@ -2817,7 +2819,7 @@
}
/**
- * Get the index of a paragraph, given a position within the text.<p>
+ * Get the index of a paragraph, given a position within the text.
*
* @param charIndex is the index of a character within the text, in the
* range <code>[0..getProcessedLength()-1]</code>.
--- a/jdk/src/java.base/share/classes/sun/text/bidi/BidiRun.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/bidi/BidiRun.java Fri May 29 12:49:31 2015 +0200
@@ -42,7 +42,7 @@
/**
* A BidiRun represents a sequence of characters at the same embedding level.
* The Bidi algorithm decomposes a piece of text into sequences of characters
- * at the same embedding level, each such sequence is called a <quote>run</quote>.
+ * at the same embedding level, each such sequence is called a "run".
*
* <p>A BidiRun represents such a run by storing its essential properties,
* but does not duplicate the characters which form the run.
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/ICUBinary.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/ICUBinary.java Fri May 29 12:49:31 2015 +0200
@@ -65,7 +65,7 @@
/**
* <p>ICU data header reader method.
* Takes a ICU generated big-endian input stream, parse the ICU standard
- * file header and authenticates them.</p>
+ * file header and authenticates them.
* <p>Header format:
* <ul>
* <li> Header size (char)
@@ -84,7 +84,7 @@
* [0] major [1] minor [2] milli [3] micro
* <li> Unicode version (4 bytes) this ICU is based on.
* </ul>
- * </p>
+ *
* <p>
* Example of use:<br>
* <pre>
@@ -98,7 +98,7 @@
* System.out.println("This is not a ICU data file");
* }
* </pre>
- * </p>
+ *
* @param inputStream input stream that contains the ICU data header
* @param dataFormatIDExpected Data format expected. An array of 4 bytes
* information about the data format.
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/IntTrie.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/IntTrie.java Fri May 29 12:49:31 2015 +0200
@@ -58,7 +58,7 @@
* trie.</p>
* @param inputStream file input stream to a ICU data file, containing
* the trie
- * @param dataManipulate object which provides methods to parse the char
+ * @param datamanipulate object which provides methods to parse the char
* data
* @throws IOException thrown when data reading fails
* @draft 2.1
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/NormalizerBase.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/NormalizerBase.java Fri May 29 12:49:31 2015 +0200
@@ -55,16 +55,16 @@
* In Unicode, this can be encoded as a single character (the
* "composed" form):
*
- * <p>
+ * <pre>
* 00C1 LATIN CAPITAL LETTER A WITH ACUTE
- * </p>
+ * </pre>
*
* or as two separate characters (the "decomposed" form):
*
- * <p>
+ * <pre>
* 0041 LATIN CAPITAL LETTER A
* 0301 COMBINING ACUTE ACCENT
- * </p>
+ * </pre>
*
* To a user of your program, however, both of these sequences should be
* treated as the same "user-level" character "A with acute accent". When you
@@ -76,17 +76,17 @@
*
* Similarly, the string "ffi" can be encoded as three separate letters:
*
- * <p>
+ * <pre>
* 0066 LATIN SMALL LETTER F
* 0066 LATIN SMALL LETTER F
* 0069 LATIN SMALL LETTER I
- * </p>
+ * </pre>
*
* or as the single character
*
- * <p>
+ * <pre>
* FB03 LATIN SMALL LIGATURE FFI
- * </p>
+ * </pre>
*
* The ffi ligature is not a distinct semantic character, and strictly speaking
* it shouldn't be in Unicode at all, but it was included for compatibility
@@ -555,12 +555,12 @@
//-------------------------------------------------------------------------
/**
- * Creates a new <tt>Normalizer</tt> object for iterating over the
+ * Creates a new {@code Normalizer} object for iterating over the
* normalized form of a given string.
* <p>
- * The <tt>options</tt> parameter specifies which optional
- * <tt>Normalizer</tt> features are to be enabled for this object.
- * <p>
+ * The {@code options} parameter specifies which optional
+ * {@code Normalizer} features are to be enabled for this object.
+ *
* @param str The string to be normalized. The normalization
* will start at the beginning of the string.
*
@@ -579,9 +579,9 @@
}
/**
- * Creates a new <tt>Normalizer</tt> object for iterating over the
+ * Creates a new {@code Normalizer} object for iterating over the
* normalized form of the given text.
- * <p>
+ *
* @param iter The input text to be normalized. The normalization
* will start at the beginning of the string.
*
@@ -592,9 +592,9 @@
}
/**
- * Creates a new <tt>Normalizer</tt> object for iterating over the
+ * Creates a new {@code Normalizer} object for iterating over the
* normalized form of the given text.
- * <p>
+ *
* @param iter The input text to be normalized. The normalization
* will start at the beginning of the string.
*
@@ -615,13 +615,13 @@
}
/**
- * Clones this <tt>Normalizer</tt> object. All properties of this
+ * Clones this {@code Normalizer} object. All properties of this
* object are duplicated in the new object, including the cloning of any
* {@link CharacterIterator} that was passed in to the constructor
* or to {@link #setText(CharacterIterator) setText}.
* However, the text storage underlying
- * the <tt>CharacterIterator</tt> is not duplicated unless the
- * iterator's <tt>clone</tt> method does so.
+ * the {@code CharacterIterator} is not duplicated unless the
+ * iterator's {@code clone} method does so.
* @stable ICU 2.8
*/
public Object clone() {
@@ -791,7 +791,7 @@
//-------------------------------------------------------------------------
/**
- * Return the current character in the normalized text->
+ * Return the current character in the normalized text.
* @return The codepoint as an int
* @stable ICU 2.8
*/
@@ -872,10 +872,10 @@
* while {@link #next} and {@link #previous} iterate through characters
* in the normalized <em>output</em>. This means that there is not
* necessarily a one-to-one correspondence between characters returned
- * by <tt>next</tt> and <tt>previous</tt> and the indices passed to and
- * returned from <tt>setIndex</tt> and {@link #getIndex}.
- * <p>
- * @param index the desired index in the input text->
+ * by {@code next} and {@code previous} and the indices passed to and
+ * returned from {@code setIndex} and {@link #getIndex}.
+ *
+ * @param index the desired index in the input text.
*
* @return the first normalized character that is the result of iterating
* forward starting at the given index.
@@ -894,8 +894,8 @@
/**
* Retrieve the index of the start of the input text. This is the begin
- * index of the <tt>CharacterIterator</tt> or the start (i.e. 0) of the
- * <tt>String</tt> over which this <tt>Normalizer</tt> is iterating
+ * index of the {@code CharacterIterator} or the start (i.e. 0) of the
+ * {@code String} over which this {@code Normalizer} is iterating
* @deprecated ICU 2.2. Use startIndex() instead.
* @return The codepoint as an int
* @see #startIndex
@@ -907,8 +907,8 @@
/**
* Retrieve the index of the end of the input text. This is the end index
- * of the <tt>CharacterIterator</tt> or the length of the <tt>String</tt>
- * over which this <tt>Normalizer</tt> is iterating
+ * of the {@code CharacterIterator} or the length of the {@code String}
+ * over which this {@code Normalizer} is iterating
* @deprecated ICU 2.2. Use endIndex() instead.
* @return The codepoint as an int
* @see #endIndex
@@ -927,9 +927,9 @@
* <b>Note:</b> This method sets the position in the <em>input</em>, while
* {@link #next} and {@link #previous} iterate through characters in the
* <em>output</em>. This means that there is not necessarily a one-to-one
- * correspondence between characters returned by <tt>next</tt> and
- * <tt>previous</tt> and the indices passed to and returned from
- * <tt>setIndex</tt> and {@link #getIndex}.
+ * correspondence between characters returned by {@code next} and
+ * {@code previous} and the indices passed to and returned from
+ * {@code setIndex} and {@link #getIndex}.
* @return The current iteration position
* @stable ICU 2.8
*/
@@ -942,9 +942,9 @@
}
/**
- * Retrieve the index of the end of the input text-> This is the end index
- * of the <tt>CharacterIterator</tt> or the length of the <tt>String</tt>
- * over which this <tt>Normalizer</tt> is iterating
+ * Retrieve the index of the end of the input text. This is the end index
+ * of the {@code CharacterIterator} or the length of the {@code String}
+ * over which this {@code Normalizer} is iterating
* @return The current iteration position
* @stable ICU 2.8
*/
@@ -963,9 +963,9 @@
* return previously buffers characters in the old normalization mode
* until the iteration is able to re-sync at the next base character.
* It is safest to call {@link #setText setText()}, {@link #first},
- * {@link #last}, etc. after calling <tt>setMode</tt>.
- * <p>
- * @param newMode the new mode for this <tt>Normalizer</tt>.
+ * {@link #last}, etc. after calling {@code setMode}.
+ *
+ * @param newMode the new mode for this {@code Normalizer}.
* The supported modes are:
* <ul>
* <li>{@link #COMPOSE} - Unicode canonical decompositiion
@@ -985,7 +985,7 @@
mode = newMode;
}
/**
- * Return the basic operation performed by this <tt>Normalizer</tt>
+ * Return the basic operation performed by this {@code Normalizer}
*
* @see #setMode
* @stable ICU 2.8
@@ -995,8 +995,8 @@
}
/**
- * Set the input text over which this <tt>Normalizer</tt> will iterate.
- * The iteration position is set to the beginning of the input text->
+ * Set the input text over which this {@code Normalizer} will iterate.
+ * The iteration position is set to the beginning of the input text.
* @param newText The new string to be normalized.
* @stable ICU 2.8
*/
@@ -1011,8 +1011,8 @@
}
/**
- * Set the input text over which this <tt>Normalizer</tt> will iterate.
- * The iteration position is set to the beginning of the input text->
+ * Set the input text over which this {@code Normalizer} will iterate.
+ * The iteration position is set to the beginning of the input text.
* @param newText The new string to be normalized.
* @stable ICU 2.8
*/
@@ -1571,7 +1571,7 @@
//
/**
- * Creates a new <tt>Normalizer</tt> object for iterating over the
+ * Creates a new {@code Normalizer} object for iterating over the
* normalized form of a given string.
*
* @param str The string to be normalized. The normalization
@@ -1646,7 +1646,6 @@
* perform further tests to arrive at a true/false result.
* @param str the input string to be checked to see if it is normalized
* @param form the normalization form
- * @param options the optional features to be enabled.
*/
public static boolean isNormalized(String str, Normalizer.Form form) {
return isNormalized(str, form, UNICODE_LATEST);
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/RangeValueIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/RangeValueIterator.java Fri May 29 12:49:31 2015 +0200
@@ -38,12 +38,13 @@
package sun.text.normalizer;
/**
- * <p>Interface for enabling iteration over sets of <int index, int value>,
+ * <p>Interface for enabling iteration over sets of
+ * {@code <int index, int value>},
* where index is the sorted integer index in ascending order and value, its
- * associated integer value.</p>
+ * associated integer value.
* <p>The result for each iteration is the consecutive range of
- * <int index, int value> with the same value. Result is represented by
- * <start, limit, value> where</p>
+ * {@code <int index, int value>} with the same value. Result is represented by
+ * {@code <start, limit, value>} where
* <ul>
* <li> start is the starting integer of the result range
* <li> limit is 1 after the maximum integer that follows start, such that
@@ -56,10 +57,10 @@
* Hence value(start) = value(start + 1) = .... = value(start + n) = .... =
* value(limit - 1). However value(start -1) != value(start) and
* value(limit) != value(start).
- * </p>
+ *
* <p>Most implementations will be created by factory methods, such as the
* character type iterator in UCharacter.getTypeIterator. See example below.
- * </p>
+ *
* Example of use:<br>
* <pre>
* RangeValueIterator iterator = UCharacter.getTypeIterator();
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/Replaceable.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/Replaceable.java Fri May 29 12:49:31 2015 +0200
@@ -71,10 +71,9 @@
* <li>If there is no previous character (i.e. start == 0), use the
* following character</li>
* <li>If there is no following character (i.e. the replaceable was
- * empty), use default metadata<br>
+ * empty), use default metadata</li>
* <li>If the code point U+FFFF is seen, it should be interpreted as
- * a special marker having no metadata<li>
- * </li>
+ * a special marker having no metadata</li>
* </ul>
* If this is not the behavior, the subclass should document any differences.
*
@@ -111,10 +110,10 @@
* starting at index <code>dstStart</code> and ending at index
* <code>dstStart + (srcLimit-srcStart) - 1</code>.
*
- * @param srcStart the beginning index to copy, inclusive; <code>0
- * <= start <= limit</code>.
+ * @param srcStart the beginning index to copy, inclusive;
+ * {@code 0 <= start <= limit}.
* @param srcLimit the ending index to copy, exclusive;
- * <code>start <= limit <= length()</code>.
+ * {@code start <= limit <= length()}.
* @param dst the destination array.
* @param dstStart the start offset in the destination array.
* @stable ICU 2.0
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/ReplaceableString.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/ReplaceableString.java Fri May 29 12:49:31 2015 +0200
@@ -109,10 +109,10 @@
* starting at index <code>dstStart</code> and ending at index
* <code>dstStart + (srcLimit-srcStart) - 1</code>.
*
- * @param srcStart the beginning index to copy, inclusive; <code>0
- * <= start <= limit</code>.
+ * @param srcStart the beginning index to copy, inclusive;
+ * {@code 0 <= start <= limit}.
* @param srcLimit the ending index to copy, exclusive;
- * <code>start <= limit <= length()</code>.
+ * {@code start <= limit <= length()}.
* @param dst the destination array.
* @param dstStart the start offset in the destination array.
* @stable ICU 2.0
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/ReplaceableUCharacterIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/ReplaceableUCharacterIterator.java Fri May 29 12:49:31 2015 +0200
@@ -150,14 +150,12 @@
}
/**
- * <p>Sets the currentIndex to the specified currentIndex in the text and returns that
+ * Sets the currentIndex to the specified currentIndex in the text and returns that
* single UTF16 character at currentIndex.
- * This assumes the text is stored as 16-bit code units.</p>
+ * This assumes the text is stored as 16-bit code units.
* @param currentIndex the currentIndex within the text.
* @exception IllegalArgumentException is thrown if an invalid currentIndex is
* supplied. i.e. currentIndex is out of bounds.
- * @return the character at the specified currentIndex or DONE if the specified
- * currentIndex is equal to the end of the text.
*/
public void setIndex(int currentIndex) {
if (currentIndex < 0 || currentIndex > replaceable.length()) {
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/RuleCharacterIterator.java Fri May 29 12:49:31 2015 +0200
@@ -101,22 +101,25 @@
public static final int DONE = -1;
/**
- * Bitmask option to enable parsing of variable names. If (options &
- * PARSE_VARIABLES) != 0, then an embedded variable will be expanded to
+ * Bitmask option to enable parsing of variable names.
+ * If {@code (options & PARSE_VARIABLES) != 0},
+ * then an embedded variable will be expanded to
* its value. Variables are parsed using the SymbolTable API.
*/
public static final int PARSE_VARIABLES = 1;
/**
- * Bitmask option to enable parsing of escape sequences. If (options &
- * PARSE_ESCAPES) != 0, then an embedded escape sequence will be expanded
+ * Bitmask option to enable parsing of escape sequences.
+ * If {@code (options & PARSE_ESCAPES) != 0},
+ * then an embedded escape sequence will be expanded
* to its value. Escapes are parsed using Utility.unescapeAt().
*/
public static final int PARSE_ESCAPES = 2;
/**
- * Bitmask option to enable skipping of whitespace. If (options &
- * SKIP_WHITESPACE) != 0, then whitespace characters will be silently
+ * Bitmask option to enable skipping of whitespace.
+ * If {@code (options & SKIP_WHITESPACE) != 0},
+ * then whitespace characters will be silently
* skipped, as if they were not present in the input. Whitespace
* characters are defined by UCharacterProperty.isRuleWhiteSpace().
*/
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/SymbolTable.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/SymbolTable.java Fri May 29 12:49:31 2015 +0200
@@ -78,7 +78,7 @@
/**
* Lookup the characters associated with this string and return it.
- * Return <tt>null</tt> if no such name exists. The resultant
+ * Return {@code null} if no such name exists. The resultant
* array may have length zero.
* @param s the symbolic name to lookup
* @return a char array containing the name's value, or null if
@@ -91,7 +91,7 @@
/**
* Lookup the UnicodeMatcher associated with the given character, and
- * return it. Return <tt>null</tt> if not found.
+ * return it. Return {@code null} if not found.
* @param ch a 32-bit code point from 0 to 0x10FFFF inclusive.
* @return the UnicodeMatcher object represented by the given
* character, or null if there is no mapping for ch.
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/Trie.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/Trie.java Fri May 29 12:49:31 2015 +0200
@@ -160,8 +160,10 @@
/**
* Lead surrogate code points' index displacement in the index array.
+ * <pre>{@code
* 0x10000-0xd800=0x2800
* 0x2800 >> INDEX_STAGE_1_SHIFT_
+ * }</pre>
*/
protected static final int LEAD_INDEX_OFFSET_ = 0x2800 >> 5;
/**
@@ -191,7 +193,7 @@
/**
* Number of index (stage 1) entries per lead surrogate.
* Same as number of index entries for 1024 trail surrogates,
- * ==0x400>>INDEX_STAGE_1_SHIFT_
+ * {@code ==0x400>>INDEX_STAGE_1_SHIFT_}
*/
protected static final int SURROGATE_BLOCK_COUNT=(1<<SURROGATE_BLOCK_BITS);
/** Length of the BMP portion of the index (stage 1) array. */
@@ -297,7 +299,7 @@
/**
* Internal trie getter from a code point.
* Could be faster(?) but longer with
- * if((c32)<=0xd7ff) { (result)=_TRIE_GET_RAW(trie, data, 0, c32); }
+ * {@code if((c32)<=0xd7ff) { (result)=_TRIE_GET_RAW(trie, data, 0, c32); }}
* Gets the offset to data which the codepoint points to
* @param ch codepoint
* @return offset to data
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/TrieIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/TrieIterator.java Fri May 29 12:49:31 2015 +0200
@@ -37,17 +37,17 @@
package sun.text.normalizer;
/**
- * <p>Class enabling iteration of the values in a Trie.</p>
+ * Class enabling iteration of the values in a Trie.
* <p>Result of each iteration contains the interval of codepoints that have
- * the same value type and the value type itself.</p>
+ * the same value type and the value type itself.
* <p>The comparison of each codepoint value is done via extract(), which the
- * default implementation is to return the value as it is.</p>
+ * default implementation is to return the value as it is.
* <p>Method extract() can be overwritten to perform manipulations on
- * codepoint values in order to perform specialized comparison.</p>
+ * codepoint values in order to perform specialized comparison.
* <p>TrieIterator is designed to be a generic iterator for the CharTrie
* and the IntTrie, hence to accommodate both types of data, the return
- * result will be in terms of int (32 bit) values.</p>
- * <p>See com.ibm.icu.text.UCharacterTypeIterator for examples of use.</p>
+ * result will be in terms of int (32 bit) values.
+ * <p>See com.ibm.icu.text.UCharacterTypeIterator for examples of use.
* <p>Notes for porting utrie_enum from icu4c to icu4j:<br>
* Internally, icu4c's utrie_enum performs all iterations in its body. In Java
* sense, the caller will have to pass a object with a callback function
@@ -63,18 +63,17 @@
* the method extract(int) (equivalent to UTrieEnumValue). Independent of icu4j,
* the caller will have to code his own iteration and flesh out the task
* (equivalent to UTrieEnumRange) to be performed in the iteration loop.
- * </p>
- * <p>There are basically 3 usage scenarios for porting:</p>
+ *
+ * <p>There are basically 3 usage scenarios for porting:
* <p>1) UTrieEnumValue is the only implemented callback then just implement a
* subclass of TrieIterator and override the extract(int) method. The
* extract(int) method is analogus to UTrieEnumValue callback.
- * </p>
+ *
* <p>2) UTrieEnumValue and UTrieEnumRange both are implemented then implement
- * a subclass of TrieIterator, override the extract method and iterate, e.g
- * </p>
- * <p>utrie_enum(&normTrie, _enumPropertyStartsValue, _enumPropertyStartsRange,
- * set);<br>
- * In Java :<br>
+ * a subclass of TrieIterator, override the extract method and iterate, e.g.<br>
+ * {@code utrie_enum(&normTrie, _enumPropertyStartsValue, _enumPropertyStartsRange,
+ * set);}<br>
+ * In Java:<br>
* <pre>
* class TrieIteratorImpl extends TrieIterator{
* public TrieIteratorImpl(Trie data){
@@ -90,17 +89,17 @@
* // port the implementation of _enumPropertyStartsRange
* }
* </pre>
- * </p>
+ *
* <p>3) UTrieEnumRange is the only implemented callback then just implement
* the while loop, when utrie_enum is called
- * <pre>
+ * <pre>{@code
* // utrie_enum(&fcdTrie, NULL, _enumPropertyStartsRange, set);
* TrieIterator fcdIter = new TrieIterator(fcdTrieImpl.fcdTrie);
* while(fcdIter.next(result)){
* set.add(result.start);
* }
- * </pre>
- * </p>
+ * }</pre>
+ *
* @author synwee
* @see com.ibm.icu.impl.Trie
* @see com.ibm.icu.lang.UCharacterTypeIterator
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/UCharacter.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/UCharacter.java Fri May 29 12:49:31 2015 +0200
@@ -128,7 +128,7 @@
* Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions
* (http://www.unicode.org/reports/tr18/#Compatibility_Properties).
* </p>
- * <p>
+ * <pre>{@code
* API access for C/POSIX character classes is as follows:
* - alpha: isUAlphabetic(c) or hasBinaryProperty(c, UProperty.ALPHABETIC)
* - lower: isULowercase(c) or hasBinaryProperty(c, UProperty.LOWERCASE)
@@ -142,7 +142,7 @@
* - cntrl: getType(c)==CONTROL
* - graph: hasBinaryProperty(c, UProperty.POSIX_GRAPH)
* - print: hasBinaryProperty(c, UProperty.POSIX_PRINT)
- * </p>
+ * }</pre>
* <p>
* The C/POSIX character classes are also available in UnicodeSet patterns,
* using patterns like [:graph:] or \p{graph}.
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/UCharacterIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/UCharacterIterator.java Fri May 29 12:49:31 2015 +0200
@@ -200,8 +200,7 @@
* iterator obtained by calling <code>getLength()</code>.
* <b>Usage:</b>
*
- * <code>
- * <pre>
+ * <pre>{@code
* UChacterIterator iter = new UCharacterIterator.getInstance(text);
* char[] buf = new char[iter.getLength()];
* iter.getText(buf);
@@ -217,15 +216,14 @@
* buf = new char[iter.getLength()];
* }
* }
- * </pre>
- * </code>
+ * }</pre>
*
* @param fillIn an array of chars to fill with the underlying UTF-16 code
* units.
* @param offset the position within the array to start putting the data.
* @return the number of code units added to fillIn, as a convenience
* @exception IndexOutOfBounds exception if there is not enough
- * room after offset in the array, or if offset < 0.
+ * room after offset in the array, or if offset {@literal <} 0.
* @stable ICU 2.4
*/
public abstract int getText(char[] fillIn, int offset);
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/UTF16.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/UTF16.java Fri May 29 12:49:31 2015 +0200
@@ -38,26 +38,26 @@
/**
* <p>Standalone utility class providing UTF16 character conversions and
- * indexing conversions.</p>
+ * indexing conversions.
* <p>Code that uses strings alone rarely need modification.
* By design, UTF-16 does not allow overlap, so searching for strings is a safe
* operation. Similarly, concatenation is always safe. Substringing is safe if
* the start and end are both on UTF-32 boundaries. In normal code, the values
* for start and end are on those boundaries, since they arose from operations
* like searching. If not, the nearest UTF-32 boundaries can be determined
- * using <code>bounds()</code>.</p>
+ * using <code>bounds()</code>.
* <strong>Examples:</strong>
* <p>The following examples illustrate use of some of these methods.
- * <pre>
+ * <pre>{@code
* // iteration forwards: Original
- * for (int i = 0; i < s.length(); ++i) {
+ * for (int i = 0; i < s.length(); ++i) {
* char ch = s.charAt(i);
* doSomethingWith(ch);
* }
*
* // iteration forwards: Changes for UTF-32
* int ch;
- * for (int i = 0; i < s.length(); i+=UTF16.getCharCount(ch)) {
+ * for (int i = 0; i < s.length(); i+=UTF16.getCharCount(ch)) {
* ch = UTF16.charAt(s,i);
* doSomethingWith(ch);
* }
@@ -74,7 +74,7 @@
* ch = UTF16.charAt(s,i);
* doSomethingWith(ch);
* }
- * </pre>
+ * }</pre>
* <strong>Notes:</strong>
* <ul>
* <li>
@@ -515,12 +515,12 @@
/**
* <p>Converts argument code point and returns a String object representing
- * the code point's value in UTF16 format.</p>
+ * the code point's value in UTF16 format.
* <p>This method does not check for the validity of the codepoint, the
* results are not guaranteed if a invalid codepoint is passed as
- * argument.</p>
+ * argument.
* <p>The result is a string whose length is 1 for non-supplementary code
- * points, 2 otherwise.</p>
+ * points, 2 otherwise.
* @param ch code point
* @return string representation of the code point
*/
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeMatcher.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeMatcher.java Fri May 29 12:49:31 2015 +0200
@@ -45,7 +45,8 @@
public interface UnicodeMatcher {
/**
- * The character at index i, where i < contextStart || i >= contextLimit,
+ * The character at index {@code i}, where
+ * {@code i < contextStart || i >= contextLimit},
* is ETHER. This allows explicit matching by rules and UnicodeSets
* of text outside the context. In traditional terms, this allows anchoring
* at the start and/or end.
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java Fri May 29 12:49:31 2015 +0200
@@ -107,8 +107,8 @@
* </tr>
* <tr>
* <td nowrap valign="top" align="left"><code>[a{ab}{ac}]</code></td>
- * <td valign="top">The character 'a' and the multicharacter strings "ab" and
- * "ac"</td>
+ * <td valign="top">The character 'a' and the multicharacter strings "ab" and
+ * "ac"</td>
* </tr>
* <tr>
* <td nowrap valign="top" align="left"><code>[\p{Lu}]</code></td>
@@ -148,10 +148,10 @@
* literal. Thus "[a\\-b]", "[-ab]", and "[ab-]" all indicate the same
* set of three characters, 'a', 'b', and '-'.
*
- * <p>Sets may be intersected using the '&' operator or the asymmetric
+ * <p>Sets may be intersected using the {@literal '&'} operator or the asymmetric
* set difference may be taken using the '-' operator, for example,
- * "[[:L:]&[\\u0000-\\u0FFF]]" indicates the set of all Unicode letters
- * with values less than 4096. Operators ('&' and '|') have equal
+ * "{@code [[:L:]&[\\u0000-\\u0FFF]]}" indicates the set of all Unicode letters
+ * with values less than 4096. Operators ({@literal '&'} and '|') have equal
* precedence and bind left-to-right. Thus
* "[[:L:]-[a-z]-[\\u0100-\\u01FF]]" is equivalent to
* "[[[:L:]-[a-z]]-[\\u0100-\\u01FF]]". This only really matters for
@@ -166,7 +166,7 @@
* that is, U+0000 through 'a'-1 and 'z'+1 through U+10FFFF
* <tr valign=top><td nowrap><code>[[<em>pat1</em>][<em>pat2</em>]]</code>
* <td>The union of sets specified by <em>pat1</em> and <em>pat2</em>
- * <tr valign=top><td nowrap><code>[[<em>pat1</em>]&[<em>pat2</em>]]</code>
+ * <tr valign=top><td nowrap><code>[[<em>pat1</em>]&[<em>pat2</em>]]</code>
* <td>The intersection of sets specified by <em>pat1</em> and <em>pat2</em>
* <tr valign=top><td nowrap><code>[[<em>pat1</em>]-[<em>pat2</em>]]</code>
* <td>The asymmetric difference of sets specified by <em>pat1</em> and
@@ -227,7 +227,7 @@
* </tr>
* <tr>
* <td nowrap valign="top" align="right"><code>property := </code></td>
- * <td valign="top"><em>a Unicode property set pattern</td>
+ * <td valign="top"><em>a Unicode property set pattern</em></td>
* </tr>
* </table>
* <br>
@@ -337,8 +337,8 @@
}
/**
- * Constructs a set containing the given range. If <code>end >
- * start</code> then an empty set is created.
+ * Constructs a set containing the given range.
+ * If {@code end > start} then an empty set is created.
*
* @param start first character, inclusive, of range
* @param end last character, inclusive, of range
@@ -651,7 +651,7 @@
* Adds the specified multicharacter to this set if it is not already
* present. If this set already contains the multicharacter,
* the call leaves this set unchanged.
- * Thus "ch" => {"ch"}
+ * Thus {@code "ch" => {"ch"}}
* <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b>
* @param s the source string
* @return this object, for chaining
@@ -691,7 +691,7 @@
/**
* Complements the specified range in this set. Any character in
* the range will be removed if it is in this set, or will be
- * added if it is not in this set. If <code>end > start</code>
+ * added if it is not in this set. If {@code end > start}
* then an empty range is complemented, leaving the set unchanged.
*
* @param start first character, inclusive, of range to be removed
@@ -1698,8 +1698,8 @@
* Modifies this set to contain those code points which have the
* given value for the given property. Prior contents of this
* set are lost.
- * @param propertyAlias
- * @param valueAlias
+ * @param propertyAlias the property alias
+ * @param valueAlias the value alias
* @param symbols if not null, then symbols are first called to see if a property
* is available. If true, then everything else is skipped.
* @return this set
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSetIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/UnicodeSetIterator.java Fri May 29 12:49:31 2015 +0200
@@ -73,35 +73,35 @@
public class UnicodeSetIterator {
/**
- * Value of <tt>codepoint</tt> if the iterator points to a string.
- * If <tt>codepoint == IS_STRING</tt>, then examine
- * <tt>string</tt> for the current iteration result.
+ * Value of {@code codepoint} if the iterator points to a string.
+ * If {@code codepoint == IS_STRING}, then examine
+ * {@code string} for the current iteration result.
* @stable ICU 2.0
*/
public static int IS_STRING = -1;
/**
- * Current code point, or the special value <tt>IS_STRING</tt>, if
+ * Current code point, or the special value {@code IS_STRING}, if
* the iterator points to a string.
* @stable ICU 2.0
*/
public int codepoint;
/**
- * When iterating over ranges using <tt>nextRange()</tt>,
- * <tt>codepointEnd</tt> contains the inclusive end of the
- * iteration range, if <tt>codepoint != IS_STRING</tt>. If
- * iterating over code points using <tt>next()</tt>, or if
- * <tt>codepoint == IS_STRING</tt>, then the value of
- * <tt>codepointEnd</tt> is undefined.
+ * When iterating over ranges using {@code nextRange()},
+ * {@code codepointEnd} contains the inclusive end of the
+ * iteration range, if {@code codepoint != IS_STRING}. If
+ * iterating over code points using {@code next()}, or if
+ * {@code codepoint == IS_STRING}, then the value of
+ * {@code codepointEnd} is undefined.
* @stable ICU 2.0
*/
public int codepointEnd;
/**
- * If <tt>codepoint == IS_STRING</tt>, then <tt>string</tt> points
- * to the current string. If <tt>codepoint != IS_STRING</tt>, the
- * value of <tt>string</tt> is undefined.
+ * If {@code codepoint == IS_STRING}, then {@code string} points
+ * to the current string. If {@code codepoint != IS_STRING}, the
+ * value of {@code string} is undefined.
* @stable ICU 2.0
*/
public String string;
@@ -118,17 +118,17 @@
/**
* Returns the next element in the set, either a code point range
* or a string. If there are no more elements in the set, return
- * false. If <tt>codepoint == IS_STRING</tt>, the value is a
- * string in the <tt>string</tt> field. Otherwise the value is a
- * range of one or more code points from <tt>codepoint</tt> to
- * <tt>codepointeEnd</tt> inclusive.
+ * false. If {@code codepoint == IS_STRING}, the value is a
+ * string in the {@code string} field. Otherwise the value is a
+ * range of one or more code points from {@code codepoint} to
+ * {@code codepointeEnd} inclusive.
*
* <p>The order of iteration is all code points ranges in sorted
* order, followed by all strings sorted order. Ranges are
- * disjoint and non-contiguous. <tt>string</tt> is undefined
- * unless <tt>codepoint == IS_STRING</tt>. Do not mix calls to
- * <tt>next()</tt> and <tt>nextRange()</tt> without calling
- * <tt>reset()</tt> between them. The results of doing so are
+ * disjoint and non-contiguous. {@code string} is undefined
+ * unless {@code codepoint == IS_STRING}. Do not mix calls to
+ * {@code next()} and {@code nextRange()} without calling
+ * {@code reset()} between them. The results of doing so are
* undefined.
*
* @return true if there was another element in the set and this
@@ -162,8 +162,8 @@
/**
* Sets this iterator to visit the elements of the given set and
* resets it to the start of that set. The iterator is valid only
- * so long as <tt>set</tt> is valid.
- * @param set the set to iterate over.
+ * so long as {@code set} is valid.
+ * @param uset the set to iterate over.
* @stable ICU 2.0
*/
public void reset(UnicodeSet uset) {
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/Utility.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/Utility.java Fri May 29 12:49:31 2015 +0200
@@ -227,7 +227,7 @@
/**
* Convert a integer to size width hex uppercase digits.
- * E.g., hex('a', 4, str) => "0041".
+ * E.g., {@code hex('a', 4, str) => "0041"}.
* Append the output to the given StringBuffer.
* If width is too small to fit, nothing will be appended to output.
*/
@@ -237,7 +237,7 @@
/**
* Convert a integer to size width (minimum) hex uppercase digits.
- * E.g., hex('a', 4, str) => "0041". If the integer requires more
+ * E.g., {@code hex('a', 4, str) => "0041"}. If the integer requires more
* than width digits, more will be used.
*/
public static String hex(int ch, int width) {
@@ -334,8 +334,8 @@
}
/**
- * Escape unprintable characters using <backslash>uxxxx notation
- * for U+0000 to U+FFFF and <backslash>Uxxxxxxxx for U+10000 and
+ * Escape unprintable characters using {@code <backslash>uxxxx} notation
+ * for U+0000 to U+FFFF and {@code <backslash>Uxxxxxxxx} for U+10000 and
* above. If the character is printable ASCII, then do nothing
* and return FALSE. Otherwise, append the escaped notation and
* return TRUE.
--- a/jdk/src/java.base/share/classes/sun/text/normalizer/VersionInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/share/classes/sun/text/normalizer/VersionInfo.java Fri May 29 12:49:31 2015 +0200
@@ -53,7 +53,7 @@
* @param version version String in the format of "major.minor.milli.micro"
* or "major.minor.milli" or "major.minor" or "major",
* where major, minor, milli, micro are non-negative numbers
- * <= 255. If the trailing version numbers are
+ * {@literal <=} 255. If the trailing version numbers are
* not specified they are taken as 0s. E.g. Version "3.1" is
* equivalent to "3.1.0.0".
* @return an instance of VersionInfo with the argument version.
@@ -98,12 +98,12 @@
/**
* Returns an instance of VersionInfo with the argument version.
- * @param major major version, non-negative number <= 255.
- * @param minor minor version, non-negative number <= 255.
- * @param milli milli version, non-negative number <= 255.
- * @param micro micro version, non-negative number <= 255.
+ * @param major major version, non-negative number {@literal <=} 255.
+ * @param minor minor version, non-negative number {@literal <=} 255.
+ * @param milli milli version, non-negative number {@literal <=} 255.
+ * @param micro micro version, non-negative number {@literal <=} 255.
* @exception throws an IllegalArgumentException when either arguments are
- * negative or > 255
+ * negative or {@literal >} 255
* @stable ICU 2.6
*/
public static VersionInfo getInstance(int major, int minor, int milli,
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java Fri May 29 12:49:31 2015 +0200
@@ -270,22 +270,6 @@
throw x;
}
- // fail if the file is a directory
- if (flags.read) {
- UnixException exc = null;
- try {
- if (UnixFileAttributes.get(fd).isDirectory()) {
- exc = new UnixException(EISDIR);
- }
- } catch (UnixException x) {
- exc = x;
- }
- if (exc != null) {
- close(fd);
- throw exc;
- }
- }
-
// unlink file immediately if delete on close. The spec is clear that
// an implementation cannot guarantee to unlink the correct file when
// replaced by an attacker after it is opened.
--- a/jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c Fri May 29 12:49:31 2015 +0200
@@ -148,6 +148,13 @@
jint fd = fdval(env, fdo);
int result = 0;
+#ifdef MACOSX
+ result = fcntl(fd, F_FULLFSYNC);
+ if (result == -1 && errno == ENOTSUP) {
+ /* Try fsync() in case F_FULLSYUNC is not implemented on the file system. */
+ result = fsync(fd);
+ }
+#else /* end MACOSX, begin not-MACOSX */
if (md == JNI_FALSE) {
result = fdatasync(fd);
} else {
@@ -163,9 +170,10 @@
if (getfl >= 0 && (getfl & O_ACCMODE) == O_RDONLY) {
return 0;
}
-#endif
+#endif /* _AIX */
result = fsync(fd);
}
+#endif /* not-MACOSX */
return handle(env, result, "Force failed");
}
--- a/jdk/src/java.base/windows/native/libjli/java_md.c Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.base/windows/native/libjli/java_md.c Fri May 29 12:49:31 2015 +0200
@@ -990,6 +990,26 @@
return JNI_FALSE;
}
+int
+filterArgs(StdArg *stdargs, const int nargc, StdArg **pargv) {
+ StdArg* argv = NULL;
+ int nargs = 0;
+ int i;
+
+ /* Copy the non-vm args */
+ for (i = 0; i < nargc ; i++) {
+ const char *arg = stdargs[i].arg;
+ if (arg[0] == '-' && arg[1] == 'J')
+ continue;
+ argv = (StdArg*) JLI_MemRealloc(argv, (nargs+1) * sizeof(StdArg));
+ argv[nargs].arg = JLI_StringDup(arg);
+ argv[nargs].has_wildcard = stdargs[i].has_wildcard;
+ nargs++;
+ }
+ *pargv = argv;
+ return nargs;
+}
+
/*
* At this point we have the arguments to the application, and we need to
* check with original stdargs in order to compare which of these truly
@@ -1005,8 +1025,9 @@
char *ostart, *astart, **nargv;
jboolean needs_expansion = JNI_FALSE;
jmethodID mid;
- int stdargc;
+ int filteredargc, stdargc;
StdArg *stdargs;
+ StdArg *filteredargs;
jclass cls = GetLauncherHelperClass(env);
NULL_CHECK0(cls);
@@ -1017,6 +1038,8 @@
stdargs = JLI_GetStdArgs();
stdargc = JLI_GetStdArgc();
+ filteredargc = filterArgs(stdargs, stdargc, &filteredargs);
+
// sanity check, this should never happen
if (argc > stdargc) {
JLI_TraceLauncher("Warning: app args is larger than the original, %d %d\n", argc, stdargc);
@@ -1025,8 +1048,8 @@
}
// sanity check, match the args we have, to the holy grail
- idx = stdargc - argc;
- ostart = stdargs[idx].arg;
+ idx = filteredargc - argc;
+ ostart = filteredargs[idx].arg;
astart = strv[0];
// sanity check, ensure that the first argument of the arrays are the same
if (JLI_StrCmp(ostart, astart) != 0) {
@@ -1039,8 +1062,8 @@
// make a copy of the args which will be expanded in java if required.
nargv = (char **)JLI_MemAlloc(argc * sizeof(char*));
for (i = 0, j = idx; i < argc; i++, j++) {
- jboolean arg_expand = (JLI_StrCmp(stdargs[j].arg, strv[i]) == 0)
- ? stdargs[j].has_wildcard
+ jboolean arg_expand = (JLI_StrCmp(filteredargs[j].arg, strv[i]) == 0)
+ ? filteredargs[j].has_wildcard
: JNI_FALSE;
if (needs_expansion == JNI_FALSE)
needs_expansion = arg_expand;
@@ -1077,5 +1100,6 @@
JLI_MemFree(nargv[i]);
}
JLI_MemFree(nargv);
+ JLI_MemFree(filteredargs);
return outArray;
}
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Fri May 29 12:49:31 2015 +0200
@@ -33,6 +33,7 @@
import java.lang.ref.WeakReference;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.locks.ReentrantLock;
import sun.misc.JavaAWTAccess;
import sun.misc.ManagedLocalsThread;
import sun.misc.SharedSecrets;
@@ -180,10 +181,16 @@
// initialization has been done)
private volatile boolean readPrimordialConfiguration;
// Have we initialized global (root) handlers yet?
- // This gets set to false in readConfiguration
- private boolean initializedGlobalHandlers = true;
- // True if JVM death is imminent and the exit hook has been called.
- private boolean deathImminent;
+ // This gets set to STATE_UNINITIALIZED in readConfiguration
+ private static final int
+ STATE_INITIALIZED = 0, // initial state
+ STATE_INITIALIZING = 1,
+ STATE_READING_CONFIG = 2,
+ STATE_UNINITIALIZED = 3,
+ STATE_SHUTDOWN = 4; // terminal state
+ private volatile int globalHandlersState; // = STATE_INITIALIZED;
+ // A concurrency lock for reset(), readConfiguration() and Cleaner.
+ private final ReentrantLock configurationLock = new ReentrantLock();
// This list contains the loggers for which some handlers have been
// explicitly configured in the configuration file.
@@ -264,13 +271,12 @@
// before synchronized block. Otherwise deadlocks are possible.
LogManager mgr = manager;
- // If the global handlers haven't been initialized yet, we
- // don't want to initialize them just so we can close them!
- synchronized (LogManager.this) {
- // Note that death is imminent.
- deathImminent = true;
- initializedGlobalHandlers = true;
- }
+ // set globalHandlersState to STATE_SHUTDOWN atomically so that
+ // no attempts are made to (re)initialize the handlers or (re)read
+ // the configuration again. This is terminal state.
+ configurationLock.lock();
+ globalHandlersState = STATE_SHUTDOWN;
+ configurationLock.unlock();
// Do a reset to close all active handlers.
reset();
@@ -1314,8 +1320,14 @@
public void reset() throws SecurityException {
checkPermission();
+
List<CloseOnReset> persistent;
- synchronized (this) {
+
+ // We don't want reset() and readConfiguration()
+ // to run in parallel
+ configurationLock.lock();
+ try {
+ // install new empty properties
props = new Properties();
// make sure we keep the loggers persistent until reset is done.
// Those are the loggers for which we previously created a
@@ -1323,26 +1335,41 @@
// from being gc'ed until those handlers are closed.
persistent = new ArrayList<>(closeOnResetLoggers);
closeOnResetLoggers.clear();
- // Since we are doing a reset we no longer want to initialize
- // the global handlers, if they haven't been initialized yet.
- initializedGlobalHandlers = true;
+
+ // if reset has been called from shutdown-hook (Cleaner),
+ // or if reset has been called from readConfiguration() which
+ // already holds the lock and will change the state itself,
+ // then do not change state here...
+ if (globalHandlersState != STATE_SHUTDOWN &&
+ globalHandlersState != STATE_READING_CONFIG) {
+ // ...else user called reset()...
+ // Since we are doing a reset we no longer want to initialize
+ // the global handlers, if they haven't been initialized yet.
+ globalHandlersState = STATE_INITIALIZED;
+ }
+
+ for (LoggerContext cx : contexts()) {
+ resetLoggerContext(cx);
+ }
+
+ persistent.clear();
+ } finally {
+ configurationLock.unlock();
}
- for (LoggerContext cx : contexts()) {
- Enumeration<String> enum_ = cx.getLoggerNames();
- while (enum_.hasMoreElements()) {
- String name = enum_.nextElement();
- Logger logger = cx.findLogger(name);
- if (logger != null) {
- resetLogger(logger);
- }
+ }
+
+ private void resetLoggerContext(LoggerContext cx) {
+ Enumeration<String> enum_ = cx.getLoggerNames();
+ while (enum_.hasMoreElements()) {
+ String name = enum_.nextElement();
+ Logger logger = cx.findLogger(name);
+ if (logger != null) {
+ resetLogger(logger);
}
}
- persistent.clear();
}
- // Private method to reset an individual target logger.
- private void resetLogger(Logger logger) {
- // Close all the Logger's handlers.
+ private void closeHandlers(Logger logger) {
Handler[] targets = logger.getHandlers();
for (Handler h : targets) {
logger.removeHandler(h);
@@ -1352,6 +1379,14 @@
// Problems closing a handler? Keep going...
}
}
+ }
+
+ // Private method to reset an individual target logger.
+ private void resetLogger(Logger logger) {
+ // Close all the Logger handlers.
+ closeHandlers(logger);
+
+ // Reset Logger level
String name = logger.getName();
if (name != null && name.equals("")) {
// This is the root logger.
@@ -1408,48 +1443,74 @@
*/
public void readConfiguration(InputStream ins) throws IOException, SecurityException {
checkPermission();
- reset();
- // Load the properties
+ // We don't want reset() and readConfiguration() to run
+ // in parallel.
+ configurationLock.lock();
try {
- props.load(ins);
- } catch (IllegalArgumentException x) {
- // props.load may throw an IllegalArgumentException if the stream
- // contains malformed Unicode escape sequences.
- // We wrap that in an IOException as readConfiguration is
- // specified to throw IOException if there are problems reading
- // from the stream.
- // Note: new IOException(x.getMessage(), x) allow us to get a more
- // concise error message than new IOException(x);
- throw new IOException(x.getMessage(), x);
+ if (globalHandlersState == STATE_SHUTDOWN) {
+ // already in terminal state: don't even bother
+ // to read the configuration
+ return;
+ }
+
+ // change state to STATE_READING_CONFIG to signal reset() to not change it
+ globalHandlersState = STATE_READING_CONFIG;
+ try {
+ // reset configuration which leaves globalHandlersState at STATE_READING_CONFIG
+ // so that while reading configuration, any ongoing logging requests block and
+ // wait for the outcome (see the end of this try statement)
+ reset();
+
+ try {
+ // Load the properties
+ props.load(ins);
+ } catch (IllegalArgumentException x) {
+ // props.load may throw an IllegalArgumentException if the stream
+ // contains malformed Unicode escape sequences.
+ // We wrap that in an IOException as readConfiguration is
+ // specified to throw IOException if there are problems reading
+ // from the stream.
+ // Note: new IOException(x.getMessage(), x) allow us to get a more
+ // concise error message than new IOException(x);
+ throw new IOException(x.getMessage(), x);
+ }
+
+ // Instantiate new configuration objects.
+ String names[] = parseClassNames("config");
+
+ for (String word : names) {
+ try {
+ Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(word);
+ clz.newInstance();
+ } catch (Exception ex) {
+ System.err.println("Can't load config class \"" + word + "\"");
+ System.err.println("" + ex);
+ // ex.printStackTrace();
+ }
+ }
+
+ // Set levels on any pre-existing loggers, based on the new properties.
+ setLevelsOnExistingLoggers();
+
+ // Note that we need to reinitialize global handles when
+ // they are first referenced.
+ globalHandlersState = STATE_UNINITIALIZED;
+ } catch (Throwable t) {
+ // If there were any trouble, then set state to STATE_INITIALIZED
+ // so that no global handlers reinitialization is performed on not fully
+ // initialized configuration.
+ globalHandlersState = STATE_INITIALIZED;
+ // re-throw
+ throw t;
+ }
+ } finally {
+ configurationLock.unlock();
}
- // Instantiate new configuration objects.
- String names[] = parseClassNames("config");
-
- for (String word : names) {
- try {
- Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(word);
- clz.newInstance();
- } catch (Exception ex) {
- System.err.println("Can't load config class \"" + word + "\"");
- System.err.println("" + ex);
- // ex.printStackTrace();
- }
- }
-
- // Set levels on any pre-existing loggers, based on the new properties.
- setLevelsOnExistingLoggers();
-
- try {
- invokeConfigurationListeners();
- } finally {
- // Note that we need to reinitialize global handles when
- // they are first referenced.
- synchronized (this) {
- initializedGlobalHandlers = false;
- }
- }
+ // should be called out of lock to avoid dead-lock situations
+ // when user code is involved
+ invokeConfigurationListeners();
}
/**
@@ -1576,20 +1637,41 @@
// Private method to load the global handlers.
// We do the real work lazily, when the global handlers
// are first used.
- private synchronized void initializeGlobalHandlers() {
- if (initializedGlobalHandlers) {
+ private void initializeGlobalHandlers() {
+ int state = globalHandlersState;
+ if (state == STATE_INITIALIZED ||
+ state == STATE_SHUTDOWN) {
+ // Nothing to do: return.
return;
}
- initializedGlobalHandlers = true;
-
- if (deathImminent) {
- // Aaargh...
- // The VM is shutting down and our exit hook has been called.
- // Avoid allocating global handlers.
- return;
+ // If we have not initialized global handlers yet (or need to
+ // reinitialize them), lets do it now (this case is indicated by
+ // globalHandlersState == STATE_UNINITIALIZED).
+ // If we are in the process of initializing global handlers we
+ // also need to lock & wait (this case is indicated by
+ // globalHandlersState == STATE_INITIALIZING).
+ // If we are in the process of reading configuration we also need to
+ // wait to see what the outcome will be (this case
+ // is indicated by globalHandlersState == STATE_READING_CONFIG)
+ // So in either case we need to wait for the lock.
+ configurationLock.lock();
+ try {
+ if (globalHandlersState != STATE_UNINITIALIZED) {
+ return; // recursive call or nothing to do
+ }
+ // set globalHandlersState to STATE_INITIALIZING first to avoid
+ // getting an infinite recursion when loadLoggerHandlers(...)
+ // is going to call addHandler(...)
+ globalHandlersState = STATE_INITIALIZING;
+ try {
+ loadLoggerHandlers(rootLogger, null, "handlers");
+ } finally {
+ globalHandlersState = STATE_INITIALIZED;
+ }
+ } finally {
+ configurationLock.unlock();
}
- loadLoggerHandlers(rootLogger, null, "handlers");
}
static final Permission controlPermission = new LoggingPermission("control", null);
@@ -1684,7 +1766,7 @@
// Private method to be called when the configuration has
// changed to apply any level settings to any pre-existing loggers.
- synchronized private void setLevelsOnExistingLoggers() {
+ private void setLevelsOnExistingLoggers() {
Enumeration<?> enum_ = props.propertyNames();
while (enum_.hasMoreElements()) {
String key = (String)enum_.nextElement();
--- a/jdk/src/java.logging/share/classes/java/util/logging/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.logging/share/classes/java/util/logging/package.html Fri May 29 12:49:31 2015 +0200
@@ -30,8 +30,7 @@
<body bgcolor="white">
<P>
Provides the classes and interfaces of
-the Java<SUP><FONT SIZE="-2">TM</FONT></SUP> 2
- platform's core logging facilities.
+the Java™ 2 platform's core logging facilities.
The central goal of the logging APIs is to support maintaining and servicing
software at customer sites.
--- a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java Fri May 29 12:49:31 2015 +0200
@@ -79,44 +79,46 @@
/**
* <p>A converter between Java types and the limited set of classes
- * defined by Open MBeans.</p>
+ * defined by Open MBeans.
*
- * <p>A Java type is an instance of java.lang.reflect.Type. For our
+ * <p>A Java type is an instance of java.lang.reflect.Type. For our
* purposes, it is either a Class, such as String.class or int.class;
- * or a ParameterizedType, such as List<String> or Map<Integer,
- * String[]>. On J2SE 1.4 and earlier, it can only be a Class.</p>
+ * or a ParameterizedType, such as {@code List<String>} or
+ * {@code Map<Integer, String[]>}.
+ * On J2SE 1.4 and earlier, it can only be a Class.
*
- * <p>Each Type is associated with an DefaultMXBeanMappingFactory. The
- * DefaultMXBeanMappingFactory defines an OpenType corresponding to the Type, plus a
- * Java class corresponding to the OpenType. For example:</p>
+ * <p>Each Type is associated with an DefaultMXBeanMappingFactory. The
+ * DefaultMXBeanMappingFactory defines an
+ * OpenType corresponding to the Type, plus a
+ * Java class corresponding to the OpenType. For example:
*
- * <pre>
+ * <pre>{@code
* Type Open class OpenType
* ---- ---------- --------
- * Integer Integer SimpleType.INTEGER
- * int int SimpleType.INTEGER
- * Integer[] Integer[] ArrayType(1, SimpleType.INTEGER)
- * int[] Integer[] ArrayType(SimpleType.INTEGER, true)
- * String[][] String[][] ArrayType(2, SimpleType.STRING)
- * List<String> String[] ArrayType(1, SimpleType.STRING)
+ * Integer Integer SimpleType.INTEGER
+ * int int SimpleType.INTEGER
+ * Integer[] Integer[] ArrayType(1, SimpleType.INTEGER)
+ * int[] Integer[] ArrayType(SimpleType.INTEGER, true)
+ * String[][] String[][] ArrayType(2, SimpleType.STRING)
+ * List<String> String[] ArrayType(1, SimpleType.STRING)
* ThreadState (an Enum) String SimpleType.STRING
- * Map<Integer, String[]> TabularData TabularType(
+ * Map<Integer, String[]> TabularData TabularType(
* CompositeType(
* {"key", SimpleType.INTEGER},
* {"value",
* ArrayType(1,
* SimpleType.STRING)}),
* indexNames={"key"})
- * </pre>
+ * }</pre>
*
* <p>Apart from simple types, arrays, and collections, Java types are
* converted through introspection into CompositeType. The Java type
* must have at least one getter (method such as "int getSize()" or
* "boolean isBig()"), and we must be able to deduce how to
* reconstruct an instance of the Java class from the values of the
- * getters using one of various heuristics.</p>
+ * getters using one of various heuristics.
*
- * @since 1.6
+ * @since 1.6
*/
public class DefaultMXBeanMappingFactory extends MXBeanMappingFactory {
static abstract class NonNullMXBeanMapping extends MXBeanMapping {
@@ -148,8 +150,8 @@
throws OpenDataException;
/**
- * <p>True if and only if this MXBeanMapping's toOpenValue and
- * fromOpenValue methods are the identity function.</p>
+ * True if and only if this MXBeanMapping's toOpenValue and
+ * fromOpenValue methods are the identity function.
*/
boolean isIdentity() {
return false;
--- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/ServerCommunicatorAdmin.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/remote/internal/ServerCommunicatorAdmin.java Fri May 29 12:49:31 2015 +0200
@@ -57,8 +57,8 @@
* <code>rspOutgoing</code> to inform that a response is sent out
* for the received request.
* @return the value of the termination flag:
- * <ul><code>true</code> if the connection is already being terminated,
- * <br><code>false</code> otherwise.</ul>
+ * true if the connection is already being terminated,
+ * false otherwise.
*/
public boolean reqIncoming() {
if (logger.traceOn()) {
@@ -80,8 +80,8 @@
/**
* Tells that a response is sent out for a received request.
* @return the value of the termination flag:
- * <ul><code>true</code> if the connection is already being terminated,
- * <br><code>false</code> otherwise.</ul>
+ * true if the connection is already being terminated,
+ * false otherwise.
*/
public boolean rspOutgoing() {
if (logger.traceOn()) {
--- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java Fri May 29 12:49:31 2015 +0200
@@ -55,17 +55,17 @@
public class EnvHelp {
/**
- * <p>Name of the attribute that specifies a default class loader
+ * Name of the attribute that specifies a default class loader
* object.
- * The value associated with this attribute is a ClassLoader object</p>
+ * The value associated with this attribute is a ClassLoader object.
*/
private static final String DEFAULT_CLASS_LOADER =
JMXConnectorFactory.DEFAULT_CLASS_LOADER;
/**
- * <p>Name of the attribute that specifies a default class loader
- * ObjectName.
- * The value associated with this attribute is an ObjectName object</p>
+ * Name of the attribute that specifies a default class loader
+ * ObjectName.
+ * The value associated with this attribute is an ObjectName object.
*/
private static final String DEFAULT_CLASS_LOADER_NAME =
JMXConnectorServerFactory.DEFAULT_CLASS_LOADER_NAME;
@@ -74,7 +74,6 @@
* Get the Connector Server default class loader.
* <p>
* Returns:
- * <p>
* <ul>
* <li>
* The ClassLoader object found in <var>env</var> for
@@ -114,6 +113,7 @@
* <code>jmx.remote.default.class.loader.name</code> is specified
* but <var>mbs</var> is null.
* </li>
+ * </ul>
* @exception InstanceNotFoundException if
* <code>jmx.remote.default.class.loader.name</code> is specified
* and the ClassLoader MBean is not found in <var>mbs</var>.
@@ -172,7 +172,6 @@
* Get the Connector Client default class loader.
* <p>
* Returns:
- * <p>
* <ul>
* <li>
* The ClassLoader object found in <var>env</var> for
@@ -232,7 +231,7 @@
/**
* Returns the cause field of a {@code Throwable} object.
* The cause field can be got only if <var>t</var> has an
- * {@link Throwable#getCause()} method (JDK Version >= 1.4)
+ * {@link Throwable#getCause()} method (JDK Version {@literal >=} 1.4)
* @param t {@code Throwable} on which the cause must be set.
* @return the cause if getCause() succeeded and the got value is not
* null, otherwise return the <var>t</var>.
@@ -254,7 +253,7 @@
/**
- * <p>Name of the attribute that specifies the size of a notification
+ * Name of the attribute that specifies the size of a notification
* buffer for a connector server. The default value is 1000.
*/
public static final String BUFFER_SIZE_PROPERTY =
@@ -316,10 +315,10 @@
}
/**
- * <p>Name of the attribute that specifies the maximum number of
- * notifications that a client will fetch from its server.. The
+ * Name of the attribute that specifies the maximum number of
+ * notifications that a client will fetch from its server. The
* value associated with this attribute should be an
- * <code>Integer</code> object. The default value is 1000.</p>
+ * {@code Integer} object. The default value is 1000.
*/
public static final String MAX_FETCH_NOTIFS =
"jmx.remote.x.notification.fetch.max";
@@ -334,10 +333,10 @@
}
/**
- * <p>Name of the attribute that specifies the timeout for a
+ * Name of the attribute that specifies the timeout for a
* client to fetch notifications from its server. The value
* associated with this attribute should be a <code>Long</code>
- * object. The default value is 60000 milliseconds.</p>
+ * object. The default value is 60000 milliseconds.
*/
public static final String FETCH_TIMEOUT =
"jmx.remote.x.notification.fetch.timeout";
@@ -351,11 +350,12 @@
}
/**
- * <p>Name of the attribute that specifies an object that will check
+ * Name of the attribute that specifies an object that will check
* accesses to add/removeNotificationListener and also attempts to
* receive notifications. The value associated with this attribute
* should be a <code>NotificationAccessController</code> object.
- * The default value is null.</p>
+ * The default value is null.
+ * <p>
* This field is not public because of its com.sun dependency.
*/
public static final String NOTIF_ACCESS_CONTROLLER =
@@ -630,9 +630,9 @@
}
/**
- * <p>Name of the attribute that specifies the timeout to keep a
+ * Name of the attribute that specifies the timeout to keep a
* server side connection after answering last client request.
- * The default value is 120000 milliseconds.</p>
+ * The default value is 120000 milliseconds.
*/
public static final String SERVER_CONNECTION_TIMEOUT =
"jmx.remote.x.server.connection.timeout";
@@ -646,9 +646,9 @@
}
/**
- * <p>Name of the attribute that specifies the period in
- * millisecond for a client to check its connection. The default
- * value is 60000 milliseconds.</p>
+ * Name of the attribute that specifies the period in
+ * millisecond for a client to check its connection. The default
+ * value is 60000 milliseconds.
*/
public static final String CLIENT_CONNECTION_CHECK_PERIOD =
"jmx.remote.x.client.connection.check.period";
@@ -741,13 +741,13 @@
}
/**
- * <p>Name of the attribute that specifies whether a connector server
+ * Name of the attribute that specifies whether a connector server
* should not prevent the VM from exiting
*/
public static final String JMX_SERVER_DAEMON = "jmx.remote.x.daemon";
/**
- * Returns true if {@value SERVER_DAEMON} is specified in the {@code env}
+ * Returns true if {@value JMX_SERVER_DAEMON} is specified in the {@code env}
* as a key and its value is a String and it is equal to true ignoring case.
*
* @param env
--- a/jdk/src/java.management/share/classes/javax/management/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/package.html Fri May 29 12:49:31 2015 +0200
@@ -30,7 +30,7 @@
<p>Provides the core classes for the Java Management Extensions.</p>
<p>The Java Management Extensions
- (JMX<sup><font size="-1">TM</font></sup>) API is a standard
+ (JMX™) API is a standard
API for management and monitoring. Typical uses include:</p>
<ul>
@@ -87,8 +87,7 @@
notion of <em>Standard MBeans</em>. A Standard MBean is one
whose attributes and operations are deduced from a Java
interface using certain naming patterns, similar to those used
- by JavaBeans<sup><font size="-1">TM</font></sup>. For
- example, consider an interface like this:</p>
+ by JavaBeans™. For example, consider an interface like this:</p>
<pre>
public interface ConfigurationMBean {
--- a/jdk/src/java.management/share/classes/javax/management/remote/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/remote/package.html Fri May 29 12:49:31 2015 +0200
@@ -1,6 +1,6 @@
<html>
<head>
- <title>JMX<sup><font size="-2">TM</font></sup> Remote API.</title>
+ <title>JMX™ Remote API.</title>
<!--
Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/package.html Fri May 29 12:49:31 2015 +0200
@@ -387,12 +387,11 @@
@see <a href="{@docRoot}/../technotes/guides/rmi/index.html">
- Java<sup><font size="-1">TM</font></sup> Remote Method
+ Java™ Remote Method
Invocation (RMI)</a>
@see <a href="{@docRoot}/../technotes/guides/jndi/index.html">
- Java Naming and Directory Interface<sup><font
- size="-1">TM</font></sup> (JNDI)</a>
+ Java Naming and Directory Interface™ (JNDI)</a>
@see <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045,
section 6.8, "Base64 Content-Transfer-Encoding"</a>
--- a/jdk/src/java.management/share/classes/sun/management/HotspotRuntimeMBean.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/HotspotRuntimeMBean.java Fri May 29 12:49:31 2015 +0200
@@ -64,7 +64,7 @@
* Returns a list of internal counters maintained in the Java
* virtual machine for the runtime system.
*
- * @return a <tt>List</tt> of internal counters maintained in the VM
+ * @return a {@code List} of internal counters maintained in the VM
* for the runtime system.
*/
public java.util.List<Counter> getInternalRuntimeCounters();
--- a/jdk/src/java.management/share/classes/sun/management/HotspotThreadMBean.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/HotspotThreadMBean.java Fri May 29 12:49:31 2015 +0200
@@ -40,12 +40,11 @@
public int getInternalThreadCount();
/**
- * Returns a <tt>Map</tt> of the name of all VM internal threads
+ * Returns a {@code Map} of the name of all VM internal threads
* to the thread CPU time in nanoseconds. The returned value is
* of nanoseconds precision but not necessarily nanoseconds accuracy.
- * <p>
*
- * @return a <tt>Map</tt> object of the name of all VM internal threads
+ * @return a {@code Map} object of the name of all VM internal threads
* to the thread CPU time in nanoseconds.
*
* @throws java.lang.UnsupportedOperationException if the Java virtual
--- a/jdk/src/java.management/share/classes/sun/management/MappedMXBeanType.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/MappedMXBeanType.java Fri May 29 12:49:31 2015 +0200
@@ -45,13 +45,15 @@
* A mapped mxbean type maps a Java type to an open type.
* Only the following Java types are mappable
* (currently required by the platform MXBeans):
- * 1. Primitive types
- * 2. Wrapper classes such java.lang.Integer, etc
- * 3. Classes with only getter methods and with a static "from" method
- * that takes a CompositeData argument.
- * 4. E[] where E is a type of 1-4 (can be multi-dimensional array)
- * 5. List<E> where E is a type of 1-3
- * 6. Map<K, V> where K and V are a type of 1-4
+ * <ol>
+ * <li>Primitive types</li>
+ * <li>Wrapper classes such java.lang.Integer, etc</li>
+ * <li>Classes with only getter methods and with a static "from" method
+ * that takes a CompositeData argument.</li>
+ * <li>{@code E[]} where {@code E} is a type of 1-4 (can be multi-dimensional array)</li>
+ * <li>{@code List<E>} where E is a type of 1-3</li>
+ * <li>{@code Map<K, V>} where {@code K} and {@code V} are a type of 1-4</li>
+ * </ol>
*
* OpenDataException will be thrown if a Java type is not supported.
*/
--- a/jdk/src/java.management/share/classes/sun/management/Sensor.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/Sensor.java Fri May 29 12:49:31 2015 +0200
@@ -34,12 +34,12 @@
* An abstract sensor.
*
* <p>
- * A <tt>AbstractSensor</tt> object consists of two attributes:
+ * A {@code AbstractSensor} object consists of two attributes:
* <ul>
- * <li><tt>on</tt> is a boolean flag indicating if a sensor is
+ * <li>{@code on} is a boolean flag indicating if a sensor is
* triggered. This flag will be set or cleared by the
* component that owns the sensor.</li>
- * <li><tt>count</tt> is the total number of times that a sensor
+ * <li>{@code count} is the total number of times that a sensor
* has been triggered.</li>
* </ul>
*
@@ -54,7 +54,7 @@
private boolean on;
/**
- * Constructs a <tt>Sensor</tt> object.
+ * Constructs a {@code Sensor} object.
*
* @param name The name of this sensor.
*/
@@ -88,8 +88,8 @@
/**
* Tests if this sensor is currently on.
*
- * @return <tt>true</tt> if the sensor is currently on;
- * <tt>false</tt> otherwise.
+ * @return {@code true} if the sensor is currently on;
+ * {@code false} otherwise.
*
*/
public boolean isOn() {
@@ -112,7 +112,7 @@
/**
* Triggers this sensor. This method sets this sensor on
- * and increments the count with the input <tt>increment</tt>.
+ * and increments the count with the input {@code increment}.
*/
public void trigger(int increment) {
synchronized (lock) {
@@ -126,7 +126,7 @@
/**
* Triggers this sensor piggybacking a memory usage object.
* This method sets this sensor on
- * and increments the count with the input <tt>increment</tt>.
+ * and increments the count with the input {@code increment}.
*/
public void trigger(int increment, MemoryUsage usage) {
synchronized (lock) {
@@ -150,7 +150,7 @@
/**
* Clears this sensor
- * and increments the count with the input <tt>increment</tt>.
+ * and increments the count with the input {@code increment}.
*/
public void clear(int increment) {
synchronized (lock) {
--- a/jdk/src/java.management/share/classes/sun/management/counter/Counter.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/counter/Counter.java Fri May 29 12:49:31 2015 +0200
@@ -63,7 +63,7 @@
public Object getValue();
/**
- * Returns <tt>true</tt> if this counter is an internal counter.
+ * Returns {@code true} if this counter is an internal counter.
*/
public boolean isInternal();
--- a/jdk/src/java.management/share/classes/sun/management/counter/perf/InstrumentationException.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/counter/perf/InstrumentationException.java Fri May 29 12:49:31 2015 +0200
@@ -27,14 +27,14 @@
public class InstrumentationException extends RuntimeException {
/**
- * Constructs a <tt>InstrumentationException</tt> with no
+ * Constructs a {@code InstrumentationException} with no
* detail message.
*/
public InstrumentationException() {
}
/**
- * Constructs a <tt>InstrumentationException</tt> with a specified
+ * Constructs a {@code InstrumentationException} with a specified
* detail message.
*
* @param message the detail message
--- a/jdk/src/java.management/share/classes/sun/management/jdp/JdpController.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.management/share/classes/sun/management/jdp/JdpController.java Fri May 29 12:49:31 2015 +0200
@@ -37,19 +37,18 @@
import sun.misc.ManagedLocalsThread;
/**
- * JdpController is responsible to create and manage a broadcast loop
+ * JdpController is responsible to create and manage a broadcast loop.
*
* <p> Other part of code has no access to broadcast loop and have to use
* provided static methods
* {@link #startDiscoveryService(InetAddress,int,String,String) startDiscoveryService}
- * and {@link #stopDiscoveryService() stopDiscoveryService}</p>
+ * and {@link #stopDiscoveryService() stopDiscoveryService}
* <p>{@link #startDiscoveryService(InetAddress,int,String,String) startDiscoveryService} could be called multiple
- * times as it stops the running service if it is necessary. Call to {@link #stopDiscoveryService() stopDiscoveryService}
- * ignored if service isn't run</p>
+ * times as it stops the running service if it is necessary.
+ * Call to {@link #stopDiscoveryService() stopDiscoveryService}
+ * ignored if service isn't run.
*
*
- * </p>
- *
* <p> System properties below could be used to control broadcast loop behavior.
* Property below have to be set explicitly in command line. It's not possible to
* set it in management.config file. Careless changes of these properties could
@@ -59,9 +58,9 @@
* <li>com.sun.management.jdp.pause - set broadcast interval in seconds</li>
* <li>com.sun.management.jdp.source_addr - an address of interface to use for broadcast</li>
* </ul>
- </p>
+ *
* <p>null parameters values are filtered out on {@link JdpPacketWriter} level and
- * corresponding keys are not placed to packet.</p>
+ * corresponding keys are not placed to packet.
*/
public final class JdpController {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/BasicControl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/BasicControl.java Fri May 29 12:49:31 2015 +0200
@@ -28,7 +28,7 @@
import javax.naming.ldap.*;
/**
- * This class provides a basic implementation of the <tt>Control</tt>
+ * This class provides a basic implementation of the {@code Control}
* interface. It represents an LDAPv3 Control as defined in RFC-2251.
*
* @author Vincent Ryan
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/BerDecoder.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/BerDecoder.java Fri May 29 12:49:31 2015 +0200
@@ -295,7 +295,7 @@
* the relative parsed position is not returned.
* @return A non-null array containing the octet string.
* @throws DecodeException If the next byte in the BER buffer is not
- * <tt>tag</tt>, or if length specified in the BER buffer exceeds the
+ * {@code tag}, or if length specified in the BER buffer exceeds the
* number of bytes left in the buffer.
*/
public byte[] parseOctetString(int tag, int rlen[]) throws DecodeException {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/EventQueue.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/EventQueue.java Fri May 29 12:49:31 2015 +0200
@@ -73,16 +73,16 @@
// package private;
/**
* Enqueue an event.
- * @param event Either a <tt>NamingExceptionEvent</tt> or a subclass
- * of <tt>NamingEvent</tt> or
- * <tt>UnsolicitedNotificationEvent</tt>.
- * If it is a subclass of <tt>NamingEvent</tt>, all listeners must implement
- * the corresponding subinterface of <tt>NamingListener</tt>.
- * For example, for a <tt>ObjectAddedEvent</tt>, all listeners <em>must</em>
- * implement the <tt>ObjectAddedListener</tt> interface.
+ * @param event Either a {@code NamingExceptionEvent} or a subclass
+ * of {@code NamingEvent} or
+ * {@code UnsolicitedNotificationEvent}.
+ * If it is a subclass of {@code NamingEvent}, all listeners must implement
+ * the corresponding subinterface of {@code NamingListener}.
+ * For example, for a {@code ObjectAddedEvent}, all listeners <em>must</em>
+ * implement the {@code ObjectAddedListener} interface.
* <em>The current implementation does not check this before dispatching
* the event.</em>
- * If the event is a <tt>NamingExceptionEvent</tt>, then all listeners
+ * If the event is a {@code NamingExceptionEvent}, then all listeners
* are notified.
* @param vector List of NamingListeners that will be notified of event.
*/
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java Fri May 29 12:49:31 2015 +0200
@@ -55,14 +55,14 @@
*<li>The filter (default is "(objectclass=*)").
*<li>The search controls (default is null SearchControls).
*<li>The events that the listener is interested in. This is determined by
- * finding out which <tt>NamingListener</tt> interface the listener supports.
+ * finding out which {@code NamingListener} interface the listener supports.
*</ul>
*<p>
- *A notifier (<tt>NamingEventNotifier</tt>) is a worker thread that is responsible
+ *A notifier ({@code NamingEventNotifier}) is a worker thread that is responsible
*for gathering information for generating events requested by its listeners.
*Each notifier maintains its own list of listeners; these listeners have
*all made the same registration request (at different times) and implements
- *the same <tt>NamingListener</tt> interfaces.
+ *the same {@code NamingListener} interfaces.
*<p>
*For unsolicited listeners, this class maintains a vector, unsolicited.
*When an unsolicited listener is registered, this class adds itself
@@ -93,7 +93,7 @@
*The notifiers are responsible for gather information for generating events
*requested by their respective listeners. When a notifier gets sufficient
*information to generate an event, it creates invokes the
- *appropriate <tt>fireXXXEvent</tt> on this class with the information and list of
+ *appropriate {@code fireXXXEvent} on this class with the information and list of
*listeners. This causes an event and the list of listeners to be added
*to the <em>event queue</em>.
*This class maintains an event queue and a dispatching thread that dequeues
@@ -138,7 +138,7 @@
}
/**
- * Adds <tt>l</tt> to list of listeners interested in <tt>nm</tt>.
+ * Adds {@code l} to list of listeners interested in {@code nm}.
*/
/*
* Make the add/removeNamingListeners synchronized to:
@@ -173,7 +173,7 @@
}
/**
- * Adds <tt>l</tt> to list of listeners interested in <tt>nm</tt>
+ * Adds {@code l} to list of listeners interested in {@code nm}
* and filter.
*/
synchronized void addNamingListener(String nm, String filter,
@@ -201,7 +201,7 @@
}
/**
- * Removes <tt>l</tt> from all notifiers in this context.
+ * Removes {@code l} from all notifiers in this context.
*/
synchronized void removeNamingListener(NamingListener l) {
if (debug) System.err.println("EventSupport removing listener");
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapName.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapName.java Fri May 29 12:49:31 2015 +0200
@@ -336,7 +336,7 @@
* characters:
*<ul>
*<li>leading and trailing whitespace
- *<li><pre>, = + < > # ; " \</pre>
+ *<li><pre>{@literal , = + < > # ; " \}</pre>
*</ul>
* If the value is a byte array, it is converted to hex
* notation (such as "#CEB1DF80").
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapReferralException.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/LdapReferralException.java Fri May 29 12:49:31 2015 +0200
@@ -35,7 +35,7 @@
* This exception is raised when a referral to an alternative context
* is encountered.
* <p>
- * An <tt>LdapReferralException</tt> object contains one or more referrals.
+ * An {@code LdapReferralException} object contains one or more referrals.
* Each referral is an alternative location for the same target entry.
* For example, a referral may be an LDAP URL.
* The referrals are attempted in sequence until one is successful or
@@ -46,20 +46,20 @@
* of an authentication error, a referral may be retried with different
* environment properties.
* <p>
- * An <tt>LdapReferralException</tt> object may also contain a reference
- * to a chain of unprocessed <tt>LdapReferralException</tt> objects.
+ * An {@code LdapReferralException} object may also contain a reference
+ * to a chain of unprocessed {@code LdapReferralException} objects.
* Once the current set of referrals have been exhausted and unprocessed
- * <tt>LdapReferralException</tt> objects remain, then the
- * <tt>LdapReferralException</tt> object referenced by the current
+ * {@code LdapReferralException} objects remain, then the
+ * {@code LdapReferralException} object referenced by the current
* object is thrown and the cycle continues.
* <p>
- * If new <tt>LdapReferralException</tt> objects are generated while
+ * If new {@code LdapReferralException} objects are generated while
* following an existing referral then these new objects are appended
- * to the end of the chain of unprocessed <tt>LdapReferralException</tt>
+ * to the end of the chain of unprocessed {@code LdapReferralException}
* objects.
* <p>
* If an exception was recorded while processing a chain of
- * <tt>LdapReferralException</tt> objects then it is throw once
+ * {@code LdapReferralException} objects then it is throw once
* processing has completed.
*
* @author Vincent Ryan
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/UnsolicitedResponseImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/UnsolicitedResponseImpl.java Fri May 29 12:49:31 2015 +0200
@@ -65,7 +65,7 @@
* Retrieves the object identifier of the response.
*
* @return A possibly null object identifier string representing the LDAP
- * <tt>ExtendedResponse.responseName</tt> component.
+ * {@code ExtendedResponse.responseName} component.
*/
public String getID() {
return oid;
@@ -79,7 +79,7 @@
* the response value. It does not include the response OID.
*
* @return A possibly null byte array representing the ASN.1 BER encoded
- * contents of the LDAP <tt>ExtendedResponse.response</tt>
+ * contents of the LDAP {@code ExtendedResponse.response}
* component.
*/
public byte[] getEncodedValue() {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java Fri May 29 12:49:31 2015 +0200
@@ -52,10 +52,10 @@
* The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037
* and no extended response value is defined.
*
- *<p>
+ * <p>
* The Start TLS extended request and response are used to establish
* a TLS connection over the existing LDAP connection associated with
- * the JNDI context on which <tt>extendedOperation()</tt> is invoked.
+ * the JNDI context on which {@code extendedOperation()} is invoked.
*
* @see StartTlsRequest
* @author Vincent Ryan
@@ -124,7 +124,7 @@
/**
* Overrides the default list of cipher suites enabled for use on the
* TLS connection. The cipher suites must have already been listed by
- * <tt>SSLSocketFactory.getSupportedCipherSuites()</tt> as being supported.
+ * {@code SSLSocketFactory.getSupportedCipherSuites()} as being supported.
* Even if a suite has been enabled, it still might not be used because
* the peer does not support it, or because the requisite certificates
* (and private keys) are not available.
@@ -140,12 +140,12 @@
}
/**
- * Overrides the default hostname verifier used by <tt>negotiate()</tt>
+ * Overrides the default hostname verifier used by {@code negotiate()}
* after the TLS handshake has completed. If
- * <tt>setHostnameVerifier()</tt> has not been called before
- * <tt>negotiate()</tt> is invoked, <tt>negotiate()</tt>
+ * {@code setHostnameVerifier()} has not been called before
+ * {@code negotiate()} is invoked, {@code negotiate()}
* will perform a simple case ignore match. If called after
- * <tt>negotiate()</tt>, this method does not do anything.
+ * {@code negotiate()}, this method does not do anything.
*
* @param verifier The non-null hostname verifier callback.
* @see #negotiate
@@ -157,10 +157,10 @@
/**
* Negotiates a TLS session using the default SSL socket factory.
* <p>
- * This method is equivalent to <tt>negotiate(null)</tt>.
+ * This method is equivalent to {@code negotiate(null)}.
*
* @return The negotiated SSL session
- * @throw IOException If an IO error was encountered while establishing
+ * @throws IOException If an IO error was encountered while establishing
* the TLS session.
* @see #setEnabledCipherSuites
* @see #setHostnameVerifier
@@ -177,7 +177,7 @@
* attaches it to the existing connection. Performs the TLS handshake
* and returns the negotiated session information.
* <p>
- * If cipher suites have been set via <tt>setEnabledCipherSuites</tt>
+ * If cipher suites have been set via {@code setEnabledCipherSuites}
* then they are enabled before the TLS handshake begins.
* <p>
* Hostname verification is performed after the TLS handshake completes.
@@ -186,7 +186,7 @@
* hostname is extracted from the subjectAltName in the server's
* certificate (if present). Otherwise the value of the common name
* attribute of the subject name is used. If a callback has
- * been set via <tt>setHostnameVerifier</tt> then that verifier is used if
+ * been set via {@code setHostnameVerifier} then that verifier is used if
* the default check fails.
* <p>
* If an error occurs then the SSL socket is closed and an IOException
@@ -195,7 +195,7 @@
* @param factory The possibly null SSL socket factory to use.
* If null, the default SSL socket factory is used.
* @return The negotiated SSL session
- * @throw IOException If an IO error was encountered while establishing
+ * @throws IOException If an IO error was encountered while establishing
* the TLS session.
* @see #setEnabledCipherSuites
* @see #setHostnameVerifier
@@ -252,7 +252,7 @@
* Closes the TLS connection gracefully and reverts back to the underlying
* connection.
*
- * @throw IOException If an IO error was encountered while closing the
+ * @throws IOException If an IO error was encountered while closing the
* TLS connection
*/
public void close() throws IOException {
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/LdapSasl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/LdapSasl.java Fri May 29 12:49:31 2015 +0200
@@ -72,12 +72,12 @@
* property has not been set, Context.SECURITY_PRINCIPAL is used.
* If SASL_CALLBACK has been set, use that instead of the default
* CallbackHandler.
- *<p>
+ * <p>
* If bind is successful and the selected SASL mechanism has a security
* layer, set inStream and outStream to be filter streams that use
* the security layer. These will be used for subsequent communication
* with the server.
- *<p>
+ *
* @param conn The non-null connection to use for sending an LDAP BIND
* @param server Non-null string name of host to connect to
* @param dn Non-null DN to bind as; also used as authentication ID
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java Fri May 29 12:49:31 2015 +0200
@@ -329,7 +329,7 @@
*<p>
* After this method is called, isContinuing() returns true.
*
- * @param resObj The possibly null resolved object.
+ * @param obj The possibly null resolved object.
* @param relResName The non-null resolved name relative to currCtx.
* @param currCtx The non-null context from which relResName is to be resolved.
*/
@@ -349,7 +349,7 @@
*<p>
* After this method is called, isContinuing() returns true.
*
- * @param resObj The possibly null resolved object.
+ * @param obj The possibly null resolved object.
* @param relResName The non-null resolved name relative to currCtx.
* @param currCtx The non-null context from which relResName is to be resolved.
* @param remain The non-null remaining name.
@@ -366,7 +366,7 @@
/**
* String overload.
*
- * @param resObj The possibly null resolved object.
+ * @param obj The possibly null resolved object.
* @param relResName The non-null resolved name relative to currCtx.
* @param currCtx The non-null context from which relResName is to be resolved.
* @param remain The non-null remaining name.
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java Fri May 29 12:49:31 2015 +0200
@@ -452,14 +452,14 @@
* nonempty component, and if 'prefix' ends with an empty component or
* 'name' starts with one, then one empty component is dropped.
* For example:
- * <pre>
+ * <pre>{@code
* elideEmpty=false elideEmpty=true
* {"a"} + {"b"} => {"a", "b"} {"a", "b"}
* {"a"} + {""} => {"a", ""} {"a", ""}
* {"a"} + {"", "b"} => {"a", "", "b"} {"a", "b"}
* {"a", ""} + {"b", ""} => {"a", "", "b", ""} {"a", "b", ""}
* {"a", ""} + {"", "b"} => {"a", "", "", "b"} {"a", "", "b"}
- * </pre>
+ * }</pre>
*/
public Name composeName(Name name, Name prefix) throws NamingException {
Name res = (Name)prefix.clone();
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java Fri May 29 12:49:31 2015 +0200
@@ -32,8 +32,8 @@
/**
* A sample service provider that implements a hierarchical directory in memory.
* Every operation begins by doing a lookup on the name passed to it and then
- * calls a corresponding "do<OperationName>" on the result of the lookup. The
- * "do<OperationName>" does the work without any further resolution (it assumes
+ * calls a corresponding "{@code do<OperationName>}" on the result of the lookup. The
+ * "{@code do<OperationName>}" does the work without any further resolution (it assumes
* that it is the target context).
*/
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java Fri May 29 12:49:31 2015 +0200
@@ -548,8 +548,8 @@
/**
- * Finds the first occurrence of <tt>ch</tt> in <tt>val</tt> starting
- * from position <tt>start</tt>. It doesn't count if <tt>ch</tt>
+ * Finds the first occurrence of {@code ch} in {@code val} starting
+ * from position {@code start}. It doesn't count if {@code ch}
* has been escaped by a backslash (\)
*/
public static int findUnescaped(char ch, String val, int start) {
@@ -568,8 +568,8 @@
}
/**
- * Formats the expression <tt>expr</tt> using arguments from the array
- * <tt>args</tt>.
+ * Formats the expression {@code expr} using arguments from the array
+ * {@code args}.
*
* <code>{i}</code> specifies the <code>i</code>'th element from
* the array <code>args</code> is to be substituted for the
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java Fri May 29 12:49:31 2015 +0200
@@ -107,12 +107,14 @@
* the subclass must override getURLSuffix() to get the correct behavior.
* Remember, the behavior must match getRootURLContext().
*
+ * <pre>{@code
* URL Suffix
* foo://host:port <empty string>
* foo://host:port/rest/of/name rest/of/name
* foo:///rest/of/name rest/of/name
* foo:/rest/of/name rest/of/name
* foo:rest/of/name rest/of/name
+ * }</pre>
*/
protected Name getURLSuffix(String prefix, String url) throws NamingException {
String suffix = url.substring(prefix.length());
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/toolkit/url/Uri.java Fri May 29 12:49:31 2015 +0200
@@ -47,7 +47,7 @@
* still run on pre-1.4 platforms not containing that class.
*
* <p> The format of an absolute URI (see the RFCs mentioned above) is:
- * <p><blockquote><pre>
+ * <blockquote><pre>{@code
* absoluteURI = scheme ":" ( hier_part | opaque_part )
*
* scheme = alpha *( alpha | digit | "+" | "-" | "." )
@@ -94,12 +94,12 @@
* mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
* escaped = "%" hex hex
* unwise = "{" | "}" | "|" | "\" | "^" | "`"
- * </pre></blockquote>
+ * }</pre></blockquote>
*
- * <p> Currently URIs containing <tt>userinfo</tt> or <tt>reg_name</tt>
+ * <p> Currently URIs containing {@code userinfo} or {@code reg_name}
* are not supported.
- * The <tt>opaque_part</tt> of a non-hierarchical URI is treated as if
- * if were a <tt>path</tt> without a leading slash.
+ * The {@code opaque_part} of a non-hierarchical URI is treated as if
+ * if were a {@code path} without a leading slash.
*/
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html Fri May 29 12:49:31 2015 +0200
@@ -33,7 +33,7 @@
<p>
This package defines the directory operations of the Java Naming and
-Directory Interface<font size=-2><sup>TM</sup></font> (JNDI).
+Directory Interface™ (JNDI).
JNDI provides naming and directory functionality to applications
written in the Java programming language. It is designed to be
independent of any specific naming or directory service
--- a/jdk/src/java.naming/share/classes/javax/naming/event/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/package.html Fri May 29 12:49:31 2015 +0200
@@ -33,7 +33,7 @@
<p>
This package defines the event notification operations of the Java Naming
-and Directory Interface<font size=-2><sup>TM</sup></font> (JNDI).
+and Directory Interface™ (JNDI).
JNDI provides naming and directory functionality to applications
written in the Java programming language. It is designed to be
independent of any specific naming or directory service
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html Fri May 29 12:49:31 2015 +0200
@@ -33,7 +33,7 @@
<p>
This package extends the directory operations of the Java Naming and
-Directory Interface<font size=-2><sup>TM</sup></font> (JNDI).
+Directory Interface™ (JNDI).
JNDI provides naming and directory functionality to applications
written in the Java programming language. It is designed to be
independent of any specific naming or directory service
--- a/jdk/src/java.naming/share/classes/javax/naming/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/package.html Fri May 29 12:49:31 2015 +0200
@@ -32,7 +32,7 @@
<p>
This package defines the naming operations of the Java Naming and
-Directory Interface<font size=-2><sup>TM</sup></font> (JNDI).
+Directory Interface™ (JNDI).
JNDI provides naming and directory functionality to applications
written in the Java programming language. It is designed to be
independent of any specific naming or directory service
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html Fri May 29 12:49:31 2015 +0200
@@ -34,7 +34,7 @@
<p>
This package defines the service provider interface (SPI) of the Java Naming
-and Directory Interface<font size=-2><sup>TM</sup></font> (JNDI).
+and Directory Interface™ (JNDI).
JNDI provides naming and directory functionality to applications
written in the Java programming language. It is designed to be
independent of any specific naming or directory service
--- a/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferences.java Fri May 29 12:49:31 2015 +0200
@@ -62,8 +62,8 @@
/**
* Windows registry path to <tt>Preferences</tt>'s root nodes.
*/
- private static final byte[] WINDOWS_ROOT_PATH
- = stringToByteArray("Software\\JavaSoft\\Prefs");
+ private static final byte[] WINDOWS_ROOT_PATH =
+ stringToByteArray("Software\\JavaSoft\\Prefs");
/**
* Windows handles to <tt>HKEY_CURRENT_USER</tt> and
@@ -147,12 +147,12 @@
* Java wrapper for Windows registry API RegOpenKey()
*/
private static native int[] WindowsRegOpenKey(int hKey, byte[] subKey,
- int securityMask);
+ int securityMask);
/**
* Retries RegOpenKey() MAX_ATTEMPTS times before giving up.
*/
private static int[] WindowsRegOpenKey1(int hKey, byte[] subKey,
- int securityMask) {
+ int securityMask) {
int[] result = WindowsRegOpenKey(hKey, subKey, securityMask);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
return result;
@@ -167,16 +167,16 @@
} else if (result[ERROR_CODE] != ERROR_ACCESS_DENIED) {
long sleepTime = INIT_SLEEP_TIME;
for (int i = 0; i < MAX_ATTEMPTS; i++) {
- try {
- Thread.sleep(sleepTime);
- } catch(InterruptedException e) {
- return result;
- }
- sleepTime *= 2;
- result = WindowsRegOpenKey(hKey, subKey, securityMask);
- if (result[ERROR_CODE] == ERROR_SUCCESS) {
- return result;
- }
+ try {
+ Thread.sleep(sleepTime);
+ } catch(InterruptedException e) {
+ return result;
+ }
+ sleepTime *= 2;
+ result = WindowsRegOpenKey(hKey, subKey, securityMask);
+ if (result[ERROR_CODE] == ERROR_SUCCESS) {
+ return result;
+ }
}
}
return result;
@@ -198,10 +198,10 @@
private static int[] WindowsRegCreateKeyEx1(int hKey, byte[] subKey) {
int[] result = WindowsRegCreateKeyEx(hKey, subKey);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
- return result;
- } else {
- long sleepTime = INIT_SLEEP_TIME;
- for (int i = 0; i < MAX_ATTEMPTS; i++) {
+ return result;
+ } else {
+ long sleepTime = INIT_SLEEP_TIME;
+ for (int i = 0; i < MAX_ATTEMPTS; i++) {
try {
Thread.sleep(sleepTime);
} catch(InterruptedException e) {
@@ -210,7 +210,7 @@
sleepTime *= 2;
result = WindowsRegCreateKeyEx(hKey, subKey);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
- return result;
+ return result;
}
}
}
@@ -232,10 +232,10 @@
private static int WindowsRegFlushKey1(int hKey) {
int result = WindowsRegFlushKey(hKey);
if (result == ERROR_SUCCESS) {
- return result;
- } else {
- long sleepTime = INIT_SLEEP_TIME;
- for (int i = 0; i < MAX_ATTEMPTS; i++) {
+ return result;
+ } else {
+ long sleepTime = INIT_SLEEP_TIME;
+ for (int i = 0; i < MAX_ATTEMPTS; i++) {
try {
Thread.sleep(sleepTime);
} catch(InterruptedException e) {
@@ -244,7 +244,7 @@
sleepTime *= 2;
result = WindowsRegFlushKey(hKey);
if (result == ERROR_SUCCESS) {
- return result;
+ return result;
}
}
}
@@ -255,23 +255,23 @@
* Java wrapper for Windows registry API RegQueryValueEx()
*/
private static native byte[] WindowsRegQueryValueEx(int hKey,
- byte[] valueName);
+ byte[] valueName);
/**
* Java wrapper for Windows registry API RegSetValueEx()
*/
private static native int WindowsRegSetValueEx(int hKey, byte[] valueName,
- byte[] value);
+ byte[] value);
/**
* Retries RegSetValueEx() MAX_ATTEMPTS times before giving up.
*/
private static int WindowsRegSetValueEx1(int hKey, byte[] valueName,
- byte[] value) {
+ byte[] value) {
int result = WindowsRegSetValueEx(hKey, valueName, value);
if (result == ERROR_SUCCESS) {
- return result;
- } else {
- long sleepTime = INIT_SLEEP_TIME;
- for (int i = 0; i < MAX_ATTEMPTS; i++) {
+ return result;
+ } else {
+ long sleepTime = INIT_SLEEP_TIME;
+ for (int i = 0; i < MAX_ATTEMPTS; i++) {
try {
Thread.sleep(sleepTime);
} catch(InterruptedException e) {
@@ -280,7 +280,7 @@
sleepTime *= 2;
result = WindowsRegSetValueEx(hKey, valueName, value);
if (result == ERROR_SUCCESS) {
- return result;
+ return result;
}
}
}
@@ -303,10 +303,10 @@
private static int[] WindowsRegQueryInfoKey1(int hKey) {
int[] result = WindowsRegQueryInfoKey(hKey);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
- return result;
- } else {
- long sleepTime = INIT_SLEEP_TIME;
- for (int i = 0; i < MAX_ATTEMPTS; i++) {
+ return result;
+ } else {
+ long sleepTime = INIT_SLEEP_TIME;
+ for (int i = 0; i < MAX_ATTEMPTS; i++) {
try {
Thread.sleep(sleepTime);
} catch(InterruptedException e) {
@@ -315,7 +315,7 @@
sleepTime *= 2;
result = WindowsRegQueryInfoKey(hKey);
if (result[ERROR_CODE] == ERROR_SUCCESS) {
- return result;
+ return result;
}
}
}
@@ -326,19 +326,19 @@
* Java wrapper for Windows registry API RegEnumKeyEx()
*/
private static native byte[] WindowsRegEnumKeyEx(int hKey, int subKeyIndex,
- int maxKeyLength);
+ int maxKeyLength);
/**
* Retries RegEnumKeyEx() MAX_ATTEMPTS times before giving up.
*/
private static byte[] WindowsRegEnumKeyEx1(int hKey, int subKeyIndex,
- int maxKeyLength) {
+ int maxKeyLength) {
byte[] result = WindowsRegEnumKeyEx(hKey, subKeyIndex, maxKeyLength);
if (result != null) {
- return result;
- } else {
- long sleepTime = INIT_SLEEP_TIME;
- for (int i = 0; i < MAX_ATTEMPTS; i++) {
+ return result;
+ } else {
+ long sleepTime = INIT_SLEEP_TIME;
+ for (int i = 0; i < MAX_ATTEMPTS; i++) {
try {
Thread.sleep(sleepTime);
} catch(InterruptedException e) {
@@ -347,7 +347,7 @@
sleepTime *= 2;
result = WindowsRegEnumKeyEx(hKey, subKeyIndex, maxKeyLength);
if (result != null) {
- return result;
+ return result;
}
}
}
@@ -358,19 +358,19 @@
* Java wrapper for Windows registry API RegEnumValue()
*/
private static native byte[] WindowsRegEnumValue(int hKey, int valueIndex,
- int maxValueNameLength);
+ int maxValueNameLength);
/**
* Retries RegEnumValueEx() MAX_ATTEMPTS times before giving up.
*/
private static byte[] WindowsRegEnumValue1(int hKey, int valueIndex,
- int maxValueNameLength) {
+ int maxValueNameLength) {
byte[] result = WindowsRegEnumValue(hKey, valueIndex,
- maxValueNameLength);
+ maxValueNameLength);
if (result != null) {
- return result;
- } else {
- long sleepTime = INIT_SLEEP_TIME;
- for (int i = 0; i < MAX_ATTEMPTS; i++) {
+ return result;
+ } else {
+ long sleepTime = INIT_SLEEP_TIME;
+ for (int i = 0; i < MAX_ATTEMPTS; i++) {
try {
Thread.sleep(sleepTime);
} catch(InterruptedException e) {
@@ -378,9 +378,9 @@
}
sleepTime *= 2;
result = WindowsRegEnumValue(hKey, valueIndex,
- maxValueNameLength);
+ maxValueNameLength);
if (result != null) {
- return result;
+ return result;
}
}
}
@@ -404,11 +404,11 @@
int[] result =
WindowsRegCreateKeyEx1(parentNativeHandle, toWindowsName(name));
if (result[ERROR_CODE] != ERROR_SUCCESS) {
- logger().warning("Could not create windows registry "
- + "node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegCreateKeyEx(...) returned error code " +
- result[ERROR_CODE] + ".");
+ logger().warning("Could not create windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegCreateKeyEx(...) returned error code " +
+ result[ERROR_CODE] + ".");
isBackingStoreAvailable = false;
return;
}
@@ -426,15 +426,15 @@
* @param rootDirectory Path to root directory, as a byte-encoded string.
*/
private WindowsPreferences(int rootNativeHandle, byte[] rootDirectory) {
- super(null,"");
+ super(null, "");
int[] result =
WindowsRegCreateKeyEx1(rootNativeHandle, rootDirectory);
if (result[ERROR_CODE] != ERROR_SUCCESS) {
logger().warning("Could not open/create prefs root node " +
- byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
- ". Windows RegCreateKeyEx(...) returned error code " +
- result[ERROR_CODE] + ".");
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegCreateKeyEx(...) returned error code " +
+ result[ERROR_CODE] + ".");
isBackingStoreAvailable = false;
return;
}
@@ -451,7 +451,7 @@
private byte[] windowsAbsolutePath() {
ByteArrayOutputStream bstream = new ByteArrayOutputStream();
bstream.write(WINDOWS_ROOT_PATH, 0, WINDOWS_ROOT_PATH.length-1);
- StringTokenizer tokenizer = new StringTokenizer(absolutePath(),"/");
+ StringTokenizer tokenizer = new StringTokenizer(absolutePath(), "/");
while (tokenizer.hasMoreTokens()) {
bstream.write((byte)'\\');
String nextName = tokenizer.nextToken();
@@ -505,27 +505,30 @@
/* Check if key's path is short enough be opened at once
otherwise use a path-splitting procedure */
if (windowsAbsolutePath.length <= MAX_WINDOWS_PATH_LENGTH + 1) {
- int[] result = WindowsRegOpenKey1(rootNativeHandle(),
- windowsAbsolutePath, mask1);
- if (result[ERROR_CODE] == ERROR_ACCESS_DENIED && mask2 != mask1)
- result = WindowsRegOpenKey1(rootNativeHandle(),
- windowsAbsolutePath, mask2);
+ int[] result = WindowsRegOpenKey1(rootNativeHandle(),
+ windowsAbsolutePath, mask1);
+ if (result[ERROR_CODE] == ERROR_ACCESS_DENIED && mask2 != mask1)
+ result = WindowsRegOpenKey1(rootNativeHandle(),
+ windowsAbsolutePath, mask2);
- if (result[ERROR_CODE] != ERROR_SUCCESS) {
- logger().warning("Could not open windows "
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegOpenKey(...) returned error code " +
- result[ERROR_CODE] + ".");
+ if (result[ERROR_CODE] != ERROR_SUCCESS) {
+ logger().warning("Could not open windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegOpenKey(...) returned error code " +
+ result[ERROR_CODE] + ".");
result[NATIVE_HANDLE] = NULL_NATIVE_HANDLE;
if (result[ERROR_CODE] == ERROR_ACCESS_DENIED) {
- throw new SecurityException("Could not open windows "
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ": Access denied");
+ throw new SecurityException(
+ "Could not open windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ": Access denied");
}
- }
- return result[NATIVE_HANDLE];
+ }
+ return result[NATIVE_HANDLE];
} else {
return openKey(rootNativeHandle(), windowsAbsolutePath, mask1, mask2);
}
@@ -548,21 +551,21 @@
int mask1, int mask2) {
/* If the path is short enough open at once. Otherwise split the path */
if (windowsRelativePath.length <= MAX_WINDOWS_PATH_LENGTH + 1 ) {
- int[] result = WindowsRegOpenKey1(nativeHandle,
- windowsRelativePath, mask1);
- if (result[ERROR_CODE] == ERROR_ACCESS_DENIED && mask2 != mask1)
- result = WindowsRegOpenKey1(nativeHandle,
- windowsRelativePath, mask2);
+ int[] result = WindowsRegOpenKey1(nativeHandle,
+ windowsRelativePath, mask1);
+ if (result[ERROR_CODE] == ERROR_ACCESS_DENIED && mask2 != mask1)
+ result = WindowsRegOpenKey1(nativeHandle,
+ windowsRelativePath, mask2);
- if (result[ERROR_CODE] != ERROR_SUCCESS) {
- logger().warning("Could not open windows "
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(nativeHandle) +
- ". Windows RegOpenKey(...) returned error code " +
- result[ERROR_CODE] + ".");
+ if (result[ERROR_CODE] != ERROR_SUCCESS) {
+ logger().warning("Could not open windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" + Integer.toHexString(nativeHandle) +
+ ". Windows RegOpenKey(...) returned error code " +
+ result[ERROR_CODE] + ".");
result[NATIVE_HANDLE] = NULL_NATIVE_HANDLE;
- }
- return result[NATIVE_HANDLE];
+ }
+ return result[NATIVE_HANDLE];
} else {
int separatorPosition = -1;
// Be greedy - open the longest possible path
@@ -604,10 +607,12 @@
private void closeKey(int nativeHandle) {
int result = WindowsRegCloseKey(nativeHandle);
if (result != ERROR_SUCCESS) {
- logger().warning("Could not close windows "
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegCloseKey(...) returned error code " + result + ".");
+ logger().warning("Could not close windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegCloseKey(...) returned error code " +
+ result + ".");
}
}
@@ -627,10 +632,13 @@
toWindowsName(javaName), toWindowsValueString(value));
if (result != ERROR_SUCCESS) {
logger().warning("Could not assign value to key " +
- byteArrayToString(toWindowsName(javaName))+ " at Windows registry node "
- + byteArrayToString(windowsAbsolutePath()) + " at root 0x"
- + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegSetValueEx(...) returned error code " + result + ".");
+ byteArrayToString(toWindowsName(javaName)) +
+ " at Windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegSetValueEx(...) returned error code " +
+ result + ".");
isBackingStoreAvailable = false;
}
closeKey(nativeHandle);
@@ -672,12 +680,12 @@
int result =
WindowsRegDeleteValue(nativeHandle, toWindowsName(key));
if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND) {
- logger().warning("Could not delete windows registry "
- + "value " + byteArrayToString(windowsAbsolutePath())+ "\\" +
- toWindowsName(key) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) +
- ". Windows RegDeleteValue(...) returned error code " +
- result + ".");
+ logger().warning("Could not delete windows registry value " +
+ byteArrayToString(windowsAbsolutePath()) + "\\" +
+ toWindowsName(key) + " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegDeleteValue(...) returned error code " +
+ result + ".");
isBackingStoreAvailable = false;
}
closeKey(nativeHandle);
@@ -693,17 +701,20 @@
// Find out the number of values
int nativeHandle = openKey(KEY_QUERY_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
- throw new BackingStoreException("Could not open windows"
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) + ".");
+ throw new BackingStoreException(
+ "Could not open windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) + ".");
}
int[] result = WindowsRegQueryInfoKey1(nativeHandle);
if (result[ERROR_CODE] != ERROR_SUCCESS) {
- String info = "Could not query windows"
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegQueryInfoKeyEx(...) returned error code " +
- result[ERROR_CODE] + ".";
+ String info = "Could not query windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegQueryInfoKeyEx(...) returned error code " +
+ result[ERROR_CODE] + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -712,17 +723,17 @@
if (valuesNumber == 0) {
closeKey(nativeHandle);
return new String[0];
- }
- // Get the values
- String[] valueNames = new String[valuesNumber];
- for (int i = 0; i < valuesNumber; i++) {
+ }
+ // Get the values
+ String[] valueNames = new String[valuesNumber];
+ for (int i = 0; i < valuesNumber; i++) {
byte[] windowsName = WindowsRegEnumValue1(nativeHandle, i,
- maxValueNameLength+1);
+ maxValueNameLength+1);
if (windowsName == null) {
String info =
- "Could not enumerate value #" + i + " of windows node " +
- byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ".";
+ "Could not enumerate value #" + i + " of windows node " +
+ byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -740,20 +751,22 @@
*/
protected String[] childrenNamesSpi() throws BackingStoreException {
// Open key
- int nativeHandle = openKey(KEY_ENUMERATE_SUB_KEYS| KEY_QUERY_VALUE);
+ int nativeHandle = openKey(KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE);
if (nativeHandle == NULL_NATIVE_HANDLE) {
- throw new BackingStoreException("Could not open windows"
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) + ".");
+ throw new BackingStoreException(
+ "Could not open windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) + ".");
}
// Get number of children
int[] result = WindowsRegQueryInfoKey1(nativeHandle);
if (result[ERROR_CODE] != ERROR_SUCCESS) {
- String info = "Could not query windows"
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegQueryInfoKeyEx(...) returned error code " +
- result[ERROR_CODE] + ".";
+ String info = "Could not query windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegQueryInfoKeyEx(...) returned error code " +
+ result[ERROR_CODE] + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -768,12 +781,12 @@
// Get children
for (int i = 0; i < subKeysNumber; i++) {
byte[] windowsName = WindowsRegEnumKeyEx1(nativeHandle, i,
- maxKeyLength+1);
+ maxKeyLength+1);
if (windowsName == null) {
String info =
- "Could not enumerate key #" + i + " of windows node " +
- byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
- Integer.toHexString(rootNativeHandle()) + ". ";
+ "Could not enumerate key #" + i + " of windows node " +
+ byteArrayToString(windowsAbsolutePath()) + " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) + ". ";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -798,20 +811,24 @@
}
if (!isBackingStoreAvailable) {
throw new BackingStoreException(
- "flush(): Backing store not available.");
+ "flush(): Backing store not available.");
}
int nativeHandle = openKey(KEY_READ);
if (nativeHandle == NULL_NATIVE_HANDLE) {
- throw new BackingStoreException("Could not open windows"
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) + ".");
+ throw new BackingStoreException(
+ "Could not open windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) + ".");
}
int result = WindowsRegFlushKey1(nativeHandle);
if (result != ERROR_SUCCESS) {
- String info = "Could not flush windows "
- + "registry node " + byteArrayToString(windowsAbsolutePath())
- + " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegFlushKey(...) returned error code " + result + ".";
+ String info = "Could not flush windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegFlushKey(...) returned error code " +
+ result + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -838,7 +855,7 @@
* Logs a warning message, if Windows Registry is unavailable.
*/
protected AbstractPreferences childSpi(String name) {
- return new WindowsPreferences(this, name);
+ return new WindowsPreferences(this, name);
}
/**
@@ -849,20 +866,22 @@
*/
public void removeNodeSpi() throws BackingStoreException {
int parentNativeHandle =
- ((WindowsPreferences)parent()).openKey(DELETE);
+ ((WindowsPreferences)parent()).openKey(DELETE);
if (parentNativeHandle == NULL_NATIVE_HANDLE) {
- throw new BackingStoreException("Could not open parent windows"
- + "registry node of " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) + ".");
+ throw new BackingStoreException(
+ "Could not open parent windows registry node of " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" +
+ Integer.toHexString(rootNativeHandle()) + ".");
}
int result =
WindowsRegDeleteKey(parentNativeHandle, toWindowsName(name()));
if (result != ERROR_SUCCESS) {
- String info = "Could not delete windows "
- + "registry node " + byteArrayToString(windowsAbsolutePath()) +
- " at root 0x" + Integer.toHexString(rootNativeHandle()) +
- ". Windows RegDeleteKeyEx(...) returned error code " +
- result + ".";
+ String info = "Could not delete windows registry node " +
+ byteArrayToString(windowsAbsolutePath()) +
+ " at root 0x" + Integer.toHexString(rootNativeHandle()) +
+ ". Windows RegDeleteKeyEx(...) returned error code " +
+ result + ".";
logger().warning(info);
throw new BackingStoreException(info);
}
@@ -879,23 +898,25 @@
private static String toJavaName(byte[] windowsNameArray) {
String windowsName = byteArrayToString(windowsNameArray);
// check if Alt64
- if ((windowsName.length()>1) &&
- (windowsName.substring(0,2).equals("/!"))) {
+ if ((windowsName.length() > 1) &&
+ (windowsName.substring(0, 2).equals("/!"))) {
return toJavaAlt64Name(windowsName);
}
- StringBuffer javaName = new StringBuffer();
+ StringBuilder javaName = new StringBuilder();
char ch;
// Decode from simple encoding
- for (int i = 0; i < windowsName.length(); i++){
+ for (int i = 0; i < windowsName.length(); i++) {
if ((ch = windowsName.charAt(i)) == '/') {
char next = ' ';
if ((windowsName.length() > i + 1) &&
- ((next = windowsName.charAt(i+1)) >= 'A') && (next <= 'Z')) {
- ch = next;
- i++;
- } else if ((windowsName.length() > i + 1) && (next == '/')) {
- ch = '\\';
- i++;
+ ((next = windowsName.charAt(i+1)) >= 'A') &&
+ (next <= 'Z')) {
+ ch = next;
+ i++;
+ } else if ((windowsName.length() > i + 1) &&
+ (next == '/')) {
+ ch = '\\';
+ i++;
}
} else if (ch == '\\') {
ch = '/';
@@ -914,8 +935,8 @@
private static String toJavaAlt64Name(String windowsName) {
byte[] byteBuffer =
- Base64.altBase64ToByteArray(windowsName.substring(2));
- StringBuffer result = new StringBuffer();
+ Base64.altBase64ToByteArray(windowsName.substring(2));
+ StringBuilder result = new StringBuilder();
for (int i = 0; i < byteBuffer.length; i++) {
int firstbyte = (byteBuffer[i++] & 0xff);
int secondbyte = (byteBuffer[i] & 0xff);
@@ -945,10 +966,10 @@
* Base64 class.
*/
private static byte[] toWindowsName(String javaName) {
- StringBuffer windowsName = new StringBuffer();
+ StringBuilder windowsName = new StringBuilder();
for (int i = 0; i < javaName.length(); i++) {
- char ch =javaName.charAt(i);
- if ((ch < 0x0020)||(ch > 0x007f)) {
+ char ch = javaName.charAt(i);
+ if ((ch < 0x0020) || (ch > 0x007f)) {
// If a non-trivial character encountered, use altBase64
return toWindowsAlt64Name(javaName);
}
@@ -957,7 +978,7 @@
} else if (ch == '/') {
windowsName.append('\\');
} else if ((ch >= 'A') && (ch <='Z')) {
- windowsName.append("/" + ch);
+ windowsName.append('/').append(ch);
} else {
windowsName.append(ch);
}
@@ -976,13 +997,13 @@
// Convert to byte pairs
int counter = 0;
for (int i = 0; i < javaName.length();i++) {
- int ch = javaName.charAt(i);
- javaNameArray[counter++] = (byte)(ch >>> 8);
- javaNameArray[counter++] = (byte)ch;
+ int ch = javaName.charAt(i);
+ javaNameArray[counter++] = (byte)(ch >>> 8);
+ javaNameArray[counter++] = (byte)ch;
}
- return stringToByteArray(
- "/!" + Base64.byteArrayToAltBase64(javaNameArray));
+ return stringToByteArray("/!" +
+ Base64.byteArrayToAltBase64(javaNameArray));
}
/**
@@ -994,30 +1015,31 @@
private static String toJavaValueString(byte[] windowsNameArray) {
// Use modified native2ascii algorithm
String windowsName = byteArrayToString(windowsNameArray);
- StringBuffer javaName = new StringBuffer();
+ StringBuilder javaName = new StringBuilder();
char ch;
for (int i = 0; i < windowsName.length(); i++){
if ((ch = windowsName.charAt(i)) == '/') {
char next = ' ';
if (windowsName.length() > i + 1 &&
- (next = windowsName.charAt(i + 1)) == 'u') {
- if (windowsName.length() < i + 6){
+ (next = windowsName.charAt(i + 1)) == 'u') {
+ if (windowsName.length() < i + 6) {
break;
} else {
- ch = (char)Integer.parseInt
- (windowsName.substring(i + 2, i + 6), 16);
+ ch = (char)Integer.parseInt(
+ windowsName.substring(i + 2, i + 6), 16);
i += 5;
}
} else
if ((windowsName.length() > i + 1) &&
- ((windowsName.charAt(i+1)) >= 'A') && (next <= 'Z')) {
- ch = next;
- i++;
- } else if ((windowsName.length() > i + 1) &&
- (next == '/')) {
- ch = '\\';
- i++;
+ ((windowsName.charAt(i+1)) >= 'A') &&
+ (next <= 'Z')) {
+ ch = next;
+ i++;
+ } else if ((windowsName.length() > i + 1) &&
+ (next == '/')) {
+ ch = '\\';
+ i++;
}
} else if (ch == '\\') {
ch = '/';
@@ -1037,14 +1059,14 @@
* to convert java string to a byte array of ASCII characters.
*/
private static byte[] toWindowsValueString(String javaName) {
- StringBuffer windowsName = new StringBuffer();
+ StringBuilder windowsName = new StringBuilder();
for (int i = 0; i < javaName.length(); i++) {
- char ch =javaName.charAt(i);
- if ((ch < 0x0020)||(ch > 0x007f)){
+ char ch = javaName.charAt(i);
+ if ((ch < 0x0020) || (ch > 0x007f)){
// write \udddd
windowsName.append("/u");
String hex = Integer.toHexString(javaName.charAt(i));
- StringBuffer hex4 = new StringBuffer(hex);
+ StringBuilder hex4 = new StringBuilder(hex);
hex4.reverse();
int len = 4 - hex4.length();
for (int j = 0; j < len; j++){
@@ -1058,7 +1080,7 @@
} else if (ch == '/') {
windowsName.append('\\');
} else if ((ch >= 'A') && (ch <='Z')) {
- windowsName.append("/" + ch);
+ windowsName.append('/').append(ch);
} else {
windowsName.append(ch);
}
@@ -1070,8 +1092,9 @@
* Returns native handle for the top Windows node for this node.
*/
private int rootNativeHandle() {
- return (isUserNode()? USER_ROOT_NATIVE_HANDLE :
- SYSTEM_ROOT_NATIVE_HANDLE);
+ return (isUserNode()
+ ? USER_ROOT_NATIVE_HANDLE
+ : SYSTEM_ROOT_NATIVE_HANDLE);
}
/**
@@ -1090,7 +1113,7 @@
* Converts a null-terminated byte array to java string
*/
private static String byteArrayToString(byte[] array) {
- StringBuffer result = new StringBuffer();
+ StringBuilder result = new StringBuilder();
for (int i = 0; i < array.length - 1; i++) {
result.append((char)array[i]);
}
--- a/jdk/src/java.rmi/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java Fri May 29 12:49:31 2015 +0200
@@ -32,7 +32,6 @@
/**
* The ExecOptionPermission class represents permission for rmid to use
* a specific command-line option when launching an activation group.
- * <P>
*
* @author Ann Wollrath
*
@@ -68,9 +67,9 @@
* Checks if the specified permission is "implied" by
* this object.
* <P>
- * More specifically, this method returns true if:<p>
+ * More specifically, this method returns true if:
* <ul>
- * <li> <i>p</i>'s class is the same as this object's class, and<p>
+ * <li> <i>p</i>'s class is the same as this object's class, and
* <li> <i>p</i>'s name equals or (in the case of wildcards)
* is implied by this object's
* name. For example, "a.b.*" implies "a.b.c", and
@@ -111,7 +110,7 @@
* Checks two ExecOptionPermission objects for equality.
* Checks that <i>obj</i>'s class is the same as this object's class
* and has the same name as this object.
- * <P>
+ *
* @param obj the object we are testing for equality with this object.
* @return true if <i>obj</i> is an ExecOptionPermission, and has the same
* name as this ExecOptionPermission object, false otherwise.
@@ -154,7 +153,7 @@
* Returns a new PermissionCollection object for storing
* ExecOptionPermission objects.
* <p>
- * A ExecOptionPermissionCollection stores a collection of
+ * An ExecOptionPermissionCollection stores a collection of
* ExecOptionPermission permissions.
*
* <p>ExecOptionPermission objects must be stored in a manner that allows
--- a/jdk/src/java.rmi/share/classes/com/sun/rmi/rmid/ExecPermission.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/com/sun/rmi/rmid/ExecPermission.java Fri May 29 12:49:31 2015 +0200
@@ -40,14 +40,13 @@
* all the files and directories contained in that directory. A pathname
* that ends with "/-" indicates (recursively) all files
* and subdirectories contained in that directory. A pathname consisting of
- * the special token "<<ALL FILES>>" matches <bold>any</bold> file.
+ * the special token "{@code <<ALL FILES>>}" matches <b>any</b> file.
* <P>
* Note: A pathname consisting of a single "*" indicates all the files
* in the current directory, while a pathname consisting of a single "-"
* indicates all the files in the current directory and
* (recursively) all files and subdirectories contained in the current
* directory.
- * <P>
*
*
* @author Ann Wollrath
@@ -72,7 +71,7 @@
* a directory and all the files contained in that directory. A pathname
* that ends with "/-" indicates a directory and (recursively) all files
* and subdirectories contained in that directory. The special pathname
- * "<<ALL FILES>>" matches all files.
+ * "{@code <<ALL FILES>>}" matches all files.
*
* <p>A pathname consisting of a single "*" indicates all the files
* in the current directory, while a pathname consisting of a single "-"
@@ -96,7 +95,7 @@
* a directory and all the files contained in that directory. A pathname
* that ends with "/-" indicates a directory and (recursively) all files
* and subdirectories contained in that directory. The special pathname
- * "<<ALL FILES>>" matches all files.
+ * "{@code <<ALL FILES>>}" matches all files.
*
* <p>A pathname consisting of a single "*" indicates all the files
* in the current directory, while a pathname consisting of a single "-"
@@ -114,9 +113,9 @@
/**
* Checks if this ExecPermission object "implies" the specified permission.
* <P>
- * More specifically, this method returns true if:<p>
+ * More specifically, this method returns true if:
* <ul>
- * <li> <i>p</i> is an instanceof ExecPermission,<p> and
+ * <li> <i>p</i> is an instanceof ExecPermission, and
* <li> <i>p</i>'s pathname is implied by this object's
* pathname. For example, "/tmp/*" implies "/tmp/foo", since
* "/tmp/*" encompasses the "/tmp" directory and all files in that
@@ -140,7 +139,7 @@
* Checks two ExecPermission objects for equality.
* Checks that <i>obj</i>'s class is the same as this object's class
* and has the same name as this object.
- * <P>
+ *
* @param obj the object we are testing for equality with this object.
* @return true if <i>obj</i> is an ExecPermission, and has the same
* pathname as this ExecPermission object, false otherwise.
--- a/jdk/src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/log/LogInputStream.java Fri May 29 12:49:31 2015 +0200
@@ -35,7 +35,7 @@
/**
* Creates a log input file with the specified system dependent
* file descriptor.
- * @param fd the system dependent file descriptor
+ * @param in the system dependent file descriptor
* @param length the total number of bytes allowed to be read
* @exception IOException If an I/O error has occurred.
*/
--- a/jdk/src/java.rmi/share/classes/sun/rmi/log/LogOutputStream.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/log/LogOutputStream.java Fri May 29 12:49:31 2015 +0200
@@ -35,7 +35,7 @@
/**
* Creates an output file with the specified system dependent
* file descriptor.
- * @param fd the system dependent file descriptor
+ * @param raf the system dependent file descriptor.
* @exception IOException If an I/O error has occurred.
*/
public LogOutputStream(RandomAccessFile raf) throws IOException {
--- a/jdk/src/java.rmi/share/classes/sun/rmi/log/ReliableLog.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/log/ReliableLog.java Fri May 29 12:49:31 2015 +0200
@@ -124,7 +124,7 @@
* stable storage directory.
*
* @param dirPath path to the stable storage directory
- * @param logCl the closure object containing callbacks for logging and
+ * @param handler the closure object containing callbacks for logging and
* recovery
* @param pad ignored
* @exception IOException If a directory creation error has
@@ -170,8 +170,8 @@
* stable storage directory.
*
* @param dirPath path to the stable storage directory
- * @param logCl the closure object containing callbacks for logging and
- * recovery
+ * @param handler the closure object containing callbacks for logging and
+ * recovery
* @exception IOException If a directory creation error has
* occurred or if initialSnapshot callback raises an exception
*/
--- a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java Fri May 29 12:49:31 2015 +0200
@@ -155,7 +155,7 @@
/**
* Returns the remote object for specified name in the registry.
* @exception RemoteException If remote operation failed.
- * @exception NotBound If name is not currently bound.
+ * @exception NotBoundException If name is not currently bound.
*/
public Remote lookup(String name)
throws RemoteException, NotBoundException
@@ -188,7 +188,7 @@
/**
* Unbind the name.
* @exception RemoteException If remote operation failed.
- * @exception NotBound If name is not currently bound.
+ * @exception NotBoundException If name is not currently bound.
*/
public void unbind(String name)
throws RemoteException, NotBoundException, AccessException
--- a/jdk/src/java.rmi/share/classes/sun/rmi/runtime/Log.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/runtime/Log.java Fri May 29 12:49:31 2015 +0200
@@ -96,7 +96,7 @@
* care to interpret a range of values between BRIEF, VERBOSE and
* SILENT.
*
- * An override < 0 is interpreted to mean that the logging
+ * An override {@literal <} 0 is interpreted to mean that the logging
* configuration should not be overridden. The level passed to the
* factories createLog method will be null in this case.
*
--- a/jdk/src/java.rmi/share/classes/sun/rmi/server/ActivationGroupImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/ActivationGroupImpl.java Fri May 29 12:49:31 2015 +0200
@@ -345,7 +345,7 @@
* request.
*
* @param id the object's activation identifier
- * @returns true if the operation succeeds (the operation will
+ * @return true if the operation succeeds (the operation will
* succeed if the object in currently known to be active and is
* either already unexported or is currently exported and has no
* pending/executing calls); false is returned if the object has
@@ -430,7 +430,7 @@
* hasn't already done so.
*
* @param id the object's identifier
- * @param obj the remote object implementation
+ * @param impl the remote object implementation
* @exception UnknownObjectException if object is not registered
* @exception RemoteException if call informing monitor fails
*/
--- a/jdk/src/java.rmi/share/classes/sun/rmi/server/ActivationGroupInit.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/server/ActivationGroupInit.java Fri May 29 12:49:31 2015 +0200
@@ -36,7 +36,7 @@
* The activator spawns (as a child process) an activation group as needed
* and directs activation requests to the appropriate activation
* group. After spawning the VM, the activator passes some
- * information to the bootstrap code via its stdin: <p>
+ * information to the bootstrap code via its stdin:
* <ul>
* <li> the activation group's id,
* <li> the activation group's descriptor (an instance of the class
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/Channel.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/Channel.java Fri May 29 12:49:31 2015 +0200
@@ -42,7 +42,7 @@
/**
* Free the connection generated by this channel.
- * @param c The connection
+ * @param conn The connection.
* @param reuse If true, the connection is in a state in which it
* can be reused for another method call.
*/
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/LiveRef.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/LiveRef.java Fri May 29 12:49:31 2015 +0200
@@ -56,7 +56,7 @@
/**
* Construct a "well-known" live reference to a remote object
- * @param isLocalServer If true, indicates this ref specifies a local
+ * @param isLocal If true, indicates this ref specifies a local
* server in this address space; if false, the ref is for a remote
* object (hence a surrogate or proxy) in another address space.
*/
--- a/jdk/src/java.rmi/share/classes/sun/rmi/transport/proxy/CGIHandler.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/transport/proxy/CGIHandler.java Fri May 29 12:49:31 2015 +0200
@@ -81,7 +81,7 @@
/**
* The CGIHandler class contains methods for executing as a CGI program.
* The main function interprets the query string as a command of the form
- * "<command>=<parameters>".
+ * "{@code <command>=<parameters>}".
*
* This class depends on the CGI 1.0 environment variables being set as
* properties of the same name in this Java VM.
--- a/jdk/src/java.scripting/share/classes/javax/script/Compilable.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.scripting/share/classes/javax/script/Compilable.java Fri May 29 12:49:31 2015 +0200
@@ -42,7 +42,7 @@
*
* @param script The source of the script, represented as a <code>String</code>.
*
- * @return An subclass of <code>CompiledScript</code> to be executed later using one
+ * @return An instance of a subclass of <code>CompiledScript</code> to be executed later using one
* of the <code>eval</code> methods of <code>CompiledScript</code>.
*
* @throws ScriptException if compilation fails.
@@ -61,7 +61,7 @@
*
* @param script The reader from which the script source is obtained.
*
- * @return An implementation of <code>CompiledScript</code> to be executed
+ * @return An instance of a subclass of <code>CompiledScript</code> to be executed
* later using one of its <code>eval</code> methods of <code>CompiledScript</code>.
*
* @throws ScriptException if compilation fails.
--- a/jdk/src/java.scripting/share/classes/javax/script/SimpleScriptContext.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.scripting/share/classes/javax/script/SimpleScriptContext.java Fri May 29 12:49:31 2015 +0200
@@ -140,6 +140,7 @@
* @throws IllegalArgumentException if the name is empty.
*/
public Object getAttribute(String name) {
+ checkName(name);
if (engineScope.containsKey(name)) {
return getAttribute(name, ENGINE_SCOPE);
} else if (globalScope != null && globalScope.containsKey(name)) {
@@ -162,7 +163,7 @@
* @throws NullPointerException if the name is null.
*/
public Object getAttribute(String name, int scope) {
-
+ checkName(name);
switch (scope) {
case ENGINE_SCOPE:
@@ -191,7 +192,7 @@
* @throws NullPointerException if the name is null.
*/
public Object removeAttribute(String name, int scope) {
-
+ checkName(name);
switch (scope) {
case ENGINE_SCOPE:
@@ -223,7 +224,7 @@
* @throws NullPointerException if the name is null.
*/
public void setAttribute(String name, Object value, int scope) {
-
+ checkName(name);
switch (scope) {
case ENGINE_SCOPE:
@@ -281,6 +282,7 @@
* @throws IllegalArgumentException if name is empty.
*/
public int getAttributesScope(String name) {
+ checkName(name);
if (engineScope.containsKey(name)) {
return ENGINE_SCOPE;
} else if (globalScope != null && globalScope.containsKey(name)) {
@@ -314,6 +316,13 @@
return scopes;
}
+ private void checkName(String name) {
+ Objects.requireNonNull(name);
+ if (name.isEmpty()) {
+ throw new IllegalArgumentException("name cannot be empty");
+ }
+ }
+
private static List<Integer> scopes;
static {
scopes = new ArrayList<Integer>(2);
--- a/jdk/src/java.scripting/share/classes/javax/script/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.scripting/share/classes/javax/script/package.html Fri May 29 12:49:31 2015 +0200
@@ -29,7 +29,7 @@
</head>
<body bgcolor="white">
<p>The scripting API consists of interfaces and classes that define
-Java <font size=1><sup>TM</sup></font> Scripting Engines and provides
+Java™ Scripting Engines and provides
a framework for their use in Java applications. This API is intended
for use by application programmers who wish to execute programs
written in scripting languages in their Java applications. The
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java Fri May 29 12:49:31 2015 +0200
@@ -1085,27 +1085,30 @@
* Check if need to use DNS to locate Kerberos services for name. If not
* defined, check dns_fallback, whose default value is true.
*/
- private boolean useDNS(String name) {
+ private boolean useDNS(String name, boolean defaultValue) {
Boolean value = getBooleanObject("libdefaults", name);
if (value != null) {
return value.booleanValue();
- } else {
- return getBooleanObject("libdefaults", "dns_fallback") != Boolean.FALSE;
}
+ value = getBooleanObject("libdefaults", "dns_fallback");
+ if (value != null) {
+ return value.booleanValue();
+ }
+ return defaultValue;
}
/**
* Check if need to use DNS to locate the KDC
*/
private boolean useDNS_KDC() {
- return useDNS("dns_lookup_kdc");
+ return useDNS("dns_lookup_kdc", true);
}
/*
* Check if need to use DNS to locate the Realm
*/
private boolean useDNS_Realm() {
- return useDNS("dns_lookup_realm");
+ return useDNS("dns_lookup_realm", false);
}
/**
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/FilteredRowSetImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/FilteredRowSetImpl.java Fri May 29 12:49:31 2015 +0200
@@ -466,7 +466,7 @@
* passed to the evaluate function.
* 2. updateXXXstream() - here it would suffice to pass the stream handle
* to the evaluate function and the implementation
- * of the evaluate function can do the comparision
+ * of the evaluate function can do the comparison
* based on the stream and also type of data.
*/
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/JoinRowSetImpl.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/JoinRowSetImpl.java Fri May 29 12:49:31 2015 +0200
@@ -4063,14 +4063,16 @@
}
/**
- * Provide interface coverage for getURL(int) in ResultSet->RowSet
+ * Provide interface coverage for getURL(int) in
+ * ResultSet{@literal ->}RowSet
*/
public java.net.URL getURL(int columnIndex) throws SQLException {
return crsInternal.getURL(columnIndex);
}
/**
- * Provide interface coverage for getURL(String) in ResultSet->RowSet
+ * Provide interface coverage for getURL(String) in
+ * ResultSet{@literal ->}RowSet
*/
public java.net.URL getURL(String columnName) throws SQLException {
return crsInternal.getURL(columnName);
--- a/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/providers/RIOptimisticProvider.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.sql.rowset/share/classes/com/sun/rowset/providers/RIOptimisticProvider.java Fri May 29 12:49:31 2015 +0200
@@ -36,7 +36,7 @@
* The reference implementation of a JDBC Rowset synchronization provider
* providing optimistic synchronization with a relational datastore
* using any JDBC technology-enabled driver.
- * <p>
+ *
* <h3>1.0 Backgroud</h3>
* This synchronization provider is registered with the
* <code>SyncFactory</code> by default as the
--- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,7 +67,7 @@
* value of this <code>SerialBlob</code> object.
* @serial
*/
- private byte buf[];
+ private byte[] buf;
/**
* The internal representation of the <code>Blob</code> object on which this
@@ -103,12 +103,13 @@
* @throws SerialException if an error occurs during serialization
* @throws SQLException if a SQL errors occurs
*/
- public SerialBlob(byte[] b) throws SerialException, SQLException {
+ public SerialBlob(byte[] b)
+ throws SerialException, SQLException {
len = b.length;
buf = new byte[(int)len];
for(int i = 0; i < len; i++) {
- buf[i] = b[i];
+ buf[i] = b[i];
}
origLen = len;
}
@@ -133,19 +134,17 @@
* to this constructor is a <code>null</code>.
* @see java.sql.Blob
*/
- public SerialBlob (Blob blob) throws SerialException, SQLException {
+ public SerialBlob (Blob blob)
+ throws SerialException, SQLException {
if (blob == null) {
- throw new SQLException("Cannot instantiate a SerialBlob " +
- "object with a null Blob object");
+ throw new SQLException(
+ "Cannot instantiate a SerialBlob object with a null Blob object");
}
len = blob.length();
buf = blob.getBytes(1, (int)len );
this.blob = blob;
-
- //if ( len < 10240000)
- // len = 10240000;
origLen = len;
}
@@ -246,7 +245,8 @@
* value from the database
*/
public long position(byte[] pattern, long start)
- throws SerialException, SQLException {
+ throws SerialException, SQLException {
+
isValid();
if (start < 1 || start > len) {
return -1;
@@ -291,7 +291,7 @@
* value from the database
*/
public long position(Blob pattern, long start)
- throws SerialException, SQLException {
+ throws SerialException, SQLException {
isValid();
return position(pattern.getBytes(1, (int)(pattern.length())), start);
}
@@ -317,8 +317,8 @@
* @see #getBytes
*/
public int setBytes(long pos, byte[] bytes)
- throws SerialException, SQLException {
- return (setBytes(pos, bytes, 0, bytes.length));
+ throws SerialException, SQLException {
+ return setBytes(pos, bytes, 0, bytes.length);
}
/**
@@ -353,7 +353,7 @@
* @see #getBytes
*/
public int setBytes(long pos, byte[] bytes, int offset, int length)
- throws SerialException, SQLException {
+ throws SerialException, SQLException {
isValid();
if (offset < 0 || offset > bytes.length) {
@@ -370,7 +370,7 @@
if ((length + offset) > bytes.length) {
throw new SerialException("Invalid OffSet. Cannot have combined offset " +
- "and length that is greater that the Blob buffer");
+ "and length that is greater that the Blob buffer");
}
int i = 0;
@@ -403,7 +403,8 @@
* @see #getBinaryStream
*/
public java.io.OutputStream setBinaryStream(long pos)
- throws SerialException, SQLException {
+ throws SerialException, SQLException {
+
isValid();
if (this.blob != null) {
return this.blob.setBinaryStream(pos);
@@ -426,17 +427,16 @@
* if {@code free} had previously been called on this object
*/
public void truncate(long length) throws SerialException {
-
isValid();
if (length > len) {
- throw new SerialException
- ("Length more than what can be truncated");
+ throw new SerialException(
+ "Length more than what can be truncated");
} else if((int)length == 0) {
- buf = new byte[0];
- len = length;
+ buf = new byte[0];
+ len = length;
} else {
- len = length;
- buf = this.getBytes(1, (int)len);
+ len = length;
+ buf = this.getBytes(1, (int)len);
}
}
@@ -467,8 +467,8 @@
throw new SerialException("Invalid position in BLOB object set");
}
if (length < 1 || length > len - pos + 1) {
- throw new SerialException("length is < 1 or pos + length >"
- + "total number of bytes");
+ throw new SerialException(
+ "length is < 1 or pos + length > total number of bytes");
}
return new ByteArrayInputStream(buf, (int) pos - 1, (int) length);
}
@@ -537,14 +537,13 @@
public Object clone() {
try {
SerialBlob sb = (SerialBlob) super.clone();
- sb.buf = (buf != null) ? Arrays.copyOf(buf, (int)len) : null;
+ sb.buf = (buf != null) ? Arrays.copyOf(buf, (int)len) : null;
sb.blob = null;
return sb;
} catch (CloneNotSupportedException ex) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
-
}
/**
@@ -555,15 +554,15 @@
throws IOException, ClassNotFoundException {
ObjectInputStream.GetField fields = s.readFields();
- byte[] tmp = (byte[])fields.get("buf", null);
- if (tmp == null)
- throw new InvalidObjectException("buf is null and should not be!");
- buf = tmp.clone();
- len = fields.get("len", 0L);
- if (buf.length != len)
- throw new InvalidObjectException("buf is not the expected size");
- origLen = fields.get("origLen", 0L);
- blob = (Blob) fields.get("blob", null);
+ byte[] tmp = (byte[])fields.get("buf", null);
+ if (tmp == null)
+ throw new InvalidObjectException("buf is null and should not be!");
+ buf = tmp.clone();
+ len = fields.get("len", 0L);
+ if (buf.length != len)
+ throw new InvalidObjectException("buf is not the expected size");
+ origLen = fields.get("origLen", 0L);
+ blob = (Blob) fields.get("blob", null);
}
/**
@@ -591,8 +590,8 @@
*/
private void isValid() throws SerialException {
if (buf == null) {
- throw new SerialException("Error: You cannot call a method on a "
- + "SerialBlob instance once free() has been called.");
+ throw new SerialException("Error: You cannot call a method on a " +
+ "SerialBlob instance once free() has been called.");
}
}
--- a/jdk/src/java.sql/share/classes/java/sql/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.sql/share/classes/java/sql/package.html Fri May 29 12:49:31 2015 +0200
@@ -34,10 +34,10 @@
Provides the API for accessing and processing data stored in a
data source (usually a relational database) using the
-Java<sup><font size=-2>TM</font></sup> programming language.
+Java™ programming language.
This API includes a framework whereby different
drivers can be installed dynamically to access different data sources.
-Although the JDBC<sup><font size=-2>TM</font></sup> API is mainly geared
+Although the JDBC™ API is mainly geared
to passing SQL statements to a database, it provides for reading and
writing data from any data source with a tabular format.
The reader/writer facility, available through the
@@ -45,17 +45,16 @@
use and update data from a spread sheet, flat file, or any other tabular
data source.
-<h2>What the JDBC<sup><font size=-2>TM</font></sup> 4.2 API Includes</h2>
-The JDBC<sup><font size=-2>TM</font></sup> 4.2 API includes both
+<h2>What the JDBC™ 4.2 API Includes</h2>
+The JDBC™ 4.2 API includes both
the <code>java.sql</code> package, referred to as the JDBC core API,
and the <code>javax.sql</code> package, referred to as the JDBC Optional
Package API. This complete JDBC API
-is included in the Java<sup><font size=-2>TM</font></sup>
-Standard Edition (Java SE<sup><font size=-2>TM</font></sup>), version 7.
+is included in the Java™ Standard Edition (Java SE™), version 7.
The <code>javax.sql</code> package extends the functionality of the JDBC API
from a client-side API to a server-side API, and it is an essential part
-of the Java<sup><font size=-2>TM</font></sup> Enterprise Edition
-(Java EE<sup><font size=-2>TM</font></sup>) technology.
+of the Java™ Enterprise Edition
+(Java EE™) technology.
<h2>Versions</h2>
The JDBC 4.2 API incorporates all of the previous JDBC API versions:
@@ -74,7 +73,7 @@
Classes, interfaces, methods, fields, constructors, and exceptions
have the following "since" tags that indicate when they were introduced
into the Java platform. When these "since" tags are used in
-Javadoc<sup><font size=-2>TM</font></sup> comments for the JDBC API,
+Javadoc™ comments for the JDBC API,
they indicate the following:
<UL>
<LI>Since 1.8 -- new in the JDBC 4.2 API and part of the Java SE platform,
@@ -88,7 +87,7 @@
<LI>Since 1.2 -- new in the JDBC 2.0 API and part of the J2SE platform,
version 1.2</li>
<LI>Since 1.1 or no "since" tag -- in the original JDBC 1.0 API and part of
- the JDK<sup><font size=-2>TM</font></sup>, version 1.1</li>
+ the JDK™, version 1.1</li>
</UL>
<P>
<b>NOTE:</b> Many of the new features are optional; consequently, there is
@@ -97,7 +96,7 @@
you try to use it.
<P>
<b>NOTE:</b> The class <code>SQLPermission</code> was added in the
-Java<sup><font size=-2>TM</font></sup> 2 SDK, Standard Edition,
+Java™ 2 SDK, Standard Edition,
version 1.3 release. This class is used to prevent unauthorized
access to the logging stream associated with the <code>DriverManager</code>,
which may contain information such as table names, column data, and so on.
@@ -277,7 +276,7 @@
Package API</h3>
<UL>
<LI>The <code>DataSource</code> interface as a means of making a connection. The
- Java Naming and Directory Interface<sup><font size=-2>TM</font></sup>
+ Java Naming and Directory Interface™
(JNDI) is used for registering a <code>DataSource</code> object with a
naming service and also for retrieving it.
<LI>Pooled connections -- allowing connections to be used and reused
--- a/jdk/src/java.sql/share/classes/javax/sql/package.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.sql/share/classes/javax/sql/package.html Fri May 29 12:49:31 2015 +0200
@@ -33,7 +33,7 @@
<body bgcolor="white">
Provides the API for server side data source access and processing from
-the Java<sup><font size=-2>TM</font></sup> programming language.
+the Java™ programming language.
This package supplements the <code>java.sql</code>
package and, as of the version 1.4 release, is included in the
Java Platform, Standard Edition (Java SE™).
@@ -84,7 +84,7 @@
creates is a connection to that physical data source.
<P>
A logical name for the data source is registered with a naming service that
-uses the Java Naming and Directory Interface<sup><font size=-2>TM</font></sup>
+uses the Java Naming and Directory Interface™
(JNDI) API, usually by a system administrator or someone performing the
duties of a system administrator. An application can retrieve the
<code>DataSource</code> object it wants by doing a lookup on the logical
@@ -189,7 +189,7 @@
<LI>Event Notification
<UL>
<LI><code>RowSetListener</code><br>
-A <code>RowSet</code> object is a JavaBeans<sup><font size=-2>TM</font></sup>
+A <code>RowSet</code> object is a JavaBeans™
component because it has properties and participates in the JavaBeans
event notification mechanism. The <code>RowSetListener</code> interface
is implemented by a component that wants to be notified about events that
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/IgnoreAllErrorHandler.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/IgnoreAllErrorHandler.java Fri May 29 12:49:31 2015 +0200
@@ -35,19 +35,30 @@
public class IgnoreAllErrorHandler implements ErrorHandler {
/** {@link org.apache.commons.logging} logging facility */
- private static java.util.logging.Logger log =
+ private static final java.util.logging.Logger log =
java.util.logging.Logger.getLogger(IgnoreAllErrorHandler.class.getName());
/** Field throwExceptions */
- private static final boolean warnOnExceptions =
- System.getProperty("com.sun.org.apache.xml.internal.security.test.warn.on.exceptions", "false").equals("true");
+ private static final boolean warnOnExceptions = getProperty(
+ "com.sun.org.apache.xml.internal.security.test.warn.on.exceptions");
/** Field throwExceptions */
- private static final boolean throwExceptions =
- System.getProperty("com.sun.org.apache.xml.internal.security.test.throw.exceptions", "false").equals("true");
+ private static final boolean throwExceptions = getProperty(
+ "com.sun.org.apache.xml.internal.security.test.throw.exceptions");
+
+ private static boolean getProperty(String name) {
+ return java.security.AccessController.doPrivileged(
+ new java.security.PrivilegedAction<Boolean>() {
+ @Override
+ public Boolean run() {
+ return Boolean.getBoolean(name);
+ }
+ });
+ }
/** @inheritDoc */
+ @Override
public void warning(SAXParseException ex) throws SAXException {
if (IgnoreAllErrorHandler.warnOnExceptions) {
log.log(java.util.logging.Level.WARNING, "", ex);
@@ -59,6 +70,7 @@
/** @inheritDoc */
+ @Override
public void error(SAXParseException ex) throws SAXException {
if (IgnoreAllErrorHandler.warnOnExceptions) {
log.log(java.util.logging.Level.SEVERE, "", ex);
@@ -70,6 +82,7 @@
/** @inheritDoc */
+ @Override
public void fatalError(SAXParseException ex) throws SAXException {
if (IgnoreAllErrorHandler.warnOnExceptions) {
log.log(java.util.logging.Level.WARNING, "", ex);
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java Fri May 29 12:49:31 2015 +0200
@@ -326,32 +326,54 @@
private KeyFactory eckf;
private ECParameterSpec ecParams;
- // The supported curve, secp256r1
- private static final Curve SECP256R1;
- static {
- final String name, oid, sfield, a, b, x, y, n;
- name = "secp256r1 [NIST P-256, X9.62 prime256v1]";
- oid = "1.2.840.10045.3.1.7";
- sfield =
- "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF";
- a =
- "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC";
- b =
- "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B";
- x =
- "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296";
- y =
- "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5";
- n =
- "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551";
- final int h = 1;
+ /* Supported curve, secp256r1 */
+ private static final Curve SECP256R1 = initializeCurve(
+ "secp256r1 [NIST P-256, X9.62 prime256v1]",
+ "1.2.840.10045.3.1.7",
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
+ "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
+ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
+ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
+ "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
+ 1
+ );
+ /* Supported curve secp384r1 */
+ private static final Curve SECP384R1 = initializeCurve(
+ "secp384r1 [NIST P-384]",
+ "1.3.132.0.34",
+ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
+ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
+ "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
+ "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
+ "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
+ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
+ 1
+ );
+
+ /* Supported curve secp521r1 */
+ private static final Curve SECP521R1 = initializeCurve(
+ "secp521r1 [NIST P-521]",
+ "1.3.132.0.35",
+ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
+ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
+ "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
+ "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
+ "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
+ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
+ 1
+ );
+
+ private static Curve initializeCurve(String name, String oid,
+ String sfield, String a, String b,
+ String x, String y, String n, int h) {
BigInteger p = bigInt(sfield);
ECField field = new ECFieldFp(p);
EllipticCurve curve = new EllipticCurve(field, bigInt(a),
bigInt(b));
ECPoint g = new ECPoint(bigInt(x), bigInt(y));
- SECP256R1 = new Curve(name, oid, curve, g, bigInt(n), h);
+ return new Curve(name, oid, curve, g, bigInt(n), h);
}
EC(PublicKey key) throws KeyException {
@@ -413,24 +435,45 @@
}
private static String getCurveOid(ECParameterSpec params) {
- // Check that the params represent the secp256r1 curve
- // If so, return the object identifier of the curve
+ // Check that the params represent one of the supported
+ // curves. If there is a match, return the object identifier
+ // of the curve.
+ Curve match;
+ if (matchCurve(params, SECP256R1)) {
+ match = SECP256R1;
+ } else if (matchCurve(params, SECP384R1)) {
+ match = SECP384R1;
+ } else if (matchCurve(params, SECP521R1)) {
+ match = SECP521R1;
+ } else {
+ return null;
+ }
+ return match.getObjectId();
+ }
+
+ private static boolean matchCurve(ECParameterSpec params, Curve curve) {
int fieldSize = params.getCurve().getField().getFieldSize();
- if (SECP256R1.getCurve().getField().getFieldSize() == fieldSize
- && SECP256R1.getCurve().equals(params.getCurve())
- && SECP256R1.getGenerator().equals(params.getGenerator())
- && SECP256R1.getOrder().equals(params.getOrder())
- && SECP256R1.getCofactor() == params.getCofactor()) {
- return SECP256R1.getObjectId();
+ if (curve.getCurve().getField().getFieldSize() == fieldSize
+ && curve.getCurve().equals(params.getCurve())
+ && curve.getGenerator().equals(params.getGenerator())
+ && curve.getOrder().equals(params.getOrder())
+ && curve.getCofactor() == params.getCofactor()) {
+ return true;
+ } else {
+ return false;
}
- return null;
}
private static ECParameterSpec getECParameterSpec(String oid) {
if (oid.equals(SECP256R1.getObjectId())) {
return SECP256R1;
+ } else if (oid.equals(SECP384R1.getObjectId())) {
+ return SECP384R1;
+ } else if (oid.equals(SECP521R1.getObjectId())) {
+ return SECP521R1;
+ } else {
+ return null;
}
- return null;
}
void marshalPublicKey(Node parent, Document doc, String dsPrefix,
--- a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/package-info.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/package-info.java Fri May 29 12:49:31 2015 +0200
@@ -24,8 +24,7 @@
*/
/**
- * Provides the API to attach to a Java<sup><font size=-2>TM</font></sup>
- * virtual machine.
+ * Provides the API to attach to a Java™ virtual machine.
* <p>
* A tool, written in the Java Language, uses this API to attach to a target
* virtual machine (VM) and load its tool agent into the target VM. For
--- a/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java Fri May 29 12:49:31 2015 +0200
@@ -241,7 +241,7 @@
* (using the zero-arg constructor) at the first invocation of this method.
* The list returned by the first invocation of this method is the list
* of providers. Subsequent invocations of this method return a list of the same
- * providers. The list is unmodifable.
+ * providers. The list is unmodifiable.
*
* @return A list of the installed attach providers.
*/
@@ -264,8 +264,8 @@
ThreadDeath td = (ThreadDeath)t;
throw td;
}
- // Ignore errors and exceptions
- System.err.println(t);
+ // Log errors and exceptions since we cannot return them
+ t.printStackTrace();
}
}
}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/Main.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat;
-
-import java.io.IOException;
-import java.io.File;
-
-import com.sun.tools.hat.internal.model.Snapshot;
-import com.sun.tools.hat.internal.model.ReachableExcludesImpl;
-import com.sun.tools.hat.internal.server.QueryListener;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-public class Main {
-
- private static String VERSION_STRING = "jhat version 2.0";
-
- private static void usage(String message) {
- if ( message != null ) {
- System.err.println("ERROR: " + message);
- }
- System.err.println("Usage: jhat [-stack <bool>] [-refs <bool>] [-port <port>] [-baseline <file>] [-debug <int>] [-version] [-h|-help] <file>");
- System.err.println();
- System.err.println("\t-J<flag> Pass <flag> directly to the runtime system. For");
- System.err.println("\t\t\t example, -J-mx512m to use a maximum heap size of 512MB");
- System.err.println("\t-stack false: Turn off tracking object allocation call stack.");
- System.err.println("\t-refs false: Turn off tracking of references to objects");
- System.err.println("\t-port <port>: Set the port for the HTTP server. Defaults to 7000");
- System.err.println("\t-exclude <file>: Specify a file that lists data members that should");
- System.err.println("\t\t\t be excluded from the reachableFrom query.");
- System.err.println("\t-baseline <file>: Specify a baseline object dump. Objects in");
- System.err.println("\t\t\t both heap dumps with the same ID and same class will");
- System.err.println("\t\t\t be marked as not being \"new\".");
- System.err.println("\t-debug <int>: Set debug level.");
- System.err.println("\t\t\t 0: No debug output");
- System.err.println("\t\t\t 1: Debug hprof file parsing");
- System.err.println("\t\t\t 2: Debug hprof file parsing, no server");
- System.err.println("\t-version Report version number");
- System.err.println("\t-h|-help Print this help and exit");
- System.err.println("\t<file> The file to read");
- System.err.println();
- System.err.println("For a dump file that contains multiple heap dumps,");
- System.err.println("you may specify which dump in the file");
- System.err.println("by appending \"#<number>\" to the file name, i.e. \"foo.hprof#3\".");
- System.err.println();
- System.err.println("All boolean options default to \"true\"");
- System.exit(1);
- }
-
- //
- // Convert s to a boolean. If it's invalid, abort the program.
- //
- private static boolean booleanValue(String s) {
- if ("true".equalsIgnoreCase(s)) {
- return true;
- } else if ("false".equalsIgnoreCase(s)) {
- return false;
- } else {
- usage("Boolean value must be true or false");
- return false; // Never happens
- }
- }
-
- public static void main(String[] args) {
- if (args.length < 1) {
- usage("No arguments supplied");
- }
-
- boolean parseonly = false;
- int portNumber = 7000;
- boolean callStack = true;
- boolean calculateRefs = true;
- String baselineDump = null;
- String excludeFileName = null;
- int debugLevel = 0;
- for (int i = 0; ; i += 2) {
- if (i > (args.length - 1)) {
- usage("Option parsing error");
- }
- if ("-version".equals(args[i])) {
- System.out.print(VERSION_STRING);
- System.out.println(" (java version " + System.getProperty("java.version") + ")");
- System.exit(0);
- }
-
- if ("-h".equals(args[i]) || "-help".equals(args[i])) {
- usage(null);
- }
-
- if (i == (args.length - 1)) {
- break;
- }
- String key = args[i];
- String value = args[i+1];
- if ("-stack".equals(key)) {
- callStack = booleanValue(value);
- } else if ("-refs".equals(key)) {
- calculateRefs = booleanValue(value);
- } else if ("-port".equals(key)) {
- portNumber = Integer.parseInt(value, 10);
- } else if ("-exclude".equals(key)) {
- excludeFileName = value;
- } else if ("-baseline".equals(key)) {
- baselineDump = value;
- } else if ("-debug".equals(key)) {
- debugLevel = Integer.parseInt(value, 10);
- } else if ("-parseonly".equals(key)) {
- // Undocumented option. To be used for testing purpose only
- parseonly = booleanValue(value);
- }
- }
- String fileName = args[args.length - 1];
- Snapshot model = null;
- File excludeFile = null;
- if (excludeFileName != null) {
- excludeFile = new File(excludeFileName);
- if (!excludeFile.exists()) {
- System.out.println("Exclude file " + excludeFile
- + " does not exist. Aborting.");
- System.exit(1);
- }
- }
-
- System.out.println("Reading from " + fileName + "...");
- try {
- model = com.sun.tools.hat.internal.parser.Reader.readFile(fileName, callStack, debugLevel);
- } catch (IOException ex) {
- ex.printStackTrace();
- System.exit(1);
- } catch (RuntimeException ex) {
- ex.printStackTrace();
- System.exit(1);
- }
- System.out.println("Snapshot read, resolving...");
- model.resolve(calculateRefs);
- System.out.println("Snapshot resolved.");
-
- if (excludeFile != null) {
- model.setReachableExcludes(new ReachableExcludesImpl(excludeFile));
- }
-
- if (baselineDump != null) {
- System.out.println("Reading baseline snapshot...");
- Snapshot baseline = null;
- try {
- baseline = com.sun.tools.hat.internal.parser.Reader.readFile(baselineDump, false,
- debugLevel);
- } catch (IOException ex) {
- ex.printStackTrace();
- System.exit(1);
- } catch (RuntimeException ex) {
- ex.printStackTrace();
- System.exit(1);
- }
- baseline.resolve(false);
- System.out.println("Discovering new objects...");
- model.markNewRelativeTo(baseline);
- baseline = null; // Guard against conservative GC
- }
- if ( debugLevel == 2 ) {
- System.out.println("No server, -debug 2 was used.");
- System.exit(0);
- }
-
- if (parseonly) {
- // do not start web server.
- System.out.println("-parseonly is true, exiting..");
- System.exit(0);
- }
-
- QueryListener listener = new QueryListener(portNumber);
- listener.setModel(model);
- Thread t = new Thread(listener, "Query Listener");
- t.setPriority(Thread.NORM_PRIORITY+1);
- t.start();
- System.out.println("Started HTTP server on port " + portNumber);
- System.out.println("Server is ready.");
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/AbstractJavaHeapObjectVisitor.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * A visitor for a JavaThing. @see JavaObject#visitReferencedObjects()
- *
- */
-
-
-abstract public class AbstractJavaHeapObjectVisitor
- implements JavaHeapObjectVisitor {
- abstract public void visit(JavaHeapObject other);
-
- /**
- * Should the given field be excluded from the set of things visited?
- * @return true if it should.
- */
- public boolean exclude(JavaClass clazz, JavaField f) {
- return false;
- }
-
- /**
- * @return true iff exclude might ever return true
- */
- public boolean mightExclude() {
- return false;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/ArrayTypeCodes.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Primitive array type codes as defined by VM specification.
- *
- */
-public interface ArrayTypeCodes {
- // Typecodes for array elements.
- // Refer to newarray instruction in VM Spec.
- public static final int T_BOOLEAN = 4;
- public static final int T_CHAR = 5;
- public static final int T_FLOAT = 6;
- public static final int T_DOUBLE = 7;
- public static final int T_BYTE = 8;
- public static final int T_SHORT = 9;
- public static final int T_INT = 10;
- public static final int T_LONG = 11;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/HackJavaValue.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * This is used to represent values that the program doesn't really understand.
- * This includes the null vlaue, and unresolved references (which shouldn't
- * happen in well-formed hprof files).
- *
- *
- * @author Bill Foote
- */
-
-
-
-
-public class HackJavaValue extends JavaValue {
-
- private String value;
- private int size;
-
- public HackJavaValue(String value, int size) {
- this.value = value;
- this.size = size;
- }
-
- public String toString() {
- return value;
- }
-
- public int getSize() {
- return size;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaBoolean.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a boolean (i.e. a boolean field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaBoolean extends JavaValue {
-
- boolean value;
-
- public JavaBoolean(boolean value) {
- this.value = value;
- }
-
- public String toString() {
- return "" + value;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaByte.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents an byte (i.e. a byte field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaByte extends JavaValue {
-
- byte value;
-
- public JavaByte(byte value) {
- this.value = value;
- }
-
- public String toString() {
- return "0x" + Integer.toString(((int) value) & 0xff, 16);
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaChar.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a char (i.e. a char field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaChar extends JavaValue {
-
- char value;
-
- public JavaChar(char value) {
- this.value = value;
- }
-
- public String toString() {
- return "" + value;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaClass.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.util.Vector;
-import java.util.Enumeration;
-import com.sun.tools.hat.internal.util.CompositeEnumeration;
-import com.sun.tools.hat.internal.parser.ReadBuffer;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-public class JavaClass extends JavaHeapObject {
- // my id
- private long id;
- // my name
- private String name;
-
- // These are JavaObjectRef before resolve
- private JavaThing superclass;
- private JavaThing loader;
- private JavaThing signers;
- private JavaThing protectionDomain;
-
- // non-static fields
- private JavaField[] fields;
- // static fields
- private JavaStatic[] statics;
-
- private static final JavaClass[] EMPTY_CLASS_ARRAY = new JavaClass[0];
- // my subclasses
- private JavaClass[] subclasses = EMPTY_CLASS_ARRAY;
-
- // my instances
- private Vector<JavaHeapObject> instances = new Vector<JavaHeapObject>();
-
- // Who I belong to. Set on resolve.
- private Snapshot mySnapshot;
-
- // Size of an instance, including VM overhead
- private int instanceSize;
- // Total number of fields including inherited ones
- private int totalNumFields;
-
-
- public JavaClass(long id, String name, long superclassId, long loaderId,
- long signersId, long protDomainId,
- JavaField[] fields, JavaStatic[] statics,
- int instanceSize) {
- this.id = id;
- this.name = name;
- this.superclass = new JavaObjectRef(superclassId);
- this.loader = new JavaObjectRef(loaderId);
- this.signers = new JavaObjectRef(signersId);
- this.protectionDomain = new JavaObjectRef(protDomainId);
- this.fields = fields;
- this.statics = statics;
- this.instanceSize = instanceSize;
- }
-
- public JavaClass(String name, long superclassId, long loaderId,
- long signersId, long protDomainId,
- JavaField[] fields, JavaStatic[] statics,
- int instanceSize) {
- this(-1L, name, superclassId, loaderId, signersId,
- protDomainId, fields, statics, instanceSize);
- }
-
- public final JavaClass getClazz() {
- return mySnapshot.getJavaLangClass();
- }
-
- public final int getIdentifierSize() {
- return mySnapshot.getIdentifierSize();
- }
-
- public final int getMinimumObjectSize() {
- return mySnapshot.getMinimumObjectSize();
- }
-
- public void resolve(Snapshot snapshot) {
- if (mySnapshot != null) {
- return;
- }
- mySnapshot = snapshot;
- resolveSuperclass(snapshot);
- if (superclass != null) {
- ((JavaClass) superclass).addSubclass(this);
- }
-
- loader = loader.dereference(snapshot, null);
- signers = signers.dereference(snapshot, null);
- protectionDomain = protectionDomain.dereference(snapshot, null);
-
- for (int i = 0; i < statics.length; i++) {
- statics[i].resolve(this, snapshot);
- }
- snapshot.getJavaLangClass().addInstance(this);
- super.resolve(snapshot);
- return;
- }
-
- /**
- * Resolve our superclass. This might be called well before
- * all instances are available (like when reading deferred
- * instances in a 1.2 dump file :-) Calling this is sufficient
- * to be able to explore this class' fields.
- */
- public void resolveSuperclass(Snapshot snapshot) {
- if (superclass == null) {
- // We must be java.lang.Object, so we have no superclass.
- } else {
- totalNumFields = fields.length;
- superclass = superclass.dereference(snapshot, null);
- if (superclass == snapshot.getNullThing()) {
- superclass = null;
- } else {
- try {
- JavaClass sc = (JavaClass) superclass;
- sc.resolveSuperclass(snapshot);
- totalNumFields += sc.totalNumFields;
- } catch (ClassCastException ex) {
- System.out.println("Warning! Superclass of " + name + " is " + superclass);
- superclass = null;
- }
- }
- }
- }
-
- public boolean isString() {
- return mySnapshot.getJavaLangString() == this;
- }
-
- public boolean isClassLoader() {
- return mySnapshot.getJavaLangClassLoader().isAssignableFrom(this);
- }
-
- /**
- * Get a numbered field from this class
- */
- public JavaField getField(int i) {
- if (i < 0 || i >= fields.length) {
- throw new Error("No field " + i + " for " + name);
- }
- return fields[i];
- }
-
- /**
- * Get the total number of fields that are part of an instance of
- * this class. That is, include superclasses.
- */
- public int getNumFieldsForInstance() {
- return totalNumFields;
- }
-
- /**
- * Get a numbered field from all the fields that are part of instance
- * of this class. That is, include superclasses.
- */
- public JavaField getFieldForInstance(int i) {
- if (superclass != null) {
- JavaClass sc = (JavaClass) superclass;
- if (i < sc.totalNumFields) {
- return sc.getFieldForInstance(i);
- }
- i -= sc.totalNumFields;
- }
- return getField(i);
- }
-
- /**
- * Get the class responsible for field i, where i is a field number that
- * could be passed into getFieldForInstance.
- *
- * @see JavaClass.getFieldForInstance()
- */
- public JavaClass getClassForField(int i) {
- if (superclass != null) {
- JavaClass sc = (JavaClass) superclass;
- if (i < sc.totalNumFields) {
- return sc.getClassForField(i);
- }
- }
- return this;
- }
-
- public long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public boolean isArray() {
- return name.indexOf('[') != -1;
- }
-
- public Enumeration<JavaHeapObject> getInstances(boolean includeSubclasses) {
- if (includeSubclasses) {
- Enumeration<JavaHeapObject> res = instances.elements();
- for (int i = 0; i < subclasses.length; i++) {
- res = new CompositeEnumeration(res,
- subclasses[i].getInstances(true));
- }
- return res;
- } else {
- return instances.elements();
- }
- }
-
- /**
- * @return a count of the instances of this class
- */
- public int getInstancesCount(boolean includeSubclasses) {
- int result = instances.size();
- if (includeSubclasses) {
- for (int i = 0; i < subclasses.length; i++) {
- result += subclasses[i].getInstancesCount(includeSubclasses);
- }
- }
- return result;
- }
-
- public JavaClass[] getSubclasses() {
- return subclasses;
- }
-
- /**
- * This can only safely be called after resolve()
- */
- public JavaClass getSuperclass() {
- return (JavaClass) superclass;
- }
-
- /**
- * This can only safely be called after resolve()
- */
- public JavaThing getLoader() {
- return loader;
- }
-
- /**
- * This can only safely be called after resolve()
- */
- public boolean isBootstrap() {
- return loader == mySnapshot.getNullThing();
- }
-
- /**
- * This can only safely be called after resolve()
- */
- public JavaThing getSigners() {
- return signers;
- }
-
- /**
- * This can only safely be called after resolve()
- */
- public JavaThing getProtectionDomain() {
- return protectionDomain;
- }
-
- public JavaField[] getFields() {
- return fields;
- }
-
- /**
- * Includes superclass fields
- */
- public JavaField[] getFieldsForInstance() {
- Vector<JavaField> v = new Vector<JavaField>();
- addFields(v);
- JavaField[] result = new JavaField[v.size()];
- for (int i = 0; i < v.size(); i++) {
- result[i] = v.elementAt(i);
- }
- return result;
- }
-
-
- public JavaStatic[] getStatics() {
- return statics;
- }
-
- // returns value of static field of given name
- public JavaThing getStaticField(String name) {
- for (int i = 0; i < statics.length; i++) {
- JavaStatic s = statics[i];
- if (s.getField().getName().equals(name)) {
- return s.getValue();
- }
- }
- return null;
- }
-
- public String toString() {
- return "class " + name;
- }
-
- public int compareTo(JavaThing other) {
- if (other instanceof JavaClass) {
- return name.compareTo(((JavaClass) other).name);
- }
- return super.compareTo(other);
- }
-
-
- /**
- * @return true iff a variable of type this is assignable from an instance
- * of other
- */
- public boolean isAssignableFrom(JavaClass other) {
- if (this == other) {
- return true;
- } else if (other == null) {
- return false;
- } else {
- return isAssignableFrom((JavaClass) other.superclass);
- // Trivial tail recursion: I have faith in javac.
- }
- }
-
- /**
- * Describe the reference that this thing has to target. This will only
- * be called if target is in the array returned by getChildrenForRootset.
- */
- public String describeReferenceTo(JavaThing target, Snapshot ss) {
- for (int i = 0; i < statics.length; i++) {
- JavaField f = statics[i].getField();
- if (f.hasId()) {
- JavaThing other = statics[i].getValue();
- if (other == target) {
- return "static field " + f.getName();
- }
- }
- }
- return super.describeReferenceTo(target, ss);
- }
-
- /**
- * @return the size of an instance of this class. Gives 0 for an array
- * type.
- */
- public int getInstanceSize() {
- return instanceSize + mySnapshot.getMinimumObjectSize();
- }
-
-
- /**
- * @return The size of all instances of this class. Correctly handles
- * arrays.
- */
- public long getTotalInstanceSize() {
- int count = instances.size();
- if (count == 0 || !isArray()) {
- return count * instanceSize;
- }
-
- // array class and non-zero count, we have to
- // get the size of each instance and sum it
- long result = 0;
- for (int i = 0; i < count; i++) {
- JavaThing t = (JavaThing) instances.elementAt(i);
- result += t.getSize();
- }
- return result;
- }
-
- /**
- * @return the size of this object
- */
- public int getSize() {
- JavaClass cl = mySnapshot.getJavaLangClass();
- if (cl == null) {
- return 0;
- } else {
- return cl.getInstanceSize();
- }
- }
-
- public void visitReferencedObjects(JavaHeapObjectVisitor v) {
- super.visitReferencedObjects(v);
- JavaHeapObject sc = getSuperclass();
- if (sc != null) v.visit(getSuperclass());
-
- JavaThing other;
- other = getLoader();
- if (other instanceof JavaHeapObject) {
- v.visit((JavaHeapObject)other);
- }
- other = getSigners();
- if (other instanceof JavaHeapObject) {
- v.visit((JavaHeapObject)other);
- }
- other = getProtectionDomain();
- if (other instanceof JavaHeapObject) {
- v.visit((JavaHeapObject)other);
- }
-
- for (int i = 0; i < statics.length; i++) {
- JavaField f = statics[i].getField();
- if (!v.exclude(this, f) && f.hasId()) {
- other = statics[i].getValue();
- if (other instanceof JavaHeapObject) {
- v.visit((JavaHeapObject) other);
- }
- }
- }
- }
-
- // package-privates below this point
- final ReadBuffer getReadBuffer() {
- return mySnapshot.getReadBuffer();
- }
-
- final void setNew(JavaHeapObject obj, boolean flag) {
- mySnapshot.setNew(obj, flag);
- }
-
- final boolean isNew(JavaHeapObject obj) {
- return mySnapshot.isNew(obj);
- }
-
- final StackTrace getSiteTrace(JavaHeapObject obj) {
- return mySnapshot.getSiteTrace(obj);
- }
-
- final void addReferenceFromRoot(Root root, JavaHeapObject obj) {
- mySnapshot.addReferenceFromRoot(root, obj);
- }
-
- final Root getRoot(JavaHeapObject obj) {
- return mySnapshot.getRoot(obj);
- }
-
- final Snapshot getSnapshot() {
- return mySnapshot;
- }
-
- void addInstance(JavaHeapObject inst) {
- instances.addElement(inst);
- }
-
- // Internals only below this point
- private void addFields(Vector<JavaField> v) {
- if (superclass != null) {
- ((JavaClass) superclass).addFields(v);
- }
- for (int i = 0; i < fields.length; i++) {
- v.addElement(fields[i]);
- }
- }
-
- private void addSubclassInstances(Vector<JavaHeapObject> v) {
- for (int i = 0; i < subclasses.length; i++) {
- subclasses[i].addSubclassInstances(v);
- }
- for (int i = 0; i < instances.size(); i++) {
- v.addElement(instances.elementAt(i));
- }
- }
-
- private void addSubclass(JavaClass sub) {
- JavaClass newValue[] = new JavaClass[subclasses.length + 1];
- System.arraycopy(subclasses, 0, newValue, 0, subclasses.length);
- newValue[subclasses.length] = sub;
- subclasses = newValue;
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaDouble.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a double (i.e. a double field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaDouble extends JavaValue {
-
- double value;
-
- public JavaDouble(double value) {
- this.value = value;
- }
-
- public String toString() {
- return Double.toString(value);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaField.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-
-/**
- *
- * @author Bill Foote
- */
-
-public class JavaField {
-
- private String name;
- private String signature;
-
- public JavaField(String name, String signature) {
- this.name = name;
- this.signature = signature;
- }
-
-
- /**
- * @return true if the type of this field is something that has an ID.
- * int fields, for exampe, don't.
- */
- public boolean hasId() {
- char ch = signature.charAt(0);
- return (ch == '[' || ch == 'L');
- }
-
- public String getName() {
- return name;
- }
-
- public String getSignature() {
- return signature;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaFloat.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a float (i.e. a float field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaFloat extends JavaValue {
-
- float value;
-
- public JavaFloat(float value) {
- this.value = value;
- }
-
- public String toString() {
- return Float.toString(value);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import com.sun.tools.hat.internal.util.Misc;
-
-
-/**
- *
- * @author Bill Foote
- */
-
-/**
- * Represents an object that's allocated out of the Java heap. It occupies
- * memory in the VM, and is the sort of thing that in a JDK 1.1 VM had
- * a handle. It can be a
- * JavaClass, a JavaObjectArray, a JavaValueArray or a JavaObject.
- */
-
-public abstract class JavaHeapObject extends JavaThing {
-
- //
- // Who we refer to. This is heavily optimized for space, because it's
- // well worth trading a bit of speed for less swapping.
- // referers and referersLen go through two phases: Building and
- // resolved. When building, referers might have duplicates, but can
- // be appended to. When resolved, referers has no duplicates or
- // empty slots.
- //
- private JavaThing[] referers = null;
- private int referersLen = 0; // -1 when resolved
-
- public abstract JavaClass getClazz();
- public abstract int getSize();
- public abstract long getId();
-
- /**
- * Do any initialization this thing needs after its data is read in.
- * Subclasses that override this should call super.resolve().
- */
- public void resolve(Snapshot snapshot) {
- StackTrace trace = snapshot.getSiteTrace(this);
- if (trace != null) {
- trace.resolve(snapshot);
- }
- }
-
- //
- // Eliminate duplicates from referers, and size the array exactly.
- // This sets us up to answer queries. See the comments around the
- // referers data member for details.
- //
- void setupReferers() {
- if (referersLen > 1) {
- // Copy referers to map, screening out duplicates
- Map<JavaThing, JavaThing> map = new HashMap<JavaThing, JavaThing>();
- for (int i = 0; i < referersLen; i++) {
- if (map.get(referers[i]) == null) {
- map.put(referers[i], referers[i]);
- }
- }
-
- // Now copy into the array
- referers = new JavaThing[map.size()];
- map.keySet().toArray(referers);
- }
- referersLen = -1;
- }
-
-
- /**
- * @return the id of this thing as hex string
- */
- public String getIdString() {
- return Misc.toHex(getId());
- }
-
- public String toString() {
- return getClazz().getName() + "@" + getIdString();
- }
-
- /**
- * @return the StackTrace of the point of allocation of this object,
- * or null if unknown
- */
- public StackTrace getAllocatedFrom() {
- return getClazz().getSiteTrace(this);
- }
-
- public boolean isNew() {
- return getClazz().isNew(this);
- }
-
- void setNew(boolean flag) {
- getClazz().setNew(this, flag);
- }
-
- /**
- * Tell the visitor about all of the objects we refer to
- */
- public void visitReferencedObjects(JavaHeapObjectVisitor v) {
- v.visit(getClazz());
- }
-
- void addReferenceFrom(JavaHeapObject other) {
- if (referersLen == 0) {
- referers = new JavaThing[1]; // It was null
- } else if (referersLen == referers.length) {
- JavaThing[] copy = new JavaThing[(3 * (referersLen + 1)) / 2];
- System.arraycopy(referers, 0, copy, 0, referersLen);
- referers = copy;
- }
- referers[referersLen++] = other;
- // We just append to referers here. Measurements have shown that
- // around 10% to 30% are duplicates, so it's better to just append
- // blindly and screen out all the duplicates at once.
- }
-
- void addReferenceFromRoot(Root r) {
- getClazz().addReferenceFromRoot(r, this);
- }
-
- /**
- * If the rootset includes this object, return a Root describing one
- * of the reasons why.
- */
- public Root getRoot() {
- return getClazz().getRoot(this);
- }
-
- /**
- * Tell who refers to us.
- *
- * @return an Enumeration of JavaHeapObject instances
- */
- public Enumeration<JavaThing> getReferers() {
- if (referersLen != -1) {
- throw new RuntimeException("not resolved: " + getIdString());
- }
- return new Enumeration<JavaThing>() {
-
- private int num = 0;
-
- public boolean hasMoreElements() {
- return referers != null && num < referers.length;
- }
-
- public JavaThing nextElement() {
- return referers[num++];
- }
- };
- }
-
- /**
- * Given other, which the caller promises is in referers, determines if
- * the reference is only a weak reference.
- */
- public boolean refersOnlyWeaklyTo(Snapshot ss, JavaThing other) {
- return false;
- }
-
- /**
- * Describe the reference that this thing has to target. This will only
- * be called if target is in the array returned by getChildrenForRootset.
- */
- public String describeReferenceTo(JavaThing target, Snapshot ss) {
- return "??";
- }
-
- public boolean isHeapAllocated() {
- return true;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaHeapObjectVisitor.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * A visitor for a JavaThing. @see JavaObject#visitReferencedObjects()
- *
- * @author Bill Foote
- */
-
-
-public interface JavaHeapObjectVisitor {
- public void visit(JavaHeapObject other);
-
- /**
- * Should the given field be excluded from the set of things visited?
- * @return true if it should.
- */
- public boolean exclude(JavaClass clazz, JavaField f);
-
- /**
- * @return true iff exclude might ever return true
- */
- public boolean mightExclude();
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaInt.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents an integer (i.e. an int field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaInt extends JavaValue {
-
- int value;
-
- public JavaInt(int value) {
- this.value = value;
- }
-
- public String toString() {
- return "" + value;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaLazyReadObject.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.io.IOException;
-import com.sun.tools.hat.internal.parser.ReadBuffer;
-
-/*
- * Base class for lazily read Java heap objects.
- */
-public abstract class JavaLazyReadObject extends JavaHeapObject {
-
- // file offset from which this object data starts
- private final long offset;
-
- protected JavaLazyReadObject(long offset) {
- this.offset = offset;
- }
-
- public final int getSize() {
- return getValueLength() + getClazz().getMinimumObjectSize();
- }
-
- protected final long getOffset() {
- return offset;
- }
-
- // return the length of the data for this object
- protected final int getValueLength() {
- try {
- return readValueLength();
- } catch (IOException exp) {
- System.err.println("lazy read failed at offset " + offset);
- exp.printStackTrace();
- return 0;
- }
- }
-
- // get this object's content as byte array
- protected final byte[] getValue() {
- try {
- return readValue();
- } catch (IOException exp) {
- System.err.println("lazy read failed at offset " + offset);
- exp.printStackTrace();
- return Snapshot.EMPTY_BYTE_ARRAY;
- }
- }
-
- // get ID of this object
- public final long getId() {
- try {
- ReadBuffer buf = getClazz().getReadBuffer();
- int idSize = getClazz().getIdentifierSize();
- if (idSize == 4) {
- return ((long)buf.getInt(offset)) & Snapshot.SMALL_ID_MASK;
- } else {
- return buf.getLong(offset);
- }
- } catch (IOException exp) {
- System.err.println("lazy read failed at offset " + offset);
- exp.printStackTrace();
- return -1;
- }
- }
-
- protected abstract int readValueLength() throws IOException;
- protected abstract byte[] readValue() throws IOException;
-
- // make Integer or Long for given object ID
- protected static Number makeId(long id) {
- if ((id & ~Snapshot.SMALL_ID_MASK) == 0) {
- return (int)id;
- } else {
- return id;
- }
- }
-
- // get ID as long value from Number
- protected static long getIdValue(Number num) {
- long id = num.longValue();
- if (num instanceof Integer) {
- id &= Snapshot.SMALL_ID_MASK;
- }
- return id;
- }
-
- // read object ID from given index from given byte array
- protected final long objectIdAt(int index, byte[] data) {
- int idSize = getClazz().getIdentifierSize();
- if (idSize == 4) {
- return ((long)intAt(index, data)) & Snapshot.SMALL_ID_MASK;
- } else {
- return longAt(index, data);
- }
- }
-
- // utility methods to read primitive types from byte array
- protected static byte byteAt(int index, byte[] value) {
- return value[index];
- }
-
- protected static boolean booleanAt(int index, byte[] value) {
- return (value[index] & 0xff) == 0? false: true;
- }
-
- protected static char charAt(int index, byte[] value) {
- int b1 = ((int) value[index++] & 0xff);
- int b2 = ((int) value[index++] & 0xff);
- return (char) ((b1 << 8) + b2);
- }
-
- protected static short shortAt(int index, byte[] value) {
- int b1 = ((int) value[index++] & 0xff);
- int b2 = ((int) value[index++] & 0xff);
- return (short) ((b1 << 8) + b2);
- }
-
- protected static int intAt(int index, byte[] value) {
- int b1 = ((int) value[index++] & 0xff);
- int b2 = ((int) value[index++] & 0xff);
- int b3 = ((int) value[index++] & 0xff);
- int b4 = ((int) value[index++] & 0xff);
- return ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4);
- }
-
- protected static long longAt(int index, byte[] value) {
- long val = 0;
- for (int j = 0; j < 8; j++) {
- val = val << 8;
- int b = ((int)value[index++]) & 0xff;
- val |= b;
- }
- return val;
- }
-
- protected static float floatAt(int index, byte[] value) {
- int val = intAt(index, value);
- return Float.intBitsToFloat(val);
- }
-
- protected static double doubleAt(int index, byte[] value) {
- long val = longAt(index, value);
- return Double.longBitsToDouble(val);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaLong.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a long (i.e. a long field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaLong extends JavaValue {
-
- long value;
-
- public JavaLong(long value) {
- this.value = value;
- }
-
- public String toString() {
- return Long.toString(value);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaObject.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.io.IOException;
-import com.sun.tools.hat.internal.parser.ReadBuffer;
-
-/**
- * Represents Java instance
- *
- * @author Bill Foote
- */
-public class JavaObject extends JavaLazyReadObject {
-
- private Object clazz; // Number before resolve
- // JavaClass after resolve
- /**
- * Construct a new JavaObject.
- *
- * @param classID id of the class object
- * @param offset The offset of field data
- */
- public JavaObject(long classID, long offset) {
- super(offset);
- this.clazz = makeId(classID);
- }
-
- public void resolve(Snapshot snapshot) {
- if (clazz instanceof JavaClass) {
- return;
- }
- if (clazz instanceof Number) {
- long classID = getIdValue((Number)clazz);
- clazz = snapshot.findThing(classID);
- if (! (clazz instanceof JavaClass)) {
- warn("Class " + Long.toHexString(classID) + " not found, " +
- "adding fake class!");
- int length;
- ReadBuffer buf = snapshot.getReadBuffer();
- int idSize = snapshot.getIdentifierSize();
- long lenOffset = getOffset() + 2*idSize + 4;
- try {
- length = buf.getInt(lenOffset);
- } catch (IOException exp) {
- throw new RuntimeException(exp);
- }
- clazz = snapshot.addFakeInstanceClass(classID, length);
- }
- } else {
- throw new InternalError("should not reach here");
- }
-
- JavaClass cl = (JavaClass) clazz;
- cl.resolve(snapshot);
-
- // while resolving, parse fields in verbose mode.
- // but, getFields calls parseFields in non-verbose mode
- // to avoid printing warnings repeatedly.
- parseFields(getValue(), true);
-
- cl.addInstance(this);
- super.resolve(snapshot);
- }
-
- /**
- * Are we the same type as other? We are iff our clazz is the
- * same type as other's.
- */
- public boolean isSameTypeAs(JavaThing other) {
- if (!(other instanceof JavaObject)) {
- return false;
- }
- JavaObject oo = (JavaObject) other;
- return getClazz().equals(oo.getClazz());
- }
-
- /**
- * Return our JavaClass object. This may only be called after resolve.
- */
- public JavaClass getClazz() {
- return (JavaClass) clazz;
- }
-
- public JavaThing[] getFields() {
- // pass false to verbose mode so that dereference
- // warnings are not printed.
- return parseFields(getValue(), false);
- }
-
- // returns the value of field of given name
- public JavaThing getField(String name) {
- JavaThing[] flds = getFields();
- JavaField[] instFields = getClazz().getFieldsForInstance();
- for (int i = 0; i < instFields.length; i++) {
- if (instFields[i].getName().equals(name)) {
- return flds[i];
- }
- }
- return null;
- }
-
- public int compareTo(JavaThing other) {
- if (other instanceof JavaObject) {
- JavaObject oo = (JavaObject) other;
- return getClazz().getName().compareTo(oo.getClazz().getName());
- }
- return super.compareTo(other);
- }
-
- public void visitReferencedObjects(JavaHeapObjectVisitor v) {
- super.visitReferencedObjects(v);
- JavaThing[] flds = getFields();
- for (int i = 0; i < flds.length; i++) {
- if (flds[i] != null) {
- if (v.mightExclude()
- && v.exclude(getClazz().getClassForField(i),
- getClazz().getFieldForInstance(i)))
- {
- // skip it
- } else if (flds[i] instanceof JavaHeapObject) {
- v.visit((JavaHeapObject) flds[i]);
- }
- }
- }
- }
-
- public boolean refersOnlyWeaklyTo(Snapshot ss, JavaThing other) {
- if (ss.getWeakReferenceClass() != null) {
- final int referentFieldIndex = ss.getReferentFieldIndex();
- if (ss.getWeakReferenceClass().isAssignableFrom(getClazz())) {
- //
- // REMIND: This introduces a dependency on the JDK
- // implementation that is undesirable.
- JavaThing[] flds = getFields();
- for (int i = 0; i < flds.length; i++) {
- if (i != referentFieldIndex && flds[i] == other) {
- return false;
- }
- }
- return true;
- }
- }
- return false;
- }
-
- /**
- * Describe the reference that this thing has to target. This will only
- * be called if target is in the array returned by getChildrenForRootset.
- */
- public String describeReferenceTo(JavaThing target, Snapshot ss) {
- JavaThing[] flds = getFields();
- for (int i = 0; i < flds.length; i++) {
- if (flds[i] == target) {
- JavaField f = getClazz().getFieldForInstance(i);
- return "field " + f.getName();
- }
- }
- return super.describeReferenceTo(target, ss);
- }
-
- public String toString() {
- if (getClazz().isString()) {
- JavaThing value = getField("value");
- if (value instanceof JavaValueArray) {
- return ((JavaValueArray)value).valueString();
- } else {
- return "null";
- }
- } else {
- return super.toString();
- }
- }
-
- // Internals only below this point
-
- /*
- * Java instance record (HPROF_GC_INSTANCE_DUMP) looks as below:
- *
- * object ID
- * stack trace serial number (int)
- * class ID
- * data length (int)
- * byte[length]
- */
- protected final int readValueLength() throws IOException {
- JavaClass cl = getClazz();
- int idSize = cl.getIdentifierSize();
- long lengthOffset = getOffset() + 2*idSize + 4;
- return cl.getReadBuffer().getInt(lengthOffset);
- }
-
- protected final byte[] readValue() throws IOException {
- JavaClass cl = getClazz();
- int idSize = cl.getIdentifierSize();
- ReadBuffer buf = cl.getReadBuffer();
- long offset = getOffset() + 2*idSize + 4;
- int length = buf.getInt(offset);
- if (length == 0) {
- return Snapshot.EMPTY_BYTE_ARRAY;
- } else {
- byte[] res = new byte[length];
- buf.get(offset + 4, res);
- return res;
- }
- }
-
- private JavaThing[] parseFields(byte[] data, boolean verbose) {
- JavaClass cl = getClazz();
- int target = cl.getNumFieldsForInstance();
- JavaField[] fields = cl.getFields();
- JavaThing[] fieldValues = new JavaThing[target];
- Snapshot snapshot = cl.getSnapshot();
- int idSize = snapshot.getIdentifierSize();
- int fieldNo = 0;
- // In the dump file, the fields are stored in this order:
- // fields of most derived class (immediate class) are stored
- // first and then the super class and so on. In this object,
- // fields are stored in the reverse ("natural") order. i.e.,
- // fields of most super class are stored first.
-
- // target variable is used to compensate for the fact that
- // the dump file starts field values from the leaf working
- // upwards in the inheritance hierarchy, whereas JavaObject
- // starts with the top of the inheritance hierarchy and works down.
- target -= fields.length;
- JavaClass currClass = cl;
- int index = 0;
- for (int i = 0; i < fieldValues.length; i++, fieldNo++) {
- while (fieldNo >= fields.length) {
- currClass = currClass.getSuperclass();
- fields = currClass.getFields();
- fieldNo = 0;
- target -= fields.length;
- }
- JavaField f = fields[fieldNo];
- char sig = f.getSignature().charAt(0);
- switch (sig) {
- case 'L':
- case '[': {
- long id = objectIdAt(index, data);
- index += idSize;
- JavaObjectRef ref = new JavaObjectRef(id);
- fieldValues[target+fieldNo] = ref.dereference(snapshot, f, verbose);
- break;
- }
- case 'Z': {
- byte value = byteAt(index, data);
- index++;
- fieldValues[target+fieldNo] = new JavaBoolean(value != 0);
- break;
- }
- case 'B': {
- byte value = byteAt(index, data);
- index++;
- fieldValues[target+fieldNo] = new JavaByte(value);
- break;
- }
- case 'S': {
- short value = shortAt(index, data);
- index += 2;
- fieldValues[target+fieldNo] = new JavaShort(value);
- break;
- }
- case 'C': {
- char value = charAt(index, data);
- index += 2;
- fieldValues[target+fieldNo] = new JavaChar(value);
- break;
- }
- case 'I': {
- int value = intAt(index, data);
- index += 4;
- fieldValues[target+fieldNo] = new JavaInt(value);
- break;
- }
- case 'J': {
- long value = longAt(index, data);
- index += 8;
- fieldValues[target+fieldNo] = new JavaLong(value);
- break;
- }
- case 'F': {
- float value = floatAt(index, data);
- index += 4;
- fieldValues[target+fieldNo] = new JavaFloat(value);
- break;
- }
- case 'D': {
- double value = doubleAt(index, data);
- index += 8;
- fieldValues[target+fieldNo] = new JavaDouble(value);
- break;
- }
- default:
- throw new RuntimeException("invalid signature: " + sig);
- }
- }
- return fieldValues;
- }
-
- private void warn(String msg) {
- System.out.println("WARNING: " + msg);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaObjectArray.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.io.IOException;
-import com.sun.tools.hat.internal.parser.ReadBuffer;
-
-/**
- * @author Bill Foote
- */
-public class JavaObjectArray extends JavaLazyReadObject {
-
- private Object clazz; // Long before resolve, the class after resolve
-
- public JavaObjectArray(long classID, long offset) {
- super(offset);
- this.clazz = makeId(classID);
- }
-
- public JavaClass getClazz() {
- return (JavaClass) clazz;
- }
-
- public void resolve(Snapshot snapshot) {
- if (clazz instanceof JavaClass) {
- return;
- }
- long classID = getIdValue((Number)clazz);
- if (snapshot.isNewStyleArrayClass()) {
- // Modern heap dumps do this
- JavaThing t = snapshot.findThing(classID);
- if (t instanceof JavaClass) {
- clazz = (JavaClass) t;
- }
- }
- if (!(clazz instanceof JavaClass)) {
- JavaThing t = snapshot.findThing(classID);
- if (t != null && t instanceof JavaClass) {
- JavaClass el = (JavaClass) t;
- String nm = el.getName();
- if (!nm.startsWith("[")) {
- nm = "L" + el.getName() + ";";
- }
- clazz = snapshot.getArrayClass(nm);
- }
- }
-
- if (!(clazz instanceof JavaClass)) {
- clazz = snapshot.getOtherArrayType();
- }
- ((JavaClass)clazz).addInstance(this);
- super.resolve(snapshot);
- }
-
- public JavaThing[] getValues() {
- return getElements();
- }
-
- public JavaThing[] getElements() {
- Snapshot snapshot = getClazz().getSnapshot();
- byte[] data = getValue();
- final int idSize = snapshot.getIdentifierSize();
- final int numElements = data.length / idSize;
- JavaThing[] elements = new JavaThing[numElements];
- int index = 0;
- for (int i = 0; i < elements.length; i++) {
- long id = objectIdAt(index, data);
- index += idSize;
- elements[i] = snapshot.findThing(id);
- }
- return elements;
- }
-
- public int compareTo(JavaThing other) {
- if (other instanceof JavaObjectArray) {
- return 0;
- }
- return super.compareTo(other);
- }
-
- public int getLength() {
- return getValueLength() / getClazz().getIdentifierSize();
- }
-
- public void visitReferencedObjects(JavaHeapObjectVisitor v) {
- super.visitReferencedObjects(v);
- JavaThing[] elements = getElements();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] != null && elements[i] instanceof JavaHeapObject) {
- v.visit((JavaHeapObject) elements[i]);
- }
- }
- }
-
- /**
- * Describe the reference that this thing has to target. This will only
- * be called if target is in the array returned by getChildrenForRootset.
- */
- public String describeReferenceTo(JavaThing target, Snapshot ss) {
- JavaThing[] elements = getElements();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] == target) {
- return "Element " + i + " of " + this;
- }
- }
- return super.describeReferenceTo(target, ss);
- }
-
- /*
- * Java object array record (HPROF_GC_OBJ_ARRAY_DUMP)
- * looks as below:
- *
- * object ID
- * stack trace serial number (int)
- * array length (int)
- * array class ID
- * array element IDs
- */
- protected final int readValueLength() throws IOException {
- JavaClass cl = getClazz();
- ReadBuffer buf = cl.getReadBuffer();
- int idSize = cl.getIdentifierSize();
- long offset = getOffset() + idSize + 4;
- int len = buf.getInt(offset);
- return len * cl.getIdentifierSize();
- }
-
- protected final byte[] readValue() throws IOException {
- JavaClass cl = getClazz();
- ReadBuffer buf = cl.getReadBuffer();
- int idSize = cl.getIdentifierSize();
- long offset = getOffset() + idSize + 4;
- int len = buf.getInt(offset);
- if (len == 0) {
- return Snapshot.EMPTY_BYTE_ARRAY;
- } else {
- byte[] res = new byte[len * idSize];
- buf.get(offset + 4 + idSize, res);
- return res;
- }
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaObjectRef.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import com.sun.tools.hat.internal.util.Misc;
-
-/**
- * A forward reference to an object. This is an intermediate representation
- * for a JavaThing, when we have the thing's ID, but we might not have read
- * the thing yet.
- *
- * @author Bill Foote
- */
-public class JavaObjectRef extends JavaThing {
- private long id;
-
- public JavaObjectRef(long id) {
- this.id = id;
- }
-
- public long getId() {
- return id;
- }
-
- public boolean isHeapAllocated() {
- return true;
- }
-
- public JavaThing dereference(Snapshot snapshot, JavaField field) {
- return dereference(snapshot, field, true);
- }
-
- public JavaThing dereference(Snapshot snapshot, JavaField field, boolean verbose) {
- if (field != null && !field.hasId()) {
- // If this happens, we must be a field that represents an int.
- // (This only happens with .bod-style files)
- return new JavaLong(id);
- }
- if (id == 0) {
- return snapshot.getNullThing();
- }
- JavaThing result = snapshot.findThing(id);
- if (result == null) {
- if (!snapshot.getUnresolvedObjectsOK() && verbose) {
- String msg = "WARNING: Failed to resolve object id "
- + Misc.toHex(id);
- if (field != null) {
- msg += " for field " + field.getName()
- + " (signature " + field.getSignature() + ")";
- }
- System.out.println(msg);
- // Thread.dumpStack();
- }
- result = new HackJavaValue("Unresolved object "
- + Misc.toHex(id), 0);
- }
- return result;
- }
-
- public int getSize() {
- return 0;
- }
-
- public String toString() {
- return "Unresolved object " + Misc.toHex(id);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaShort.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a short (i.e. a short field in an instance).
- *
- * @author Bill Foote
- */
-
-
-public class JavaShort extends JavaValue {
-
- short value;
-
- public JavaShort(short value) {
- this.value = value;
- }
-
- public String toString() {
- return "" + value;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaStatic.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- *
- * @author Bill Foote
- */
-
-/**
- * Represents the value of a static field of a JavaClass
- */
-
-public class JavaStatic {
-
- private JavaField field;
- private JavaThing value;
-
- public JavaStatic(JavaField field, JavaThing value) {
- this.field = field;
- this.value = value;
- }
-
- public void resolve(JavaClass clazz, Snapshot snapshot) {
- long id = -1;
- if (value instanceof JavaObjectRef) {
- id = ((JavaObjectRef)value).getId();
- }
- value = value.dereference(snapshot, field);
- if (value.isHeapAllocated() &&
- clazz.getLoader() == snapshot.getNullThing()) {
- // static fields are only roots if they are in classes
- // loaded by the root classloader.
- JavaHeapObject ho = (JavaHeapObject) value;
- String s = "Static reference from " + clazz.getName()
- + "." + field.getName();
- snapshot.addRoot(new Root(id, clazz.getId(),
- Root.JAVA_STATIC, s));
- }
- }
-
- public JavaField getField() {
- return field;
- }
-
- public JavaThing getValue() {
- return value;
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaThing.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-
-/**
- *
- * @author Bill Foote
- */
-
-
-/**
- * Represents a java "Thing". A thing is anything that can be the value of
- * a field. This includes JavaHeapObject, JavaObjectRef, and JavaValue.
- */
-
-public abstract class JavaThing {
-
- protected JavaThing() {
- }
-
- /**
- * If this is a forward reference, figure out what it really
- * refers to.
- *
- * @param snapshot The snapshot this is for
- * @param field The field this thing represents. If null, it is
- * assumed this thing is an object (and never a value).
- */
- public JavaThing dereference(Snapshot shapshot, JavaField field) {
- return this;
- }
-
-
- /**
- * Are we the same type as other?
- *
- * @see JavaObject.isSameTypeAs()
- */
- public boolean isSameTypeAs(JavaThing other) {
- return getClass() == other.getClass();
- }
- /**
- * @return true iff this represents a heap-allocated object
- */
- abstract public boolean isHeapAllocated();
-
- /**
- * @return the size of this object, in bytes, including VM overhead
- */
- abstract public int getSize();
-
- /**
- * @return a human-readable string representation of this thing
- */
- abstract public String toString();
-
- /**
- * Compare our string representation to other's
- * @see java.lang.String.compareTo()
- */
- public int compareTo(JavaThing other) {
- return toString().compareTo(other.toString());
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaValue.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Abstract base class for all value types (ints, longs, floats, etc.)
- *
- * @author Bill Foote
- */
-
-
-
-
-public abstract class JavaValue extends JavaThing {
-
- protected JavaValue() {
- }
-
- public boolean isHeapAllocated() {
- return false;
- }
-
- abstract public String toString();
-
- public int getSize() {
- // The size of a value is already accounted for in the class
- // that has the data member.
- return 0;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaValueArray.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import com.sun.tools.hat.internal.parser.ReadBuffer;
-import java.io.IOException;
-
-/**
- * An array of values, that is, an array of ints, boolean, floats or the like.
- *
- * @author Bill Foote
- */
-public class JavaValueArray extends JavaLazyReadObject
- /*imports*/ implements ArrayTypeCodes {
-
- private static String arrayTypeName(byte sig) {
- switch (sig) {
- case 'B':
- return "byte[]";
- case 'Z':
- return "boolean[]";
- case 'C':
- return "char[]";
- case 'S':
- return "short[]";
- case 'I':
- return "int[]";
- case 'F':
- return "float[]";
- case 'J':
- return "long[]";
- case 'D':
- return "double[]";
- default:
- throw new RuntimeException("invalid array element sig: " + sig);
- }
- }
-
- private static int elementSize(byte type) {
- switch (type) {
- case T_BYTE:
- case T_BOOLEAN:
- return 1;
- case T_CHAR:
- case T_SHORT:
- return 2;
- case T_INT:
- case T_FLOAT:
- return 4;
- case T_LONG:
- case T_DOUBLE:
- return 8;
- default:
- throw new RuntimeException("invalid array element type: " + type);
- }
- }
-
- /*
- * Java primitive array record (HPROF_GC_PRIM_ARRAY_DUMP) looks
- * as below:
- *
- * object ID
- * stack trace serial number (int)
- * length of the instance data (int)
- * element type (byte)
- * array data
- */
- protected final int readValueLength() throws IOException {
- JavaClass cl = getClazz();
- ReadBuffer buf = cl.getReadBuffer();
- int idSize = cl.getIdentifierSize();
- long offset = getOffset() + idSize + 4;
- // length of the array
- int len = buf.getInt(offset);
- // typecode of array element type
- byte type = buf.getByte(offset + 4);
- return len * elementSize(type);
- }
-
- protected final byte[] readValue() throws IOException {
- JavaClass cl = getClazz();
- ReadBuffer buf = cl.getReadBuffer();
- int idSize = cl.getIdentifierSize();
- long offset = getOffset() + idSize + 4;
- // length of the array
- int length = buf.getInt(offset);
- // typecode of array element type
- byte type = buf.getByte(offset + 4);
- if (length == 0) {
- return Snapshot.EMPTY_BYTE_ARRAY;
- } else {
- length *= elementSize(type);
- byte[] res = new byte[length];
- buf.get(offset + 5, res);
- return res;
- }
- }
-
- // JavaClass set only after resolve.
- private JavaClass clazz;
-
- // This field contains elementSignature byte and
- // divider to be used to calculate length. Note that
- // length of content byte[] is not same as array length.
- // Actual array length is (byte[].length / divider)
- private int data;
-
- // First 8 bits of data is used for element signature
- private static final int SIGNATURE_MASK = 0x0FF;
-
- // Next 8 bits of data is used for length divider
- private static final int LENGTH_DIVIDER_MASK = 0x0FF00;
-
- // Number of bits to shift to get length divider
- private static final int LENGTH_DIVIDER_SHIFT = 8;
-
- public JavaValueArray(byte elementSignature, long offset) {
- super(offset);
- this.data = (elementSignature & SIGNATURE_MASK);
- }
-
- public JavaClass getClazz() {
- return clazz;
- }
-
- public void visitReferencedObjects(JavaHeapObjectVisitor v) {
- super.visitReferencedObjects(v);
- }
-
- public void resolve(Snapshot snapshot) {
- if (clazz instanceof JavaClass) {
- return;
- }
- byte elementSig = getElementType();
- clazz = snapshot.findClass(arrayTypeName(elementSig));
- if (clazz == null) {
- clazz = snapshot.getArrayClass("" + ((char) elementSig));
- }
- getClazz().addInstance(this);
- super.resolve(snapshot);
- }
-
- public int getLength() {
- int divider = (data & LENGTH_DIVIDER_MASK) >>> LENGTH_DIVIDER_SHIFT;
- if (divider == 0) {
- byte elementSignature = getElementType();
- switch (elementSignature) {
- case 'B':
- case 'Z':
- divider = 1;
- break;
- case 'C':
- case 'S':
- divider = 2;
- break;
- case 'I':
- case 'F':
- divider = 4;
- break;
- case 'J':
- case 'D':
- divider = 8;
- break;
- default:
- throw new RuntimeException("unknown primitive type: " +
- elementSignature);
- }
- data |= (divider << LENGTH_DIVIDER_SHIFT);
- }
- return (getValueLength() / divider);
- }
-
- public Object getElements() {
- final int len = getLength();
- final byte et = getElementType();
- byte[] data = getValue();
- int index = 0;
- switch (et) {
- case 'Z': {
- boolean[] res = new boolean[len];
- for (int i = 0; i < len; i++) {
- res[i] = booleanAt(index, data);
- index++;
- }
- return res;
- }
- case 'B': {
- byte[] res = new byte[len];
- for (int i = 0; i < len; i++) {
- res[i] = byteAt(index, data);
- index++;
- }
- return res;
- }
- case 'C': {
- char[] res = new char[len];
- for (int i = 0; i < len; i++) {
- res[i] = charAt(index, data);
- index += 2;
- }
- return res;
- }
- case 'S': {
- short[] res = new short[len];
- for (int i = 0; i < len; i++) {
- res[i] = shortAt(index, data);
- index += 2;
- }
- return res;
- }
- case 'I': {
- int[] res = new int[len];
- for (int i = 0; i < len; i++) {
- res[i] = intAt(index, data);
- index += 4;
- }
- return res;
- }
- case 'J': {
- long[] res = new long[len];
- for (int i = 0; i < len; i++) {
- res[i] = longAt(index, data);
- index += 8;
- }
- return res;
- }
- case 'F': {
- float[] res = new float[len];
- for (int i = 0; i < len; i++) {
- res[i] = floatAt(index, data);
- index += 4;
- }
- return res;
- }
- case 'D': {
- double[] res = new double[len];
- for (int i = 0; i < len; i++) {
- res[i] = doubleAt(index, data);
- index += 8;
- }
- return res;
- }
- default: {
- throw new RuntimeException("unknown primitive type?");
- }
- }
- }
-
- public byte getElementType() {
- return (byte) (data & SIGNATURE_MASK);
- }
-
- private void checkIndex(int index) {
- if (index < 0 || index >= getLength()) {
- throw new ArrayIndexOutOfBoundsException(index);
- }
- }
-
- private void requireType(char type) {
- if (getElementType() != type) {
- throw new RuntimeException("not of type : " + type);
- }
- }
-
- public boolean getBooleanAt(int index) {
- checkIndex(index);
- requireType('Z');
- return booleanAt(index, getValue());
- }
-
- public byte getByteAt(int index) {
- checkIndex(index);
- requireType('B');
- return byteAt(index, getValue());
- }
-
- public char getCharAt(int index) {
- checkIndex(index);
- requireType('C');
- return charAt(index << 1, getValue());
- }
-
- public short getShortAt(int index) {
- checkIndex(index);
- requireType('S');
- return shortAt(index << 1, getValue());
- }
-
- public int getIntAt(int index) {
- checkIndex(index);
- requireType('I');
- return intAt(index << 2, getValue());
- }
-
- public long getLongAt(int index) {
- checkIndex(index);
- requireType('J');
- return longAt(index << 3, getValue());
- }
-
- public float getFloatAt(int index) {
- checkIndex(index);
- requireType('F');
- return floatAt(index << 2, getValue());
- }
-
- public double getDoubleAt(int index) {
- checkIndex(index);
- requireType('D');
- return doubleAt(index << 3, getValue());
- }
-
- public String valueString() {
- return valueString(true);
- }
-
- public String valueString(boolean bigLimit) {
- // Char arrays deserve special treatment
- StringBuilder result;
- byte[] value = getValue();
- int max = value.length;
- byte elementSignature = getElementType();
- if (elementSignature == 'C') {
- result = new StringBuilder();
- for (int i = 0; i < value.length; ) {
- char val = charAt(i, value);
- result.append(val);
- i += 2;
- }
- } else {
- int limit = 8;
- if (bigLimit) {
- limit = 1000;
- }
- result = new StringBuilder("{");
- int num = 0;
- for (int i = 0; i < value.length; ) {
- if (num > 0) {
- result.append(", ");
- }
- if (num >= limit) {
- result.append("... ");
- break;
- }
- num++;
- switch (elementSignature) {
- case 'Z': {
- boolean val = booleanAt(i, value);
- if (val) {
- result.append("true");
- } else {
- result.append("false");
- }
- i++;
- break;
- }
- case 'B': {
- int val = 0xFF & byteAt(i, value);
- result.append("0x").append(Integer.toString(val, 16));
- i++;
- break;
- }
- case 'S': {
- short val = shortAt(i, value);
- i += 2;
- result.append(val);
- break;
- }
- case 'I': {
- int val = intAt(i, value);
- i += 4;
- result.append(val);
- break;
- }
- case 'J': { // long
- long val = longAt(i, value);
- result.append(val);
- i += 8;
- break;
- }
- case 'F': {
- float val = floatAt(i, value);
- result.append(val);
- i += 4;
- break;
- }
- case 'D': { // double
- double val = doubleAt(i, value);
- result.append(val);
- i += 8;
- break;
- }
- default: {
- throw new RuntimeException("unknown primitive type?");
- }
- }
- }
- result.append('}');
- }
- return result.toString();
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/ReachableExcludes.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-
-/**
- * This represents a set of data members that should be excluded from the
- * reachable objects query. This is useful to exclude observers from the
- * transitive closure of objects reachable from a given object, allowing
- * some kind of real determination of the "size" of that object.
- *
- */
-
-public interface ReachableExcludes {
- /**
- * @return true iff the given field is on the hitlist of excluded
- * fields.
- */
- public boolean isExcluded(String fieldName);
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.BufferedReader;
-import java.io.IOException;
-
-import java.util.Hashtable;
-
-/**
- * This represents a set of data members that should be excluded from the
- * reachable objects query.
- * This is useful to exclude observers from the
- * transitive closure of objects reachable from a given object, allowing
- * some kind of real determination of the "size" of that object.
- *
- * @author Bill Foote
- */
-public class ReachableExcludesImpl implements ReachableExcludes {
-
- private File excludesFile;
- private long lastModified;
- private Hashtable<String, String> methods; // Used as a bag
-
- /**
- * Create a new ReachableExcludesImpl over the given file. The file will be
- * re-read whenever the timestamp changes.
- */
- public ReachableExcludesImpl(File excludesFile) {
- this.excludesFile = excludesFile;
- readFile();
- }
-
- private void readFileIfNeeded() {
- if (excludesFile.lastModified() != lastModified) {
- synchronized(this) {
- if (excludesFile.lastModified() != lastModified) {
- readFile();
- }
- }
- }
- }
-
- private void readFile() {
- long lm = excludesFile.lastModified();
- Hashtable<String, String> m = new Hashtable<String, String>();
-
- try {
- BufferedReader r = new BufferedReader(new InputStreamReader(
- new FileInputStream(excludesFile)));
-
- String method;
- while ((method = r.readLine()) != null) {
- m.put(method, method);
- }
- lastModified = lm;
- methods = m; // We want this to be atomic
- } catch (IOException ex) {
- System.out.println("Error reading " + excludesFile + ": " + ex);
- }
- }
-
- /**
- * @return true iff the given field is on the histlist of excluded
- * fields.
- */
- public boolean isExcluded(String fieldName) {
- readFileIfNeeded();
- return methods.get(fieldName) != null;
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
-
-/**
- * @author A. Sundararajan
- */
-
-public class ReachableObjects {
- public ReachableObjects(JavaHeapObject root,
- final ReachableExcludes excludes) {
- this.root = root;
-
- final Hashtable<JavaHeapObject, JavaHeapObject> bag = new Hashtable<JavaHeapObject, JavaHeapObject>();
- final Hashtable<String, String> fieldsExcluded = new Hashtable<String, String>(); //Bag<String>
- final Hashtable<String, String> fieldsUsed = new Hashtable<String, String>(); // Bag<String>
- JavaHeapObjectVisitor visitor = new AbstractJavaHeapObjectVisitor() {
- public void visit(JavaHeapObject t) {
- // Size is zero for things like integer fields
- if (t != null && t.getSize() > 0 && bag.get(t) == null) {
- bag.put(t, t);
- t.visitReferencedObjects(this);
- }
- }
-
- public boolean mightExclude() {
- return excludes != null;
- }
-
- public boolean exclude(JavaClass clazz, JavaField f) {
- if (excludes == null) {
- return false;
- }
- String nm = clazz.getName() + "." + f.getName();
- if (excludes.isExcluded(nm)) {
- fieldsExcluded.put(nm, nm);
- return true;
- } else {
- fieldsUsed.put(nm, nm);
- return false;
- }
- }
- };
- // Put the closure of root and all objects reachable from root into
- // bag (depth first), but don't include root:
- visitor.visit(root);
- bag.remove(root);
-
- // Now grab the elements into a vector, and sort it in decreasing size
- JavaThing[] things = new JavaThing[bag.size()];
- int i = 0;
- for (Enumeration<JavaHeapObject> e = bag.elements(); e.hasMoreElements(); ) {
- things[i++] = (JavaThing) e.nextElement();
- }
- ArraySorter.sort(things, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- JavaThing left = (JavaThing) lhs;
- JavaThing right = (JavaThing) rhs;
- int diff = right.getSize() - left.getSize();
- if (diff != 0) {
- return diff;
- }
- return left.compareTo(right);
- }
- });
- this.reachables = things;
-
- this.totalSize = root.getSize();
- for (i = 0; i < things.length; i++) {
- this.totalSize += things[i].getSize();
- }
-
- excludedFields = getElements(fieldsExcluded);
- usedFields = getElements(fieldsUsed);
- }
-
- public JavaHeapObject getRoot() {
- return root;
- }
-
- public JavaThing[] getReachables() {
- return reachables;
- }
-
- public long getTotalSize() {
- return totalSize;
- }
-
- public String[] getExcludedFields() {
- return excludedFields;
- }
-
- public String[] getUsedFields() {
- return usedFields;
- }
-
- private String[] getElements(Hashtable<?, ?> ht) {
- Object[] keys = ht.keySet().toArray();
- int len = keys.length;
- String[] res = new String[len];
- System.arraycopy(keys, 0, res, 0, len);
- ArraySorter.sortArrayOfStrings(res);
- return res;
- }
-
- private JavaHeapObject root;
- private JavaThing[] reachables;
- private String[] excludedFields;
- private String[] usedFields;
- private long totalSize;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/ReferenceChain.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- * Represents a chain of references to some target object
- *
- * @author Bill Foote
- */
-
-public class ReferenceChain {
-
- JavaHeapObject obj; // Object referred to
- ReferenceChain next; // Next in chain
-
- public ReferenceChain(JavaHeapObject obj, ReferenceChain next) {
- this.obj = obj;
- this.next = next;
- }
-
- public JavaHeapObject getObj() {
- return obj;
- }
-
- public ReferenceChain getNext() {
- return next;
- }
-
- public int getDepth() {
- int count = 1;
- ReferenceChain tmp = next;
- while (tmp != null) {
- count++;
- tmp = tmp.next;
- }
- return count;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/Root.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import com.sun.tools.hat.internal.util.Misc;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-/**
- * Represents a member of the rootset, that is, one of the objects that
- * the GC starts from when marking reachable objects.
- */
-
-public class Root {
-
- private long id; // ID of the JavaThing we refer to
- private long refererId; // Thread or Class responsible for this, or 0
- private int index = -1; // Index in Snapshot.roots
- private int type;
- private String description;
- private JavaHeapObject referer = null;
- private StackTrace stackTrace = null;
-
- // Values for type. Higher values are more interesting -- see getType().
- // See also getTypeName()
- public final static int INVALID_TYPE = 0;
- public final static int UNKNOWN = 1;
- public final static int SYSTEM_CLASS = 2;
-
- public final static int NATIVE_LOCAL = 3;
- public final static int NATIVE_STATIC = 4;
- public final static int THREAD_BLOCK = 5;
- public final static int BUSY_MONITOR = 6;
- public final static int JAVA_LOCAL = 7;
- public final static int NATIVE_STACK = 8;
- public final static int JAVA_STATIC = 9;
-
-
- public Root(long id, long refererId, int type, String description) {
- this(id, refererId, type, description, null);
- }
-
-
- public Root(long id, long refererId, int type, String description,
- StackTrace stackTrace) {
- this.id = id;
- this.refererId = refererId;
- this.type = type;
- this.description = description;
- this.stackTrace = stackTrace;
- }
-
- public long getId() {
- return id;
- }
-
- public String getIdString() {
- return Misc.toHex(id);
- }
-
- public String getDescription() {
- if ("".equals(description)) {
- return getTypeName() + " Reference";
- } else {
- return description;
- }
- }
-
- /**
- * Return type. We guarantee that more interesting roots will have
- * a type that is numerically higher.
- */
- public int getType() {
- return type;
- }
-
- public String getTypeName() {
- switch(type) {
- case INVALID_TYPE: return "Invalid (?!?)";
- case UNKNOWN: return "Unknown";
- case SYSTEM_CLASS: return "System Class";
- case NATIVE_LOCAL: return "JNI Local";
- case NATIVE_STATIC: return "JNI Global";
- case THREAD_BLOCK: return "Thread Block";
- case BUSY_MONITOR: return "Busy Monitor";
- case JAVA_LOCAL: return "Java Local";
- case NATIVE_STACK: return "Native Stack (possibly Java local)";
- case JAVA_STATIC: return "Java Static";
- default: return "??";
- }
- }
-
- /**
- * Given two Root instances, return the one that is most interesting.
- */
- public Root mostInteresting(Root other) {
- if (other.type > this.type) {
- return other;
- } else {
- return this;
- }
- }
-
- /**
- * Get the object that's responsible for this root, if there is one.
- * This will be null, a Thread object, or a Class object.
- */
- public JavaHeapObject getReferer() {
- return referer;
- }
-
- /**
- * @return the stack trace responsible for this root, or null if there
- * is none.
- */
- public StackTrace getStackTrace() {
- return stackTrace;
- }
-
- /**
- * @return The index of this root in Snapshot.roots
- */
- public int getIndex() {
- return index;
- }
-
- void resolve(Snapshot ss) {
- if (refererId != 0) {
- referer = ss.findThing(refererId);
- }
- if (stackTrace != null) {
- stackTrace.resolve(ss);
- }
- }
-
- void setIndex(int i) {
- index = i;
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/Snapshot.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,630 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-import java.lang.ref.SoftReference;
-import java.util.*;
-import com.sun.tools.hat.internal.parser.ReadBuffer;
-import com.sun.tools.hat.internal.util.Misc;
-
-/**
- *
- * @author Bill Foote
- */
-
-/**
- * Represents a snapshot of the Java objects in the VM at one instant.
- * This is the top-level "model" object read out of a single .hprof or .bod
- * file.
- */
-
-public class Snapshot {
-
- public static long SMALL_ID_MASK = 0x0FFFFFFFFL;
- public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
-
- private static final JavaField[] EMPTY_FIELD_ARRAY = new JavaField[0];
- private static final JavaStatic[] EMPTY_STATIC_ARRAY = new JavaStatic[0];
-
- // all heap objects
- private Hashtable<Number, JavaHeapObject> heapObjects =
- new Hashtable<Number, JavaHeapObject>();
-
- private Hashtable<Number, JavaClass> fakeClasses =
- new Hashtable<Number, JavaClass>();
-
- // all Roots in this Snapshot
- private Vector<Root> roots = new Vector<Root>();
-
- // name-to-class map
- private Map<String, JavaClass> classes =
- new TreeMap<String, JavaClass>();
-
- // new objects relative to a baseline - lazily initialized
- private volatile Map<JavaHeapObject, Boolean> newObjects;
-
- // allocation site traces for all objects - lazily initialized
- private volatile Map<JavaHeapObject, StackTrace> siteTraces;
-
- // object-to-Root map for all objects
- private Map<JavaHeapObject, Root> rootsMap =
- new HashMap<JavaHeapObject, Root>();
-
- // soft cache of finalizeable objects - lazily initialized
- private SoftReference<Vector<?>> finalizablesCache;
-
- // represents null reference
- private JavaThing nullThing;
-
- // java.lang.ref.Reference class
- private JavaClass weakReferenceClass;
- // index of 'referent' field in java.lang.ref.Reference class
- private int referentFieldIndex;
-
- // java.lang.Class class
- private JavaClass javaLangClass;
- // java.lang.String class
- private JavaClass javaLangString;
- // java.lang.ClassLoader class
- private JavaClass javaLangClassLoader;
-
- // unknown "other" array class
- private volatile JavaClass otherArrayType;
- // Stuff to exclude from reachable query
- private ReachableExcludes reachableExcludes;
- // the underlying heap dump buffer
- private ReadBuffer readBuf;
-
- // True iff some heap objects have isNew set
- private boolean hasNewSet;
- private boolean unresolvedObjectsOK;
-
- // whether object array instances have new style class or
- // old style (element) class.
- private boolean newStyleArrayClass;
-
- // object id size in the heap dump
- private int identifierSize = 4;
-
- // minimum object size - accounts for object header in
- // most Java virtual machines - we assume 2 identifierSize
- // (which is true for Sun's hotspot JVM).
- private int minimumObjectSize;
-
- public Snapshot(ReadBuffer buf) {
- nullThing = new HackJavaValue("<null>", 0);
- readBuf = buf;
- }
-
- public void setSiteTrace(JavaHeapObject obj, StackTrace trace) {
- if (trace != null && trace.getFrames().length != 0) {
- initSiteTraces();
- siteTraces.put(obj, trace);
- }
- }
-
- public StackTrace getSiteTrace(JavaHeapObject obj) {
- if (siteTraces != null) {
- return siteTraces.get(obj);
- } else {
- return null;
- }
- }
-
- public void setNewStyleArrayClass(boolean value) {
- newStyleArrayClass = value;
- }
-
- public boolean isNewStyleArrayClass() {
- return newStyleArrayClass;
- }
-
- public void setIdentifierSize(int size) {
- identifierSize = size;
- minimumObjectSize = 2 * size;
- }
-
- public int getIdentifierSize() {
- return identifierSize;
- }
-
- public int getMinimumObjectSize() {
- return minimumObjectSize;
- }
-
- public void addHeapObject(long id, JavaHeapObject ho) {
- heapObjects.put(makeId(id), ho);
- }
-
- public void addRoot(Root r) {
- r.setIndex(roots.size());
- roots.addElement(r);
- }
-
- public void addClass(long id, JavaClass c) {
- addHeapObject(id, c);
- putInClassesMap(c);
- }
-
- JavaClass addFakeInstanceClass(long classID, int instSize) {
- // Create a fake class name based on ID.
- String name = "unknown-class<@" + Misc.toHex(classID) + ">";
-
- // Create fake fields convering the given instance size.
- // Create as many as int type fields and for the left over
- // size create byte type fields.
- int numInts = instSize / 4;
- int numBytes = instSize % 4;
- JavaField[] fields = new JavaField[numInts + numBytes];
- int i;
- for (i = 0; i < numInts; i++) {
- fields[i] = new JavaField("unknown-field-" + i, "I");
- }
- for (i = 0; i < numBytes; i++) {
- fields[i + numInts] = new JavaField("unknown-field-" +
- i + numInts, "B");
- }
-
- // Create fake instance class
- JavaClass c = new JavaClass(name, 0, 0, 0, 0, fields,
- EMPTY_STATIC_ARRAY, instSize);
- // Add the class
- addFakeClass(makeId(classID), c);
- return c;
- }
-
-
- /**
- * @return true iff it's possible that some JavaThing instances might
- * isNew set
- *
- * @see JavaThing.isNew()
- */
- public boolean getHasNewSet() {
- return hasNewSet;
- }
-
- //
- // Used in the body of resolve()
- //
- private static class MyVisitor extends AbstractJavaHeapObjectVisitor {
- JavaHeapObject t;
- public void visit(JavaHeapObject other) {
- other.addReferenceFrom(t);
- }
- }
-
- // To show heap parsing progress, we print a '.' after this limit
- private static final int DOT_LIMIT = 5000;
-
- /**
- * Called after reading complete, to initialize the structure
- */
- public void resolve(boolean calculateRefs) {
- System.out.println("Resolving " + heapObjects.size() + " objects...");
-
- // First, resolve the classes. All classes must be resolved before
- // we try any objects, because the objects use classes in their
- // resolution.
- javaLangClass = findClass("java.lang.Class");
- if (javaLangClass == null) {
- System.out.println("WARNING: hprof file does not include java.lang.Class!");
- javaLangClass = new JavaClass("java.lang.Class", 0, 0, 0, 0,
- EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
- addFakeClass(javaLangClass);
- }
- javaLangString = findClass("java.lang.String");
- if (javaLangString == null) {
- System.out.println("WARNING: hprof file does not include java.lang.String!");
- javaLangString = new JavaClass("java.lang.String", 0, 0, 0, 0,
- EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
- addFakeClass(javaLangString);
- }
- javaLangClassLoader = findClass("java.lang.ClassLoader");
- if (javaLangClassLoader == null) {
- System.out.println("WARNING: hprof file does not include java.lang.ClassLoader!");
- javaLangClassLoader = new JavaClass("java.lang.ClassLoader", 0, 0, 0, 0,
- EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
- addFakeClass(javaLangClassLoader);
- }
-
- for (JavaHeapObject t : heapObjects.values()) {
- if (t instanceof JavaClass) {
- t.resolve(this);
- }
- }
-
- // Now, resolve everything else.
- for (JavaHeapObject t : heapObjects.values()) {
- if (!(t instanceof JavaClass)) {
- t.resolve(this);
- }
- }
-
- heapObjects.putAll(fakeClasses);
- fakeClasses.clear();
-
- weakReferenceClass = findClass("java.lang.ref.Reference");
- if (weakReferenceClass == null) { // JDK 1.1.x
- weakReferenceClass = findClass("sun.misc.Ref");
- referentFieldIndex = 0;
- } else {
- JavaField[] fields = weakReferenceClass.getFieldsForInstance();
- for (int i = 0; i < fields.length; i++) {
- if ("referent".equals(fields[i].getName())) {
- referentFieldIndex = i;
- break;
- }
- }
- }
-
- if (calculateRefs) {
- calculateReferencesToObjects();
- System.out.print("Eliminating duplicate references");
- System.out.flush();
- // This println refers to the *next* step
- }
- int count = 0;
- for (JavaHeapObject t : heapObjects.values()) {
- t.setupReferers();
- ++count;
- if (calculateRefs && count % DOT_LIMIT == 0) {
- System.out.print(".");
- System.out.flush();
- }
- }
- if (calculateRefs) {
- System.out.println("");
- }
-
- // to ensure that Iterator.remove() on getClasses()
- // result will throw exception..
- classes = Collections.unmodifiableMap(classes);
- }
-
- private void calculateReferencesToObjects() {
- System.out.print("Chasing references, expect "
- + (heapObjects.size() / DOT_LIMIT) + " dots");
- System.out.flush();
- int count = 0;
- MyVisitor visitor = new MyVisitor();
- for (JavaHeapObject t : heapObjects.values()) {
- visitor.t = t;
- // call addReferenceFrom(t) on all objects t references:
- t.visitReferencedObjects(visitor);
- ++count;
- if (count % DOT_LIMIT == 0) {
- System.out.print(".");
- System.out.flush();
- }
- }
- System.out.println();
- for (Root r : roots) {
- r.resolve(this);
- JavaHeapObject t = findThing(r.getId());
- if (t != null) {
- t.addReferenceFromRoot(r);
- }
- }
- }
-
- public void markNewRelativeTo(Snapshot baseline) {
- hasNewSet = true;
- for (JavaHeapObject t : heapObjects.values()) {
- boolean isNew;
- long thingID = t.getId();
- if (thingID == 0L || thingID == -1L) {
- isNew = false;
- } else {
- JavaThing other = baseline.findThing(t.getId());
- if (other == null) {
- isNew = true;
- } else {
- isNew = !t.isSameTypeAs(other);
- }
- }
- t.setNew(isNew);
- }
- }
-
- public Enumeration<JavaHeapObject> getThings() {
- return heapObjects.elements();
- }
-
-
- public JavaHeapObject findThing(long id) {
- Number idObj = makeId(id);
- JavaHeapObject jho = heapObjects.get(idObj);
- return jho != null? jho : fakeClasses.get(idObj);
- }
-
- public JavaHeapObject findThing(String id) {
- return findThing(Misc.parseHex(id));
- }
-
- public JavaClass findClass(String name) {
- if (name.startsWith("0x")) {
- return (JavaClass) findThing(name);
- } else {
- return classes.get(name);
- }
- }
-
- /**
- * Return an Iterator of all of the classes in this snapshot.
- **/
- public Iterator<JavaClass> getClasses() {
- // note that because classes is a TreeMap
- // classes are already sorted by name
- return classes.values().iterator();
- }
-
- public JavaClass[] getClassesArray() {
- JavaClass[] res = new JavaClass[classes.size()];
- classes.values().toArray(res);
- return res;
- }
-
- public synchronized Enumeration<?> getFinalizerObjects() {
- Vector<?> obj;
- if (finalizablesCache != null &&
- (obj = finalizablesCache.get()) != null) {
- return obj.elements();
- }
-
- JavaClass clazz = findClass("java.lang.ref.Finalizer");
- JavaObject queue = (JavaObject) clazz.getStaticField("queue");
- JavaThing tmp = queue.getField("head");
- Vector<JavaHeapObject> finalizables = new Vector<JavaHeapObject>();
- if (tmp != getNullThing()) {
- JavaObject head = (JavaObject) tmp;
- while (true) {
- JavaHeapObject referent = (JavaHeapObject) head.getField("referent");
- JavaThing next = head.getField("next");
- if (next == getNullThing() || next.equals(head)) {
- break;
- }
- head = (JavaObject) next;
- finalizables.add(referent);
- }
- }
- finalizablesCache = new SoftReference<Vector<?>>(finalizables);
- return finalizables.elements();
- }
-
- public Enumeration<Root> getRoots() {
- return roots.elements();
- }
-
- public Root[] getRootsArray() {
- Root[] res = new Root[roots.size()];
- roots.toArray(res);
- return res;
- }
-
- public Root getRootAt(int i) {
- return roots.elementAt(i);
- }
-
- public ReferenceChain[]
- rootsetReferencesTo(JavaHeapObject target, boolean includeWeak) {
- Vector<ReferenceChain> fifo = new Vector<ReferenceChain>(); // This is slow... A real fifo would help
- // Must be a fifo to go breadth-first
- Hashtable<JavaHeapObject, JavaHeapObject> visited = new Hashtable<JavaHeapObject, JavaHeapObject>();
- // Objects are added here right after being added to fifo.
- Vector<ReferenceChain> result = new Vector<ReferenceChain>();
- visited.put(target, target);
- fifo.addElement(new ReferenceChain(target, null));
-
- while (fifo.size() > 0) {
- ReferenceChain chain = fifo.elementAt(0);
- fifo.removeElementAt(0);
- JavaHeapObject curr = chain.getObj();
- if (curr.getRoot() != null) {
- result.addElement(chain);
- // Even though curr is in the rootset, we want to explore its
- // referers, because they might be more interesting.
- }
- Enumeration<JavaThing> referers = curr.getReferers();
- while (referers.hasMoreElements()) {
- JavaHeapObject t = (JavaHeapObject) referers.nextElement();
- if (t != null && !visited.containsKey(t)) {
- if (includeWeak || !t.refersOnlyWeaklyTo(this, curr)) {
- visited.put(t, t);
- fifo.addElement(new ReferenceChain(t, chain));
- }
- }
- }
- }
-
- ReferenceChain[] realResult = new ReferenceChain[result.size()];
- for (int i = 0; i < result.size(); i++) {
- realResult[i] = result.elementAt(i);
- }
- return realResult;
- }
-
- public boolean getUnresolvedObjectsOK() {
- return unresolvedObjectsOK;
- }
-
- public void setUnresolvedObjectsOK(boolean v) {
- unresolvedObjectsOK = v;
- }
-
- public JavaClass getWeakReferenceClass() {
- return weakReferenceClass;
- }
-
- public int getReferentFieldIndex() {
- return referentFieldIndex;
- }
-
- public JavaThing getNullThing() {
- return nullThing;
- }
-
- public void setReachableExcludes(ReachableExcludes e) {
- reachableExcludes = e;
- }
-
- public ReachableExcludes getReachableExcludes() {
- return reachableExcludes;
- }
-
- // package privates
- void addReferenceFromRoot(Root r, JavaHeapObject obj) {
- Root root = rootsMap.get(obj);
- if (root == null) {
- rootsMap.put(obj, r);
- } else {
- rootsMap.put(obj, root.mostInteresting(r));
- }
- }
-
- Root getRoot(JavaHeapObject obj) {
- return rootsMap.get(obj);
- }
-
- JavaClass getJavaLangClass() {
- return javaLangClass;
- }
-
- JavaClass getJavaLangString() {
- return javaLangString;
- }
-
- JavaClass getJavaLangClassLoader() {
- return javaLangClassLoader;
- }
-
- JavaClass getOtherArrayType() {
- if (otherArrayType == null) {
- synchronized(this) {
- if (otherArrayType == null) {
- addFakeClass(new JavaClass("[<other>", 0, 0, 0, 0,
- EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY,
- 0));
- otherArrayType = findClass("[<other>");
- }
- }
- }
- return otherArrayType;
- }
-
- JavaClass getArrayClass(String elementSignature) {
- JavaClass clazz;
- synchronized(classes) {
- clazz = findClass("[" + elementSignature);
- if (clazz == null) {
- clazz = new JavaClass("[" + elementSignature, 0, 0, 0, 0,
- EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
- addFakeClass(clazz);
- // This is needed because the JDK only creates Class structures
- // for array element types, not the arrays themselves. For
- // analysis, though, we need to pretend that there's a
- // JavaClass for the array type, too.
- }
- }
- return clazz;
- }
-
- ReadBuffer getReadBuffer() {
- return readBuf;
- }
-
- void setNew(JavaHeapObject obj, boolean isNew) {
- initNewObjects();
- if (isNew) {
- newObjects.put(obj, Boolean.TRUE);
- }
- }
-
- boolean isNew(JavaHeapObject obj) {
- if (newObjects != null) {
- return newObjects.get(obj) != null;
- } else {
- return false;
- }
- }
-
- // Internals only below this point
- private Number makeId(long id) {
- if (identifierSize == 4) {
- return (int)id;
- } else {
- return id;
- }
- }
-
- private void putInClassesMap(JavaClass c) {
- String name = c.getName();
- if (classes.containsKey(name)) {
- // more than one class can have the same name
- // if so, create a unique name by appending
- // - and id string to it.
- name += "-" + c.getIdString();
- }
- classes.put(c.getName(), c);
- }
-
- private void addFakeClass(JavaClass c) {
- putInClassesMap(c);
- c.resolve(this);
- }
-
- private void addFakeClass(Number id, JavaClass c) {
- fakeClasses.put(id, c);
- addFakeClass(c);
- }
-
- private synchronized void initNewObjects() {
- if (newObjects == null) {
- synchronized (this) {
- if (newObjects == null) {
- newObjects = new HashMap<JavaHeapObject, Boolean>();
- }
- }
- }
- }
-
- private synchronized void initSiteTraces() {
- if (siteTraces == null) {
- synchronized (this) {
- if (siteTraces == null) {
- siteTraces = new HashMap<JavaHeapObject, StackTrace>();
- }
- }
- }
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/StackFrame.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-/**
- * Represents a stack frame.
- */
-
-public class StackFrame {
-
- //
- // Values for the lineNumber data member. These are the same
- // as the values used in the JDK 1.2 heap dump file.
- //
- public final static int LINE_NUMBER_UNKNOWN = -1;
- public final static int LINE_NUMBER_COMPILED = -2;
- public final static int LINE_NUMBER_NATIVE = -3;
-
- private String methodName;
- private String methodSignature;
- private String className;
- private String sourceFileName;
- private int lineNumber;
-
- public StackFrame(String methodName, String methodSignature,
- String className, String sourceFileName, int lineNumber) {
- this.methodName = methodName;
- this.methodSignature = methodSignature;
- this.className = className;
- this.sourceFileName = sourceFileName;
- this.lineNumber = lineNumber;
- }
-
- public void resolve(Snapshot snapshot) {
- }
-
- public String getMethodName() {
- return methodName;
- }
-
- public String getMethodSignature() {
- return methodSignature;
- }
-
- public String getClassName() {
- return className;
- }
-
- public String getSourceFileName() {
- return sourceFileName;
- }
-
- public String getLineNumber() {
- switch(lineNumber) {
- case LINE_NUMBER_UNKNOWN:
- return "(unknown)";
- case LINE_NUMBER_COMPILED:
- return "(compiled method)";
- case LINE_NUMBER_NATIVE:
- return "(native method)";
- default:
- return Integer.toString(lineNumber, 10);
- }
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/StackTrace.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.model;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-/**
- * Represents a stack trace, that is, an ordered collection of stack frames.
- */
-
-public class StackTrace {
-
- private StackFrame[] frames;
-
- public StackTrace(StackFrame[] frames) {
- this.frames = frames;
- }
-
- /**
- * @param depth. The minimum reasonable depth is 1.
- *
- * @return a (possibly new) StackTrace that is limited to depth.
- */
- public StackTrace traceForDepth(int depth) {
- if (depth >= frames.length) {
- return this;
- } else {
- StackFrame[] f = new StackFrame[depth];
- System.arraycopy(frames, 0, f, 0, depth);
- return new StackTrace(f);
- }
- }
-
- public void resolve(Snapshot snapshot) {
- for (int i = 0; i < frames.length; i++) {
- frames[i].resolve(snapshot);
- }
- }
-
- public StackFrame[] getFrames() {
- return frames;
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,311 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.oql;
-
-import com.sun.tools.hat.internal.model.*;
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-/**
- * This is Object Query Language Interpreter
- *
- */
-public class OQLEngine {
- static {
- try {
- // Do we have javax.script support?
- // create ScriptEngineManager
- Class<?> managerClass = Class.forName("javax.script.ScriptEngineManager");
- Object manager = managerClass.newInstance();
-
- // create JavaScript engine
- Method getEngineMethod = managerClass.getMethod("getEngineByName",
- new Class<?>[] { String.class });
- Object jse = getEngineMethod.invoke(manager, new Object[] {"js"});
- oqlSupported = (jse != null);
- } catch (Exception exp) {
- oqlSupported = false;
- }
- }
-
- // check OQL is supported or not before creating OQLEngine
- public static boolean isOQLSupported() {
- return oqlSupported;
- }
-
- public OQLEngine(Snapshot snapshot) {
- if (!isOQLSupported()) {
- throw new UnsupportedOperationException("OQL not supported");
- }
- init(snapshot);
- }
-
- /**
- Query is of the form
-
- select <java script code to select>
- [ from [instanceof] <class name> [<identifier>]
- [ where <java script boolean expression> ]
- ]
- */
- public synchronized void executeQuery(String query, ObjectVisitor visitor)
- throws OQLException {
- debugPrint("query : " + query);
- StringTokenizer st = new StringTokenizer(query);
- if (st.hasMoreTokens()) {
- String first = st.nextToken();
- if (! first.equals("select") ) {
- // Query does not start with 'select' keyword.
- // Just treat it as plain JavaScript and eval it.
- try {
- Object res = evalScript(query);
- visitor.visit(res);
- } catch (Exception e) {
- throw new OQLException(e);
- }
- return;
- }
- } else {
- throw new OQLException("query syntax error: no 'select' clause");
- }
-
- String selectExpr = "";
- boolean seenFrom = false;
- while (st.hasMoreTokens()) {
- String tok = st.nextToken();
- if (tok.equals("from")) {
- seenFrom = true;
- break;
- }
- selectExpr += " " + tok;
- }
-
- if (selectExpr.equals("")) {
- throw new OQLException("query syntax error: 'select' expression can not be empty");
- }
-
- String className = null;
- boolean isInstanceOf = false;
- String whereExpr = null;
- String identifier = null;
-
- if (seenFrom) {
- if (st.hasMoreTokens()) {
- String tmp = st.nextToken();
- if (tmp.equals("instanceof")) {
- isInstanceOf = true;
- if (! st.hasMoreTokens()) {
- throw new OQLException("no class name after 'instanceof'");
- }
- className = st.nextToken();
- } else {
- className = tmp;
- }
- } else {
- throw new OQLException("query syntax error: class name must follow 'from'");
- }
-
- if (st.hasMoreTokens()) {
- identifier = st.nextToken();
- if (identifier.equals("where")) {
- throw new OQLException("query syntax error: identifier should follow class name");
- }
- if (st.hasMoreTokens()) {
- String tmp = st.nextToken();
- if (! tmp.equals("where")) {
- throw new OQLException("query syntax error: 'where' clause expected after 'from' clause");
- }
-
- whereExpr = "";
- while (st.hasMoreTokens()) {
- whereExpr += " " + st.nextToken();
- }
- if (whereExpr.equals("")) {
- throw new OQLException("query syntax error: 'where' clause cannot have empty expression");
- }
- }
- } else {
- throw new OQLException("query syntax error: identifier should follow class name");
- }
- }
-
- executeQuery(new OQLQuery(selectExpr, isInstanceOf, className,
- identifier, whereExpr), visitor);
- }
-
- private void executeQuery(OQLQuery q, ObjectVisitor visitor)
- throws OQLException {
- JavaClass clazz = null;
- if (q.className != null) {
- clazz = snapshot.findClass(q.className);
- if (clazz == null) {
- throw new OQLException(q.className + " is not found!");
- }
- }
-
- StringBuffer buf = new StringBuffer();
- buf.append("function __select__(");
- if (q.identifier != null) {
- buf.append(q.identifier);
- }
- buf.append(") { return ");
- buf.append(q.selectExpr.replace('\n', ' '));
- buf.append("; }");
-
- String selectCode = buf.toString();
- debugPrint(selectCode);
- String whereCode = null;
- if (q.whereExpr != null) {
- buf = new StringBuffer();
- buf.append("function __where__(");
- buf.append(q.identifier);
- buf.append(") { return ");
- buf.append(q.whereExpr.replace('\n', ' '));
- buf.append("; }");
- whereCode = buf.toString();
- }
- debugPrint(whereCode);
-
- // compile select expression and where condition
- try {
- evalMethod.invoke(engine, new Object[] { selectCode });
- if (whereCode != null) {
- evalMethod.invoke(engine, new Object[] { whereCode });
- }
-
- if (q.className != null) {
- Enumeration<JavaHeapObject> objects = clazz.getInstances(q.isInstanceOf);
- while (objects.hasMoreElements()) {
- JavaHeapObject obj = objects.nextElement();
- Object[] args = new Object[] { wrapJavaObject(obj) };
- boolean b = (whereCode == null);
- if (!b) {
- Object res = call("__where__", args);
- if (res instanceof Boolean) {
- b = ((Boolean)res).booleanValue();
- } else if (res instanceof Number) {
- b = ((Number)res).intValue() != 0;
- } else {
- b = (res != null);
- }
- }
-
- if (b) {
- Object select = call("__select__", args);
- if (visitor.visit(select)) return;
- }
- }
- } else {
- // simple "select <expr>" query
- Object select = call("__select__", new Object[] {});
- visitor.visit(select);
- }
- } catch (Exception e) {
- throw new OQLException(e);
- }
- }
-
- public Object evalScript(String script) throws Exception {
- return evalMethod.invoke(engine, new Object[] { script });
- }
-
- public Object wrapJavaObject(JavaHeapObject obj) throws Exception {
- return call("wrapJavaObject", new Object[] { obj });
- }
-
- public Object toHtml(Object obj) throws Exception {
- return call("toHtml", new Object[] { obj });
- }
-
- public Object call(String func, Object[] args) throws Exception {
- return invokeMethod.invoke(engine, new Object[] { func, args });
- }
-
- private static void debugPrint(String msg) {
- if (debug) System.out.println(msg);
- }
-
- private void init(Snapshot snapshot) throws RuntimeException {
- this.snapshot = snapshot;
- try {
- // create ScriptEngineManager
- Class<?> managerClass = Class.forName("javax.script.ScriptEngineManager");
- Object manager = managerClass.newInstance();
-
- // create JavaScript engine
- Method getEngineMethod = managerClass.getMethod("getEngineByName",
- new Class<?>[] { String.class });
- engine = getEngineMethod.invoke(manager, new Object[] {"js"});
-
- // initialize engine with init file (hat.js)
- InputStream strm = getInitStream();
- Class<?> engineClass = Class.forName("javax.script.ScriptEngine");
- evalMethod = engineClass.getMethod("eval",
- new Class<?>[] { Reader.class });
- evalMethod.invoke(engine, new Object[] {new InputStreamReader(strm)});
-
- // initialize ScriptEngine.eval(String) and
- // Invocable.invokeFunction(String, Object[]) methods.
- Class<?> invocableClass = Class.forName("javax.script.Invocable");
-
- evalMethod = engineClass.getMethod("eval",
- new Class<?>[] { String.class });
- invokeMethod = invocableClass.getMethod("invokeFunction",
- new Class<?>[] { String.class, Object[].class });
-
- // initialize ScriptEngine.put(String, Object) method
- Method putMethod = engineClass.getMethod("put",
- new Class<?>[] { String.class, Object.class });
-
- // call ScriptEngine.put to initialize built-in heap object
- putMethod.invoke(engine, new Object[] {
- "heap", call("wrapHeapSnapshot", new Object[] { snapshot })
- });
- } catch (Exception e) {
- if (debug) e.printStackTrace();
- throw new RuntimeException(e);
- }
- }
-
- private InputStream getInitStream() {
- return getClass().getResourceAsStream("/com/sun/tools/hat/resources/hat.js");
- }
-
- private Object engine;
- private Method evalMethod;
- private Method invokeMethod;
- private Snapshot snapshot;
- private static boolean debug = false;
- private static boolean oqlSupported;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/oql/OQLException.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.oql;
-
-/**
- * OQLException is thrown if OQL execution results in error
- *
- */
-@SuppressWarnings("serial") // JDK implementation class
-public class OQLException extends Exception {
- public OQLException(String msg) {
- super(msg);
- }
-
- public OQLException(String msg, Throwable cause) {
- super(msg, cause);
- }
-
- public OQLException(Throwable cause) {
- super(cause);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/oql/OQLQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.oql;
-
-/**
- * This represents a parsed OQL query
- *
- */
-class OQLQuery {
- OQLQuery(String selectExpr, boolean isInstanceOf,
- String className, String identifier, String whereExpr) {
- this.selectExpr = selectExpr;
- this.isInstanceOf = isInstanceOf;
- this.className = className;
- this.identifier = identifier;
- this.whereExpr = whereExpr;
- }
-
- String selectExpr;
- boolean isInstanceOf;
- String className;
- String identifier;
- String whereExpr;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/oql/ObjectVisitor.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.oql;
-
-/**
- * This visitor is supplied to OQLEngine.executeQuery
- * to receive result set objects one by one.
- *
- */
-public interface ObjectVisitor {
- // return true to terminate the result set callback earlier
- public boolean visit(Object o);
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/FileReadBuffer.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-/**
- * Implementation of ReadBuffer using a RandomAccessFile
- *
- * @author A. Sundararajan
- */
-class FileReadBuffer implements ReadBuffer {
- // underlying file to read
- private RandomAccessFile file;
-
- FileReadBuffer(RandomAccessFile file) {
- this.file = file;
- }
-
- private void seek(long pos) throws IOException {
- file.getChannel().position(pos);
- }
-
- public synchronized void get(long pos, byte[] buf) throws IOException {
- seek(pos);
- file.read(buf);
- }
-
- public synchronized char getChar(long pos) throws IOException {
- seek(pos);
- return file.readChar();
- }
-
- public synchronized byte getByte(long pos) throws IOException {
- seek(pos);
- return (byte) file.read();
- }
-
- public synchronized short getShort(long pos) throws IOException {
- seek(pos);
- return file.readShort();
- }
-
- public synchronized int getInt(long pos) throws IOException {
- seek(pos);
- return file.readInt();
- }
-
- public synchronized long getLong(long pos) throws IOException {
- seek(pos);
- return file.readLong();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/HprofReader.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,892 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.*;
-import java.util.Date;
-import java.util.Hashtable;
-import com.sun.tools.hat.internal.model.ArrayTypeCodes;
-import com.sun.tools.hat.internal.model.*;
-
-/**
- * Object that's used to read a hprof file.
- *
- * @author Bill Foote
- */
-
-public class HprofReader extends Reader /* imports */ implements ArrayTypeCodes {
-
- final static int MAGIC_NUMBER = 0x4a415641;
- // That's "JAVA", the first part of "JAVA PROFILE ..."
- private final static String[] VERSIONS = {
- " PROFILE 1.0\0",
- " PROFILE 1.0.1\0",
- " PROFILE 1.0.2\0",
- };
-
- private final static int VERSION_JDK12BETA3 = 0;
- private final static int VERSION_JDK12BETA4 = 1;
- private final static int VERSION_JDK6 = 2;
- // These version numbers are indices into VERSIONS. The instance data
- // member version is set to one of these, and it drives decisions when
- // reading the file.
- //
- // Version 1.0.1 added HPROF_GC_PRIM_ARRAY_DUMP, which requires no
- // version-sensitive parsing.
- //
- // Version 1.0.1 changed the type of a constant pool entry from a signature
- // to a typecode.
- //
- // Version 1.0.2 added HPROF_HEAP_DUMP_SEGMENT and HPROF_HEAP_DUMP_END
- // to allow a large heap to be dumped as a sequence of heap dump segments.
- //
- // The HPROF agent in J2SE 1.2 through to 5.0 generate a version 1.0.1
- // file. In Java SE 6.0 the version is either 1.0.1 or 1.0.2 depending on
- // the size of the heap (normally it will be 1.0.1 but for multi-GB
- // heaps the heap dump will not fit in a HPROF_HEAP_DUMP record so the
- // dump is generated as version 1.0.2).
-
- //
- // Record types:
- //
- static final int HPROF_UTF8 = 0x01;
- static final int HPROF_LOAD_CLASS = 0x02;
- static final int HPROF_UNLOAD_CLASS = 0x03;
- static final int HPROF_FRAME = 0x04;
- static final int HPROF_TRACE = 0x05;
- static final int HPROF_ALLOC_SITES = 0x06;
- static final int HPROF_HEAP_SUMMARY = 0x07;
-
- static final int HPROF_START_THREAD = 0x0a;
- static final int HPROF_END_THREAD = 0x0b;
-
- static final int HPROF_HEAP_DUMP = 0x0c;
-
- static final int HPROF_CPU_SAMPLES = 0x0d;
- static final int HPROF_CONTROL_SETTINGS = 0x0e;
- static final int HPROF_LOCKSTATS_WAIT_TIME = 0x10;
- static final int HPROF_LOCKSTATS_HOLD_TIME = 0x11;
-
- static final int HPROF_GC_ROOT_UNKNOWN = 0xff;
- static final int HPROF_GC_ROOT_JNI_GLOBAL = 0x01;
- static final int HPROF_GC_ROOT_JNI_LOCAL = 0x02;
- static final int HPROF_GC_ROOT_JAVA_FRAME = 0x03;
- static final int HPROF_GC_ROOT_NATIVE_STACK = 0x04;
- static final int HPROF_GC_ROOT_STICKY_CLASS = 0x05;
- static final int HPROF_GC_ROOT_THREAD_BLOCK = 0x06;
- static final int HPROF_GC_ROOT_MONITOR_USED = 0x07;
- static final int HPROF_GC_ROOT_THREAD_OBJ = 0x08;
-
- static final int HPROF_GC_CLASS_DUMP = 0x20;
- static final int HPROF_GC_INSTANCE_DUMP = 0x21;
- static final int HPROF_GC_OBJ_ARRAY_DUMP = 0x22;
- static final int HPROF_GC_PRIM_ARRAY_DUMP = 0x23;
-
- static final int HPROF_HEAP_DUMP_SEGMENT = 0x1c;
- static final int HPROF_HEAP_DUMP_END = 0x2c;
-
- private final static int T_CLASS = 2;
-
- private int version; // The version of .hprof being read
-
- private int debugLevel;
- private long currPos; // Current position in the file
-
- private int dumpsToSkip;
- private boolean callStack; // If true, read the call stack of objects
-
- private int identifierSize; // Size, in bytes, of identifiers.
- private Hashtable<Long, String> names;
-
- // Hashtable<Integer, ThreadObject>, used to map the thread sequence number
- // (aka "serial number") to the thread object ID for
- // HPROF_GC_ROOT_THREAD_OBJ. ThreadObject is a trivial inner class,
- // at the end of this file.
- private Hashtable<Integer, ThreadObject> threadObjects;
-
- // Hashtable<Long, String>, maps class object ID to class name
- // (with / converted to .)
- private Hashtable<Long, String> classNameFromObjectID;
-
- // Hashtable<Integer, Integer>, maps class serial # to class object ID
- private Hashtable<Integer, String> classNameFromSerialNo;
-
- // Hashtable<Long, StackFrame> maps stack frame ID to StackFrame.
- // Null if we're not tracking them.
- private Hashtable<Long, StackFrame> stackFrames;
-
- // Hashtable<Integer, StackTrace> maps stack frame ID to StackTrace
- // Null if we're not tracking them.
- private Hashtable<Integer, StackTrace> stackTraces;
-
- private Snapshot snapshot;
-
- public HprofReader(String fileName, PositionDataInputStream in,
- int dumpNumber, boolean callStack, int debugLevel)
- throws IOException {
- super(in);
- RandomAccessFile file = new RandomAccessFile(fileName, "r");
- this.snapshot = new Snapshot(MappedReadBuffer.create(file));
- this.dumpsToSkip = dumpNumber - 1;
- this.callStack = callStack;
- this.debugLevel = debugLevel;
- names = new Hashtable<Long, String>();
- threadObjects = new Hashtable<Integer, ThreadObject>(43);
- classNameFromObjectID = new Hashtable<Long, String>();
- if (callStack) {
- stackFrames = new Hashtable<Long, StackFrame>(43);
- stackTraces = new Hashtable<Integer, StackTrace>(43);
- classNameFromSerialNo = new Hashtable<Integer, String>();
- }
- }
-
- public Snapshot read() throws IOException {
- currPos = 4; // 4 because of the magic number
- version = readVersionHeader();
- identifierSize = in.readInt();
- snapshot.setIdentifierSize(identifierSize);
- if (version >= VERSION_JDK12BETA4) {
- snapshot.setNewStyleArrayClass(true);
- } else {
- snapshot.setNewStyleArrayClass(false);
- }
-
- currPos += 4;
- if (identifierSize != 4 && identifierSize != 8) {
- throw new IOException("I'm sorry, but I can't deal with an identifier size of " + identifierSize + ". I can only deal with 4 or 8.");
- }
- System.out.println("Dump file created " + (new Date(in.readLong())));
- currPos += 8;
-
- for (;;) {
- int type;
- try {
- type = in.readUnsignedByte();
- } catch (EOFException ignored) {
- break;
- }
- in.readInt(); // Timestamp of this record
- // Length of record: readInt() will return negative value for record
- // length >2GB. so store 32bit value in long to keep it unsigned.
- long length = in.readInt() & 0xffffffffL;
- if (debugLevel > 0) {
- System.out.println("Read record type " + type
- + ", length " + length
- + " at position " + toHex(currPos));
- }
- if (length < 0) {
- throw new IOException("Bad record length of " + length
- + " at byte " + toHex(currPos+5)
- + " of file.");
- }
- currPos += 9 + length;
- switch (type) {
- case HPROF_UTF8: {
- long id = readID();
- byte[] chars = new byte[(int)length - identifierSize];
- in.readFully(chars);
- names.put(id, new String(chars));
- break;
- }
- case HPROF_LOAD_CLASS: {
- int serialNo = in.readInt(); // Not used
- long classID = readID();
- int stackTraceSerialNo = in.readInt();
- long classNameID = readID();
- Long classIdI = classID;
- String nm = getNameFromID(classNameID).replace('/', '.');
- classNameFromObjectID.put(classIdI, nm);
- if (classNameFromSerialNo != null) {
- classNameFromSerialNo.put(serialNo, nm);
- }
- break;
- }
-
- case HPROF_HEAP_DUMP: {
- if (dumpsToSkip <= 0) {
- try {
- readHeapDump(length, currPos);
- } catch (EOFException exp) {
- handleEOF(exp, snapshot);
- }
- if (debugLevel > 0) {
- System.out.println(" Finished processing instances in heap dump.");
- }
- return snapshot;
- } else {
- dumpsToSkip--;
- skipBytes(length);
- }
- break;
- }
-
- case HPROF_HEAP_DUMP_END: {
- if (version >= VERSION_JDK6) {
- if (dumpsToSkip <= 0) {
- skipBytes(length); // should be no-op
- return snapshot;
- } else {
- // skip this dump (of the end record for a sequence of dump segments)
- dumpsToSkip--;
- }
- } else {
- // HPROF_HEAP_DUMP_END only recognized in >= 1.0.2
- warn("Ignoring unrecognized record type " + type);
- }
- skipBytes(length); // should be no-op
- break;
- }
-
- case HPROF_HEAP_DUMP_SEGMENT: {
- if (version >= VERSION_JDK6) {
- if (dumpsToSkip <= 0) {
- try {
- // read the dump segment
- readHeapDump(length, currPos);
- } catch (EOFException exp) {
- handleEOF(exp, snapshot);
- }
- } else {
- // all segments comprising the heap dump will be skipped
- skipBytes(length);
- }
- } else {
- // HPROF_HEAP_DUMP_SEGMENT only recognized in >= 1.0.2
- warn("Ignoring unrecognized record type " + type);
- skipBytes(length);
- }
- break;
- }
-
- case HPROF_FRAME: {
- if (stackFrames == null) {
- skipBytes(length);
- } else {
- long id = readID();
- String methodName = getNameFromID(readID());
- String methodSig = getNameFromID(readID());
- String sourceFile = getNameFromID(readID());
- int classSer = in.readInt();
- String className = classNameFromSerialNo.get(classSer);
- int lineNumber = in.readInt();
- if (lineNumber < StackFrame.LINE_NUMBER_NATIVE) {
- warn("Weird stack frame line number: " + lineNumber);
- lineNumber = StackFrame.LINE_NUMBER_UNKNOWN;
- }
- stackFrames.put(id,
- new StackFrame(methodName, methodSig,
- className, sourceFile,
- lineNumber));
- }
- break;
- }
- case HPROF_TRACE: {
- if (stackTraces == null) {
- skipBytes(length);
- } else {
- int serialNo = in.readInt();
- int threadSeq = in.readInt(); // Not used
- StackFrame[] frames = new StackFrame[in.readInt()];
- for (int i = 0; i < frames.length; i++) {
- long fid = readID();
- frames[i] = stackFrames.get(fid);
- if (frames[i] == null) {
- throw new IOException("Stack frame " + toHex(fid) + " not found");
- }
- }
- stackTraces.put(serialNo,
- new StackTrace(frames));
- }
- break;
- }
- case HPROF_UNLOAD_CLASS:
- case HPROF_ALLOC_SITES:
- case HPROF_START_THREAD:
- case HPROF_END_THREAD:
- case HPROF_HEAP_SUMMARY:
- case HPROF_CPU_SAMPLES:
- case HPROF_CONTROL_SETTINGS:
- case HPROF_LOCKSTATS_WAIT_TIME:
- case HPROF_LOCKSTATS_HOLD_TIME:
- {
- // Ignore these record types
- skipBytes(length);
- break;
- }
- default: {
- skipBytes(length);
- warn("Ignoring unrecognized record type " + type);
- }
- }
- }
-
- return snapshot;
- }
-
- private void skipBytes(long length) throws IOException {
- in.skipBytes((int)length);
- }
-
- private int readVersionHeader() throws IOException {
- int candidatesLeft = VERSIONS.length;
- boolean[] matched = new boolean[VERSIONS.length];
- for (int i = 0; i < candidatesLeft; i++) {
- matched[i] = true;
- }
-
- int pos = 0;
- while (candidatesLeft > 0) {
- char c = (char) in.readByte();
- currPos++;
- for (int i = 0; i < VERSIONS.length; i++) {
- if (matched[i]) {
- if (c != VERSIONS[i].charAt(pos)) { // Not matched
- matched[i] = false;
- --candidatesLeft;
- } else if (pos == VERSIONS[i].length() - 1) { // Full match
- return i;
- }
- }
- }
- ++pos;
- }
- throw new IOException("Version string not recognized at byte " + (pos+3));
- }
-
- private void readHeapDump(long bytesLeft, long posAtEnd) throws IOException {
- while (bytesLeft > 0) {
- int type = in.readUnsignedByte();
- if (debugLevel > 0) {
- System.out.println(" Read heap sub-record type " + type
- + " at position "
- + toHex(posAtEnd - bytesLeft));
- }
- bytesLeft--;
- switch(type) {
- case HPROF_GC_ROOT_UNKNOWN: {
- long id = readID();
- bytesLeft -= identifierSize;
- snapshot.addRoot(new Root(id, 0, Root.UNKNOWN, ""));
- break;
- }
- case HPROF_GC_ROOT_THREAD_OBJ: {
- long id = readID();
- int threadSeq = in.readInt();
- int stackSeq = in.readInt();
- bytesLeft -= identifierSize + 8;
- threadObjects.put(threadSeq,
- new ThreadObject(id, stackSeq));
- break;
- }
- case HPROF_GC_ROOT_JNI_GLOBAL: {
- long id = readID();
- long globalRefId = readID(); // Ignored, for now
- bytesLeft -= 2*identifierSize;
- snapshot.addRoot(new Root(id, 0, Root.NATIVE_STATIC, ""));
- break;
- }
- case HPROF_GC_ROOT_JNI_LOCAL: {
- long id = readID();
- int threadSeq = in.readInt();
- int depth = in.readInt();
- bytesLeft -= identifierSize + 8;
- ThreadObject to = getThreadObjectFromSequence(threadSeq);
- StackTrace st = getStackTraceFromSerial(to.stackSeq);
- if (st != null) {
- st = st.traceForDepth(depth+1);
- }
- snapshot.addRoot(new Root(id, to.threadId,
- Root.NATIVE_LOCAL, "", st));
- break;
- }
- case HPROF_GC_ROOT_JAVA_FRAME: {
- long id = readID();
- int threadSeq = in.readInt();
- int depth = in.readInt();
- bytesLeft -= identifierSize + 8;
- ThreadObject to = getThreadObjectFromSequence(threadSeq);
- StackTrace st = getStackTraceFromSerial(to.stackSeq);
- if (st != null) {
- st = st.traceForDepth(depth+1);
- }
- snapshot.addRoot(new Root(id, to.threadId,
- Root.JAVA_LOCAL, "", st));
- break;
- }
- case HPROF_GC_ROOT_NATIVE_STACK: {
- long id = readID();
- int threadSeq = in.readInt();
- bytesLeft -= identifierSize + 4;
- ThreadObject to = getThreadObjectFromSequence(threadSeq);
- StackTrace st = getStackTraceFromSerial(to.stackSeq);
- snapshot.addRoot(new Root(id, to.threadId,
- Root.NATIVE_STACK, "", st));
- break;
- }
- case HPROF_GC_ROOT_STICKY_CLASS: {
- long id = readID();
- bytesLeft -= identifierSize;
- snapshot.addRoot(new Root(id, 0, Root.SYSTEM_CLASS, ""));
- break;
- }
- case HPROF_GC_ROOT_THREAD_BLOCK: {
- long id = readID();
- int threadSeq = in.readInt();
- bytesLeft -= identifierSize + 4;
- ThreadObject to = getThreadObjectFromSequence(threadSeq);
- StackTrace st = getStackTraceFromSerial(to.stackSeq);
- snapshot.addRoot(new Root(id, to.threadId,
- Root.THREAD_BLOCK, "", st));
- break;
- }
- case HPROF_GC_ROOT_MONITOR_USED: {
- long id = readID();
- bytesLeft -= identifierSize;
- snapshot.addRoot(new Root(id, 0, Root.BUSY_MONITOR, ""));
- break;
- }
- case HPROF_GC_CLASS_DUMP: {
- int bytesRead = readClass();
- bytesLeft -= bytesRead;
- break;
- }
- case HPROF_GC_INSTANCE_DUMP: {
- int bytesRead = readInstance();
- bytesLeft -= bytesRead;
- break;
- }
- case HPROF_GC_OBJ_ARRAY_DUMP: {
- int bytesRead = readArray(false);
- bytesLeft -= bytesRead;
- break;
- }
- case HPROF_GC_PRIM_ARRAY_DUMP: {
- int bytesRead = readArray(true);
- bytesLeft -= bytesRead;
- break;
- }
- default: {
- throw new IOException("Unrecognized heap dump sub-record type: " + type);
- }
- }
- }
- if (bytesLeft != 0) {
- warn("Error reading heap dump or heap dump segment: Byte count is " + bytesLeft + " instead of 0");
- skipBytes(bytesLeft);
- }
- if (debugLevel > 0) {
- System.out.println(" Finished heap sub-records.");
- }
- }
-
- private long readID() throws IOException {
- return (identifierSize == 4)?
- (Snapshot.SMALL_ID_MASK & (long)in.readInt()) : in.readLong();
- }
-
- //
- // Read a java value. If result is non-null, it's expected to be an
- // array of one element. We use it to fake multiple return values.
- // @returns the number of bytes read
- //
- private int readValue(JavaThing[] resultArr) throws IOException {
- byte type = in.readByte();
- return 1 + readValueForType(type, resultArr);
- }
-
- private int readValueForType(byte type, JavaThing[] resultArr)
- throws IOException {
- if (version >= VERSION_JDK12BETA4) {
- type = signatureFromTypeId(type);
- }
- return readValueForTypeSignature(type, resultArr);
- }
-
- private int readValueForTypeSignature(byte type, JavaThing[] resultArr)
- throws IOException {
- switch (type) {
- case '[':
- case 'L': {
- long id = readID();
- if (resultArr != null) {
- resultArr[0] = new JavaObjectRef(id);
- }
- return identifierSize;
- }
- case 'Z': {
- int b = in.readByte();
- if (b != 0 && b != 1) {
- warn("Illegal boolean value read");
- }
- if (resultArr != null) {
- resultArr[0] = new JavaBoolean(b != 0);
- }
- return 1;
- }
- case 'B': {
- byte b = in.readByte();
- if (resultArr != null) {
- resultArr[0] = new JavaByte(b);
- }
- return 1;
- }
- case 'S': {
- short s = in.readShort();
- if (resultArr != null) {
- resultArr[0] = new JavaShort(s);
- }
- return 2;
- }
- case 'C': {
- char ch = in.readChar();
- if (resultArr != null) {
- resultArr[0] = new JavaChar(ch);
- }
- return 2;
- }
- case 'I': {
- int val = in.readInt();
- if (resultArr != null) {
- resultArr[0] = new JavaInt(val);
- }
- return 4;
- }
- case 'J': {
- long val = in.readLong();
- if (resultArr != null) {
- resultArr[0] = new JavaLong(val);
- }
- return 8;
- }
- case 'F': {
- float val = in.readFloat();
- if (resultArr != null) {
- resultArr[0] = new JavaFloat(val);
- }
- return 4;
- }
- case 'D': {
- double val = in.readDouble();
- if (resultArr != null) {
- resultArr[0] = new JavaDouble(val);
- }
- return 8;
- }
- default: {
- throw new IOException("Bad value signature: " + type);
- }
- }
- }
-
- private ThreadObject getThreadObjectFromSequence(int threadSeq)
- throws IOException {
- ThreadObject to = threadObjects.get(threadSeq);
- if (to == null) {
- throw new IOException("Thread " + threadSeq +
- " not found for JNI local ref");
- }
- return to;
- }
-
- private String getNameFromID(long id) throws IOException {
- return getNameFromID(Long.valueOf(id));
- }
-
- private String getNameFromID(Long id) throws IOException {
- if (id.longValue() == 0L) {
- return "";
- }
- String result = names.get(id);
- if (result == null) {
- warn("Name not found at " + toHex(id.longValue()));
- return "unresolved name " + toHex(id.longValue());
- }
- return result;
- }
-
- private StackTrace getStackTraceFromSerial(int ser) throws IOException {
- if (stackTraces == null) {
- return null;
- }
- StackTrace result = stackTraces.get(ser);
- if (result == null) {
- warn("Stack trace not found for serial # " + ser);
- }
- return result;
- }
-
- //
- // Handle a HPROF_GC_CLASS_DUMP
- // Return number of bytes read
- //
- private int readClass() throws IOException {
- long id = readID();
- StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
- long superId = readID();
- long classLoaderId = readID();
- long signersId = readID();
- long protDomainId = readID();
- long reserved1 = readID();
- long reserved2 = readID();
- int instanceSize = in.readInt();
- int bytesRead = 7 * identifierSize + 8;
-
- int numConstPoolEntries = in.readUnsignedShort();
- bytesRead += 2;
- for (int i = 0; i < numConstPoolEntries; i++) {
- int index = in.readUnsignedShort(); // unused
- bytesRead += 2;
- bytesRead += readValue(null); // We ignore the values
- }
-
- int numStatics = in.readUnsignedShort();
- bytesRead += 2;
- JavaThing[] valueBin = new JavaThing[1];
- JavaStatic[] statics = new JavaStatic[numStatics];
- for (int i = 0; i < numStatics; i++) {
- long nameId = readID();
- bytesRead += identifierSize;
- byte type = in.readByte();
- bytesRead++;
- bytesRead += readValueForType(type, valueBin);
- String fieldName = getNameFromID(nameId);
- if (version >= VERSION_JDK12BETA4) {
- type = signatureFromTypeId(type);
- }
- String signature = "" + ((char) type);
- JavaField f = new JavaField(fieldName, signature);
- statics[i] = new JavaStatic(f, valueBin[0]);
- }
-
- int numFields = in.readUnsignedShort();
- bytesRead += 2;
- JavaField[] fields = new JavaField[numFields];
- for (int i = 0; i < numFields; i++) {
- long nameId = readID();
- bytesRead += identifierSize;
- byte type = in.readByte();
- bytesRead++;
- String fieldName = getNameFromID(nameId);
- if (version >= VERSION_JDK12BETA4) {
- type = signatureFromTypeId(type);
- }
- String signature = "" + ((char) type);
- fields[i] = new JavaField(fieldName, signature);
- }
- String name = classNameFromObjectID.get(id);
- if (name == null) {
- warn("Class name not found for " + toHex(id));
- name = "unknown-name@" + toHex(id);
- }
- JavaClass c = new JavaClass(id, name, superId, classLoaderId, signersId,
- protDomainId, fields, statics,
- instanceSize);
- snapshot.addClass(id, c);
- snapshot.setSiteTrace(c, stackTrace);
-
- return bytesRead;
- }
-
- private String toHex(long addr) {
- return com.sun.tools.hat.internal.util.Misc.toHex(addr);
- }
-
- //
- // Handle a HPROF_GC_INSTANCE_DUMP
- // Return number of bytes read
- //
- private int readInstance() throws IOException {
- long start = in.position();
- long id = readID();
- StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
- long classID = readID();
- int bytesFollowing = in.readInt();
- int bytesRead = (2 * identifierSize) + 8 + bytesFollowing;
- JavaObject jobj = new JavaObject(classID, start);
- skipBytes(bytesFollowing);
- snapshot.addHeapObject(id, jobj);
- snapshot.setSiteTrace(jobj, stackTrace);
- return bytesRead;
- }
-
- //
- // Handle a HPROF_GC_OBJ_ARRAY_DUMP or HPROF_GC_PRIM_ARRAY_DUMP
- // Return number of bytes read
- //
- private int readArray(boolean isPrimitive) throws IOException {
- long start = in.position();
- long id = readID();
- StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
- int num = in.readInt();
- int bytesRead = identifierSize + 8;
- long elementClassID;
- if (isPrimitive) {
- elementClassID = in.readByte();
- bytesRead++;
- } else {
- elementClassID = readID();
- bytesRead += identifierSize;
- }
-
- // Check for primitive arrays:
- byte primitiveSignature = 0x00;
- int elSize = 0;
- if (isPrimitive || version < VERSION_JDK12BETA4) {
- switch ((int)elementClassID) {
- case T_BOOLEAN: {
- primitiveSignature = (byte) 'Z';
- elSize = 1;
- break;
- }
- case T_CHAR: {
- primitiveSignature = (byte) 'C';
- elSize = 2;
- break;
- }
- case T_FLOAT: {
- primitiveSignature = (byte) 'F';
- elSize = 4;
- break;
- }
- case T_DOUBLE: {
- primitiveSignature = (byte) 'D';
- elSize = 8;
- break;
- }
- case T_BYTE: {
- primitiveSignature = (byte) 'B';
- elSize = 1;
- break;
- }
- case T_SHORT: {
- primitiveSignature = (byte) 'S';
- elSize = 2;
- break;
- }
- case T_INT: {
- primitiveSignature = (byte) 'I';
- elSize = 4;
- break;
- }
- case T_LONG: {
- primitiveSignature = (byte) 'J';
- elSize = 8;
- break;
- }
- }
- if (version >= VERSION_JDK12BETA4 && primitiveSignature == 0x00) {
- throw new IOException("Unrecognized typecode: "
- + elementClassID);
- }
- }
- if (primitiveSignature != 0x00) {
- int size = elSize * num;
- bytesRead += size;
- JavaValueArray va = new JavaValueArray(primitiveSignature, start);
- skipBytes(size);
- snapshot.addHeapObject(id, va);
- snapshot.setSiteTrace(va, stackTrace);
- } else {
- int sz = num * identifierSize;
- bytesRead += sz;
- JavaObjectArray arr = new JavaObjectArray(elementClassID, start);
- skipBytes(sz);
- snapshot.addHeapObject(id, arr);
- snapshot.setSiteTrace(arr, stackTrace);
- }
- return bytesRead;
- }
-
- private byte signatureFromTypeId(byte typeId) throws IOException {
- switch (typeId) {
- case T_CLASS: {
- return (byte) 'L';
- }
- case T_BOOLEAN: {
- return (byte) 'Z';
- }
- case T_CHAR: {
- return (byte) 'C';
- }
- case T_FLOAT: {
- return (byte) 'F';
- }
- case T_DOUBLE: {
- return (byte) 'D';
- }
- case T_BYTE: {
- return (byte) 'B';
- }
- case T_SHORT: {
- return (byte) 'S';
- }
- case T_INT: {
- return (byte) 'I';
- }
- case T_LONG: {
- return (byte) 'J';
- }
- default: {
- throw new IOException("Invalid type id of " + typeId);
- }
- }
- }
-
- private void handleEOF(EOFException exp, Snapshot snapshot) {
- if (debugLevel > 0) {
- exp.printStackTrace();
- }
- warn("Unexpected EOF. Will miss information...");
- // we have EOF, we have to tolerate missing references
- snapshot.setUnresolvedObjectsOK(true);
- }
-
- private void warn(String msg) {
- System.out.println("WARNING: " + msg);
- }
-
- //
- // A trivial data-holder class for HPROF_GC_ROOT_THREAD_OBJ.
- //
- private class ThreadObject {
-
- long threadId;
- int stackSeq;
-
- ThreadObject(long threadId, int stackSeq) {
- this.threadId = threadId;
- this.stackSeq = stackSeq;
- }
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/MappedReadBuffer.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
-
-/**
- * Implementation of ReadBuffer using mapped file buffer
- *
- * @author A. Sundararajan
- */
-class MappedReadBuffer implements ReadBuffer {
- private MappedByteBuffer buf;
-
- MappedReadBuffer(MappedByteBuffer buf) {
- this.buf = buf;
- }
-
- // factory method to create correct ReadBuffer for a given file
- static ReadBuffer create(RandomAccessFile file) throws IOException {
- FileChannel ch = file.getChannel();
- long size = ch.size();
- // if file size is more than 2 GB and when file mapping is
- // configured (default), use mapped file reader
- if (canUseFileMap() && (size <= Integer.MAX_VALUE)) {
- MappedByteBuffer buf;
- try {
- buf = ch.map(FileChannel.MapMode.READ_ONLY, 0, size);
- ch.close();
- return new MappedReadBuffer(buf);
- } catch (IOException exp) {
- exp.printStackTrace();
- System.err.println("File mapping failed, will use direct read");
- // fall through
- }
- } // else fall through
- return new FileReadBuffer(file);
- }
-
- private static boolean canUseFileMap() {
- // set jhat.disableFileMap to any value other than "false"
- // to disable file mapping
- String prop = System.getProperty("jhat.disableFileMap");
- return prop == null || prop.equals("false");
- }
-
- private void seek(long pos) throws IOException {
- assert pos <= Integer.MAX_VALUE : "position overflow";
- buf.position((int)pos);
- }
-
- public synchronized void get(long pos, byte[] res) throws IOException {
- seek(pos);
- buf.get(res);
- }
-
- public synchronized char getChar(long pos) throws IOException {
- seek(pos);
- return buf.getChar();
- }
-
- public synchronized byte getByte(long pos) throws IOException {
- seek(pos);
- return buf.get();
- }
-
- public synchronized short getShort(long pos) throws IOException {
- seek(pos);
- return buf.getShort();
- }
-
- public synchronized int getInt(long pos) throws IOException {
- seek(pos);
- return buf.getInt();
- }
-
- public synchronized long getLong(long pos) throws IOException {
- seek(pos);
- return buf.getLong();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/PositionDataInputStream.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.DataInputStream;
-import java.io.InputStream;
-
-/**
- * A DataInputStream that keeps track of total bytes read
- * (in effect 'position' in stream) so far.
- *
- */
-public class PositionDataInputStream extends DataInputStream {
- public PositionDataInputStream(InputStream in) {
- super(in instanceof PositionInputStream?
- in : new PositionInputStream(in));
- }
-
- public boolean markSupported() {
- return false;
- }
-
- public void mark(int readLimit) {
- throw new UnsupportedOperationException("mark");
- }
-
- public void reset() {
- throw new UnsupportedOperationException("reset");
- }
-
- public long position() {
- return ((PositionInputStream)in).position();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/PositionInputStream.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * InputStream that keeps track of total bytes read (in effect
- * 'position' in stream) from the input stream.
- *
- */
-public class PositionInputStream extends FilterInputStream {
- private long position = 0L;
-
- public PositionInputStream(InputStream in) {
- super(in);
- }
-
- public int read() throws IOException {
- int res = super.read();
- if (res != -1) position++;
- return res;
- }
-
- public int read(byte[] b, int off, int len) throws IOException {
- int res = super.read(b, off, len);
- if (res != -1) position += res;
- return res;
- }
-
- public long skip(long n) throws IOException {
- long res = super.skip(n);
- position += res;
- return res;
- }
-
- public boolean markSupported() {
- return false;
- }
-
- public void mark(int readLimit) {
- throw new UnsupportedOperationException("mark");
- }
-
- public void reset() {
- throw new UnsupportedOperationException("reset");
- }
-
- public long position() {
- return position;
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/ReadBuffer.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.IOException;
-
-/**
- * Positionable read only buffer
- *
- * @author A. Sundararajan
- */
-public interface ReadBuffer {
- // read methods - only byte array and int primitive types.
- // read position has to be specified always.
- public void get(long pos, byte[] buf) throws IOException;
- public char getChar(long pos) throws IOException;
- public byte getByte(long pos) throws IOException;
- public short getShort(long pos) throws IOException;
- public int getInt(long pos) throws IOException;
- public long getLong(long pos) throws IOException;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/parser/Reader.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.parser;
-
-import java.io.*;
-import com.sun.tools.hat.internal.model.*;
-
-/**
- * Abstract base class for reading object dump files. A reader need not be
- * thread-safe.
- *
- * @author Bill Foote
- */
-
-
-public abstract class Reader {
- protected PositionDataInputStream in;
-
- protected Reader(PositionDataInputStream in) {
- this.in = in;
- }
-
- /**
- * Read a snapshot from a data input stream. It is assumed that the magic
- * number has already been read.
- */
- abstract public Snapshot read() throws IOException;
-
- /**
- * Read a snapshot from a file.
- *
- * @param heapFile The name of a file containing a heap dump
- * @param callStack If true, read the call stack of allocaation sites
- */
- public static Snapshot readFile(String heapFile, boolean callStack,
- int debugLevel)
- throws IOException {
- int dumpNumber = 1;
- int pos = heapFile.lastIndexOf('#');
- if (pos > -1) {
- String num = heapFile.substring(pos+1, heapFile.length());
- try {
- dumpNumber = Integer.parseInt(num, 10);
- } catch (java.lang.NumberFormatException ex) {
- String msg = "In file name \"" + heapFile
- + "\", a dump number was "
- + "expected after the :, but \""
- + num + "\" was found instead.";
- System.err.println(msg);
- throw new IOException(msg);
- }
- heapFile = heapFile.substring(0, pos);
- }
- PositionDataInputStream in = new PositionDataInputStream(
- new BufferedInputStream(new FileInputStream(heapFile)));
- try {
- int i = in.readInt();
- if (i == HprofReader.MAGIC_NUMBER) {
- Reader r
- = new HprofReader(heapFile, in, dumpNumber,
- callStack, debugLevel);
- return r.read();
- } else {
- throw new IOException("Unrecognized magic number: " + i);
- }
- } finally {
- in.close();
- }
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import java.util.Iterator;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class AllClassesQuery extends QueryHandler {
-
- boolean excludePlatform;
- boolean oqlSupported;
-
- public AllClassesQuery(boolean excludePlatform, boolean oqlSupported) {
- this.excludePlatform = excludePlatform;
- this.oqlSupported = oqlSupported;
- }
-
- public void run() {
- if (excludePlatform) {
- startHtml("All Classes (excluding platform)");
- } else {
- startHtml("All Classes (including platform)");
- }
-
- Iterator<JavaClass> classes = snapshot.getClasses();
- String lastPackage = null;
- while (classes.hasNext()) {
- JavaClass clazz = classes.next();
- if (excludePlatform && PlatformClasses.isPlatformClass(clazz)) {
- // skip this..
- continue;
- }
- String name = clazz.getName();
- int pos = name.lastIndexOf('.');
- String pkg;
- if (name.startsWith("[")) { // Only in ancient heap dumps
- pkg = "<Arrays>";
- } else if (pos == -1) {
- pkg = "<Default Package>";
- } else {
- pkg = name.substring(0, pos);
- }
- if (!pkg.equals(lastPackage)) {
- out.print("<h2>Package ");
- print(pkg);
- out.println("</h2>");
- }
- lastPackage = pkg;
- printClass(clazz);
- if (clazz.getId() != -1) {
- print(" [" + clazz.getIdString() + "]");
- }
- out.println("<br>");
- }
-
- out.println("<h2>Other Queries</h2>");
- out.println("<ul>");
-
- out.println("<li>");
- printAnchorStart();
- if (excludePlatform) {
- out.print("allClassesWithPlatform/\">");
- print("All classes including platform");
- } else {
- out.print("\">");
- print("All classes excluding platform");
- }
- out.println("</a>");
-
- out.println("<li>");
- printAnchorStart();
- out.print("showRoots/\">");
- print("Show all members of the rootset");
- out.println("</a>");
-
- out.println("<li>");
- printAnchorStart();
- out.print("showInstanceCounts/includePlatform/\">");
- print("Show instance counts for all classes (including platform)");
- out.println("</a>");
-
- out.println("<li>");
- printAnchorStart();
- out.print("showInstanceCounts/\">");
- print("Show instance counts for all classes (excluding platform)");
- out.println("</a>");
-
- out.println("<li>");
- printAnchorStart();
- out.print("histo/\">");
- print("Show heap histogram");
- out.println("</a>");
-
- out.println("<li>");
- printAnchorStart();
- out.print("finalizerSummary/\">");
- print("Show finalizer summary");
- out.println("</a>");
-
- if (oqlSupported) {
- out.println("<li>");
- printAnchorStart();
- out.print("oql/\">");
- print("Execute Object Query Language (OQL) query");
- out.println("</a>");
- }
-
- out.println("</ul>");
-
- endHtml();
- }
-
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/AllRootsQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import java.util.Vector;
-
-import com.sun.tools.hat.internal.model.*;
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class AllRootsQuery extends QueryHandler {
-
- public AllRootsQuery() {
- }
-
- public void run() {
- startHtml("All Members of the Rootset");
-
- Root[] roots = snapshot.getRootsArray();
- ArraySorter.sort(roots, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- Root left = (Root) lhs;
- Root right = (Root) rhs;
- int d = left.getType() - right.getType();
- if (d != 0) {
- return -d; // More interesting values are *higher*
- }
- return left.getDescription().compareTo(right.getDescription());
- }
- });
-
- int lastType = Root.INVALID_TYPE;
-
- for (int i= 0; i < roots.length; i++) {
- Root root = roots[i];
-
- if (root.getType() != lastType) {
- lastType = root.getType();
- out.print("<h2>");
- print(root.getTypeName() + " References");
- out.println("</h2>");
- }
-
- printRoot(root);
- if (root.getReferer() != null) {
- out.print("<small> (from ");
- printThingAnchorTag(root.getReferer().getId());
- print(root.getReferer().toString());
- out.print(")</a></small>");
- }
- out.print(" :<br>");
-
- JavaThing t = snapshot.findThing(root.getId());
- if (t != null) { // It should always be
- print("--> ");
- printThing(t);
- out.println("<br>");
- }
- }
-
- out.println("<h2>Other Queries</h2>");
- out.println("<ul>");
- out.println("<li>");
- printAnchorStart();
- out.print("\">");
- print("Show All Classes");
- out.println("</a>");
- out.println("</ul>");
-
- endHtml();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
-
-import java.util.Enumeration;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class ClassQuery extends QueryHandler {
-
-
- public ClassQuery() {
- }
-
- public void run() {
- startHtml("Class " + query);
- JavaClass clazz = snapshot.findClass(query);
- if (clazz == null) {
- error("class not found: " + query);
- } else {
- printFullClass(clazz);
- }
- endHtml();
- }
-
- protected void printFullClass(JavaClass clazz) {
- out.print("<h1>");
- print(clazz.toString());
- out.println("</h1>");
-
- out.println("<h2>Superclass:</h2>");
- printClass(clazz.getSuperclass());
-
- out.println("<h2>Loader Details</h2>");
- out.println("<h3>ClassLoader:</h3>");
- printThing(clazz.getLoader());
-
- out.println("<h3>Signers:</h3>");
- printThing(clazz.getSigners());
-
- out.println("<h3>Protection Domain:</h3>");
- printThing(clazz.getProtectionDomain());
-
- out.println("<h2>Subclasses:</h2>");
- JavaClass[] sc = clazz.getSubclasses();
- for (int i = 0; i < sc.length; i++) {
- out.print(" ");
- printClass(sc[i]);
- out.println("<br>");
- }
-
- out.println("<h2>Instance Data Members:</h2>");
- JavaField[] ff = clazz.getFields().clone();
- ArraySorter.sort(ff, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- JavaField left = (JavaField) lhs;
- JavaField right = (JavaField) rhs;
- return left.getName().compareTo(right.getName());
- }
- });
- for (int i = 0; i < ff.length; i++) {
- out.print(" ");
- printField(ff[i]);
- out.println("<br>");
- }
-
- out.println("<h2>Static Data Members:</h2>");
- JavaStatic[] ss = clazz.getStatics();
- for (int i = 0; i < ss.length; i++) {
- printStatic(ss[i]);
- out.println("<br>");
- }
-
- out.println("<h2>Instances</h2>");
-
- printAnchorStart();
- print("instances/" + encodeForURL(clazz));
- out.print("\">");
- out.println("Exclude subclasses</a><br>");
-
- printAnchorStart();
- print("allInstances/" + encodeForURL(clazz));
- out.print("\">");
- out.println("Include subclasses</a><br>");
-
-
- if (snapshot.getHasNewSet()) {
- out.println("<h2>New Instances</h2>");
-
- printAnchorStart();
- print("newInstances/" + encodeForURL(clazz));
- out.print("\">");
- out.println("Exclude subclasses</a><br>");
-
- printAnchorStart();
- print("allNewInstances/" + encodeForURL(clazz));
- out.print("\">");
- out.println("Include subclasses</a><br>");
- }
-
- out.println("<h2>References summary by Type</h2>");
- printAnchorStart();
- print("refsByType/" + encodeForURL(clazz));
- out.print("\">");
- out.println("References summary by type</a>");
-
- printReferencesTo(clazz);
- }
-
- protected void printReferencesTo(JavaHeapObject obj) {
- if (obj.getId() == -1) {
- return;
- }
- out.println("<h2>References to this object:</h2>");
- out.flush();
- Enumeration<JavaThing> referers = obj.getReferers();
- while (referers.hasMoreElements()) {
- JavaHeapObject ref = (JavaHeapObject) referers.nextElement();
- printThing(ref);
- print (" : " + ref.describeReferenceTo(obj, snapshot));
- // If there are more than one references, this only gets the
- // first one.
- out.println("<br>");
- }
-
- out.println("<h2>Other Queries</h2>");
- out.println("Reference Chains from Rootset");
- long id = obj.getId();
-
- out.print("<ul><li>");
- printAnchorStart();
- out.print("roots/");
- printHex(id);
- out.print("\">");
- out.println("Exclude weak refs</a>");
-
- out.print("<li>");
- printAnchorStart();
- out.print("allRoots/");
- printHex(id);
- out.print("\">");
- out.println("Include weak refs</a></ul>");
-
- printAnchorStart();
- out.print("reachableFrom/");
- printHex(id);
- out.print("\">");
- out.println("Objects reachable from here</a><br>");
- }
-
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import java.util.*;
-
-public class FinalizerObjectsQuery extends QueryHandler {
- public void run() {
- Enumeration<?> objs = snapshot.getFinalizerObjects();
- startHtml("Objects pending finalization");
-
- out.println("<a href='/finalizerSummary/'>Finalizer summary</a>");
-
- out.println("<h1>Objects pending finalization</h1>");
-
- while (objs.hasMoreElements()) {
- printThing((JavaHeapObject)objs.nextElement());
- out.println("<br>");
- }
-
- endHtml();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import java.util.*;
-
-public class FinalizerSummaryQuery extends QueryHandler {
- public void run() {
- Enumeration<?> objs = snapshot.getFinalizerObjects();
- startHtml("Finalizer Summary");
-
- out.println("<p align='center'>");
- out.println("<b><a href='/'>All Classes (excluding platform)</a></b>");
- out.println("</p>");
-
- printFinalizerSummary(objs);
- endHtml();
- }
-
- private static class HistogramElement {
- public HistogramElement(JavaClass clazz) {
- this.clazz = clazz;
- }
-
- public void updateCount() {
- this.count++;
- }
-
- public int compare(HistogramElement other) {
- long diff = other.count - count;
- return (diff == 0L)? 0 : ((diff > 0L)? +1 : -1);
- }
-
- public JavaClass getClazz() {
- return clazz;
- }
-
- public long getCount() {
- return count;
- }
-
- private JavaClass clazz;
- private long count;
- }
-
- private void printFinalizerSummary(Enumeration<?> objs) {
- int count = 0;
- Map<JavaClass, HistogramElement> map = new HashMap<JavaClass, HistogramElement>();
-
- while (objs.hasMoreElements()) {
- JavaHeapObject obj = (JavaHeapObject) objs.nextElement();
- count++;
- JavaClass clazz = obj.getClazz();
- if (! map.containsKey(clazz)) {
- map.put(clazz, new HistogramElement(clazz));
- }
- HistogramElement element = map.get(clazz);
- element.updateCount();
- }
-
- out.println("<p align='center'>");
- out.println("<b>");
- out.println("Total ");
- if (count != 0) {
- out.print("<a href='/finalizerObjects/'>instances</a>");
- } else {
- out.print("instances");
- }
- out.println(" pending finalization: ");
- out.print(count);
- out.println("</b></p><hr>");
-
- if (count == 0) {
- return;
- }
-
- // calculate and print histogram
- HistogramElement[] elements = new HistogramElement[map.size()];
- map.values().toArray(elements);
- Arrays.sort(elements, new Comparator<HistogramElement>() {
- public int compare(HistogramElement o1, HistogramElement o2) {
- return o1.compare(o2);
- }
- });
-
- out.println("<table border=1 align=center>");
- out.println("<tr><th>Count</th><th>Class</th></tr>");
- for (int j = 0; j < elements.length; j++) {
- out.println("<tr><td>");
- out.println(elements[j].getCount());
- out.println("</td><td>");
- printClass(elements[j].getClazz());
- out.println("</td><tr>");
- }
- out.println("</table>");
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/HistogramQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.JavaClass;
-import java.util.Arrays;
-import java.util.Comparator;
-
-/**
- * Prints histogram sortable by class name, count and size.
- *
- */
-public class HistogramQuery extends QueryHandler {
- public void run() {
- JavaClass[] classes = snapshot.getClassesArray();
- Comparator<JavaClass> comparator;
- if (query.equals("count")) {
- comparator = new Comparator<JavaClass>() {
- public int compare(JavaClass first, JavaClass second) {
- long diff = (second.getInstancesCount(false) -
- first.getInstancesCount(false));
- return (diff == 0)? 0: ((diff < 0)? -1 : + 1);
- }
- };
- } else if (query.equals("class")) {
- comparator = new Comparator<JavaClass>() {
- public int compare(JavaClass first, JavaClass second) {
- return first.getName().compareTo(second.getName());
- }
- };
- } else {
- // default sort is by total size
- comparator = new Comparator<JavaClass>() {
- public int compare(JavaClass first, JavaClass second) {
- long diff = (second.getTotalInstanceSize() -
- first.getTotalInstanceSize());
- return (diff == 0)? 0: ((diff < 0)? -1 : + 1);
- }
- };
- }
- Arrays.sort(classes, comparator);
-
- startHtml("Heap Histogram");
-
- out.println("<p align='center'>");
- out.println("<b><a href='/'>All Classes (excluding platform)</a></b>");
- out.println("</p>");
-
- out.println("<table align=center border=1>");
- out.println("<tr><th><a href='/histo/class'>Class</a></th>");
- out.println("<th><a href='/histo/count'>Instance Count</a></th>");
- out.println("<th><a href='/histo/size'>Total Size</a></th></tr>");
- for (int i = 0; i < classes.length; i++) {
- JavaClass clazz = classes[i];
- out.println("<tr><td>");
- printClass(clazz);
- out.println("</td>");
- out.println("<td>");
- out.println(clazz.getInstancesCount(false));
- out.println("</td>");
- out.println("<td>");
- out.println(clazz.getTotalInstanceSize());
- out.println("</td></tr>");
- }
- out.println("</table>");
-
- endHtml();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/HttpReader.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
- * 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
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-/**
- * Reads a single HTTP query from a socket, and starts up a QueryHandler
- * to server it.
- *
- * @author Bill Foote
- */
-
-
-import java.net.Socket;
-
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.BufferedWriter;
-import java.io.PrintWriter;
-import java.io.OutputStreamWriter;
-
-import com.sun.tools.hat.internal.model.Snapshot;
-import com.sun.tools.hat.internal.oql.OQLEngine;
-import com.sun.tools.hat.internal.util.Misc;
-
-public class HttpReader implements Runnable {
-
-
- private Socket socket;
- private PrintWriter out;
- private Snapshot snapshot;
- private OQLEngine engine;
-
- public HttpReader (Socket s, Snapshot snapshot, OQLEngine engine) {
- this.socket = s;
- this.snapshot = snapshot;
- this.engine = engine;
- }
-
- public void run() {
- InputStream in = null;
- try {
- in = new BufferedInputStream(socket.getInputStream());
- out = new PrintWriter(new BufferedWriter(
- new OutputStreamWriter(
- socket.getOutputStream())));
- out.println("HTTP/1.0 200 OK");
- out.println("Cache-Control: no-cache");
- out.println("Pragma: no-cache");
- out.println();
- if (in.read() != 'G' || in.read() != 'E'
- || in.read() != 'T' || in.read() != ' ') {
- outputError("Protocol error");
- }
- int data;
- StringBuilder queryBuf = new StringBuilder();
- while ((data = in.read()) != -1 && data != ' ') {
- char ch = (char) data;
- queryBuf.append(ch);
- }
- String query = queryBuf.toString();
- query = java.net.URLDecoder.decode(query, "UTF-8");
- QueryHandler handler = null;
- if (snapshot == null) {
- outputError("The heap snapshot is still being read.");
- return;
- } else if (query.equals("/")) {
- handler = new AllClassesQuery(true, engine != null);
- handler.setUrlStart("");
- handler.setQuery("");
- } else if (query.startsWith("/oql/")) {
- if (engine != null) {
- handler = new OQLQuery(engine);
- handler.setUrlStart("");
- handler.setQuery(query.substring(5));
- }
- } else if (query.startsWith("/oqlhelp/")) {
- if (engine != null) {
- handler = new OQLHelp();
- handler.setUrlStart("");
- handler.setQuery("");
- }
- } else if (query.equals("/allClassesWithPlatform/")) {
- handler = new AllClassesQuery(false, engine != null);
- handler.setUrlStart("../");
- handler.setQuery("");
- } else if (query.equals("/showRoots/")) {
- handler = new AllRootsQuery();
- handler.setUrlStart("../");
- handler.setQuery("");
- } else if (query.equals("/showInstanceCounts/includePlatform/")) {
- handler = new InstancesCountQuery(false);
- handler.setUrlStart("../../");
- handler.setQuery("");
- } else if (query.equals("/showInstanceCounts/")) {
- handler = new InstancesCountQuery(true);
- handler.setUrlStart("../");
- handler.setQuery("");
- } else if (query.startsWith("/instances/")) {
- handler = new InstancesQuery(false);
- handler.setUrlStart("../");
- handler.setQuery(query.substring(11));
- } else if (query.startsWith("/newInstances/")) {
- handler = new InstancesQuery(false, true);
- handler.setUrlStart("../");
- handler.setQuery(query.substring(14));
- } else if (query.startsWith("/allInstances/")) {
- handler = new InstancesQuery(true);
- handler.setUrlStart("../");
- handler.setQuery(query.substring(14));
- } else if (query.startsWith("/allNewInstances/")) {
- handler = new InstancesQuery(true, true);
- handler.setUrlStart("../");
- handler.setQuery(query.substring(17));
- } else if (query.startsWith("/object/")) {
- handler = new ObjectQuery();
- handler.setUrlStart("../");
- handler.setQuery(query.substring(8));
- } else if (query.startsWith("/class/")) {
- handler = new ClassQuery();
- handler.setUrlStart("../");
- handler.setQuery(query.substring(7));
- } else if (query.startsWith("/roots/")) {
- handler = new RootsQuery(false);
- handler.setUrlStart("../");
- handler.setQuery(query.substring(7));
- } else if (query.startsWith("/allRoots/")) {
- handler = new RootsQuery(true);
- handler.setUrlStart("../");
- handler.setQuery(query.substring(10));
- } else if (query.startsWith("/reachableFrom/")) {
- handler = new ReachableQuery();
- handler.setUrlStart("../");
- handler.setQuery(query.substring(15));
- } else if (query.startsWith("/rootStack/")) {
- handler = new RootStackQuery();
- handler.setUrlStart("../");
- handler.setQuery(query.substring(11));
- } else if (query.startsWith("/histo/")) {
- handler = new HistogramQuery();
- handler.setUrlStart("../");
- handler.setQuery(query.substring(7));
- } else if (query.startsWith("/refsByType/")) {
- handler = new RefsByTypeQuery();
- handler.setUrlStart("../");
- handler.setQuery(query.substring(12));
- } else if (query.startsWith("/finalizerSummary/")) {
- handler = new FinalizerSummaryQuery();
- handler.setUrlStart("../");
- handler.setQuery("");
- } else if (query.startsWith("/finalizerObjects/")) {
- handler = new FinalizerObjectsQuery();
- handler.setUrlStart("../");
- handler.setQuery("");
- }
-
- if (handler != null) {
- handler.setOutput(out);
- handler.setSnapshot(snapshot);
- handler.run();
- } else {
- outputError("Query '" + query + "' not implemented");
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- } finally {
- if (out != null) {
- out.close();
- }
- try {
- if (in != null) {
- in.close();
- }
- } catch (IOException ignored) {
- }
- try {
- socket.close();
- } catch (IOException ignored) {
- }
- }
- }
-
- private void outputError(String msg) {
- out.println();
- out.println("<html><body bgcolor=\"#ffffff\">");
- out.println(Misc.encodeHtml(msg));
- out.println("</body></html>");
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
-import java.util.Enumeration;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class InstancesCountQuery extends QueryHandler {
-
-
- private boolean excludePlatform;
-
- public InstancesCountQuery(boolean excludePlatform) {
- this.excludePlatform = excludePlatform;
- }
-
- public void run() {
- if (excludePlatform) {
- startHtml("Instance Counts for All Classes (excluding platform)");
- } else {
- startHtml("Instance Counts for All Classes (including platform)");
- }
-
- JavaClass[] classes = snapshot.getClassesArray();
- if (excludePlatform) {
- int num = 0;
- for (int i = 0; i < classes.length; i++) {
- if (! PlatformClasses.isPlatformClass(classes[i])) {
- classes[num++] = classes[i];
- }
- }
- JavaClass[] tmp = new JavaClass[num];
- System.arraycopy(classes, 0, tmp, 0, tmp.length);
- classes = tmp;
- }
- ArraySorter.sort(classes, new Comparer() {
- public int compare(Object lhso, Object rhso) {
- JavaClass lhs = (JavaClass) lhso;
- JavaClass rhs = (JavaClass) rhso;
- int diff = lhs.getInstancesCount(false)
- - rhs.getInstancesCount(false);
- if (diff != 0) {
- return -diff; // Sort from biggest to smallest
- }
- String left = lhs.getName();
- String right = rhs.getName();
- if (left.startsWith("[") != right.startsWith("[")) {
- // Arrays at the end
- if (left.startsWith("[")) {
- return 1;
- } else {
- return -1;
- }
- }
- return left.compareTo(right);
- }
- });
-
- String lastPackage = null;
- long totalSize = 0;
- long instances = 0;
- for (int i = 0; i < classes.length; i++) {
- JavaClass clazz = classes[i];
- int count = clazz.getInstancesCount(false);
- print("" + count);
- printAnchorStart();
- print("instances/" + encodeForURL(classes[i]));
- out.print("\"> ");
- if (count == 1) {
- print("instance");
- } else {
- print("instances");
- }
- out.print("</a> ");
- if (snapshot.getHasNewSet()) {
- Enumeration<JavaHeapObject> objects = clazz.getInstances(false);
- int newInst = 0;
- while (objects.hasMoreElements()) {
- JavaHeapObject obj = objects.nextElement();
- if (obj.isNew()) {
- newInst++;
- }
- }
- print("(");
- printAnchorStart();
- print("newInstances/" + encodeForURL(classes[i]));
- out.print("\">");
- print("" + newInst + " new");
- out.print("</a>) ");
- }
- print("of ");
- printClass(classes[i]);
- out.println("<br>");
- instances += count;
- totalSize += classes[i].getTotalInstanceSize();
- }
- out.println("<h2>Total of " + instances + " instances occupying " + totalSize + " bytes.</h2>");
-
- out.println("<h2>Other Queries</h2>");
- out.println("<ul>");
-
- out.print("<li>");
- printAnchorStart();
- if (!excludePlatform) {
- out.print("showInstanceCounts/\">");
- print("Show instance counts for all classes (excluding platform)");
- } else {
- out.print("showInstanceCounts/includePlatform/\">");
- print("Show instance counts for all classes (including platform)");
- }
- out.println("</a>");
-
- out.print("<li>");
- printAnchorStart();
- out.print("allClassesWithPlatform/\">");
- print("Show All Classes (including platform)");
- out.println("</a>");
-
- out.print("<li>");
- printAnchorStart();
- out.print("\">");
- print("Show All Classes (excluding platform)");
- out.println("</a>");
-
- out.println("</ul>");
-
- endHtml();
- }
-
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import java.util.Enumeration;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class InstancesQuery extends QueryHandler {
-
- private boolean includeSubclasses;
- private boolean newObjects;
-
- public InstancesQuery(boolean includeSubclasses) {
- this.includeSubclasses = includeSubclasses;
- }
-
- public InstancesQuery(boolean includeSubclasses, boolean newObjects) {
- this.includeSubclasses = includeSubclasses;
- this.newObjects = newObjects;
- }
-
- public void run() {
- JavaClass clazz = snapshot.findClass(query);
- String instancesOf;
- if (newObjects)
- instancesOf = "New instances of ";
- else
- instancesOf = "Instances of ";
- if (includeSubclasses) {
- startHtml(instancesOf + query + " (including subclasses)");
- } else {
- startHtml(instancesOf + query);
- }
- if (clazz == null) {
- error("Class not found");
- } else {
- out.print("<strong>");
- printClass(clazz);
- out.print("</strong><br><br>");
- Enumeration<JavaHeapObject> objects = clazz.getInstances(includeSubclasses);
- long totalSize = 0;
- long instances = 0;
- while (objects.hasMoreElements()) {
- JavaHeapObject obj = objects.nextElement();
- if (newObjects && !obj.isNew())
- continue;
- printThing(obj);
- out.println("<br>");
- totalSize += obj.getSize();
- instances++;
- }
- out.println("<h2>Total of " + instances + " instances occupying " + totalSize + " bytes.</h2>");
- }
- endHtml();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/OQLHelp.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * 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
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import java.io.*;
-
-/**
- * This handles Object Query Language (OQL) help.
- *
- * @author A. Sundararajan
- */
-
-class OQLHelp extends QueryHandler {
-
- public OQLHelp() {
- }
-
- public void run() {
- InputStream is = getClass().getResourceAsStream("/com/sun/tools/hat/resources/oqlhelp.html");
- int ch = -1;
- try {
- is = new BufferedInputStream(is);
- while ( (ch = is.read()) != -1) {
- out.print((char)ch);
- }
- } catch (Exception exp) {
- printException(exp);
- }
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/OQLQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * 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
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.oql.*;
-
-/**
- * This handles Object Query Language (OQL) queries.
- *
- * @author A. Sundararajan
- */
-
-class OQLQuery extends QueryHandler {
-
- public OQLQuery(OQLEngine engine) {
- this.engine = engine;
- }
-
- public void run() {
- startHtml("Object Query Language (OQL) query");
- String oql = null;
- if (query != null && !query.equals("")) {
- int index = query.indexOf("?query=");
- if (index != -1 && query.length() > 7) {
- oql = query.substring(index + 7);
- }
- }
- out.println("<p align='center'><table>");
- out.println("<tr><td><b>");
- out.println("<a href='/'>All Classes (excluding platform)</a>");
- out.println("</b></td>");
- out.println("<td><b><a href='/oqlhelp/'>OQL Help</a></b></td></tr>");
- out.println("</table></p>");
- out.println("<form action='/oql/' method='get'>");
- out.println("<p align='center'>");
- out.println("<textarea name='query' cols=80 rows=10>");
- if (oql != null) {
- println(oql);
- }
- out.println("</textarea>");
- out.println("</p>");
- out.println("<p align='center'>");
- out.println("<input type='submit' value='Execute'></input>");
- out.println("</p>");
- out.println("</form>");
- if (oql != null) {
- executeQuery(oql);
- }
- endHtml();
- }
-
- private void executeQuery(String q) {
- try {
- out.println("<table border='1'>");
- engine.executeQuery(q, new ObjectVisitor() {
- public boolean visit(Object o) {
- out.println("<tr><td>");
- try {
- out.println(engine.toHtml(o));
- } catch (Exception e) {
- printException(e);
- }
- out.println("</td></tr>");
- return false;
- }
- });
- out.println("</table>");
- } catch (OQLException exp) {
- printException(exp);
- }
- }
-
- private OQLEngine engine;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/ObjectQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import java.util.Enumeration;
-
-import com.sun.tools.hat.internal.model.*;
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class ObjectQuery extends ClassQuery {
- // We inherit printFullClass from ClassQuery
-
- public ObjectQuery() {
- }
-
- public void run() {
- startHtml("Object at " + query);
- long id = parseHex(query);
- JavaHeapObject thing = snapshot.findThing(id);
- //
- // In the following, I suppose we really should use a visitor
- // pattern. I'm not that strongly motivated to do this, however:
- // This is the only typecase there is, and the default for an
- // unrecognized type is to do something reasonable.
- //
- if (thing == null) {
- error("object not found");
- } else if (thing instanceof JavaClass) {
- printFullClass((JavaClass) thing);
- } else if (thing instanceof JavaValueArray) {
- print(((JavaValueArray) thing).valueString(true));
- printAllocationSite(thing);
- printReferencesTo(thing);
- } else if (thing instanceof JavaObjectArray) {
- printFullObjectArray((JavaObjectArray) thing);
- printAllocationSite(thing);
- printReferencesTo(thing);
- } else if (thing instanceof JavaObject) {
- printFullObject((JavaObject) thing);
- printAllocationSite(thing);
- printReferencesTo(thing);
- } else {
- // We should never get here
- print(thing.toString());
- printReferencesTo(thing);
- }
- endHtml();
- }
-
-
- private void printFullObject(JavaObject obj) {
- out.print("<h1>instance of ");
- print(obj.toString());
- out.print(" <small>(" + obj.getSize() + " bytes)</small>");
- out.println("</h1>\n");
-
- out.println("<h2>Class:</h2>");
- printClass(obj.getClazz());
-
- out.println("<h2>Instance data members:</h2>");
- final JavaThing[] things = obj.getFields();
- final JavaField[] fields = obj.getClazz().getFieldsForInstance();
- Integer[] hack = new Integer[things.length];
- for (int i = 0; i < things.length; i++) {
- hack[i] = i;
- }
- ArraySorter.sort(hack, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- JavaField left = fields[((Integer) lhs).intValue()];
- JavaField right = fields[((Integer) rhs).intValue()];
- return left.getName().compareTo(right.getName());
- }
- });
- for (int i = 0; i < things.length; i++) {
- int index = hack[i].intValue();
- printField(fields[index]);
- out.print(" : ");
- printThing(things[index]);
- out.println("<br>");
- }
- }
-
- private void printFullObjectArray(JavaObjectArray arr) {
- JavaThing[] elements = arr.getElements();
- out.println("<h1>Array of " + elements.length + " objects</h1>");
-
- out.println("<h2>Class:</h2>");
- printClass(arr.getClazz());
-
- out.println("<h2>Values</h2>");
- for (int i = 0; i < elements.length; i++) {
- out.print("" + i + " : ");
- printThing(elements[i]);
- out.println("<br>");
- }
- }
-
- //
- // Print the StackTrace where this was allocated
- //
- private void printAllocationSite(JavaHeapObject obj) {
- StackTrace trace = obj.getAllocatedFrom();
- if (trace == null || trace.getFrames().length == 0) {
- return;
- }
- out.println("<h2>Object allocated from:</h2>");
- printStackTrace(trace);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/PlatformClasses.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.JavaClass;
-import com.sun.tools.hat.internal.model.Snapshot;
-
-import java.util.LinkedList;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.io.IOException;
-
-/**
- * This class is a helper that determines if a class is a "platform"
- * class or not. It's a platform class if its name starts with one of
- * the prefixes to be found in /com/sun/tools/hat/resources/platform_names.txt.
- *
- * @author Bill Foote
- */
-
-public class PlatformClasses {
-
- static String[] names = null;
-
-
- public static synchronized String[] getNames() {
- if (names == null) {
- LinkedList<String> list = new LinkedList<String>();
- InputStream str
- = PlatformClasses.class
- .getResourceAsStream("/com/sun/tools/hat/resources/platform_names.txt");
- if (str != null) {
- try {
- BufferedReader rdr
- = new BufferedReader(new InputStreamReader(str));
- for (;;) {
- String s = rdr.readLine();
- if (s == null) {
- break;
- } else if (s.length() > 0) {
- list.add(s);
- }
- }
- rdr.close();
- str.close();
- } catch (IOException ex) {
- ex.printStackTrace();
- // Shouldn't happen, and if it does, continuing
- // is the right thing to do anyway.
- }
- }
- names = list.toArray(new String[list.size()]);
- }
- return names;
- }
-
-
- public static boolean isPlatformClass(JavaClass clazz) {
- // all classes loaded by bootstrap loader are considered
- // platform classes. In addition, the older name based filtering
- // is also done for compatibility.
- if (clazz.isBootstrap()) {
- return true;
- }
-
- String name = clazz.getName();
- // skip even the array classes of the skipped classes.
- if (name.startsWith("[")) {
- int index = name.lastIndexOf('[');
- if (index != -1) {
- if (name.charAt(index + 1) != 'L') {
- // some primitive array.
- return true;
- }
- // skip upto 'L' after the last '['.
- name = name.substring(index + 2);
- }
- }
- String[] nms = getNames();
- for (int i = 0; i < nms.length; i++) {
- if (name.startsWith(nms[i])) {
- return true;
- }
- }
- return false;
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/QueryHandler.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
- * 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
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import java.io.PrintWriter;
-
-import com.sun.tools.hat.internal.model.*;
-import com.sun.tools.hat.internal.util.Misc;
-import java.io.StringWriter;
-
-import java.net.URLEncoder;
-import java.io.UnsupportedEncodingException;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-abstract class QueryHandler {
-
- protected String urlStart;
- protected String query;
- protected PrintWriter out;
- protected Snapshot snapshot;
-
- abstract void run();
-
-
- void setUrlStart(String s) {
- urlStart = s;
- }
-
- void setQuery(String s) {
- query = s;
- }
-
- void setOutput(PrintWriter o) {
- this.out = o;
- }
-
- void setSnapshot(Snapshot ss) {
- this.snapshot = ss;
- }
-
- protected String encodeForURL(String s) {
- try {
- s = URLEncoder.encode(s, "UTF-8");
- } catch (UnsupportedEncodingException ex) {
- // Should never happen
- ex.printStackTrace();
- }
- return s;
- }
-
- protected void startHtml(String title) {
- out.print("<html><title>");
- print(title);
- out.println("</title>");
- out.println("<body bgcolor=\"#ffffff\"><center><h1>");
- print(title);
- out.println("</h1></center>");
- }
-
- protected void endHtml() {
- out.println("</body></html>");
- }
-
- protected void error(String msg) {
- println(msg);
- }
-
- protected void printAnchorStart() {
- out.print("<a href=\"");
- out.print(urlStart);
- }
-
- protected void printThingAnchorTag(long id) {
- printAnchorStart();
- out.print("object/");
- printHex(id);
- out.print("\">");
- }
-
- protected void printObject(JavaObject obj) {
- printThing(obj);
- }
-
- protected void printThing(JavaThing thing) {
- if (thing == null) {
- out.print("null");
- return;
- }
- if (thing instanceof JavaHeapObject) {
- JavaHeapObject ho = (JavaHeapObject) thing;
- long id = ho.getId();
- if (id != -1L) {
- if (ho.isNew())
- out.println("<strong>");
- printThingAnchorTag(id);
- }
- print(thing.toString());
- if (id != -1) {
- if (ho.isNew())
- out.println("[new]</strong>");
- out.print(" (" + ho.getSize() + " bytes)");
- out.println("</a>");
- }
- } else {
- print(thing.toString());
- }
- }
-
- protected void printRoot(Root root) {
- StackTrace st = root.getStackTrace();
- boolean traceAvailable = (st != null) && (st.getFrames().length != 0);
- if (traceAvailable) {
- printAnchorStart();
- out.print("rootStack/");
- printHex(root.getIndex());
- out.print("\">");
- }
- print(root.getDescription());
- if (traceAvailable) {
- out.print("</a>");
- }
- }
-
- protected void printClass(JavaClass clazz) {
- if (clazz == null) {
- out.println("null");
- return;
- }
- printAnchorStart();
- out.print("class/");
- print(encodeForURL(clazz));
- out.print("\">");
- print(clazz.toString());
- out.println("</a>");
- }
-
- protected String encodeForURL(JavaClass clazz) {
- if (clazz.getId() == -1) {
- return encodeForURL(clazz.getName());
- } else {
- return clazz.getIdString();
- }
- }
-
- protected void printField(JavaField field) {
- print(field.getName() + " (" + field.getSignature() + ")");
- }
-
- protected void printStatic(JavaStatic member) {
- JavaField f = member.getField();
- printField(f);
- out.print(" : ");
- if (f.hasId()) {
- JavaThing t = member.getValue();
- printThing(t);
- } else {
- print(member.getValue().toString());
- }
- }
-
- protected void printStackTrace(StackTrace trace) {
- StackFrame[] frames = trace.getFrames();
- for (int i = 0; i < frames.length; i++) {
- StackFrame f = frames[i];
- String clazz = f.getClassName();
- out.print("<font color=purple>");
- print(clazz);
- out.print("</font>");
- print("." + f.getMethodName() + "(" + f.getMethodSignature() + ")");
- out.print(" <bold>:</bold> ");
- print(f.getSourceFileName() + " line " + f.getLineNumber());
- out.println("<br>");
- }
- }
-
- protected void printException(Throwable t) {
- println(t.getMessage());
- out.println("<pre>");
- StringWriter sw = new StringWriter();
- t.printStackTrace(new PrintWriter(sw));
- print(sw.toString());
- out.println("</pre>");
- }
-
- protected void printHex(long addr) {
- if (snapshot.getIdentifierSize() == 4) {
- out.print(Misc.toHex((int)addr));
- } else {
- out.print(Misc.toHex(addr));
- }
- }
-
- protected long parseHex(String value) {
- return Misc.parseHex(value);
- }
-
- protected void print(String str) {
- out.print(Misc.encodeHtml(str));
- }
-
- protected void println(String str) {
- out.println(Misc.encodeHtml(str));
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/QueryListener.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-import java.net.Socket;
-import java.net.ServerSocket;
-import java.net.InetAddress;
-
-import java.io.InputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.Writer;
-import java.io.BufferedWriter;
-import java.io.PrintWriter;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.BufferedOutputStream;
-
-import com.sun.tools.hat.internal.model.Snapshot;
-import com.sun.tools.hat.internal.oql.OQLEngine;
-
-public class QueryListener implements Runnable {
-
-
- private Snapshot snapshot;
- private OQLEngine engine;
- private int port;
-
- public QueryListener(int port) {
- this.port = port;
- this.snapshot = null; // Client will setModel when it's ready
- this.engine = null; // created when snapshot is set
- }
-
- public void setModel(Snapshot ss) {
- this.snapshot = ss;
- if (OQLEngine.isOQLSupported()) {
- this.engine = new OQLEngine(ss);
- }
- }
-
- public void run() {
- try {
- waitForRequests();
- } catch (IOException ex) {
- ex.printStackTrace();
- System.exit(1);
- }
- }
-
- private void waitForRequests() throws IOException {
- ServerSocket ss = new ServerSocket(port);
- Thread last = null;
- for (;;) {
- Socket s = ss.accept();
- Thread t = new Thread(new HttpReader(s, snapshot, engine));
- if (snapshot == null) {
- t.setPriority(Thread.NORM_PRIORITY+1);
- } else {
- t.setPriority(Thread.NORM_PRIORITY-1);
- if (last != null) {
- try {
- last.setPriority(Thread.NORM_PRIORITY-2);
- } catch (Throwable ignored) {
- }
- // If the thread is no longer alive, we'll get a
- // NullPointerException
- }
- }
- t.start();
- last = t;
- }
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/ReachableQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class ReachableQuery extends QueryHandler {
- // We inherit printFullClass from ClassQuery
-
-
- public ReachableQuery() {
- }
-
- public void run() {
- startHtml("Objects Reachable From " + query);
- long id = parseHex(query);
- JavaHeapObject root = snapshot.findThing(id);
- ReachableObjects ro = new ReachableObjects(root,
- snapshot.getReachableExcludes());
- // Now, print out the sorted list, but start with root
- long totalSize = ro.getTotalSize();
- JavaThing[] things = ro.getReachables();
- long instances = things.length;
-
- out.print("<strong>");
- printThing(root);
- out.println("</strong><br>");
- out.println("<br>");
- for (int i = 0; i < things.length; i++) {
- printThing(things[i]);
- out.println("<br>");
- }
-
- printFields(ro.getUsedFields(), "Data Members Followed");
- printFields(ro.getExcludedFields(), "Excluded Data Members");
- out.println("<h2>Total of " + instances + " instances occupying " + totalSize + " bytes.</h2>");
-
- endHtml();
- }
-
- private void printFields(String[] fields, String title) {
- if (fields.length == 0) {
- return;
- }
- out.print("<h3>");
- print(title);
- out.println("</h3>");
-
- for (int i = 0; i < fields.length; i++) {
- print(fields[i]);
- out.println("<br>");
- }
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import com.sun.tools.hat.internal.model.*;
-import java.util.*;
-
-/**
- * References by type summary
- *
- */
-public class RefsByTypeQuery extends QueryHandler {
- public void run() {
- JavaClass clazz = snapshot.findClass(query);
- if (clazz == null) {
- error("class not found: " + query);
- } else {
- Map<JavaClass, Long> referrersStat = new HashMap<JavaClass, Long>();
- final Map<JavaClass, Long> refereesStat = new HashMap<JavaClass, Long>();
- Enumeration<JavaHeapObject> instances = clazz.getInstances(false);
- while (instances.hasMoreElements()) {
- JavaHeapObject instance = instances.nextElement();
- if (instance.getId() == -1) {
- continue;
- }
- Enumeration<JavaThing> e = instance.getReferers();
- while (e.hasMoreElements()) {
- JavaHeapObject ref = (JavaHeapObject)e.nextElement();
- JavaClass cl = ref.getClazz();
- if (cl == null) {
- System.out.println("null class for " + ref);
- continue;
- }
- Long count = referrersStat.get(cl);
- if (count == null) {
- count = 1L;
- } else {
- count = count + 1L;
- }
- referrersStat.put(cl, count);
- }
- instance.visitReferencedObjects(
- new AbstractJavaHeapObjectVisitor() {
- public void visit(JavaHeapObject obj) {
- JavaClass cl = obj.getClazz();
- Long count = refereesStat.get(cl);
- if (count == null) {
- count = 1L;
- } else {
- count = count + 1L;
- }
- refereesStat.put(cl, count);
- }
- }
- );
- } // for each instance
-
- startHtml("References by Type");
- out.println("<p align='center'>");
- printClass(clazz);
- if (clazz.getId() != -1) {
- println("[" + clazz.getIdString() + "]");
- }
- out.println("</p>");
-
- if (referrersStat.size() != 0) {
- out.println("<h3 align='center'>Referrers by Type</h3>");
- print(referrersStat);
- }
-
- if (refereesStat.size() != 0) {
- out.println("<h3 align='center'>Referees by Type</h3>");
- print(refereesStat);
- }
-
- endHtml();
- } // clazz != null
- } // run
-
- private void print(final Map<JavaClass, Long> map) {
- out.println("<table border='1' align='center'>");
- Set<JavaClass> keys = map.keySet();
- JavaClass[] classes = new JavaClass[keys.size()];
- keys.toArray(classes);
- Arrays.sort(classes, new Comparator<JavaClass>() {
- public int compare(JavaClass first, JavaClass second) {
- Long count1 = map.get(first);
- Long count2 = map.get(second);
- return count2.compareTo(count1);
- }
- });
-
- out.println("<tr><th>Class</th><th>Count</th></tr>");
- for (int i = 0; i < classes.length; i++) {
- JavaClass clazz = classes[i];
- out.println("<tr><td>");
- out.print("<a href='/refsByType/");
- print(clazz.getIdString());
- out.print("'>");
- print(clazz.getName());
- out.println("</a>");
- out.println("</td><td>");
- out.println(map.get(clazz));
- out.println("</td></tr>");
- }
- out.println("</table>");
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/RootStackQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-
-import com.sun.tools.hat.internal.model.*;
-
-/**
- * Query to show the StackTrace for a given root
- *
- * @author Bill Foote
- */
-
-
-class RootStackQuery extends QueryHandler {
-
- public RootStackQuery() {
- }
-
- public void run() {
- int index = (int) parseHex(query);
- Root root = snapshot.getRootAt(index);
- if (root == null) {
- error("Root at " + index + " not found");
- return;
- }
- StackTrace st = root.getStackTrace();
- if (st == null || st.getFrames().length == 0) {
- error("No stack trace for " + root.getDescription());
- return;
- }
- startHtml("Stack Trace for " + root.getDescription());
- out.println("<p>");
- printStackTrace(st);
- out.println("</p>");
- endHtml();
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/server/RootsQuery.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.server;
-
-import java.util.Vector;
-
-import com.sun.tools.hat.internal.model.*;
-import com.sun.tools.hat.internal.util.ArraySorter;
-import com.sun.tools.hat.internal.util.Comparer;
-
-/**
- *
- * @author Bill Foote
- */
-
-
-class RootsQuery extends QueryHandler {
-
- private boolean includeWeak;
-
- public RootsQuery(boolean includeWeak) {
- this.includeWeak = includeWeak;
- }
-
- public void run() {
- long id = parseHex(query);
- JavaHeapObject target = snapshot.findThing(id);
- if (target == null) {
- startHtml("Object not found for rootset");
- error("object not found");
- endHtml();
- return;
- }
- if (includeWeak) {
- startHtml("Rootset references to " + target
- + " (includes weak refs)");
- } else {
- startHtml("Rootset references to " + target
- + " (excludes weak refs)");
- }
- out.flush();
-
- ReferenceChain[] refs
- = snapshot.rootsetReferencesTo(target, includeWeak);
- ArraySorter.sort(refs, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- ReferenceChain left = (ReferenceChain) lhs;
- ReferenceChain right = (ReferenceChain) rhs;
- Root leftR = left.getObj().getRoot();
- Root rightR = right.getObj().getRoot();
- int d = leftR.getType() - rightR.getType();
- if (d != 0) {
- return -d; // More interesting values are *higher*
- }
- return left.getDepth() - right.getDepth();
- }
- });
-
- out.print("<h1>References to ");
- printThing(target);
- out.println("</h1>");
- int lastType = Root.INVALID_TYPE;
- for (int i= 0; i < refs.length; i++) {
- ReferenceChain ref = refs[i];
- Root root = ref.getObj().getRoot();
- if (root.getType() != lastType) {
- lastType = root.getType();
- out.print("<h2>");
- print(root.getTypeName() + " References");
- out.println("</h2>");
- }
- out.print("<h3>");
- printRoot(root);
- if (root.getReferer() != null) {
- out.print("<small> (from ");
- printThingAnchorTag(root.getReferer().getId());
- print(root.getReferer().toString());
- out.print(")</a></small>");
-
- }
- out.print(" :</h3>");
- while (ref != null) {
- ReferenceChain next = ref.getNext();
- JavaHeapObject obj = ref.getObj();
- print("--> ");
- printThing(obj);
- if (next != null) {
- print(" (" +
- obj.describeReferenceTo(next.getObj(), snapshot)
- + ":)");
- }
- out.println("<br>");
- ref = next;
- }
- }
-
- out.println("<h2>Other queries</h2>");
-
- if (includeWeak) {
- printAnchorStart();
- out.print("roots/");
- printHex(id);
- out.print("\">");
- out.println("Exclude weak refs</a><br>");
- endHtml();
- }
-
- if (!includeWeak) {
- printAnchorStart();
- out.print("allRoots/");
- printHex(id);
- out.print("\">");
- out.println("Include weak refs</a><br>");
- }
- }
-
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/ArraySorter.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.util;
-import java.util.*;
-
-/**
- * A singleton utility class that sorts an array of objects.
- * <p>
- * Use:
- * <pre>
- *
- * Stuff[] arr = ...;
- * ArraySorter.sort(arr, new Comparer() {
- * public int compare(Object lhs, Object rhs) {
- * return ((String) lhs).compareTo((String) rhs);
- * }
- * });
- * </pre>
- *
- * @author Bill Foote
- */
-
-public class ArraySorter {
-
- /**
- * Sort the given array, using c for comparison
- **/
- static public void sort(Object[] arr, Comparer c) {
- quickSort(arr, c, 0, arr.length-1);
- }
-
-
- /**
- * Sort an array of strings, using String.compareTo()
- **/
- static public void sortArrayOfStrings(Object[] arr) {
- sort(arr, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- return ((String) lhs).compareTo((String) rhs);
- }
- });
- }
-
-
- static private void swap(Object[] arr, int a, int b) {
- Object tmp = arr[a];
- arr[a] = arr[b];
- arr[b] = tmp;
- }
-
- //
- // Sorts arr between from and to, inclusive. This is a quick, off-the-top-
- // of-my-head quicksort: I haven't put any thought into optimizing it.
- // I _did_ put thought into making sure it's safe (it will always
- // terminate). Worst-case it's O(n^2), but it will usually run in
- // in O(n log n). It's well-behaved if the list is already sorted,
- // or nearly so.
- //
- static private void quickSort(Object[] arr, Comparer c, int from, int to) {
- if (to <= from)
- return;
- int mid = (from + to) / 2;
- if (mid != from)
- swap(arr, mid, from);
- Object pivot = arr[from]; // Simple-minded, but reasonable
- int highestBelowPivot = from - 1;
- int low = from+1;
- int high = to;
- // We now move low and high toward each other, maintaining the
- // invariants:
- // arr[i] <= pivot for all i < low
- // arr[i] > pivot for all i > high
- // As long as these invariants hold, and every iteration makes
- // progress, we are safe.
- while (low <= high) {
- int cmp = c.compare(arr[low], pivot);
- if (cmp <= 0) { // arr[low] <= pivot
- if (cmp < 0) {
- highestBelowPivot = low;
- }
- low++;
- } else {
- int c2;
- for (;;) {
- // arr[high] > pivot:
- c2 = c.compare(arr[high], pivot);
- if (c2 > 0) {
- high--;
- if (low > high) {
- break;
- }
- } else {
- break;
- }
- }
- // At this point, low is never == high, BTW
- if (low <= high) {
- swap(arr, low, high);
- if (c2 < 0) {
- highestBelowPivot = low;
- }
- low++;
- high--;
- }
- }
- }
- // At this point, low == high+1
- // Now we just need to sort from from..highestBelowPivot
- // and from high+1..to
- if (highestBelowPivot > from) {
- // pivot == pivot, so ensure algorithm terminates
- swap(arr, from, highestBelowPivot);
- quickSort(arr, c, from, highestBelowPivot-1);
- }
- quickSort(arr, c, high+1, to);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/Comparer.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.util;
-
-/**
- * Base class for comparison of two objects.
- * @see VectorSorter
- *
- * @author Bill Foote
- */
-
-abstract public class Comparer {
-
- /**
- * @return a number <, == or > 0 depending on lhs compared to rhs
- * @see java.lang.String.compareTo
- **/
- abstract public int compare(Object lhs, Object rhs);
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.util;
-
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import com.sun.tools.hat.internal.model.JavaHeapObject;
-
-public class CompositeEnumeration implements Enumeration<JavaHeapObject> {
- Enumeration<JavaHeapObject> e1;
- Enumeration<JavaHeapObject> e2;
-
- public CompositeEnumeration(Enumeration<JavaHeapObject> e1, Enumeration<JavaHeapObject> e2) {
- this.e1 = e1;
- this.e2 = e2;
- }
-
- public boolean hasMoreElements() {
- return e1.hasMoreElements() || e2.hasMoreElements();
- }
-
- public JavaHeapObject nextElement() {
- if (e1.hasMoreElements()) {
- return e1.nextElement();
- }
-
- if (e2.hasMoreElements()) {
- return e2.nextElement();
- }
-
- throw new NoSuchElementException();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/Misc.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.util;
-import java.util.*;
-
-/**
- * Miscellaneous functions I couldn't think of a good place to put.
- *
- * @author Bill Foote
- */
-
-
-public class Misc {
-
- private static char[] digits = { '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-
- public final static String toHex(int addr) {
- char[] buf = new char[8];
- int i = 0;
- for (int s = 28; s >= 0; s -= 4) {
- buf[i++] = digits[(addr >> s) & 0xf];
- }
- return "0x" + new String(buf);
- }
-
- public final static String toHex(long addr) {
- return "0x" + Long.toHexString(addr);
- }
-
- public final static long parseHex(String value) {
- long result = 0;
- if (value.length() < 2 || value.charAt(0) != '0' ||
- value.charAt(1) != 'x') {
- return -1L;
- }
- for(int i = 2; i < value.length(); i++) {
- result *= 16;
- char ch = value.charAt(i);
- if (ch >= '0' && ch <= '9') {
- result += (ch - '0');
- } else if (ch >= 'a' && ch <= 'f') {
- result += (ch - 'a') + 10;
- } else if (ch >= 'A' && ch <= 'F') {
- result += (ch - 'A') + 10;
- } else {
- throw new NumberFormatException("" + ch
- + " is not a valid hex digit");
- }
- }
- return result;
- }
-
- public static String encodeHtml(String str) {
- final int len = str.length();
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < len; i++) {
- char ch = str.charAt(i);
- if (ch == '<') {
- sb.append("<");
- } else if (ch == '>') {
- sb.append(">");
- } else if (ch == '"') {
- sb.append(""");
- } else if (ch == '\'') {
- sb.append("'");
- } else if (ch == '&') {
- sb.append("&");
- } else if (ch < ' ') {
- sb.append("&#").append((int)ch).append(';');
- } else {
- int c = (ch & 0xFFFF);
- if (c > 127) {
- sb.append("&#").append(c).append(';');
- } else {
- sb.append(ch);
- }
- }
- }
- return sb.toString();
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/VectorSorter.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-package com.sun.tools.hat.internal.util;
-import java.util.*;
-
-/**
- * A singleton utility class that sorts a vector.
- * <p>
- * Use:
- * <pre>
- *
- * Vector v = <a vector of, say, String objects>;
- * VectorSorter.sort(v, new Comparer() {
- * public int compare(Object lhs, Object rhs) {
- * return ((String) lhs).compareTo((String) rhs);
- * }
- * });
- * </pre>
- *
- * @author Bill Foote
- */
-
-
-public class VectorSorter {
-
- /**
- * Sort the given vector, using c for comparison
- **/
- static public void sort(Vector<Object> v, Comparer c) {
- quickSort(v, c, 0, v.size()-1);
- }
-
-
- /**
- * Sort a vector of strings, using String.compareTo()
- **/
- static public void sortVectorOfStrings(Vector<Object> v) {
- sort(v, new Comparer() {
- public int compare(Object lhs, Object rhs) {
- return ((String) lhs).compareTo((String) rhs);
- }
- });
- }
-
-
- static private void swap(Vector<Object> v, int a, int b) {
- Object tmp = v.elementAt(a);
- v.setElementAt(v.elementAt(b), a);
- v.setElementAt(tmp, b);
- }
-
- //
- // Sorts v between from and to, inclusive. This is a quick, off-the-top-
- // of-my-head quicksort: I haven't put any thought into optimizing it.
- // I _did_ put thought into making sure it's safe (it will always
- // terminate). Worst-case it's O(n^2), but it will usually run in
- // in O(n log n). It's well-behaved if the list is already sorted,
- // or nearly so.
- //
- static private void quickSort(Vector<Object> v, Comparer c, int from, int to) {
- if (to <= from)
- return;
- int mid = (from + to) / 2;
- if (mid != from)
- swap(v, mid, from);
- Object pivot = v.elementAt(from);
- // Simple-minded, but reasonable
- int highestBelowPivot = from - 1;
- int low = from+1;
- int high = to;
- // We now move low and high toward eachother, maintaining the
- // invariants:
- // v[i] <= pivot for all i < low
- // v[i] > pivot for all i > high
- // As long as these invariants hold, and every iteration makes
- // progress, we are safe.
- while (low <= high) {
- int cmp = c.compare(v.elementAt(low), pivot);
- if (cmp <= 0) { // v[low] <= pivot
- if (cmp < 0) {
- highestBelowPivot = low;
- }
- low++;
- } else {
- int c2;
- for (;;) {
- c2 = c.compare(v.elementAt(high), pivot);
- // v[high] > pivot:
- if (c2 > 0) {
- high--;
- if (low > high) {
- break;
- }
- } else {
- break;
- }
- }
- // At this point, low is never == high
- if (low <= high) {
- swap(v, low, high);
- if (c2 < 0) {
- highestBelowPivot = low;
- }
- low++;
- high--;
- }
- }
- }
- // Now we just need to sort from from..highestBelowPivot
- // and from high+1..to
- if (highestBelowPivot > from) {
- // pivot == pivot, so ensure algorithm terminates
- swap(v, from, highestBelowPivot);
- quickSort(v, c, from, highestBelowPivot-1);
- }
- quickSort(v, c, high+1, to);
- }
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/resources/hat.js Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1473 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.
- */
-
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
-
-var hatPkg = Packages.com.sun.tools.hat.internal;
-
-/**
- * This is JavaScript interface for heap analysis using HAT
- * (Heap Analysis Tool). HAT classes are referred from
- * this file. In particular, refer to classes in hat.model
- * package.
- *
- * HAT model objects are wrapped as convenient script objects so that
- * fields may be accessed in natural syntax. For eg. Java fields can be
- * accessed with obj.field_name syntax and array elements can be accessed
- * with array[index] syntax.
- */
-
-// returns an enumeration that wraps elements of
-// the input enumeration elements.
-function wrapperEnumeration(e) {
- return new java.util.Enumeration() {
- hasMoreElements: function() {
- return e.hasMoreElements();
- },
- nextElement: function() {
- return wrapJavaValue(e.nextElement());
- }
- };
-}
-
-// returns an enumeration that filters out elements
-// of input enumeration using the filter function.
-function filterEnumeration(e, func, wrap) {
- var next = undefined;
- var index = 0;
-
- function findNext() {
- var tmp;
- while (e.hasMoreElements()) {
- tmp = e.nextElement();
- index++;
- if (wrap) {
- tmp = wrapJavaValue(tmp);
- }
- if (func(tmp, index, e)) {
- next = tmp;
- return;
- }
- }
- }
-
- return new java.util.Enumeration() {
- hasMoreElements: function() {
- findNext();
- return next != undefined;
- },
-
- nextElement: function() {
- if (next == undefined) {
- // user may not have called hasMoreElements?
- findNext();
- }
- if (next == undefined) {
- throw "NoSuchElementException";
- }
- var res = next;
- next = undefined;
- return res;
- }
- };
-}
-
-// enumeration that has no elements ..
-var emptyEnumeration = new java.util.Enumeration() {
- hasMoreElements: function() {
- return false;
- },
- nextElement: function() {
- throw "NoSuchElementException";
- }
- };
-
-function wrapRoot(root) {
- if (root) {
- return {
- id: root.idString,
- description: root.description,
- referrer: wrapJavaValue(root.referer),
- type: root.typeName
- };
- } else {
- return null;
- }
-}
-
-function JavaClassProto() {
- function jclass(obj) {
- return obj['wrapped-object'];
- }
-
- // return whether given class is subclass of this class or not
- this.isSubclassOf = function(other) {
- var tmp = jclass(this);
- var otherid = objectid(other);
- while (tmp != null) {
- if (otherid.equals(tmp.idString)) {
- return true;
- }
- tmp = tmp.superclass;
- }
- return false;
- }
-
- // return whether given class is superclass of this class or not
- this.isSuperclassOf = function(other) {
- return other.isSubclassOf(this);
- }
-
- // includes direct and indirect superclasses
- this.superclasses = function() {
- var res = new Array();
- var tmp = this.superclass;
- while (tmp != null) {
- res[res.length] = tmp;
- tmp = tmp.superclass;
- }
- return res;
- }
-
- /**
- * Returns an array containing subclasses of this class.
- *
- * @param indirect should include indirect subclasses or not.
- * default is true.
- */
- this.subclasses = function(indirect) {
- if (indirect == undefined) indirect = true;
- var classes = jclass(this).subclasses;
- var res = new Array();
- for (var i in classes) {
- var subclass = wrapJavaValue(classes[i]);
- res[res.length] = subclass;
- if (indirect) {
- res = res.concat(subclass.subclasses());
- }
- }
- return res;
- }
- this.toString = function() { return jclass(this).toString(); }
-}
-
-var theJavaClassProto = new JavaClassProto();
-
-// Script wrapper for HAT model objects, values.
-// wraps a Java value as appropriate for script object
-function wrapJavaValue(thing) {
- if (thing == null || thing == undefined ||
- thing instanceof hatPkg.model.HackJavaValue) {
- return null;
- }
-
- if (thing instanceof hatPkg.model.JavaValue) {
- // map primitive values to closest JavaScript primitives
- if (thing instanceof hatPkg.model.JavaBoolean) {
- return thing.toString() == "true";
- } else if (thing instanceof hatPkg.model.JavaChar) {
- return thing.toString() + '';
- } else {
- return java.lang.Double.parseDouble(thing.toString());
- }
- } else {
- // wrap Java object as script object
- return wrapJavaObject(thing);
- }
-}
-
-// wrap Java object with appropriate script object
-function wrapJavaObject(thing) {
-
- // HAT Java model object wrapper. Handles all cases
- // (instance, object/primitive array and Class objects)
- function javaObject(jobject) {
- // FIXME: Do I need this? or can I assume that these would
- // have been resolved already?
- if (jobject instanceof hatPkg.model.JavaObjectRef) {
- jobject = jobject.dereference();
- if (jobject instanceof hatPkg.model.HackJavaValue) {
- print(jobject);
- return null;
- }
- }
-
- if (jobject instanceof hatPkg.model.JavaObject) {
- return new JavaObjectWrapper(jobject);
- } else if (jobject instanceof hatPkg.model.JavaClass) {
- return new JavaClassWrapper(jobject);
- } else if (jobject instanceof hatPkg.model.JavaObjectArray) {
- return new JavaObjectArrayWrapper(jobject);
- } else if (jobject instanceof hatPkg.model.JavaValueArray) {
- return new JavaValueArrayWrapper(jobject);
- } else {
- print("unknown heap object type: " + jobject.getClass());
- return jobject;
- }
- }
-
- // returns wrapper for Java instances
- function JavaObjectWrapper(instance) {
- var things = instance.fields;
- var fields = instance.clazz.fieldsForInstance;
-
- // instance fields can be accessed in natural syntax
- return new JSAdapter() {
- __getIds__ : function() {
- var res = new Array(fields.length);
- for (var i in fields) {
- res[i] = fields[i].name;
- }
- return res;
- },
- __has__ : function(name) {
- for (var i in fields) {
- if (name == fields[i].name) return true;
- }
- return name == 'class' || name == 'toString' ||
- name == 'wrapped-object';
- },
- __get__ : function(name) {
-
- for (var i in fields) {
- if(fields[i].name == name) {
- return wrapJavaValue(things[i]);
- }
- }
-
- if (name == 'class') {
- return wrapJavaValue(instance.clazz);
- } else if (name == 'wrapped-object') {
- return instance;
- }
-
- return undefined;
- },
- __call__: function(name) {
- if (name == 'toString') {
- return instance.toString();
- } else {
- return undefined;
- }
- }
- }
- }
-
-
- // return wrapper for Java Class objects
- function JavaClassWrapper(jclass) {
- var fields = jclass.statics;
-
- // to access static fields of given Class cl, use
- // cl.statics.<static-field-name> syntax
- this.statics = new JSAdapter() {
- __getIds__ : function() {
- var res = new Array(fields.length);
- for (var i in fields) {
- res[i] = fields[i].field.name;
- }
- return res;
- },
- __has__ : function(name) {
- for (var i in fields) {
- if (name == fields[i].field.name) {
- return true;
- }
- }
- return false;
- },
- __get__ : function(name) {
- for (var i in fields) {
- if (name == fields[i].field.name) {
- return wrapJavaValue(fields[i].value);
- }
- }
- return undefined;
- }
- }
-
- if (jclass.superclass != null) {
- this.superclass = wrapJavaValue(jclass.superclass);
- } else {
- this.superclass = null;
- }
-
- this.loader = wrapJavaValue(jclass.getLoader());
- this.signers = wrapJavaValue(jclass.getSigners());
- this.protectionDomain = wrapJavaValue(jclass.getProtectionDomain());
- this.instanceSize = jclass.instanceSize;
- this.name = jclass.name;
- this.fields = jclass.fields;
- this['wrapped-object'] = jclass;
- }
-
- for (var i in theJavaClassProto) {
- if (typeof theJavaClassProto[i] == 'function') {
- JavaClassWrapper.prototype[i] = theJavaClassProto[i];
- }
- }
-
- // returns wrapper for Java object arrays
- function JavaObjectArrayWrapper(array) {
- var elements = array.elements;
- // array elements can be accessed in natural syntax
- // also, 'length' property is supported.
- return new JSAdapter() {
- __getIds__ : function() {
- var res = new Array(elements.length);
- for (var i = 0; i < elements.length; i++) {
- res[i] = String(i);
- }
- return res;
- },
- __has__: function(name) {
- return (name >= 0 && name < elements.length) ||
- name == 'length' || name == 'class' ||
- name == 'toString' || name == 'wrapped-object';
- },
- __get__ : function(name) {
- 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 == 'wrapped-object') {
- return array;
- } else {
- return undefined;
- }
- },
- __call__: function(name) {
- if (name == 'toString') {
- return array.toString();
- } else {
- return undefined;
- }
- }
- }
- }
-
- // returns wrapper for Java primitive arrays
- function JavaValueArrayWrapper(array) {
- var type = String(java.lang.Character.toString(array.elementType));
- var elements = array.elements;
- // array elements can be accessed in natural syntax
- // also, 'length' property is supported.
- return new JSAdapter() {
- __getIds__ : function() {
- var r = new Array(array.length);
- for (var i = 0; i < array.length; i++) {
- r[i] = String(i);
- }
- return r;
- },
- __has__: function(name) {
- return (name >= 0 && name < array.length) ||
- name == 'length' || name == 'class' ||
- name == 'toString' || name == 'wrapped-object';
- },
- __get__: function(name) {
- if (name >= 0 && name < array.length) {
- return elements[name];
- }
-
- if (name == 'length') {
- return array.length;
- } else if (name == 'wrapped-object') {
- return array;
- } else if (name == 'class') {
- return wrapJavaValue(array.clazz);
- } else {
- return undefined;
- }
- },
- __call__: function(name) {
- if (name == 'toString') {
- return array.valueString(true);
- } else {
- return undefined;
- }
- }
- }
- }
- return javaObject(thing);
-}
-
-// unwrap a script object to corresponding HAT object
-function unwrapJavaObject(jobject) {
- if (!(jobject instanceof hatPkg.model.JavaHeapObject)) {
- try {
- jobject = jobject["wrapped-object"];
- } catch (e) {
- print("unwrapJavaObject: " + jobject + ", " + e);
- jobject = undefined;
- }
- }
- return jobject;
-}
-
-/**
- * readHeapDump parses a heap dump file and returns script wrapper object.
- *
- * @param file Heap dump file name
- * @param stack flag to tell if allocation site traces are available
- * @param refs flag to tell if backward references are needed or not
- * @param debug debug level for HAT
- * @return heap as a JavaScript object
- */
-function readHeapDump(file, stack, refs, debug) {
-
- // default value of debug is 0
- if (!debug) debug = 0;
-
- // by default, we assume no stack traces
- if (!stack) stack = false;
-
- // by default, backward references are resolved
- if (!refs) refs = true;
-
- // read the heap dump
- var heap = hatPkg.parser.HprofReader.readFile(file, stack, debug);
-
- // resolve it
- heap.resolve(refs);
-
- // wrap Snapshot as convenient script object
- return wrapHeapSnapshot(heap);
-}
-
-/**
- * The result object supports the following methods:
- *
- * forEachClass -- calls a callback for each Java Class
- * forEachObject -- calls a callback for each Java object
- * findClass -- finds Java Class of given name
- * findObject -- finds object from given object id
- * objects -- returns all objects of given class as an enumeration
- * classes -- returns all classes in the heap as an enumeration
- * reachables -- returns all objects reachable from a given object
- * livepaths -- returns an array of live paths because of which an
- * object alive.
- * describeRef -- returns description for a reference from a 'from'
- * object to a 'to' object.
- */
-function wrapHeapSnapshot(heap) {
- function getClazz(clazz) {
- if (clazz == undefined) clazz = "java.lang.Object";
- var type = typeof(clazz);
- if (type == "string") {
- clazz = heap.findClass(clazz);
- } else if (type == "object") {
- clazz = unwrapJavaObject(clazz);
- } else {
- throw "class expected";;
- }
- return clazz;
- }
-
- // return heap as a script object with useful methods.
- return {
- snapshot: heap,
-
- /**
- * Class iteration: Calls callback function for each
- * Java Class in the heap. Default callback function
- * is 'print'. If callback returns true, the iteration
- * is stopped.
- *
- * @param callback function to be called.
- */
- forEachClass: function(callback) {
- if (callback == undefined) callback = print;
- var classes = this.snapshot.classes;
- while (classes.hasMoreElements()) {
- if (callback(wrapJavaValue(classes.nextElement())))
- return;
- }
- },
-
- /**
- * Returns an Enumeration of all roots.
- */
- roots: function() {
- var e = this.snapshot.roots;
- return new java.util.Enumeration() {
- hasMoreElements: function() {
- return e.hasMoreElements();
- },
- nextElement: function() {
- return wrapRoot(e.nextElement());
- }
- };
- },
-
- /**
- * Returns an Enumeration for all Java classes.
- */
- classes: function() {
- return wrapIterator(this.snapshot.classes, true);
- },
-
- /**
- * Object iteration: Calls callback function for each
- * Java Object in the heap. Default callback function
- * is 'print'.If callback returns true, the iteration
- * is stopped.
- *
- * @param callback function to be called.
- * @param clazz Class whose objects are retrieved.
- * Optional, default is 'java.lang.Object'
- * @param includeSubtypes flag to tell if objects of subtypes
- * are included or not. optional, default is true.
- */
- forEachObject: function(callback, clazz, includeSubtypes) {
- if (includeSubtypes == undefined) includeSubtypes = true;
- if (callback == undefined) callback = print;
- clazz = getClazz(clazz);
-
- if (clazz) {
- var instances = clazz.getInstances(includeSubtypes);
- while (instances.hasNextElements()) {
- if (callback(wrapJavaValue(instances.nextElement())))
- return;
- }
- }
- },
-
- /**
- * Returns an enumeration of Java objects in the heap.
- *
- * @param clazz Class whose objects are retrieved.
- * Optional, default is 'java.lang.Object'
- * @param includeSubtypes flag to tell if objects of subtypes
- * are included or not. optional, default is true.
- * @param where (optional) filter expression or function to
- * filter the objects. The expression has to return true
- * to include object passed to it in the result array.
- * Built-in variable 'it' refers to the current object in
- * filter expression.
- */
- objects: function(clazz, includeSubtypes, where) {
- if (includeSubtypes == undefined) includeSubtypes = true;
- if (where) {
- if (typeof(where) == 'string') {
- where = new Function("it", "return " + where);
- }
- }
- clazz = getClazz(clazz);
- if (clazz) {
- var instances = clazz.getInstances(includeSubtypes);
- if (where) {
- return filterEnumeration(instances, where, true);
- } else {
- return wrapperEnumeration(instances);
- }
- } else {
- return emptyEnumeration;
- }
- },
-
- /**
- * Find Java Class of given name.
- *
- * @param name class name
- */
- findClass: function(name) {
- var clazz = this.snapshot.findClass(name + '');
- return wrapJavaValue(clazz);
- },
-
- /**
- * Find Java Object from given object id
- *
- * @param id object id as string
- */
- findObject: function(id) {
- return wrapJavaValue(this.snapshot.findThing(id));
- },
-
- /**
- * Returns an enumeration of objects in the finalizer
- * queue waiting to be finalized.
- */
- finalizables: function() {
- var tmp = this.snapshot.getFinalizerObjects();
- return wrapperEnumeration(tmp);
- },
-
- /**
- * Returns an array that contains objects referred from the
- * given Java object directly or indirectly (i.e., all
- * transitively referred objects are returned).
- *
- * @param jobject Java object whose reachables are returned.
- */
- reachables: function (jobject) {
- return reachables(jobject, this.snapshot.reachableExcludes);
- },
-
- /**
- * Returns array of paths of references by which the given
- * Java object is live. Each path itself is an array of
- * objects in the chain of references. Each path supports
- * toHtml method that returns html description of the path.
- *
- * @param jobject Java object whose live paths are returned
- * @param weak flag to indicate whether to include paths with
- * weak references or not. default is false.
- */
- livepaths: function (jobject, weak) {
- if (weak == undefined) {
- weak = false;
- }
-
- function wrapRefChain(refChain) {
- var path = new Array();
-
- // compute path array from refChain
- var tmp = refChain;
- while (tmp != null) {
- var obj = tmp.obj;
- path[path.length] = wrapJavaValue(obj);
- tmp = tmp.next;
- }
-
- function computeDescription(html) {
- var root = refChain.obj.root;
- var desc = root.description;
- if (root.referer) {
- var ref = root.referer;
- desc += " (from " +
- (html? toHtml(ref) : ref.toString()) + ')';
- }
- desc += '->';
- var tmp = refChain;
- while (tmp != null) {
- var next = tmp.next;
- var obj = tmp.obj;
- desc += html? toHtml(obj) : obj.toString();
- if (next != null) {
- desc += " (" +
- obj.describeReferenceTo(next.obj, heap) +
- ") ->";
- }
- tmp = next;
- }
- return desc;
- }
-
- return new JSAdapter() {
- __getIds__ : function() {
- var res = new Array(path.length);
- for (var i = 0; i < path.length; i++) {
- res[i] = String(i);
- }
- return res;
- },
- __has__ : function (name) {
- return (name >= 0 && name < path.length) ||
- name == 'length' || name == 'toHtml' ||
- name == 'toString';
- },
- __get__ : function(name) {
- if (name >= 0 && name < path.length) {
- return path[name];
- } else if (name == 'length') {
- return path.length;
- } else {
- return undefined;
- }
- },
- __call__: function(name) {
- if (name == 'toHtml') {
- return computeDescription(true);
- } else if (name == 'toString') {
- return computeDescription(false);
- } else {
- return undefined;
- }
- }
- };
- }
-
- jobject = unwrapJavaObject(jobject);
- var refChains = this.snapshot.rootsetReferencesTo(jobject, weak);
- var paths = new Array(refChains.length);
- for (var i in refChains) {
- paths[i] = wrapRefChain(refChains[i]);
- }
- return paths;
- },
-
- /**
- * Return description string for reference from 'from' object
- * to 'to' Java object.
- *
- * @param from source Java object
- * @param to destination Java object
- */
- describeRef: function (from, to) {
- from = unwrapJavaObject(from);
- to = unwrapJavaObject(to);
- return from.describeReferenceTo(to, this.snapshot);
- },
- };
-}
-
-// per-object functions
-
-/**
- * Returns allocation site trace (if available) of a Java object
- *
- * @param jobject object whose allocation site trace is returned
- */
-function allocTrace(jobject) {
- try {
- jobject = unwrapJavaObject(jobject);
- var trace = jobject.allocatedFrom;
- return (trace != null) ? trace.frames : null;
- } catch (e) {
- print("allocTrace: " + jobject + ", " + e);
- return null;
- }
-}
-
-/**
- * Returns Class object for given Java object
- *
- * @param jobject object whose Class object is returned
- */
-function classof(jobject) {
- jobject = unwrapJavaObject(jobject);
- return wrapJavaValue(jobject.clazz);
-}
-
-/**
- * Find referers (a.k.a in-coming references). Calls callback
- * for each referrer of the given Java object. If the callback
- * returns true, the iteration is stopped.
- *
- * @param callback function to call for each referer
- * @param jobject object whose referers are retrieved
- */
-function forEachReferrer(callback, jobject) {
- jobject = unwrapJavaObject(jobject);
- var refs = jobject.referers;
- while (refs.hasMoreElements()) {
- if (callback(wrapJavaValue(refs.nextElement()))) {
- return;
- }
- }
-}
-
-/**
- * Compares two Java objects for object identity.
- *
- * @param o1, o2 objects to compare for identity
- */
-function identical(o1, o2) {
- return objectid(o1) == objectid(o2);
-}
-
-/**
- * Returns Java object id as string
- *
- * @param jobject object whose id is returned
- */
-function objectid(jobject) {
- try {
- jobject = unwrapJavaObject(jobject);
- return String(jobject.idString);
- } catch (e) {
- print("objectid: " + jobject + ", " + e);
- return null;
- }
-}
-
-/**
- * Prints allocation site trace of given object
- *
- * @param jobject object whose allocation site trace is returned
- */
-function printAllocTrace(jobject) {
- var frames = this.allocTrace(jobject);
- if (frames == null || frames.length == 0) {
- print("allocation site trace unavailable for " +
- objectid(jobject));
- return;
- }
- print(objectid(jobject) + " was allocated at ..");
- for (var i in frames) {
- var frame = frames[i];
- var src = frame.sourceFileName;
- if (src == null) src = '<unknown source>';
- print('\t' + frame.className + "." +
- frame.methodName + '(' + frame.methodSignature + ') [' +
- src + ':' + frame.lineNumber + ']');
- }
-}
-
-/**
- * Returns an enumeration of referrers of the given Java object.
- *
- * @param jobject Java object whose referrers are returned.
- */
-function referrers(jobject) {
- try {
- jobject = unwrapJavaObject(jobject);
- return wrapperEnumeration(jobject.referers);
- } catch (e) {
- print("referrers: " + jobject + ", " + e);
- return emptyEnumeration;
- }
-}
-
-/**
- * Returns an array that contains objects referred from the
- * given Java object.
- *
- * @param jobject Java object whose referees are returned.
- */
-function referees(jobject) {
- var res = new Array();
- jobject = unwrapJavaObject(jobject);
- if (jobject != undefined) {
- try {
- jobject.visitReferencedObjects(
- new hatPkg.model.JavaHeapObjectVisitor() {
- visit: function(other) {
- res[res.length] = wrapJavaValue(other);
- },
- exclude: function(clazz, field) {
- return false;
- },
- mightExclude: function() {
- return false;
- }
- });
- } catch (e) {
- print("referees: " + jobject + ", " + e);
- }
- }
- return res;
-}
-
-/**
- * Returns an array that contains objects referred from the
- * given Java object directly or indirectly (i.e., all
- * transitively referred objects are returned).
- *
- * @param jobject Java object whose reachables are returned.
- * @param excludes optional comma separated list of fields to be
- * removed in reachables computation. Fields are
- * written as class_name.field_name form.
- */
-function reachables(jobject, excludes) {
- if (excludes == undefined) {
- excludes = null;
- } else if (typeof(excludes) == 'string') {
- var st = new java.util.StringTokenizer(excludes, ",");
- var excludedFields = new Array();
- while (st.hasMoreTokens()) {
- excludedFields[excludedFields.length] = st.nextToken().trim();
- }
- if (excludedFields.length > 0) {
- excludes = new hatPkg.model.ReachableExcludes() {
- isExcluded: function (field) {
- for (var index in excludedFields) {
- if (field.equals(excludedFields[index])) {
- return true;
- }
- }
- return false;
- }
- };
- } else {
- // nothing to filter...
- excludes = null;
- }
- } else if (! (excludes instanceof hatPkg.model.ReachableExcludes)) {
- excludes = null;
- }
-
- jobject = unwrapJavaObject(jobject);
- var ro = new hatPkg.model.ReachableObjects(jobject, excludes);
- var tmp = ro.reachables;
- var res = new Array(tmp.length);
- for (var i in tmp) {
- res[i] = wrapJavaValue(tmp[i]);
- }
- return res;
-}
-
-
-/**
- * Returns whether 'from' object refers to 'to' object or not.
- *
- * @param from Java object that is source of the reference.
- * @param to Java object that is destination of the reference.
- */
-function refers(from, to) {
- try {
- var tmp = unwrapJavaObject(from);
- if (tmp instanceof hatPkg.model.JavaClass) {
- from = from.statics;
- } else if (tmp instanceof hatPkg.model.JavaValueArray) {
- return false;
- }
- for (var i in from) {
- if (identical(from[i], to)) {
- return true;
- }
- }
- } catch (e) {
- print("refers: " + from + ", " + e);
- }
- return false;
-}
-
-/**
- * If rootset includes given jobject, return Root
- * object explanining the reason why it is a root.
- *
- * @param jobject object whose Root is returned
- */
-function root(jobject) {
- try {
- jobject = unwrapJavaObject(jobject);
- return wrapRoot(jobject.root);
- } catch (e) {
- return null;
- }
-}
-
-/**
- * Returns size of the given Java object
- *
- * @param jobject object whose size is returned
- */
-function sizeof(jobject) {
- try {
- jobject = unwrapJavaObject(jobject);
- return jobject.size;
- } catch (e) {
- print("sizeof: " + jobject + ", " + e);
- return null;
- }
-}
-
-/**
- * Returns String by replacing Unicode chars and
- * HTML special chars (such as '<') with entities.
- *
- * @param str string to be encoded
- */
-function encodeHtml(str) {
- return hatPkg.util.Misc.encodeHtml(str);
-}
-
-/**
- * Returns HTML string for the given object.
- *
- * @param obj object for which HTML string is returned.
- */
-function toHtml(obj) {
- if (obj == null) {
- return "null";
- }
-
- if (obj == undefined) {
- return "undefined";
- }
-
- var tmp = unwrapJavaObject(obj);
- if (tmp != undefined) {
- var id = tmp.idString;
- if (tmp instanceof Packages.com.sun.tools.hat.internal.model.JavaClass) {
- var name = tmp.name;
- return "<a href='/class/" + id + "'>class " + name + "</a>";
- } else {
- var name = tmp.clazz.name;
- return "<a href='/object/" + id + "'>" +
- name + "@" + id + "</a>";
- }
- } else if (obj instanceof Object) {
- if (Array.isArray(obj)) {
- // script array
- var res = "[ ";
- for (var i in obj) {
- res += toHtml(obj[i]);
- if (i != obj.length - 1) {
- res += ", ";
- }
- }
- res += " ]";
- return res;
- } else {
- // if the object has a toHtml function property
- // just use that...
- if (typeof(obj.toHtml) == 'function') {
- return obj.toHtml();
- } else {
- // script object
- var res = "{ ";
- for (var i in obj) {
- res += i + ":" + toHtml(obj[i]) + ", ";
- }
- res += "}";
- return res;
- }
- }
- } else {
- // 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;
- }
- }
-}
-
-/*
- * Generic array/iterator/enumeration [or even object!] manipulation
- * functions. These functions accept an array/iteration/enumeration
- * and expression String or function. These functions iterate each
- * element of array and apply the expression/function on each element.
- */
-
-// private function to wrap an Iterator as an Enumeration
-function wrapIterator(itr, wrap) {
- if (itr instanceof java.util.Iterator) {
- return new java.util.Enumeration() {
- hasMoreElements: function() {
- return itr.hasNext();
- },
- nextElement: function() {
- return wrap? wrapJavaValue(itr.next()) : itr.next();
- }
- };
- } else {
- return itr;
- }
-}
-
-/**
- * Converts an enumeration/iterator/object into an array
- *
- * @param obj enumeration/iterator/object
- * @return array that contains values of enumeration/iterator/object
- */
-function toArray(obj) {
- obj = wrapIterator(obj);
- if (obj instanceof java.util.Enumeration) {
- var res = new Array();
- while (obj.hasMoreElements()) {
- res[res.length] = obj.nextElement();
- }
- return res;
- } else if (obj instanceof Array) {
- return obj;
- } else {
- var res = new Array();
- for (var index in obj) {
- res[res.length] = obj[index];
- }
- return res;
- }
-}
-
-/**
- * Returns whether the given array/iterator/enumeration contains
- * an element that satisfies the given boolean expression specified
- * in code.
- *
- * @param array input array/iterator/enumeration that is iterated
- * @param code expression string or function
- * @return boolean result
- *
- * The code evaluated can refer to the following built-in variables.
- *
- * 'it' -> currently visited element
- * 'index' -> index of the current element
- * 'array' -> array that is being iterated
- */
-function contains(array, code) {
- array = wrapIterator(array);
- var func = code;
- if (typeof(func) != 'function') {
- func = new Function("it", "index", "array", "return " + code);
- }
-
- if (array instanceof java.util.Enumeration) {
- var index = 0;
- while (array.hasMoreElements()) {
- var it = array.nextElement();
- if (func(it, index, array)) {
- return true;
- }
- index++;
- }
- } else {
- for (var index in array) {
- var it = array[index];
- if (func(it, String(index), array)) {
- return true;
- }
- }
- }
- return false;
-}
-
-/**
- * concatenates two arrays/iterators/enumerators.
- *
- * @param array1 array/iterator/enumeration
- * @param array2 array/iterator/enumeration
- *
- * @return concatenated array or composite enumeration
- */
-function concat(array1, array2) {
- array1 = wrapIterator(array1);
- array2 = wrapIterator(array2);
- if (array1 instanceof Array && array2 instanceof Array) {
- return array1.concat(array2);
- } else if (array1 instanceof java.util.Enumeration &&
- array2 instanceof java.util.Enumeration) {
- return new Packages.com.sun.tools.hat.internal.util.CompositeEnumeration(array1, array2);
- } else {
- return undefined;
- }
-}
-
-/**
- * Returns the number of array/iterator/enumeration elements
- * that satisfy the given boolean expression specified in code.
- * The code evaluated can refer to the following built-in variables.
- *
- * @param array input array/iterator/enumeration that is iterated
- * @param code expression string or function
- * @return number of elements
- *
- * 'it' -> currently visited element
- * 'index' -> index of the current element
- * 'array' -> array that is being iterated
- */
-function count(array, code) {
- if (code == undefined) {
- return length(array);
- }
- array = wrapIterator(array);
- var func = code;
- if (typeof(func) != 'function') {
- func = new Function("it", "index", "array", "return " + code);
- }
-
- var result = 0;
- if (array instanceof java.util.Enumeration) {
- var index = 0;
- while (array.hasMoreElements()) {
- var it = array.nextElement();
- if (func(it, index, array)) {
- result++;
- }
- index++;
- }
- } else {
- for (var index in array) {
- var it = array[index];
- if (func(it, index, array)) {
- result++;
- }
- }
- }
- return result;
-}
-
-/**
- * filter function returns an array/enumeration that contains
- * elements of the input array/iterator/enumeration that satisfy
- * the given boolean expression. The boolean expression code can
- * refer to the following built-in variables.
- *
- * @param array input array/iterator/enumeration that is iterated
- * @param code expression string or function
- * @return array/enumeration that contains the filtered elements
- *
- * 'it' -> currently visited element
- * 'index' -> index of the current element
- * 'array' -> array that is being iterated
- * 'result' -> result array
- */
-function filter(array, code) {
- array = wrapIterator(array);
- var func = code;
- if (typeof(code) != 'function') {
- func = new Function("it", "index", "array", "result", "return " + code);
- }
- if (array instanceof java.util.Enumeration) {
- return filterEnumeration(array, func, false);
- } else {
- var result = new Array();
- for (var index in array) {
- var it = array[index];
- if (func(it, String(index), array, result)) {
- result[result.length] = it;
- }
- }
- return result;
- }
-}
-
-/**
- * Returns the number of elements of array/iterator/enumeration.
- *
- * @param array input array/iterator/enumeration that is iterated
- */
-function length(array) {
- array = wrapIterator(array);
- if (array instanceof Array) {
- return array.length;
- } else if (array instanceof java.util.Enumeration) {
- var cnt = 0;
- while (array.hasMoreElements()) {
- array.nextElement();
- cnt++;
- }
- return cnt;
- } else {
- var cnt = 0;
- for (var index in array) {
- cnt++;
- }
- return cnt;
- }
-}
-
-/**
- * Transforms the given object or array by evaluating given code
- * on each element of the object or array. The code evaluated
- * can refer to the following built-in variables.
- *
- * @param array input array/iterator/enumeration that is iterated
- * @param code expression string or function
- * @return array/enumeration that contains mapped values
- *
- * 'it' -> currently visited element
- * 'index' -> index of the current element
- * 'array' -> array that is being iterated
- * 'result' -> result array
- *
- * map function returns an array/enumeration of values created
- * by repeatedly calling code on each element of the input
- * array/iterator/enumeration.
- */
-function map(array, code) {
- array = wrapIterator(array);
- var func = code;
- if(typeof(code) != 'function') {
- func = new Function("it", "index", "array", "result", "return " + code);
- }
-
- if (array instanceof java.util.Enumeration) {
- var index = 0;
- var result = new java.util.Enumeration() {
- hasMoreElements: function() {
- return array.hasMoreElements();
- },
- nextElement: function() {
- return func(array.nextElement(), index++, array, result);
- }
- };
- return result;
- } else {
- var result = new Array();
- for (var index in array) {
- var it = array[index];
- result[result.length] = func(it, String(index), array, result);
- }
- return result;
- }
-}
-
-// private function used by min, max functions
-function minmax(array, code) {
- if (typeof(code) == 'string') {
- code = new Function("lhs", "rhs", "return " + code);
- }
- array = wrapIterator(array);
- if (array instanceof java.util.Enumeration) {
- if (! array.hasMoreElements()) {
- return undefined;
- }
- var res = array.nextElement();
- while (array.hasMoreElements()) {
- var next = array.nextElement();
- if (code(next, res)) {
- res = next;
- }
- }
- return res;
- } else {
- if (array.length == 0) {
- return undefined;
- }
- var res = array[0];
- for (var index = 1; index < array.length; index++) {
- if (code(array[index], res)) {
- res = array[index];
- }
- }
- return res;
- }
-}
-
-/**
- * Returns the maximum element of the array/iterator/enumeration
- *
- * @param array input array/iterator/enumeration that is iterated
- * @param code (optional) comparision expression or function
- * by default numerical maximum is computed.
- */
-function max(array, code) {
- if (code == undefined) {
- code = function (lhs, rhs) { return lhs > rhs; }
- }
- return minmax(array, code);
-}
-
-/**
- * Returns the minimum element of the array/iterator/enumeration
- *
- * @param array input array/iterator/enumeration that is iterated
- * @param code (optional) comparision expression or function
- * by default numerical minimum is computed.
- */
-function min(array, code) {
- if (code == undefined) {
- code = function (lhs, rhs) { return lhs < rhs; }
- }
- return minmax(array, code);
-}
-
-/**
- * sort function sorts the input array. optionally accepts
- * code to compare the elements. If code is not supplied,
- * numerical sort is done.
- *
- * @param array input array/iterator/enumeration that is sorted
- * @param code expression string or function
- * @return sorted array
- *
- * The comparison expression can refer to the following
- * built-in variables:
- *
- * 'lhs' -> 'left side' element
- * 'rhs' -> 'right side' element
- */
-function sort(array, code) {
- // we need an array to sort, so convert non-arrays
- array = toArray(array);
-
- // by default use numerical comparison
- var func = code;
- if (code == undefined) {
- func = function(lhs, rhs) { return lhs - rhs; };
- } else if (typeof(code) == 'string') {
- func = new Function("lhs", "rhs", "return " + code);
- }
- return array.sort(func);
-}
-
-/**
- * Returns the sum of the elements of the array
- *
- * @param array input array that is summed.
- * @param code optional expression used to map
- * input elements before sum.
- */
-function sum(array, code) {
- array = wrapIterator(array);
- if (code != undefined) {
- array = map(array, code);
- }
- var result = 0;
- if (array instanceof java.util.Enumeration) {
- while (array.hasMoreElements()) {
- result += Number(array.nextElement());
- }
- } else {
- for (var index in array) {
- result += Number(array[index]);
- }
- }
- return result;
-}
-
-/**
- * Returns array of unique elements from the given input
- * array/iterator/enumeration.
- *
- * @param array from which unique elements are returned.
- * @param code optional expression (or function) giving unique
- * attribute/property for each element.
- * by default, objectid is used for uniqueness.
- */
-function unique(array, code) {
- array = wrapIterator(array);
- if (code == undefined) {
- code = new Function("it", "return objectid(it);");
- } else if (typeof(code) == 'string') {
- code = new Function("it", "return " + code);
- }
- var tmp = new Object();
- if (array instanceof java.util.Enumeration) {
- while (array.hasMoreElements()) {
- var it = array.nextElement();
- tmp[code(it)] = it;
- }
- } else {
- for (var index in array) {
- var it = array[index];
- tmp[code(it)] = it;
- }
- }
- var res = new Array();
- for (var index in tmp) {
- res[res.length] = tmp[index];
- }
- return res;
-}
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/resources/oqlhelp.html Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,808 +0,0 @@
-<!--
-Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-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.
--->
-
-<html>
-<head>
-<style>
-.key { color: red; font-weight: bold }
-</style>
-<title>
-Object Query Language (OQL)
-</title>
-</head>
-<body>
-<h1>Object Query Language (OQL)</h1>
-
-<p>
-OQL is SQL-like query language to query Java heap. OQL allows to filter/select information
-wanted from Java heap. While pre-defined queries such as "show all instances of class X"
-are already supported by HAT, OQL adds more flexibility. OQL is based on JavaScript expression
-language.
-</p>
-
-<p>
-OQL query is of the form
-
-<pre>
-<code>
- <span class="key">select</span> <JavaScript expression to select>
- [ <span class="key">from</span> [<span class="key">instanceof</span>] <class name> <identifier>
- [ <span class="key">where</span> <JavaScript boolean expression to filter> ] ]
-</code>
-</pre>
-where class name is fully qualified Java class name (example: java.net.URL) or array class name.
-[C is char array name, [Ljava.io.File; is name of java.io.File[] and so on.
-Note that fully qualified class name does not always uniquely identify a
-Java class at runtime. There may be more than one Java class with the same
-name but loaded by different loaders. So, class name is permitted to be
-id string of the class object.
-
-If <span class="key">instanceof</span> keyword is used, subtype objects are selected. If this
-keyword is not specified, only the instances of exact class specified are selected. Both
-<span class="key">from</span> and <span class="key">where</span> clauses are optional.
-</p>
-
-
-<p>
-In <span class="key">select</span> and (optional) <span class="key">where</span> clauses, the expression
-used in JavaScript expression. Java heap objects are wrapped as convenient script objects so that
-fields may be accessed in natural syntax. For example, Java fields can be accessed with obj.field_name
-syntax and array elements can be accessed with array[index] syntax. Each Java object selected is
-bound to a JavaScript variable of the identifier name specified in <span class="key">from</span> clause.
-</p>
-
-<h2>OQL Examples</h2>
-
-<ul>
-<li>select all Strings of length 100 or more
-<pre>
-<code>
- select s from java.lang.String s where s.value.length >= 100
-</code>
-</pre>
-<li>select all int arrays of length 256 or more
-<pre>
-<code>
- select a from [I a where a.length >= 256
-</code>
-</pre>
-<li>show content of Strings that match a regular expression
-<pre>
-<code>
- select s.value.toString() from java.lang.String s
- where /java/.test(s.value.toString())
-</code>
-</pre>
-<li>show path value of all File objects
-<pre>
-<code</b>
- select file.path.value.toString() from java.io.File file
-</code>
-</pre>
-<li>show names of all ClassLoader classes
-<pre>
-<code>
- select <a href="#classof">classof</a>(cl).name
- from instanceof java.lang.ClassLoader cl
-</code>
-</pre>
-<li>show instances of the Class identified by given id string
-<pre>
-<code>
- select o from instanceof 0xd404b198 o
-</code>
-</pre>
-Note that 0xd404b198 is id of a Class (in a session). This is found by
-looking at the id shown in that class's page.
-</ul>
-
-<h2>OQL built-in objects, functions</h2>
-
-<h3>heap object</h3>
-
-The <b>heap</b> built-in object supports the following methods:
-
-<ul>
-<li><b>heap.forEachClass</b> -- calls a callback function for each Java Class
-<pre>
-<code>
- heap.forEachClass(callback);
-</code>
-</pre>
-<li><b>heap.forEachObject</b> -- calls a callback function for each Java object
-<pre>
-<code>
- heap.forEachObject(callback, clazz, includeSubtypes);
-</code>
-</pre>
-<code>clazz</code> is the class whose instances are selected. If not specified, defaults to java.lang.Object. <code>includeSubtypes</code> is a boolean flag
-that specifies whether to include subtype instances or not. Default value of
-this flag is true.
-<a name="findClass"></a>
-<li><b>heap.findClass</b> -- finds Java Class of given name
-<pre>
-<code>
- heap.findClass(className);
-</code>
-</pre>
-where <code>className</code> is name of the class to find. The resulting Class
-object has following properties:
-<ul>
-<li>name - name of the class.
-<li>superclass - Class object for super class (or null if java.lang.Object).
-<li>statics - name, value pairs for static fields of the Class.
-<li>fields - array of field objects. field object has name, signature
-properties.
-<li>loader - ClassLoader object that loaded this class.
-<li>signers - signers that signed this class.
-<li>protectionDomain - protection domain to which this class belongs.
-</ul>
-Class objects have the following methods:
-<ul>
-<li>isSubclassOf - tests whether given class is direct or indirect
-subclass of this class or not.
-<li>isSuperclassOf - tests whether given Class is direct or indirect
-superclass of this class or not.
-<li>subclasses - returns array of direct and indirect subclasses.
-<li>superclasses - returns array of direct and indirect superclasses.
-</ul>
-<a name="findObject"></a>
-<li><b>heap.findObject</b> -- finds object from given object id
-<pre>
-<code>
- heap.findObject(stringIdOfObject);
-</code>
-</pre>
-<a name="classes"></a>
-<li><b>heap.classes</b> -- returns an enumeration of all Java classes
-<a name="objects"></a>
-<li><b>heap.objects</b> -- returns an enumeration of Java objects
-<pre>
-<code>
- heap.objects(clazz, [includeSubtypes], [filter])
-</code>
-</pre>
-<code>clazz</code> is the class whose instances are selected. If not specified, defaults to java.lang.Object. <code>includeSubtypes</code> is a boolean flag
-that specifies whether to include subtype instances or not. Default value of
-this flag is true. This method accepts an optional filter expression to filter
-the result set of objects.
-<a name="finalizables"></a>
-<li><b>heap.finalizables</b> -- returns an enumeration of Java objects that are
-pending to be finalized.
-<li><b>heap.livepaths</b> -- return an array of paths by which a given object
-is alive. This method accepts optional second parameter that is a boolean
-flag. This flag tells whether to include paths with weak reference(s) or not.
-By default, paths with weak reference(s) are not included.
-<pre>
-<code>
- select heap.livepaths(s) from java.lang.String s
-</code>
-</pre>
-Each element of this array itself is another array. The later array is
-contains an objects that are in the 'reference chain' of the path.
-<li><b>heap.roots</b> -- returns an Enumeration of Roots of the heap.
-<a name="rootobj"></a>
-Each Root object has the following properties:
-<ul>
-<li>id - String id of the object that is referred by this root
-<li>type - descriptive type of Root (JNI Global, JNI Local, Java Static etc)
-<li>description - String description of the Root
-<li>referrer - Thread Object or Class object that is responsible for this root or null
-</ul>
-</ul>
-
-Examples:
-<ul>
-<li>access static field 'props' of class java.lang.System
-<pre>
-<code>
- select heap.findClass("java.lang.System").statics.props
-</code>
-</pre>
-<li>get number of fields of java.lang.String class
-<pre>
-<code>
- select heap.findClass("java.lang.String").fields.length
-</code>
-</pre>
-<li> find the object whose object id is given
-<pre>
-<code>
- select heap.findObject("0xf3800b58")
-</code>
-</pre>
-<li>select all classes that have name pattern java.net.*
-<pre>
-<code>
- select <a href="#filter">filter</a>(heap.classes(), "/java.net./.test(it.name)")
-</code>
-</pre>
-</ul>
-
-<h3>functions on individual objects</h3>
-
-<ul>
-<li><a href="#allocTrace">allocTrace(jobject)</a>
-<li><a href="#classof">classof(jobject)</a>
-<li><a href="#forEachReferrer">forEachReferrer(callback, jobject)</a>
-<li><a href="#identical">identical(o1, o2)</a>
-<li><a href="#objectid">objectid(jobject)</a>
-<li><a href="#reachables">reachables(jobject, excludedFields)</a>
-<li><a href="#referrers">referrers(jobject)</a>
-<li><a href="#referees">referees(jobject)</a>
-<li><a href="#refers">refers(jobject)</a>
-<li><a href="#root">root(jobject)</a>
-<li><a href="#sizeof">sizeof(jobject)</a>
-<li><a href="#toHtml">toHtml(obj)</a>
-</ul>
-
-<a name="allocTrace"></a>
-<h4>allocTrace function</h4>
-
-This returns allocation site trace of a given Java object if available.
-allocTrace returns array of frame objects. Each frame object has the following
-properties:
-<ul>
-<li>className - name of the Java class whose method is running in the frame.
-<li>methodName - name of the Java method running in the frame.
-<li>methodSignature - signature of the Java method running in the frame.
-<li>sourceFileName - name of source file of the Java class running in the frame.
-<li>lineNumber - source line number within the method.
-</ul>
-
-<a name="classof"></a>
-<h4>classof function</h4>
-
-Returns Class object of a given Java Object. The result object supports the
-following properties:
-<ul>
-<li>name - name of the class.
-<li>superclass - Class object for super class (or null if java.lang.Object).
-<li>statics - name, value pairs for static fields of the Class.
-<li>fields - array of field objects. Field objects have name, signature
-properties.
-<li>loader - ClassLoader object that loaded this class.
-<li>signers - signers that signed this class.
-<li>protectionDomain - protection domain to which this class belongs.
-</ul>
-Class objects have the following methods:
-<ul>
-<li>isSubclassOf - tests whether given class is direct or indirect
-subclass of this class or not.
-<li>isSuperclassOf - tests whether given Class is direct or indirect
-superclass of this class or not.
-<li>subclasses - returns array of direct and indirect subclasses.
-<li>superclasses - returns array of direct and indirect superclasses.
-</ul>
-
-Examples:
-<ul>
-<li>show class name of each Reference type object
-<pre>
-<code>
- select classof(o).name from instanceof java.lang.ref.Reference o
-</code>
-<li>show all subclasses of java.io.InputStream
-<pre>
-<code>
- select heap.findClass("java.io.InputStream").subclasses()
-</code>
-<li>show all superclasses of java.io.BufferedInputStream
-<pre>
-<code>
- select heap.findClass("java.io.BufferedInputStream").superclasses()
-</code>
-</pre>
-</ul>
-
-<a name="forEachReferrer"></a>
-<h4>forEachReferrer function</h4>
-
-calls a callback function for each referrer of a given Java object.
-
-<a name="identical"></a>
-<h4>identical function</h4>
-<p>
-Returns whether two given Java objects are identical or not.
-</p>
-Example:
-<pre>
-<code>
- select identical(heap.findClass("Foo").statics.bar, heap.findClass("AnotherClass").statics.bar)
-</code>
-</pre>
-
-<a name="objectid"></a>
-<h4>objectid function</h4>
-
-<p>
-Returns String id of a given Java object. This id can be passed to
-<a href="#findObject">heap.findObject</a> and may also be used to compare
-objects for identity.
-</p>
-Example:
-<pre>
-<code>
- select objectid(o) from java.lang.Object o
-</code>
-</pre>
-
-<a name="reachables"></a>
-<h4>reachables function</h4>
-<p>
-Returns an array of Java objects that are transitively referred from the
-given Java object. Optionally accepts a second parameter that is comma
-separated field names to be excluded from reachability computation.
-Fields are written in class_name.field_name pattern.
-</p>
-Examples:
-<ul>
-<li>print all reachable objects from each Properties instance.
-<pre>
-<code>
- select reachables(p) from java.util.Properties p
-</code>
-</pre>
-<li>print all reachables from each java.net.URL but omit the objects reachable
-via the fields specified.
-<pre>
-<code>
- select reachables(u, 'java.net.URL.handler') from java.net.URL u
-</code>
-</pre>
-</ul>
-
-<a name="referrers"></a>
-<h4>referrers function</h4>
-<p>
-Returns an enumeration of Java objects that hold reference to a given Java
-object.
-</p>
-Examples:
-<ul>
-<li> print number of referrers for each java.lang.Object instance
-<pre>
-<code>
- select count(referrers(o)) from java.lang.Object o
-</code>
-</pre>
-<li>print referrers for each java.io.File object
-<pre>
-<code>
- select referrers(f) from java.io.File f
-</code>
-</pre>
-<li>print URL objects only if referred by 2 or more
-<pre>
-<code>
- select u from java.net.URL u where count(referrers(u)) > 2
-</code>
-</pre>
-</ul>
-
-<a name="referees"></a>
-<h4>referees function</h4>
-<p>
-Returns an array of Java objects to which the given Java
-object directly refers to.
-</p>
-Example: to print all static reference fields of java.io.File class
-<pre>
-<code>
- select referees(<a href="#findClass">heap.findClass</a>("java.io.File"))
-</code>
-</pre>
-
-<a name="refers"></a>
-<h4>refers function</h4>
-<p>
-Returns whether first Java object refers to second Java object or not.
-</p>
-
-<a name="root"></a>
-<h4>root function</h4>
-<p>
-If given object is a member of root set of objects, this function returns
-a descriptive <a href="#rootobj">Root object</a> describing why it is so.
-If given object is not a root, then this function returns null.
-</p>
-
-<a name="sizeof"></a>
-<h4>sizeof function</h4>
-
-Returns size of the given Java object in bytes
-Example:
-<pre>
-<code>
- select sizeof(o) from [I o
-</code>
-</pre>
-
-<a name="toHtml"></a>
-<h4>toHtml function</h4>
-
-Returns HTML string for the given Java object. Note that this is called
-automatically for objects selected by select expression. But, it may be useful
-to print more complex output.
-
-Example: print hyperlink in bold font weight
-<pre>
-<code>
- select "<b>" + toHtml(o) + "</b>" from java.lang.Object o
-</code>
-</pre>
-
-<h3>Selecting multiple values</h3>
-<p>
-Multiple values can be selected using JavaScript object literals or arrays.
-</p>
-
-Example: show name and thread for each thread object
-<pre>
-<code>
- select { name: t.name? t.name.toString() : "null", thread: t }
- from instanceof java.lang.Thread t
-</code>
-</pre>
-
-<h3>array/iterator/enumeration manipulation functions</h3>
-
-<p>
-These functions accept an array/iterator/enumeration and an
-expression string [or a callback function] as input. These functions iterate
-the array/iterator/enumeration and apply the expression (or function) on
-each element. Note that JavaScript objects are associative arrays. So,
-these functions may also be used with arbitrary JavaScript objects.
-</p>
-
-<ul>
-<li><a href="#concat">concat(array1/enumeration1, array2/enumeration2)</a>
-<li><a href="#contains">contains(array/enumeration, expression)</a>
-<li><a href="#count">count(array/enumeration, expression)</a>
-<li><a href="#filter">filter(array/enumeration, expression)</a>
-<li><a href="#length">length(array/enumeration)</a>
-<li><a href="#map">map(array/enumeration, expression)</a>
-<li><a href="#max">max(array/enumeration, [expression])</a>
-<li><a href="#min">min(array/enumeration, [expression])</a>
-<li><a href="#sort">sort(array/enumeration, [expression])</a>
-<li><a href="#sum">sum(array/enumeration, [expression])</a>
-<li><a href="#toArray">toArray(array/enumeration)</a>
-<li><a href="#unique">unique(array/enumeration, [expression])</a>
-</ul>
-
-<a name="concat"></a>
-<h4>concat function</h4>
-<p>
-Concatenates two arrays or enumerations (i.e., returns composite
-enumeration).
-</p>
-
-<a name="contains"></a>
-<h4>contains function</h4>
-<p>
-Returns whether the given array/enumeration contains an element
-the given boolean expression specified in code. The code evaluated
-can refer to the following built-in variables.
-</p>
-<ul>
-<li>it -> currently visited element
-<li>index -> index of the current element
-<li>array -> array/enumeration that is being iterated
-</ul>
-Example: select all Properties objects that are referred by
-some static field some class.
-<pre>
-<code>
- select p from java.util.Properties p
- where contains(<a href="#referrers">referrers</a>(p), "<a href="#classof">classof</a>(it).name == 'java.lang.Class'")
-</code>
-</pre>
-
-<a name="count"></a>
-<h4>count function</h4>
-<p>
-count function returns the count of elements of the input array/enumeration
-that satisfy the given boolean expression. The boolean expression code can
-refer to the following built-in variables.
-</p>
-<ul>
-<li>it -> currently visited element
-<li>index -> index of the current element
-<li>array -> array/enumeration that is being iterated
-</ul>
-Example: print number of classes that have specific name pattern
-<pre>
-<code>
- select count(<a href="#classes">heap.classes()</a>, "/java.io./.test(it.name)")
-</code>
-</pre>
-
-<a name="filter"></a>
-<h4>filter function</h4>
-<p>
-filter function returns an array/enumeration that contains elements
-of the input array/enumeration that satisfy the given boolean
-expression. The boolean expression code can refer to the following built-in
-variables.
-</p>
-<ul>
-<li>it -> currently visited element
-<li>index -> index of the current element
-<li>array -> array/enumeration that is being iterated
-<li>result -> result array/enumeration
-</ul>
-Examples:
-<ul>
-<li>show all classes that have java.io.* name pattern
-<pre>
-<code>
- 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./.test(<a href="#classof">classof</a>(it).name)")
- from java.net.URL u
-</code>
-</pre>
-</ul>
-
-<a name="length"></a>
-<h4>length function</h4>
-<p>
-length function returns number of elements of an array/enumeration.
-</p>
-
-<a name="map"></a>
-<h4>map function</h4>
-<p>
-Transforms the given array/enumeration by evaluating given code
-on each element. The code evaluated can refer to the following built-in
-variables.
-</p>
-<ul>
-<li>it -> currently visited element
-<li>index -> index of the current element
-<li>array -> array/enumeration that is being iterated
-<li>result -> result array/enumeration
-</ul>
-<p>
-map function returns an array/enumeration of values created by repeatedly
-calling code on each element of input array/enumeration.
-</p>
-Example: show all static fields of java.io.File with name and value
-<pre>
-<code>
- select map(<a href="#findClass">heap.findClass</a>("java.io.File").statics, "index + '=' + <a href="#toHtml">toHtml</a>(it)")
-</code>
-</pre>
-
-<a name="max"></a>
-<h4>max function</h4>
-<p>
-returns the maximum element of the given array/enumeration.
-Optionally accepts code expression to compare elements of the array.
-By default numerical comparison is used. The comparison expression can
-use the following built-in variables:
-</p>
-<ul>
-<li>lhs -> left side element for comparison
-<li>rhs -> right side element for comparison
-</ul>
-Examples:
-<ul>
-<li>find the maximum length of any String instance
-<pre>
-<code>
- 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.value.length > rhs.value.length')
-</code>
-</pre>
-</ul>
-
-<a name="min"></a>
-<h4>min function</h4>
-<p>
-returns the minimum element of the given array/enumeration. Optionally
-accepts code expression to compare elements of the array. By default numerical
-comparison is used. The comparison expression can use the following built-in
-variables:
-</p>
-<ul>
-<li>lhs -> left side element for comparison
-<li>rhs -> right side element for comparison
-</ul>
-Examples:
-<ul>
-<li>find the minimum size of any Vector instance
-<pre>
-<code>
- select min(map(heap.objects('java.util.Vector', false), 'it.elementData.length'))
-</code>
-</pre>
-<li>find Vector instance that has the maximum length
-<pre>
-<code>
- select min(heap.objects('java.util.Vector'), 'lhs.elementData.length < rhs.elementData.length')
-</code>
-</ul>
-
-<a name="sort"></a>
-<h4>sort function</h4>
-<p>
-sorts given array/enumeration. Optionally accepts code expression to
-compare elements of the array. By default numerical comparison is used.
-The comparison expression can use the following built-in variables:
-</p>
-<ul>
-<li>lhs -> left side element for comparison
-<li>rhs -> right side element for comparison
-</ul>
-Examples:
-<ul>
-<li> print all char[] objects in the order of size.
-<pre>
-<code>
- select sort(<a href="#objects">heap.objects</a>('[C'), '<a href="#sizeof">sizeof</a>(lhs) - sizeof(rhs)')
-</code>
-</pre>
-<li> print all char[] objects in the order of size but print
-size as well.
-<pre>
-<code>
- select <a href="#map">map</a>(sort(<a href="#objects">heap.objects</a>('[C'), '<a href="#sizeof">sizeof</a>(lhs) - sizeof(rhs)'), '{ size: sizeof(it), obj: it }')
-</code>
-</pre>
-</ul>
-
-<a name="sum"></a>
-<h4>sum function</h4>
-<p>
-This function returns the sum of all the elements of the given input array or
-enumeration. Optionally, accepts an expression as second param. This is used
-to map the input elements before summing those.
-</p>
-Example: return sum of sizes of the reachable objects from each Properties object
-<pre>
-<code>
- select sum(<a href="#map">map</a>(<a href="#reachables">reachables</a>(p), '<a href="#sizeof">sizeof</a>(it)'))
- from java.util.Properties p
-
- // or omit the map as in ...
- select sum(<a href="#reachables">reachables</a>(p), '<a href="#sizeof">sizeof</a>(it)')
- from java.util.Properties p
-</code>
-</code>
-</pre>
-
-<a name="toArray"></a>
-<h4>toArray function</h4>
-<p>
-This function returns an array that contains elements of the input
-array/enumeration.
-</p>
-
-<a name="unique"></a>
-<h4>unique function</h4>
-<p>
-This function returns an array/enumeration containing unique elements of the
-given input array/enumeration
-</p>
-Example: select unique char[] instances referenced from Strings. Note that
-more than one String instance can share the same char[] for the content.
-<pre>
-<code>
- // number of unique char[] instances referenced from any String
- select count(unique(map(heap.objects('java.lang.String'), 'it.value')))
-
- // total number of Strings
- select count(heap.objects('java.lang.String'))
-</code>
-</pre>
-
-<h3>More complex examples</h3>
-
-<h4>Print histogram of each class loader and number of classes loaded by it</h4>
-
-<pre>
-<code>
- select <a href="#map">map</a>(<a href="#sort">sort</a>(map(heap.objects('java.lang.ClassLoader'),
- '{ loader: it, count: it.classes.elementCount }'), 'lhs.count < rhs.count'),
- 'toHtml(it) + "<br>"')
-</code>
-</pre>
-<p>
-The above query uses the fact that, <b>java.lang.ClassLoader</b> has a private
-field called <b>classes</b> of type <b>java.util.Vector</b> and Vector has a
-private field named <b>elementCount</b> that is number of elements in the
-vector. We select multiple values (loader, count) using JavaScript object
-literal and map function. We sort the result by count (i.e., number of classes
-loaded) using sort function with comparison expression.
-</p>
-
-<h4>Show parent-child chain for each class loader instance</h4>
-
-<pre>
-<code>
- select <a href="#map">map</a>(heap.objects('java.lang.ClassLoader'),
- function (it) {
- var res = '';
- while (it != null) {
- res += toHtml(it) + "->";
- it = it.parent;
- }
- res += "null";
- return res + "<br>";
- })
-</code>
-</pre>
-<p>
-Note that we use <b>parent</b> field of <b>java.lang.ClassLoader</b> class
-and walk until parent is null using the callback function to map call.
-</p>
-
-<h4>Printing value of all System properties</h4>
-
-<pre>
-<code>
- 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) {
- res += it.key.value.toString() + '=' +
- it.value.value.toString() + '<br>';
- it = it.next;
- }
- return res;
- });
-</code>
-</pre>
-<p>
-The above query uses the following facts:
-<ul>
-<li>java.lang.System has static field by name 'props' of type java.util.Properties.
-<li>java.util.Properties has field by 'table' of type java.util.Hashtable$Entry
-(this field is inherited from java.util.Hashtable). This is the hashtable
-buckets array.
-<li>java.util.Hashtable$Entry has 'key', 'value' and 'next' fields. Each
-entry points the next entry (or null) in the same hashtable bucket.
-<li>java.lang.String class has 'value' field of type char[].
-</ul>
-<p>
-<b>Note that this query (and many other queries) may not be stable - because
-private fields of Java platform classes may be modified/removed without any
-notification! (implementation detail)</b>. But, using such queries on user
-classes may be safe - given that user has the control over the classes.
-</p>
-
-</body>
-</html>
--- a/jdk/src/jdk.dev/share/classes/com/sun/tools/hat/resources/platform_names.txt Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-boolean[
-char[
-float[
-double[
-byte[
-short[
-int[
-long[
-sun.
-java.
-javax.accessibility
-javax.crypto.
-javax.imageio.
-javax.naming.
-javax.net.
-javax.print.
-javax.rmi.
-javax.security.
-javax.sound.
-javax.sql.
-javax.swing.
-javax.transaction.
-javax.xml.parsers.
-javax.xml.transform.
-org.ietf.jgss.
-org.omg.
-org.w3c.dom.
-org.xml.sax.
-
--- a/jdk/src/jdk.hprof.agent/unix/native/libhprof/hprof_md.c Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.hprof.agent/unix/native/libhprof/hprof_md.c Fri May 29 12:49:31 2015 +0200
@@ -290,19 +290,7 @@
Dl_info dlinfo;
libdir[0] = 0;
-#if defined(LINUX) || defined(_ALLBSD_SOURCE) || defined(AIX)
- addr = (void*)&Agent_OnLoad;
-#else
- /* Just using &Agent_OnLoad will get the first external symbol with
- * this name in the first .so, which may not be libhprof.so.
- * On Solaris we can actually ask for the address of our Agent_OnLoad.
- */
- addr = dlsym(RTLD_SELF, "Agent_OnLoad");
- /* Just in case the above didn't work (missing linker patch?). */
- if ( addr == NULL ) {
- addr = (void*)&Agent_OnLoad;
- }
-#endif
+ addr = (void*)&md_get_prelude_path;
/* Use dladdr() to get the full path to libhprof.so, which we use to find
* the prelude file.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Accessible.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Accessible.java Fri May 29 12:49:31 2015 +0200
@@ -40,8 +40,8 @@
public interface Accessible {
/**
- * Returns the Java<sup><font size=-2>TM</font></sup>
- * programming language modifiers, encoded in an integer.
+ * Returns the Java™ programming language modifiers, encoded
+ * in an integer.
* <p>
* The modifier encodings are defined in
* <cite>The Java™ Virtual Machine Specification</cite>
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotLoadedException.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotLoadedException.java Fri May 29 12:49:31 2015 +0200
@@ -45,7 +45,7 @@
* <li>There can be no guarantee that running the appropriate class
* loader won't cause a deadlock in loading the
* class. Class loaders can consist of arbitrary
- * Java<sup><font size=-2>TM</font></sup> programming language code and the
+ * Java™ programming language code and the
* class loading methods are usually synchronized. Most of the work
* done by a debugger happens when threads are suspended. If another
* application thread is suspended within the same class loader,
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Locatable.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Locatable.java Fri May 29 12:49:31 2015 +0200
@@ -36,10 +36,10 @@
@jdk.Exported
public interface Locatable {
/**
- * Returns the {@link Location} of this mirror, if there
- * is executable code associated with it. Note that both
- * Java<SUP><FONT SIZE="-2">TM</FONT></SUP> programming
- * language methods and native methods have executable code.
+ * Returns the {@link Location} of this mirror, if there is
+ * executable code associated with it. Note that both Java™
+ * programming language methods and native methods have executable
+ * code.
* Returns null for abstract methods, since abstract methods
* have no executable code.
*
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java Fri May 29 12:49:31 2015 +0200
@@ -31,8 +31,7 @@
* Request for notification when the contents of a field are accessed
* in the target VM.
* This event will be triggered when the specified field is accessed
- * by Java<SUP><FONT SIZE="-2">TM</FONT></SUP> programming
- * language code or by a
+ * by Java™ programming language code or by a
* Java Native Interface (JNI) get function (<code>Get<Type>Field,
* GetStatic<Type>Field</code>).
* Access by JDI does not trigger this event.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java Fri May 29 12:49:31 2015 +0200
@@ -30,7 +30,7 @@
/**
* Request for notification when a field is set.
* This event will be triggered when a value is assigned to the specified
- * field with a Java<SUP><FONT SIZE="-2">TM</FONT></SUP> programming
+ * field with a Java™ programming
* language statement (assignment, increment, etc) or by a
* Java Native Interface (JNI) set function (<code>Set<Type>Field,
* SetStatic<Type>Field</code>).
--- a/jdk/src/jdk.jdi/share/classes/jdi-overview.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.jdi/share/classes/jdi-overview.html Fri May 29 12:49:31 2015 +0200
@@ -1,11 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
- <title>Java(tm) Debug Interface</title>
+ <title>Java™ Debug Interface</title>
</head>
<body>
- The Java<sup><font size="-2">TM</font></sup>
- Debug Interface (JDI) is a high level Java
+ The Java™ Debug Interface (JDI) is a high level Java
API providing information useful for debuggers and similar
systems needing access to the running state of a (usually remote)
virtual machine.
--- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RMIGenerator.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RMIGenerator.java Fri May 29 12:49:31 2015 +0200
@@ -79,7 +79,7 @@
* Examine and consume command line arguments.
* @param argv The command line arguments. Ignore null
* and unknown arguments. Set each consumed argument to null.
- * @param error Report any errors using the main.error() methods.
+ * @param main Report any errors using the main.error() methods.
* @return true if no errors, false otherwise.
*/
public boolean parseArgs(String argv[], Main main) {
--- a/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RemoteClass.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/RemoteClass.java Fri May 29 12:49:31 2015 +0200
@@ -111,7 +111,7 @@
* the remote methods implemented by this class, i.e. all of the
* methods in the class's remote interfaces.
*
- * The methods in the array are ordered according to the comparision
+ * The methods in the array are ordered according to the comparison
* of the strings consisting of their method name followed by their
* type signature, so each method's index in the array corresponds
* to its "operation number" in the JDK 1.1 version of the
--- a/jdk/src/sample/share/jmx/jmx-scandir/index.html Fri May 22 09:14:18 2015 +0200
+++ b/jdk/src/sample/share/jmx/jmx-scandir/index.html Fri May 29 12:49:31 2015 +0200
@@ -33,11 +33,11 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
- <title>JMX(TM) "scandir" Example</title>
+ <title>JMX™ "scandir" Example</title>
</head>
<body>
- <h1><center>Java<font size="-1"><sup>TM</sup></font> Management Extensions (JMX<font size="-1"><sup>TM</sup></font>) <i>scandir</i> Example</center></h1>
+ <h1><center>Java™ Management Extensions (JMX™) <i>scandir</i> Example</center></h1>
<h2><a name="h2-Introduction">Introduction</a></h2>
<ul>
@@ -1197,7 +1197,7 @@
<p>Another common best practice when you want
to improve interoperability is to use directly
the Notification base classes provided in the
- JMX<sup>TM</sup> API. Do not create your own
+ JMX™ API. Do not create your own
subclasses of these standard classes.
</p>
<p>Indeed, if you code your own subclass, a generic
@@ -1974,7 +1974,7 @@
More information on SSL authentication can be obtained from the <a
href="http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#HowSSLWorks"
title="How SSL Works"
- >Java<sup>TM</sup> Secure Socket Extension (JSSE) Reference Guide</a>.
+ >Java™ Secure Socket Extension (JSSE) Reference Guide</a>.
</p>
<p>To start jconsole with our provided keystore and
truststore, go to the scandir example root directory and
@@ -2202,13 +2202,13 @@
<li><a
href="http://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#HowSSLWorks"
title="The JSSE Reference Guide"
- >Java<sup>TM</sup> Secure Socket Extension (JSSE) Reference Guide</a>:
- comprehensive documentation about the Java<sup>TM</sup> Secure Socket
+ >Java™ Secure Socket Extension (JSSE) Reference Guide</a>:
+ comprehensive documentation about the Java™ Secure Socket
Extension (JSSE)
</li>
<li><a href="http://java.sun.com/javase/6/docs/"
>Java SE 6 Documentation Index</a>: This document covers the
- Java<sup>TM</sup> Platform, Standard Edition 6 JDK.</li>
+ Java™ Platform, Standard Edition 6 JDK.</li>
</ol>
<p>
<hr>
--- a/jdk/test/ProblemList.txt Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/ProblemList.txt Fri May 29 12:49:31 2015 +0200
@@ -379,4 +379,10 @@
# 8064572 8060736 8062938
sun/jvmstat/monitor/MonitoredVm/CR6672135.java generic-all
+# 8079273
+demo/jvmti/hprof/CpuOldTest.java generic-all
+demo/jvmti/hprof/CpuTimesTest.java generic-all
+demo/jvmti/hprof/OptionsTest.java generic-all
+demo/jvmti/hprof/StackMapTableTest.java generic-all
+
############################################################################
--- a/jdk/test/TEST.groups Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/TEST.groups Fri May 29 12:49:31 2015 +0200
@@ -534,7 +534,6 @@
sun/nio/cs/OLD/TestIBMDB.java \
sun/nio/cs/SJISCanEncode.java \
sun/nio/cs/Test6254467.java \
- sun/nio/cs/TestCompoundTest.java \
sun/nio/cs/TestCp834_SBCS.java \
sun/nio/cs/TestEUC_TW.java \
sun/nio/cs/TestISO2022CNDecoder.java \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/KeyWrap/TestCipherKeyWrapperTest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,316 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.lang.System.out;
+
+import java.lang.Integer;
+import java.lang.String;
+import java.lang.System;
+import java.security.AlgorithmParameters;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.KeyPair;
+import java.security.NoSuchAlgorithmException;
+import java.security.KeyPairGenerator;
+import java.security.Provider;
+import java.security.Security;
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.spec.PBEParameterSpec;
+
+/*
+ * @test
+ * @bug 8048599
+ * @summary Tests for key wrap and unwrap operations
+ */
+
+public class TestCipherKeyWrapperTest {
+ private static final String SUN_JCE = "SunJCE";
+ // Blowfish Variable key length: 32 bits to 448 bits
+ private static final int BLOWFISH_MIN_KEYSIZE = 32;
+ private static final int BLOWFISH_MAX_KEYSIZE = 448;
+ private static final int LINIMITED_KEYSIZE = 128;
+ private static final String NOPADDING = "NoPaDDing";
+ private static final String[] PBE_ALGORITHM_AR = { "pbeWithMD5ANDdes",
+ "PBEWithMD5AndDES/CBC/PKCS5Padding", "PBEWithMD5AndTripleDES",
+ "PBEWithMD5AndTripleDES/CBC/PKCS5Padding", "PBEwithSHA1AndDESede",
+ "PBEwithSHA1AndDESede/CBC/PKCS5Padding", "PBEwithSHA1AndRC2_40",
+ "PBEwithSHA1Andrc2_40/CBC/PKCS5Padding", "PBEWithSHA1AndRC2_128",
+ "PBEWithSHA1andRC2_128/CBC/PKCS5Padding", "PBEWithSHA1AndRC4_40",
+ "PBEWithsha1AndRC4_40/ECB/NoPadding", "PBEWithSHA1AndRC4_128",
+ "pbeWithSHA1AndRC4_128/ECB/NoPadding", "PBEWithHmacSHA1AndAES_128",
+ "PBEWithHmacSHA224AndAES_128", "PBEWithHmacSHA256AndAES_128",
+ "PBEWithHmacSHA384AndAES_128", "PBEWithHmacSHA512AndAES_128",
+ "PBEWithHmacSHA1AndAES_256", "PBEWithHmacSHA224AndAES_256",
+ "PBEWithHmacSHA256AndAES_256", "PBEWithHmacSHA384AndAES_256",
+ "PBEWithHmacSHA512AndAES_256" };
+ private static final String[] MODEL_AR = { "ECb", "pCbC", "cbC", "cFB",
+ "cFB24", "cFB40", "OfB48", "OFB64" };
+ private static final String[] PADDING_AR = { NOPADDING, "PKCS5Padding" };
+
+ private enum AlgorithmWrapper {
+ AESWrap("AES", "AESWrap", -1),
+ AESWrap_128("AES", "AESWrap_128", 128),
+ AESWrap_192("AES", "AESWrap_192", 192),
+ AESWrap_256("AES", "AESWrap_256", 256),
+ DESedeWrap("desede", "DESedeWrap", -1),
+ NegtiveWrap("AES", "DESedeWrap", -1);
+
+ private final String algorithm;
+ private final String wrapper;
+ private final int keySize;
+
+ private AlgorithmWrapper(String algorithm, String wrapper, int kSize) {
+ this.algorithm = algorithm;
+ this.wrapper = wrapper;
+ this.keySize = kSize;
+ }
+
+ public String getAlgorithm() {
+ return algorithm;
+ }
+
+ public String getWrapper() {
+ return wrapper;
+ }
+
+ public int getKeySize() {
+ return keySize;
+ }
+
+ };
+
+ public static void main(String[] args) throws Exception {
+
+ TestCipherKeyWrapperTest test = new TestCipherKeyWrapperTest();
+ // AESWrap and DESedeWrap test
+ for (AlgorithmWrapper algoWrapper : AlgorithmWrapper.values()) {
+ String algo = algoWrapper.getAlgorithm();
+ String wrapper = algoWrapper.getWrapper();
+ try {
+ int keySize = algoWrapper.getKeySize();
+ // only run the tests on longer key lengths if unlimited
+ // version of JCE jurisdiction policy files are installed
+ if (!(Cipher.getMaxAllowedKeyLength(algo) == Integer.MAX_VALUE)
+ && keySize > LINIMITED_KEYSIZE) {
+ out.println(algo + " will not run if unlimited version of"
+ + " JCE jurisdiction policy files are installed");
+ continue;
+ }
+ test.wrapperAesDESedeKeyTest(algo, wrapper, keySize);
+ if (algoWrapper == AlgorithmWrapper.NegtiveWrap) {
+ throw new RuntimeException("Expected not throw when algo"
+ + " and wrapAlgo are not match:" + algo);
+ }
+ } catch (InvalidKeyException e) {
+ if (algoWrapper == AlgorithmWrapper.NegtiveWrap) {
+ out.println("Expepted exception when algo"
+ + " and wrapAlgo are not match:" + algo);
+ } else {
+ throw e;
+ }
+ }
+ }
+ test.wrapperBlowfishKeyTest();
+ // PBE and public wrapper test.
+ String[] publicPrivateAlgos = new String[] { "DiffieHellman", "DSA",
+ "RSA" };
+ Provider provider = Security.getProvider(SUN_JCE);
+ if (provider == null) {
+ throw new RuntimeException("SUN_JCE provider not exist");
+ }
+
+ test.wrapperPBEKeyTest(provider);
+ // Public and private key wrap test
+ test.wrapperPublicPriviteKeyTest(provider, publicPrivateAlgos);
+ }
+
+ private void wrapperAesDESedeKeyTest(String algo, String wrapAlgo,
+ int keySize) throws InvalidKeyException, NoSuchAlgorithmException,
+ NoSuchPaddingException, IllegalBlockSizeException,
+ InvalidAlgorithmParameterException {
+ // Initialization
+ KeyGenerator kg = KeyGenerator.getInstance(algo);
+ if (keySize != -1) {
+ kg.init(keySize);
+ }
+ SecretKey key = kg.generateKey();
+ wrapTest(algo, wrapAlgo, key, key, Cipher.SECRET_KEY, false);
+ }
+
+ private void wrapperBlowfishKeyTest() throws InvalidKeyException,
+ NoSuchAlgorithmException, NoSuchPaddingException,
+ IllegalBlockSizeException, InvalidAlgorithmParameterException {
+ // how many kinds of padding mode
+ int padKinds;
+ // Keysize should be multiple of 8 bytes.
+ int KeyCutter = 8;
+ int kSize = BLOWFISH_MIN_KEYSIZE;
+ String algorithm = "Blowfish";
+ int maxAllowKeyLength = Cipher.getMaxAllowedKeyLength(algorithm);
+ boolean unLimitPolicy = maxAllowKeyLength == Integer.MAX_VALUE;
+ SecretKey key = null;
+ while (kSize <= BLOWFISH_MAX_KEYSIZE) {
+ for (String mode : MODEL_AR) {
+ // PKCS5padding is meaningful only for ECB, CBC, PCBC
+ if (mode.equalsIgnoreCase(MODEL_AR[0])
+ || mode.equalsIgnoreCase(MODEL_AR[1])
+ || mode.equalsIgnoreCase(MODEL_AR[2])) {
+ padKinds = PADDING_AR.length;
+ } else {
+ padKinds = 1;
+ }
+ // Initialization
+ KeyGenerator kg = KeyGenerator.getInstance(algorithm);
+ for (int k = 0; k < padKinds; k++) {
+ String transformation = algorithm + "/" + mode + "/"
+ + PADDING_AR[k];
+ if (NOPADDING.equals(PADDING_AR[k]) && kSize % 64 != 0) {
+ out.println(transformation
+ + " will not run if input length not multiple"
+ + " of 8 bytes when padding is " + NOPADDING);
+ continue;
+ }
+ kg.init(kSize);
+ key = kg.generateKey();
+ // only run the tests on longer key lengths if unlimited
+ // version of JCE jurisdiction policy files are installed
+ if (!unLimitPolicy && kSize > LINIMITED_KEYSIZE) {
+ out.println("keyStrength > 128 within " + algorithm
+ + " will not run under global policy");
+ } else {
+ wrapTest(transformation, transformation, key, key,
+ Cipher.SECRET_KEY, false);
+ }
+ }
+ }
+ if (kSize <= LINIMITED_KEYSIZE) {
+ KeyCutter = 8;
+ } else {
+ KeyCutter = 48;
+ }
+ kSize += KeyCutter;
+ }
+ }
+
+ private void wrapperPBEKeyTest(Provider p) throws InvalidKeySpecException,
+ InvalidKeyException, NoSuchPaddingException,
+ IllegalBlockSizeException, InvalidAlgorithmParameterException,
+ NoSuchAlgorithmException {
+ for (String alg : PBE_ALGORITHM_AR) {
+ String baseAlgo = alg.split("/")[0].toUpperCase();
+ // only run the tests on longer key lengths if unlimited version
+ // of JCE jurisdiction policy files are installed
+
+ if (Cipher.getMaxAllowedKeyLength(alg) < Integer.MAX_VALUE
+ && (baseAlgo.endsWith("TRIPLEDES") || alg
+ .endsWith("AES_256"))) {
+ out.println("keyStrength > 128 within " + alg
+ + " will not run under global policy");
+ continue;
+ }
+ SecretKeyFactory skf = SecretKeyFactory.getInstance(baseAlgo, p);
+ SecretKey key = skf.generateSecret(new PBEKeySpec("Secret Lover"
+ .toCharArray()));
+ wrapTest(alg, alg, key, key, Cipher.SECRET_KEY, true);
+ }
+ }
+
+ private void wrapperPublicPriviteKeyTest(Provider p, String[] algorithms)
+ throws NoSuchAlgorithmException, InvalidKeyException,
+ NoSuchPaddingException, IllegalBlockSizeException,
+ InvalidAlgorithmParameterException {
+ for (String algo : algorithms) {
+ // Key pair generated
+ System.out.println("Generate key pair (algorithm: " + algo
+ + ", provider: " + p.getName() + ")");
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(algo);
+ kpg.initialize(512);
+ KeyPair kp = kpg.genKeyPair();
+ // key generated
+ String algoWrap = "DES";
+ KeyGenerator kg = KeyGenerator.getInstance(algoWrap, p);
+ Key key = kg.generateKey();
+ wrapTest(algo, algoWrap, key, kp.getPrivate(), Cipher.PRIVATE_KEY,
+ false);
+ wrapTest(algo, algoWrap, key, kp.getPublic(), Cipher.PUBLIC_KEY,
+ false);
+ }
+ }
+
+ private void wrapTest(String transformation, String wrapAlgo, Key initKey,
+ Key wrapKey, int keyType, boolean isPBE)
+ throws NoSuchAlgorithmException, NoSuchPaddingException,
+ InvalidKeyException, IllegalBlockSizeException,
+ InvalidAlgorithmParameterException {
+ String algo = transformation.split("/")[0];
+ boolean isAESBlowfish = algo.indexOf("AES") != -1
+ || algo.indexOf("Blowfish") != -1;
+ AlgorithmParameters aps = null;
+ AlgorithmParameterSpec pbeParams = null;
+ if (isPBE) {
+ byte[] salt = new byte[8];
+ int iterCnt = 1000;
+ new Random().nextBytes(salt);
+ pbeParams = new PBEParameterSpec(salt, iterCnt);
+ }
+ // Wrap & UnWrap operation
+ Cipher wrapCI = Cipher.getInstance(wrapAlgo);
+ if (isPBE && !isAESBlowfish) {
+ wrapCI.init(Cipher.WRAP_MODE, initKey, pbeParams);
+ } else if (isAESBlowfish) {
+ wrapCI.init(Cipher.WRAP_MODE, initKey);
+ aps = wrapCI.getParameters();
+ } else {
+ wrapCI.init(Cipher.WRAP_MODE, initKey);
+ }
+ out.println("keysize : " + wrapKey.getEncoded().length);
+ byte[] keyWrapper = wrapCI.wrap(wrapKey);
+ if (isPBE && !isAESBlowfish) {
+ wrapCI.init(Cipher.UNWRAP_MODE, initKey, pbeParams);
+ } else if (isAESBlowfish) {
+ wrapCI.init(Cipher.UNWRAP_MODE, initKey, aps);
+ } else {
+ wrapCI.init(Cipher.UNWRAP_MODE, initKey);
+ }
+ Key unwrappedKey = wrapCI.unwrap(keyWrapper, algo, keyType);
+ // Comparison
+ if (!Arrays.equals(wrapKey.getEncoded(), unwrappedKey.getEncoded())) {
+ throw new RuntimeException("Comparation failed testing "
+ + transformation + ":" + wrapAlgo + ":" + keyType);
+ }
+ }
+}
--- a/jdk/test/com/sun/jdi/BadHandshakeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/com/sun/jdi/BadHandshakeTest.java Fri May 29 12:49:31 2015 +0200
@@ -84,14 +84,19 @@
class_name,
pb,
(line) -> {
- // The first thing that will get read is
- // Listening for transport dt_socket at address: xxxxx
- // which shows the debuggee is ready to accept connections.
- success.set(line.contains("Listening for transport dt_socket at address:"));
- // If the first line contains 'Address already in use'
- // that means the debuggee has failed to start due to busy port
- bindFailed.set(line.contains("Address already in use"));
- return true;
+ // 'Listening for transport dt_socket at address: xxxxx'
+ // indicates the debuggee is ready to accept connections
+ if (line.contains("Listening for transport dt_socket at address:")) {
+ success.set(true);
+ return true;
+ }
+ // 'Address already in use' indicates
+ // the debuggee has failed to start due to busy port.
+ if (line.contains("Address already in use")) {
+ bindFailed.set(true);
+ return true;
+ }
+ return false;
},
Integer.MAX_VALUE,
TimeUnit.MILLISECONDS
--- a/jdk/test/com/sun/jdi/NoLaunchOptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/com/sun/jdi/NoLaunchOptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -21,134 +21,35 @@
* questions.
*/
-/*
- * @test NoLaunchOptionTest.java
- * @bug 4554734 4724714
- * @summary Test for -Xrunjdwp:[onthrow,onuncaught] suboptions require launch suboption
- * @author Tim Bell
- *
- * @modules jdk.jdi
- * @run compile -g NoLaunchOptionTest.java
- * @build VMConnection
- * @run driver NoLaunchOptionTest
- */
-
-import java.net.ServerSocket;
-
-public class NoLaunchOptionTest extends Object {
- private Process subprocess;
- private int subprocessStatus;
- private static final String CR = System.getProperty("line.separator");
- private static final int BUFFERSIZE = 4096;
- public static final int RETSTAT = 0;
- public static final int STDOUT = 1;
- public static final int STDERR = 2;
-
- /**
- * Run an arbitrary command and return the results to caller.
- *
- * @param an array of String containing the command
- * to run and any flags or parameters to the command.
- *
- * @return completion status, stderr and stdout as array of String
- * Look for:
- * return status in result[NoLaunchOptionTest.RETSTAT]
- * standard out in result[NoLaunchOptionTest.STDOUT]
- * standard err in result[NoLaunchOptionTest.STDERR]
- *
- */
- public String[] run (String[] cmdStrings) {
- StringBuffer stdoutBuffer = new StringBuffer();
- StringBuffer stderrBuffer = new StringBuffer();
+import static jdk.testlibrary.Asserts.assertFalse;
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
- System.out.print(CR + "runCommand method about to execute: ");
- for (int iNdx = 0; iNdx < cmdStrings.length; iNdx++) {
- System.out.print(" ");
- System.out.print(cmdStrings[iNdx]);
- }
- System.out.println(CR);
- try {
- Process process = Runtime.getRuntime().exec(cmdStrings);
- /*
- * Gather up the output of the subprocess using non-blocking
- * reads so we can get both the subprocess stdout and the
- * subprocess stderr without overfilling any buffers.
- */
- java.io.BufferedInputStream is =
- new java.io.BufferedInputStream(process.getInputStream());
- int isLen = 0;
- byte[] isBuf = new byte[BUFFERSIZE];
-
- java.io.BufferedInputStream es =
- new java.io.BufferedInputStream(process.getErrorStream());
- int esLen = 0;
- byte[] esBuf = new byte[BUFFERSIZE];
-
- do {
- isLen = is.read(isBuf);
- if (isLen > 0) {
- stdoutBuffer.append(
- new String(isBuf, 0, isLen));
- }
- esLen = es.read(esBuf);
- if (esLen > 0) {
- stderrBuffer.append(
- new String(esBuf, 0, esLen));
- }
- } while ((isLen > -1) || (esLen > -1));
- try {
- process.waitFor();
- subprocessStatus = process.exitValue();
- process = null;
- } catch(java.lang.InterruptedException e) {
- System.err.println("InterruptedException: " + e);
- }
-
- } catch(java.io.IOException ex) {
- System.err.println("IO error: " + ex);
- }
- String[] result =
- new String[] {
- Integer.toString(subprocessStatus),
- stdoutBuffer.toString(),
- stderrBuffer.toString()
- };
-
- System.out.println(CR + "--- Return code was: " +
- CR + result[RETSTAT]);
- System.out.println(CR + "--- Return stdout was: " +
- CR + result[STDOUT]);
- System.out.println(CR + "--- Return stderr was: " +
- CR + result[STDERR]);
-
- return result;
- }
+/*
+ * @test NoLaunchOptionTest.java
+ * @bug 4554734 4724714
+ * @summary Test for -Xrunjdwp:[onthrow,onuncaught] suboptions require launch suboption
+ * @author Tim Bell
+ * @library /lib/testlibrary
+ * @modules jdk.jdi
+ * @run compile -g NoLaunchOptionTest.java
+ * @build jdk.testlibrary.* VMConnection
+ * @run driver NoLaunchOptionTest
+ */
+public class NoLaunchOptionTest extends Object {
public static void main(String[] args) throws Exception {
- // find a free port
- ServerSocket ss = new ServerSocket(0);
- int port = ss.getLocalPort();
- ss.close();
- String address = String.valueOf(port);
+ String[] cmd = VMConnection.insertDebuggeeVMOptions(new String[] {
+ "-agentlib:jdwp=transport=dt_socket,address=5555," +
+ "onthrow=java.lang.ClassNotFoundException,suspend=n",
+ "NotAClass" });
- String javaExe = System.getProperty("java.home") +
- java.io.File.separator + "bin" +
- java.io.File.separator + "java";
- String targetClass = "NotAClass";
- String cmds [] = {javaExe,
- "-agentlib:jdwp=transport=dt_socket,address=" +
- address + "," +
- "onthrow=java.lang.ClassNotFoundException,suspend=n",
- targetClass};
- NoLaunchOptionTest myTest = new NoLaunchOptionTest();
- String results [] = myTest.run(VMConnection.insertDebuggeeVMOptions(cmds));
- if ((results[RETSTAT].equals("1")) &&
- (results[STDERR].contains("ERROR:"))) {
- System.out.println("Test passed: status = 1 with warning messages " +
- "is expected and normal for this test");
- } else {
- throw new Exception("Test failed: unspecified test failure");
- }
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmd);
+ OutputAnalyzer output = ProcessTools.executeProcess(pb);
+ System.out.println(output.getOutput());
+
+ assertFalse(output.getExitValue() == 0, "Exit code should not be 0");
+ output.shouldContain("ERROR: JDWP Specify launch=<command line> when using onthrow or onuncaught suboption");
}
}
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -21,22 +21,55 @@
* questions.
*/
-/*
- *
- * @bug 6455258
- * @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap
- * method
- */
+import static jdk.testlibrary.Asserts.assertTrue;
+import static jdk.testlibrary.Asserts.fail;
+import java.io.File;
import java.lang.management.*;
import java.util.List;
-import javax.management.MBeanServer;
+
+import jdk.test.lib.hprof.HprofParser;
+import jdk.testlibrary.ProcessTools;
+
import com.sun.management.HotSpotDiagnosticMXBean;
+/*
+ * @test
+ * @bug 6455258
+ * @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap method
+ * @library /lib/testlibrary
+ * @library /../../test/lib/share/classes
+ * @build jdk.testlibrary.*
+ * @build jdk.test.lib.hprof.*
+ * @build jdk.test.lib.hprof.module.*
+ * @build jdk.test.lib.hprof.parser.*
+ * @build jdk.test.lib.hprof.utils.*
+ * @run main DumpHeap
+ */
public class DumpHeap {
- public static void main(String[] argv) throws Exception {
- List<HotSpotDiagnosticMXBean> list = ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
- System.out.println("Dumping to file: " + argv[0] + " ....");
- list.get(0).dumpHeap(argv[0], true);
+
+ public static void main(String[] args) throws Exception {
+ List<HotSpotDiagnosticMXBean> list = ManagementFactory.getPlatformMXBeans(HotSpotDiagnosticMXBean.class);
+ File dump = new File(ProcessTools.getProcessId() + ".hprof");
+ if (dump.exists()) {
+ dump.delete();
+ }
+ System.out.println("Dumping to file: " + dump.getAbsolutePath());
+ list.get(0).dumpHeap(dump.getAbsolutePath(), true);
+
+ verifyDumpFile(dump);
+
+ dump.delete();
}
+
+ private static void verifyDumpFile(File dump) {
+ assertTrue(dump.exists() && dump.isFile(), "Could not create dump file");
+ try {
+ HprofParser.parse(dump);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Could not parse dump file");
+ }
+ }
+
}
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.sh Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-# @test
-# @bug 6455258
-# @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap
-# method
-#
-# @modules jdk.management
-# @build DumpHeap
-# @run shell DumpHeap.sh
-
-if [ "${TESTJAVA}" = "" ] ; then
- echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
- exit 1
-fi
-
-if [ "${COMPILEJAVA}" = "" ] ; then
- COMPILEJAVA="${TESTJAVA}"
-fi
-
-failed=0
-
-# we use the pid of this shell process to name the heap dump output file.
-DUMPFILE="java_pid$$.hprof"
-
-${TESTJAVA}/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES \
- DumpHeap ${DUMPFILE} || exit 2
-
-# check that heap dump is parsable
-${COMPILEJAVA}/bin/jhat ${TESTTOOLVMOPTS} -parseonly true ${DUMPFILE}
-if [ $? != 0 ]; then failed=1; fi
-
-# dump file is large so remove it
-rm ${DUMPFILE}
-
-exit $failed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/Character/UnicodeBlock/NonOptimalMapSize.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+/**
+ * @test
+ * @bug 8080535
+ * @summary Expected size of Character.UnicodeBlock.map is not optimal
+ */
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
+public class NonOptimalMapSize {
+ public static void main(String[] args) throws Throwable {
+ Class<?> ubCls = Character.UnicodeBlock.class;
+ Field mapField = ubCls.getDeclaredField("map");
+ mapField.setAccessible(true);
+ Map<?,?> map = (Map<?,?>)mapField.get(null);
+ if (!map.getClass().equals(HashMap.class)) {
+ throw new RuntimeException(
+ "Character.UnicodeBlock.map is expected to be HashMap");
+ }
+ int mapSize = map.size();
+
+ Field sizeField = ubCls.getDeclaredField("INITIAL_CAPACITY");
+ sizeField.setAccessible(true);
+ int INITIAL_CAPACITY = sizeField.getInt(null);
+
+ // Construct a HashMap with specified initial capacity
+ HashMap<Object,Object> map1 = new HashMap<>(INITIAL_CAPACITY);
+ Class<?> hmCls = HashMap.class;
+ Field tableField = hmCls.getDeclaredField("table");
+ tableField.setAccessible(true);
+ // ... and fill it up
+ map1.put(new Object(), new Object());
+ final Object initialTable = tableField.get(map1);
+ while (map1.size() < map.size() &&
+ initialTable == tableField.get(map1)) {
+ map1.put(new Object(), new Object());
+ }
+
+ // Now check that internal storage didn't change
+ if (initialTable != tableField.get(map1)) {
+ throw new RuntimeException(
+ "Initial capacity " + INITIAL_CAPACITY +
+ " was only enough to hold " + (map1.size()-1) +
+ " entries, but needed " + map.size());
+ }
+ }
+}
--- a/jdk/test/java/lang/Runtime/exec/LotsOfOutput.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/java/lang/Runtime/exec/LotsOfOutput.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,22 @@
/**
* @test
- * @bug 4369826
+ * @bug 4369826 8078582
* @summary Process with lots of output should not crash VM
+ * @key intermittent
* @author kladko
*/
public class LotsOfOutput {
+ static final Runtime runtime = Runtime.getRuntime();
+
+ // Allow memory to grow by up to 1Mb total
+ static final int THRESHOLD = 1048576;
+
+ // Compute used memory
+ static long usedMemory() {
+ return runtime.totalMemory() - runtime.freeMemory();
+ }
public static void main(String[] args) throws Exception {
if (! UnixCommands.isUnix) {
@@ -37,18 +47,21 @@
}
UnixCommands.ensureCommandsAvailable("cat");
- Process p = Runtime.getRuntime().exec(UnixCommands.cat() + " /dev/zero");
- long initMemory = Runtime.getRuntime().totalMemory();
- for (int i=1; i< 10; i++) {
+ Process p = runtime.exec(UnixCommands.cat() + " /dev/zero");
+ long initMemory = usedMemory();
+ boolean growing = false;
+ for (int i = 1; i < 10; i++) {
Thread.sleep(100);
- long totalMemory = Runtime.getRuntime().totalMemory();
- if (totalMemory != initMemory) {
- System.out.printf("consuming memory: i: %d, initial: %d, total: %d, delta: %d%n",
- i, initMemory, totalMemory, totalMemory - initMemory);
+ long used = usedMemory();
+ if (used != initMemory) {
+ System.out.printf("consuming memory: i: %d, initial: %d, used: %d, delta: %d%n",
+ i, initMemory, used, used - initMemory);
}
- if (totalMemory > initMemory + 1000000)
- throw new Exception("Process consumes memory.");
+ if (used > initMemory + THRESHOLD)
+ growing = true;
}
+ if (growing)
+ throw new Exception("Process consumes memory.");
}
}
--- a/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -72,12 +72,6 @@
final int catchDrops) {
this.testCase = testCase;
this.dropped = catchDrops;
- if (Helper.IS_VERBOSE) {
- System.out.printf("CatchException::CatchException(%s, isVararg=%b " +
- "argsCount=%d catchDrops=%d)%n",
- testCase, isVararg, argsCount, catchDrops
- );
- }
MethodHandle thrower = testCase.thrower;
int throwerLen = thrower.type().parameterCount();
List<Class<?>> classes;
@@ -97,9 +91,11 @@
}
public static void main(String[] args) throws Throwable {
+ System.out.println("classes = " + ARGS_CLASSES);
+
TestFactory factory = new TestFactory();
long timeout = Helper.IS_THOROUGH ? 0L : Utils.adjustTimeout(Utils.DEFAULT_TEST_TIMEOUT);
- // substract vm init time and reserve time for vm exit
+ // subtract vm init time and reserve time for vm exit
timeout *= 0.9;
TimeLimitedRunner runner = new TimeLimitedRunner(timeout, 2.0d,
() -> {
@@ -131,6 +127,12 @@
}
private void runTest() {
+ if (Helper.IS_VERBOSE) {
+ System.out.printf("CatchException(%s, isVararg=%b argsCount=%d " +
+ "dropped=%d)%n",
+ testCase, thrower.isVarargsCollector(), argsCount, dropped);
+ }
+
Helper.clear();
Object[] args = Helper.randomArgs(
@@ -212,10 +214,7 @@
args = 1;
}
- if (Helper.IS_VERBOSE) {
- System.out.printf("maxArgs = %d%nmaxDrops = %d%n",
- maxArgs, maxDrops);
- }
+ System.out.printf("maxArgs = %d%nmaxDrops = %d%n", maxArgs, maxDrops);
constructorSize = TestCase.CONSTRUCTORS.size();
}
@@ -243,7 +242,7 @@
/**
* @return next test from test matrix:
- * {varArgs, noVarArgs} x TestCase.rtypes x TestCase.THROWABLES x {1, .., maxArgs } x {1, .., maxDrops}
+ * {varArgs, noVarArgs} x TestCase.rtypes x TestCase.THROWABLES x {1, .., maxArgs } x {0, .., maxDrops}
*/
public CatchExceptionTest nextTest() {
if (constructor < constructorSize) {
@@ -256,7 +255,7 @@
return null;
}
if (dropArgs <= currentMaxDrops) {
- if (dropArgs == 1) {
+ if (dropArgs == 0) {
if (Helper.IS_THOROUGH || Helper.RNG.nextBoolean()) {
++dropArgs;
return createTest();
@@ -271,8 +270,8 @@
}
}
- if (args <= maxArgs) {
- dropArgs = 1;
+ if (args < maxArgs) {
+ dropArgs = 0;
currentMaxDrops = Math.min(args, maxDrops);
++args;
return createTest();
--- a/jdk/test/java/nio/file/Files/SBC.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/java/nio/file/Files/SBC.java Fri May 29 12:49:31 2015 +0200
@@ -22,7 +22,7 @@
*/
/* @test
- * @bug 4313887 8066915
+ * @bug 4313887
* @summary Unit test for java.nio.file.Files.newByteChannel
* @library ..
*/
@@ -59,7 +59,6 @@
dosSharingOptionTests(dir);
// misc. tests
- directoryOpenTests(dir);
badCombinations(dir);
unsupportedOptions(dir);
nullTests(dir);
@@ -279,21 +278,6 @@
}
}
- // test opening a directory for read or write
- static void directoryOpenTests(Path dir) throws Exception {
- try (SeekableByteChannel sbc = Files.newByteChannel(dir, READ)) {
- throw new RuntimeException("Opened directory for read");
- } catch (IOException expected) { }
-
- try (SeekableByteChannel sbc = Files.newByteChannel(dir, WRITE)) {
- throw new RuntimeException("Opened directory for write");
- } catch (IOException expected) { }
-
- try (SeekableByteChannel sbc = Files.newByteChannel(dir, APPEND)) {
- throw new RuntimeException("Opened directory for append ");
- } catch (IOException expected) { }
- }
-
// Windows specific options for the use by applications that really want
// to use legacy DOS sharing options
static void dosSharingOptionTests(Path dir) throws Exception {
--- a/jdk/test/java/security/KeyStore/ProbeKeystores.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/java/security/KeyStore/ProbeKeystores.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,15 +41,6 @@
private static final String CERT_FILE = "trusted.pem";
public static final void main(String[] args) throws Exception {
- try {
- test();
- } finally {
- cleanup();
- }
- }
-
- private static final void test() throws Exception {
- cleanup();
// Testing empty keystores
@@ -129,22 +120,11 @@
System.out.println("OK.");
}
- private static void cleanup() {
- new File("empty.jks").delete();
- new File("empty.jceks").delete();
- new File("empty.p12").delete();
- new File("onecert.jks").delete();
- new File("onecert.jceks").delete();
- new File("onecert.p12").delete();
- new File("onekey.jceks").delete();
- new File("onekey.p12").delete();
- }
-
// Instantiate an empty keystore using the supplied keystore type
private static void init(String file, String type) throws Exception {
KeyStore ks = KeyStore.getInstance(type);
ks.load(null, null);
- try (OutputStream stream = new FileOutputStream(DIR + "/" + file)) {
+ try (OutputStream stream = new FileOutputStream(file)) {
ks.store(stream, PASSWORD);
}
System.out.println("Created a " + type + " keystore named '" + file + "'");
@@ -156,7 +136,7 @@
KeyStore ks = KeyStore.getInstance(type);
ks.load(null, null);
ks.setEntry("mycert", new KeyStore.TrustedCertificateEntry(cert), null);
- try (OutputStream stream = new FileOutputStream(DIR + "/" + file)) {
+ try (OutputStream stream = new FileOutputStream(file)) {
ks.store(stream, PASSWORD);
}
System.out.println("Created a " + type + " keystore named '" + file + "'");
@@ -169,7 +149,7 @@
ks.load(null, null);
ks.setEntry("mykey", new KeyStore.SecretKeyEntry(key),
new PasswordProtection(PASSWORD));
- try (OutputStream stream = new FileOutputStream(DIR + "/" + file)) {
+ try (OutputStream stream = new FileOutputStream(file)) {
ks.store(stream, PASSWORD);
}
System.out.println("Created a " + type + " keystore named '" + file + "'");
@@ -178,7 +158,7 @@
// Instantiate a keystore by probing the supplied file for the keystore type
private static void probe(String file, String type) throws Exception {
// First try with the correct password
- KeyStore ks = KeyStore.getInstance(new File(DIR, file), PASSWORD);
+ KeyStore ks = KeyStore.getInstance(new File(file), PASSWORD);
if (!type.equalsIgnoreCase(ks.getType())) {
throw new Exception("ERROR: expected a " + type + " keystore, " +
"got a " + ks.getType() + " keystore instead");
@@ -188,7 +168,7 @@
// Next try with an incorrect password
try {
- ks = KeyStore.getInstance(new File(DIR, file), BAD_PASSWORD);
+ ks = KeyStore.getInstance(new File(file), BAD_PASSWORD);
throw new Exception("ERROR: expected an exception but got success");
} catch (IOException e) {
System.out.println("Failed to load a " + type + " keystore named '" + file + "' (as expected)");
@@ -201,10 +181,10 @@
Builder builder;
if (usePassword) {
- builder = Builder.newInstance(new File(DIR, file),
+ builder = Builder.newInstance(new File(file),
new PasswordProtection(PASSWORD));
} else {
- builder = Builder.newInstance(new File(DIR, file),
+ builder = Builder.newInstance(new File(file),
new CallbackHandlerProtection(new DummyHandler()));
}
KeyStore ks = builder.getKeyStore();
@@ -219,7 +199,7 @@
// Load the keystore entries
private static void load(String file, String type) throws Exception {
KeyStore ks = KeyStore.getInstance(type);
- try (InputStream stream = new FileInputStream(DIR + "/" + file)) {
+ try (InputStream stream = new FileInputStream(file)) {
ks.load(stream, PASSWORD);
}
if (!type.equalsIgnoreCase(ks.getType())) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,457 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.LockInfo;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MonitorInfo;
+import java.lang.management.ThreadInfo;
+import java.security.Permission;
+import java.security.Policy;
+import java.security.ProtectionDomain;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+
+
+/**
+ * @test
+ * @bug 8077846
+ * @key randomness
+ * @summary Test that using a reentrant configuration lock does not introduce
+ * new synchronization issues in Logger and LogManager. This test
+ * focuses more particularly on potential deadlock in
+ * drainLoggerRefQueueBounded / readConfiguration / reset
+ * todo: add at randomness
+ * @run main/othervm TestConfigurationLock
+ * @author danielfuchs
+ */
+// This test is a best effort to try & detect issues. The test itself will run
+// for 8secs. This might be unsufficient to detect issues.
+// To get a greater confidence it is recommended to run this test in a loop:
+// e.g. use something like:
+// $ while jtreg -jdk:$JDK -verbose:all \
+// test/java/util/logging/TestConfigurationLock.java ; \
+// do echo Running test again ; done
+// and let it run for a few hours...
+//
+public class TestConfigurationLock {
+
+ static volatile Exception thrown = null;
+ static volatile boolean goOn = true;
+ static volatile boolean deadlock = false;
+
+ static final double CONFSYNCTHRESHOLD = 0.3;
+ static final double LOGSYNCTHRESHOLD = 0.3;
+ static final int RESETERS = 0;
+ static final int READERS = 3;
+ static final int LOGGERS = 4;
+ static final long TIME = 8 * 1000; // 8 sec.
+ static final long STEP = 1 * 1000; // message every 1 sec.
+ static final int LCOUNT = 50; // 50 loggers created in a row...
+ static final AtomicLong nextLogger = new AtomicLong(0);
+ static final AtomicLong resetCount = new AtomicLong(0);
+ static final AtomicLong readCount = new AtomicLong(0);
+ static final AtomicLong checkCount = new AtomicLong(0);
+
+ static final String BLAH = "blah";
+
+ static Object fakeConfExternalLock() {
+ return LogManager.getLogManager();
+ }
+
+ static Object fakeLogExternalLock() {
+ return LogManager.getLogManager();
+ }
+
+
+ /**
+ * This test will run both with and without a security manager.
+ *
+ * The test starts a number of threads that will call
+ * LogManager.reset() concurrently (ResetConf), and a number of threads
+ * that will call readConfiguration() (ReadConf), and then starts a
+ * number of threads that will create new loggers concurrently
+ * (AddLogger), and finally two additional threads:
+ * - one (Stopper) that will stop the test after 4secs (TIME ms),
+ * - and one DeadlockDetector that will attempt to detect deadlocks.
+ * If after 4secs no deadlock was detected and no exception was thrown
+ * then the test is considered a success and passes.
+ *
+ * This procedure is done twice: once without a security manager and once
+ * again with a security manager - which means the test takes ~8secs to
+ * run.
+ *
+ * Note that 8sec may not be enough to detect issues if there are some.
+ * This is a best effort test.
+ *
+ * @param args the command line arguments
+ * @throws java.lang.Exception if the test fails
+ */
+ public static void main(String[] args) throws Exception {
+
+ File conf = new File(System.getProperty("test.src", "./src"),
+ TestConfigurationLock.class.getSimpleName() + ".properties");
+ if (!conf.canRead()) {
+ throw new IOException("Can't read config file: " + conf.getAbsolutePath());
+ }
+ System.setProperty("java.util.logging.config.file", conf.getAbsolutePath());
+ // test without security
+ System.out.println("No security");
+ test();
+
+ // test with security
+ System.out.println("\nWith security");
+ Policy.setPolicy(new Policy() {
+ @Override
+ public boolean implies(ProtectionDomain domain, Permission permission) {
+ if (super.implies(domain, permission)) return true;
+ // System.out.println("Granting " + permission);
+ return true; // all permissions
+ }
+ });
+ System.setSecurityManager(new SecurityManager());
+ test();
+ }
+
+
+ /**
+ * Starts all threads, wait 4secs, then stops all threads.
+ * @throws Exception if a deadlock was detected or an error occurred.
+ */
+ public static void test() throws Exception {
+ goOn = true;
+ thrown = null;
+ long sNextLogger = nextLogger.get();
+ long sUpdateCount = resetCount.get();
+ long sReadCount = readCount.get();
+ long sCheckCount = checkCount.get();
+ List<Thread> threads = new ArrayList<>();
+ for (int i = 0; i<RESETERS; i++) {
+ threads.add(new ResetConf());
+ }
+ for (int i = 0; i<READERS; i++) {
+ threads.add(new ReadConf());
+ }
+ for (int i = 0; i<LOGGERS; i++) {
+ threads.add(new AddLogger());
+ }
+ threads.add(0, new Stopper(TIME));
+ threads.stream().forEach(Thread::start);
+
+ Thread deadLockDetector = new DeadlockDetector();
+ deadLockDetector.start();
+ deadLockDetector.join();
+
+ if (!deadlock) {
+ threads.stream().forEach(TestConfigurationLock::join);
+ } else {
+ System.err.println("Deadlock found: exiting forcibly.");
+ Runtime.getRuntime().halt(-1);
+ }
+
+ if (thrown != null) {
+ throw thrown;
+ }
+ System.out.println("Passed: " + (nextLogger.get() - sNextLogger)
+ + " loggers created by " + LOGGERS + " Thread(s),");
+ System.out.println("\t LogManager.reset() called "
+ + (resetCount.get() - sUpdateCount) + " times by " + RESETERS
+ + " Thread(s).");
+ System.out.println("\t LogManager.readConfiguration() called "
+ + (readCount.get() - sReadCount) + " times by " + READERS
+ + " Thread(s).");
+ System.out.println("\t ThreadMXBean.findDeadlockedThreads called "
+ + (checkCount.get() -sCheckCount) + " times by 1 Thread.");
+
+ }
+
+ static void join(Thread t) {
+ try {
+ t.join();
+ } catch (Exception x) {
+ fail(x);
+ }
+ }
+
+ final static class ResetConf extends Thread {
+
+ public ResetConf() {
+ setDaemon(true);
+ }
+
+ @Override
+ public void run() {
+ while (goOn) {
+ try {
+ if (Math.random() > CONFSYNCTHRESHOLD) {
+ // calling reset while holding a lock can increase
+ // deadlock probability...
+ synchronized(fakeConfExternalLock()) {
+ LogManager.getLogManager().reset();
+ }
+ } else {
+ LogManager.getLogManager().reset();
+ }
+ Logger blah = Logger.getLogger(BLAH);
+ blah.setLevel(Level.FINEST);
+ blah.fine(BLAH);
+ resetCount.incrementAndGet();
+ pause(1);
+ } catch (Exception x) {
+ fail(x);
+ }
+ }
+ }
+ }
+
+ final static class ReadConf extends Thread {
+
+ public ReadConf() {
+ setDaemon(true);
+ }
+
+ @Override
+ public void run() {
+ while (goOn) {
+ try {
+ if (Math.random() > CONFSYNCTHRESHOLD) {
+ // calling readConfiguration while holding a lock can
+ // increase deadlock probability...
+ synchronized(fakeConfExternalLock()) {
+ LogManager.getLogManager().readConfiguration();
+ }
+ } else {
+ LogManager.getLogManager().readConfiguration();
+ }
+ Logger blah = Logger.getLogger(BLAH);
+ blah.setLevel(Level.FINEST);
+ blah.fine(BLAH);
+ readCount.incrementAndGet();
+ pause(1);
+ } catch (Exception x) {
+ fail(x);
+ }
+ }
+ }
+ }
+
+ final static class AddLogger extends Thread {
+
+ public AddLogger() {
+ setDaemon(true);
+ }
+
+ @Override
+ public void run() {
+ try {
+ while (goOn) {
+ Logger l;
+ Logger foo = Logger.getLogger("foo");
+ Logger bar = Logger.getLogger("foo.bar");
+ for (int i=0; i < LCOUNT ; i++) {
+ LogManager manager = LogManager.getLogManager();
+ if (Math.random() > LOGSYNCTHRESHOLD) {
+ synchronized(fakeLogExternalLock()) {
+ l = Logger.getLogger("foo.bar.l"+nextLogger.incrementAndGet());
+ }
+ } else {
+ l = Logger.getLogger("foo.bar.l"+nextLogger.incrementAndGet());
+ }
+ l.setLevel(Level.FINEST);
+ l.fine("I'm fine");
+ if (!goOn) break;
+ pause(1);
+ }
+ }
+ } catch (InterruptedException | RuntimeException x ) {
+ fail(x);
+ }
+ }
+ }
+
+ final static class DeadlockDetector extends Thread {
+
+ @Override
+ public void run() {
+ boolean deadlock = false;
+ while(goOn) {
+ try {
+ long[] ids = ManagementFactory.getThreadMXBean().findDeadlockedThreads();
+ checkCount.incrementAndGet();
+ ids = ids == null ? new long[0] : ids;
+ if (ids.length == 1) {
+ throw new RuntimeException("Found 1 deadlocked thread: "+ids[0]);
+ } else if (ids.length > 0) {
+ deadlock = true;
+ ThreadInfo[] infos = ManagementFactory.getThreadMXBean()
+ .getThreadInfo(ids, true, true);
+ System.err.println("Found "+ids.length+" deadlocked threads: ");
+ for (ThreadInfo inf : infos) {
+ System.err.println(asString(inf));
+ }
+ throw new RuntimeException("Found "+ids.length+" deadlocked threads");
+ }
+ pause(100);
+ } catch(InterruptedException | RuntimeException x) {
+ if (deadlock) deadlock(x);
+ else fail(x);
+ }
+ }
+ }
+
+ }
+
+ static final class Stopper extends Thread {
+ long start;
+ long time;
+
+ Stopper(long time) {
+ start = System.currentTimeMillis();
+ this.time = time;
+ setDaemon(true);
+ }
+
+ @Override
+ public void run() {
+ try {
+ long rest, previous;
+ int msgCount = 0;
+ previous = time;
+ Logger logger = Logger.getLogger("remaining");
+ while (goOn && (rest = start - System.currentTimeMillis() + time) > 0) {
+ if (previous == time || previous - rest >= STEP) {
+ logger.log(Level.INFO, "{0}ms remaining...", String.valueOf(rest));
+ msgCount++;
+ previous = rest == time ? rest -1 : rest;
+ System.gc();
+ }
+ if (goOn == false) break;
+ pause(Math.min(rest, 100));
+ }
+ System.err.println(this + ": " + msgCount + " messages.");
+ System.err.flush();
+ System.out.println(System.currentTimeMillis() - start
+ + " ms elapsed ("+time+ " requested)");
+ goOn = false;
+ } catch(InterruptedException | RuntimeException x) {
+ fail(x);
+ }
+ }
+
+ }
+
+ // ThreadInfo.toString() only prints 8 frames...
+ static String asString(ThreadInfo inf) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("\"").append(inf.getThreadName()).append("\"")
+ .append(inf.isDaemon() ? " daemon" : "")
+ .append(" prio=").append(inf.getPriority())
+ .append(" Id=").append(inf.getThreadId())
+ .append(" ").append(inf.getThreadState());
+ if (inf.getLockName() != null) {
+ sb.append(" on ").append(inf.getLockName());
+ }
+ if (inf.getLockOwnerName() != null) {
+ sb.append(" owned by \"").append(inf.getLockOwnerName())
+ .append("\" Id=").append(inf.getLockOwnerId());
+ }
+ if (inf.isSuspended()) {
+ sb.append(" (suspended)");
+ }
+ if (inf.isInNative()) {
+ sb.append(" (in native)");
+ }
+ sb.append('\n');
+ int i = 0;
+ StackTraceElement[] stackTrace = inf.getStackTrace();
+ for (; i < stackTrace.length; i++) {
+ StackTraceElement ste = stackTrace[i];
+ sb.append("\tat ").append(ste.toString());
+ sb.append('\n');
+ if (i == 0 && inf.getLockInfo() != null) {
+ Thread.State ts = inf.getThreadState();
+ switch (ts) {
+ case BLOCKED:
+ sb.append("\t- blocked on ").append(inf.getLockInfo());
+ sb.append('\n');
+ break;
+ case WAITING:
+ sb.append("\t- waiting on ").append(inf.getLockInfo());
+ sb.append('\n');
+ break;
+ case TIMED_WAITING:
+ sb.append("\t- waiting on ").append(inf.getLockInfo());
+ sb.append('\n');
+ break;
+ default:
+ }
+ }
+
+ for (MonitorInfo mi : inf.getLockedMonitors()) {
+ if (mi.getLockedStackDepth() == i) {
+ sb.append("\t- locked ").append(mi);
+ sb.append('\n');
+ }
+ }
+ }
+ if (i < stackTrace.length) {
+ sb.append("\t...");
+ sb.append('\n');
+ }
+
+ LockInfo[] locks = inf.getLockedSynchronizers();
+ if (locks.length > 0) {
+ sb.append("\n\tNumber of locked synchronizers = ").append(locks.length);
+ sb.append('\n');
+ for (LockInfo li : locks) {
+ sb.append("\t- ").append(li);
+ sb.append('\n');
+ }
+ }
+ sb.append('\n');
+ return sb.toString();
+ }
+
+ static void pause(long millis) throws InterruptedException {
+ Thread.sleep(millis);
+ }
+
+ static void fail(Exception x) {
+ x.printStackTrace(System.err);
+ if (thrown == null) {
+ thrown = x;
+ }
+ goOn = false;
+ }
+
+ static void deadlock(Exception x) {
+ deadlock = true;
+ System.out.flush();
+ fail(x);
+ System.err.flush();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.properties Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,22 @@
+########################################################################
+# Logging configuration property file for TestConfigurationLock.java #
+########################################################################
+
+handlers= java.util.logging.ConsoleHandler
+
+.level= INFO
+
+java.util.logging.FileHandler.pattern = %h/java%u.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+
+java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+blah.level = FINE
+foo.bar.l10.level = INFO
+foo.bar.l100.level = INFO
+foo.bar.l1000.level = INFO
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/crypto/SecretKeyFactory/PBKDF2TranslateTest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+import java.util.Random;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.interfaces.PBEKey;
+import javax.crypto.spec.PBEKeySpec;
+import javax.security.auth.DestroyFailedException;
+
+import static java.lang.System.out;
+
+/*
+ * @test
+ * @bug 8048820
+ * @summary The test verifies if the SecretKeyFactory.translateKey() method
+ * works as expected for the PBKDF2 algorithms.
+ */
+
+public class PBKDF2TranslateTest {
+
+ private static final String PASS_PHRASE = "some hidden string";
+ private static final int ITERATION_COUNT = 1000;
+ private static final int KEY_SIZE = 128;
+ private static final String[] TEST_ALGOS = { "PBKDF2WithHmacSHA1",
+ "PBKDF2WithHmacSHA224", "PBKDF2WithHmacSHA256",
+ "PBKDF2WithHmacSHA384", "PBKDF2WithHmacSHA512" };
+ private final String algoForTest;
+
+ public static void main(String[] args) throws Exception {
+ for (String algo : TEST_ALGOS) {
+ PBKDF2TranslateTest theTest = new PBKDF2TranslateTest(algo);
+ byte[] salt = new byte[8];
+ new Random().nextBytes(salt);
+ theTest.testMyOwnSecretKey(salt);
+ theTest.generateAndTranslateKey(salt);
+ theTest.translateSpoiledKey(salt);
+ }
+ }
+
+ public PBKDF2TranslateTest(String algo) {
+ algoForTest = algo;
+ }
+
+ /**
+ * The test case scenario implemented in the method: - derive PBKDF2 key
+ * using the given algorithm; - translate the key - check if the translated
+ * and original keys have the same key value.
+ *
+ */
+ public void generateAndTranslateKey(byte[] salt)
+ throws NoSuchAlgorithmException, InvalidKeySpecException,
+ InvalidKeyException {
+ // derive PBKDF2 key
+ SecretKey key1 = getSecretKeyForPBKDF2(algoForTest, salt);
+
+ // translate key
+ SecretKeyFactory skf = SecretKeyFactory.getInstance(algoForTest);
+ SecretKey key2 = skf.translateKey(key1);
+
+ // Check if it still the same after translation
+ if (!Arrays.equals(key1.getEncoded(), key2.getEncoded())) {
+ System.out.println("Key1=" + new String(key1.getEncoded())
+ + " key2=" + new String(key2.getEncoded()) + " salt="
+ + new String(salt));
+ throw new RuntimeException(
+ "generateAndTranslateKey test case failed: the key1 and"
+ + " key2 values in its primary encoding format are"
+ + " not the same for " + algoForTest
+ + " algorithm.");
+ }
+ }
+
+ /**
+ * The test case scenario implemented in the method: - derive Key1 for the
+ * given PBKDF2 algorithm - create my own secret Key2 as an instance of a
+ * class implements PBEKey - translate Key2 - check if the key value of the
+ * translated key and Key1 are the same.
+ */
+ private void testMyOwnSecretKey(byte[] salt)
+ throws NoSuchAlgorithmException, InvalidKeySpecException,
+ InvalidKeyException {
+ SecretKey key1 = getSecretKeyForPBKDF2(algoForTest, salt);
+ SecretKey key2 = getMyOwnSecretKey(salt);
+
+ // Is it actually the same?
+ if (!Arrays.equals(key1.getEncoded(), key2.getEncoded())) {
+ throw new RuntimeException(
+ "We shouldn't be here. The key1 and key2 values in its"
+ + " primary encoding format have to be the same!");
+ }
+
+ // translate key
+ SecretKeyFactory skf = SecretKeyFactory.getInstance(algoForTest);
+ SecretKey key3 = skf.translateKey(key2);
+
+ // Check if it still the same after translation
+ if (!Arrays.equals(key1.getEncoded(), key3.getEncoded())) {
+ System.out.println("Key1=" + new String(key1.getEncoded())
+ + " key3=" + new String(key3.getEncoded()) + " salt="
+ + new String(salt));
+ throw new RuntimeException(
+ "testMyOwnSecretKey test case failed: the key1 and key3"
+ + " values in its primary encoding format are not"
+ + " the same for " + algoForTest + " algorithm.");
+ }
+
+ }
+
+ /**
+ * The test case scenario implemented in the method: - create my own secret
+ * Key2 as an instance of a class implements PBEKey - spoil the key (set
+ * iteration count to 0, for example) - try to translate key -
+ * InvalidKeyException is expected.
+ */
+ public void translateSpoiledKey(byte[] salt)
+ throws NoSuchAlgorithmException, InvalidKeySpecException {
+ // derive the key
+ SecretKey key1 = getMyOwnSecretKey(salt);
+
+ // spoil the key
+ ((MyPBKDF2SecretKey) key1).spoil();
+
+ // translate key
+ SecretKeyFactory skf = SecretKeyFactory.getInstance(algoForTest);
+ try {
+ skf.translateKey(key1);
+ throw new RuntimeException(
+ "translateSpoiledKey test case failed, should throw"
+ + " InvalidKeyException when spoil the key");
+ } catch (InvalidKeyException ike) {
+ out.println("Expected exception when spoil the key");
+ }
+
+ }
+
+ /**
+ * Generate a PBKDF2 secret key using given algorithm.
+ */
+ private SecretKey getSecretKeyForPBKDF2(String algoDeriveKey, byte[] salt)
+ throws NoSuchAlgorithmException, InvalidKeySpecException {
+
+ SecretKeyFactory skf = SecretKeyFactory.getInstance(algoDeriveKey);
+ PBEKeySpec spec = new PBEKeySpec(PASS_PHRASE.toCharArray(), salt,
+ ITERATION_COUNT, KEY_SIZE);
+
+ return skf.generateSecret(spec);
+ }
+
+ /**
+ * Generate a secrete key as an instance of a class implements PBEKey.
+ */
+ private SecretKey getMyOwnSecretKey(byte[] salt)
+ throws InvalidKeySpecException, NoSuchAlgorithmException {
+ return new MyPBKDF2SecretKey(PASS_PHRASE, algoForTest, salt,
+ ITERATION_COUNT, KEY_SIZE);
+ }
+
+ /**
+ * An utility class to check the SecretKeyFactory.translateKey() method.
+ */
+ class MyPBKDF2SecretKey implements PBEKey {
+ private final byte[] key;
+ private final byte[] salt;
+ private final String algorithm;
+ private final int keyLength;
+ private final String pass;
+ private int itereationCount;
+
+ /**
+ * The key is generating by SecretKeyFactory and its value just copying
+ * in the key field of MySecretKey class. So, this is real key derived
+ * using the given algo.
+ */
+ public MyPBKDF2SecretKey(String passPhrase, String algo, byte[] salt1,
+ int iterationCount, int keySize)
+ throws InvalidKeySpecException, NoSuchAlgorithmException {
+ algorithm = algo;
+ salt = salt1;
+ itereationCount = iterationCount;
+ pass = passPhrase;
+
+ PBEKeySpec spec = new PBEKeySpec(passPhrase.toCharArray(), salt,
+ iterationCount, keySize);
+
+ SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(algo);
+
+ SecretKey realKey = keyFactory.generateSecret(spec);
+
+ keyLength = realKey.getEncoded().length;
+
+ key = new byte[keyLength];
+ System.arraycopy(realKey.getEncoded(), 0, key, 0, keyLength);
+ }
+
+ @Override
+ public String getAlgorithm() {
+ return algorithm;
+ }
+
+ @Override
+ public String getFormat() {
+ return "RAW";
+ }
+
+ @Override
+ public byte[] getEncoded() {
+ byte[] copy = new byte[keyLength];
+ System.arraycopy(key, 0, copy, 0, keyLength);
+ return copy;
+ }
+
+ @Override
+ public int getIterationCount() {
+ return itereationCount;
+ }
+
+ @Override
+ public byte[] getSalt() {
+ return salt;
+ }
+
+ @Override
+ public char[] getPassword() {
+ return pass.toCharArray();
+ }
+
+ /**
+ * Spoil the generated key (before translation) to cause an
+ * InvalidKeyException
+ */
+ public void spoil() {
+ itereationCount = -1;
+ }
+
+ @Override
+ public void destroy() throws DestroyFailedException {
+ }
+
+ @Override
+ public boolean isDestroyed() {
+ return false;
+ }
+
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/crypto/SecretKeyFactory/SecKFTranslateTest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.SecureRandom;
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+import java.util.Random;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.spec.PBEParameterSpec;
+import javax.security.auth.DestroyFailedException;
+
+/*
+ * @test
+ * @bug 8048820
+ * @summary The test verifies SecretKey values should remain the same after
+ * translation with SecretKeyFactory.translateKey().
+ */
+
+public class SecKFTranslateTest {
+ private static final String SUN_JCE = "SunJCE";
+
+ public static void main(String[] args) throws Exception {
+
+ SecKFTranslateTest test = new SecKFTranslateTest();
+ test.run();
+ }
+
+ private void run() throws Exception {
+
+ for (Algorithm algorithm : Algorithm.values()) {
+ runTest(algorithm);
+ }
+ }
+
+ private void runTest(Algorithm algo) throws NoSuchAlgorithmException,
+ NoSuchProviderException, InvalidKeyException,
+ InvalidKeySpecException, NoSuchPaddingException,
+ InvalidAlgorithmParameterException, ShortBufferException,
+ IllegalBlockSizeException, BadPaddingException {
+ AlgorithmParameterSpec[] aps = new AlgorithmParameterSpec[1];
+ byte[] plainText = new byte[800];
+
+ SecretKey key1 = algo.intSecurityKey(aps);
+ Random random = new Random();
+ // Initialization
+ SecretKeyFactory skf = SecretKeyFactory.getInstance(algo.toString(),
+ SUN_JCE);
+
+ random.nextBytes(plainText);
+ Cipher ci = Cipher.getInstance(algo.toString(), SUN_JCE);
+ // Encryption
+ ci.init(Cipher.ENCRYPT_MODE, key1, aps[0]);
+ byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+ int offset = ci.update(plainText, 0, plainText.length, cipherText, 0);
+ ci.doFinal(cipherText, offset);
+ // translate key
+ SecretKey key2 = skf.translateKey(key1);
+
+ // Decryption
+ ci.init(Cipher.DECRYPT_MODE, key2, aps[0]);
+ byte[] recoveredText = new byte[ci.getOutputSize(plainText.length)];
+ ci.doFinal(cipherText, 0, cipherText.length, recoveredText);
+
+ // Comparison
+ if (!Arrays.equals(plainText, recoveredText)) {
+ System.out.println("Key1:" + new String(key1.getEncoded())
+ + " Key2:" + new String(key2.getEncoded()));
+ throw new RuntimeException("Testing translate key failed with "
+ + algo);
+ }
+
+ }
+}
+
+class MyOwnSecKey implements SecretKey {
+
+ private static final String DEFAULT_ALGO = "PBEWithMD5AndDES";
+ private final byte[] key;
+ private final String algorithm;
+ private final int keySize;
+
+ public MyOwnSecKey(byte[] key1, int offset, String algo)
+ throws InvalidKeyException {
+ algorithm = algo;
+ if (algo.equalsIgnoreCase("DES")) {
+ keySize = 8;
+ } else if (algo.equalsIgnoreCase("DESede")) {
+ keySize = 24;
+ } else {
+ throw new InvalidKeyException(
+ "Inappropriate key format and algorithm");
+ }
+
+ if (key1 == null || key1.length - offset < keySize) {
+ throw new InvalidKeyException("Wrong key size");
+ }
+ key = new byte[keySize];
+ System.arraycopy(key, offset, key, 0, keySize);
+ }
+
+ public MyOwnSecKey(PBEKeySpec ks) throws InvalidKeySpecException {
+ algorithm = DEFAULT_ALGO;
+ key = new String(ks.getPassword()).getBytes();
+ keySize = key.length;
+ }
+
+ @Override
+ public String getAlgorithm() {
+ return algorithm;
+ }
+
+ @Override
+ public String getFormat() {
+ return "RAW";
+ }
+
+ @Override
+ public byte[] getEncoded() {
+ byte[] copy = new byte[keySize];
+ System.arraycopy(key, 0, copy, 0, keySize);
+ return copy;
+ }
+
+ @Override
+ public void destroy() throws DestroyFailedException {
+ }
+
+ @Override
+ public boolean isDestroyed() {
+ return false;
+ }
+}
+
+enum Algorithm {
+ DES {
+ @Override
+ SecretKey intSecurityKey(AlgorithmParameterSpec[] spec)
+ throws InvalidKeyException {
+ int keyLength = 8;
+ byte[] keyVal = new byte[keyLength];
+ new SecureRandom().nextBytes(keyVal);
+ SecretKey key1 = new MyOwnSecKey(keyVal, 0, this.toString());
+ return key1;
+ }
+ },
+ DESEDE {
+ @Override
+ SecretKey intSecurityKey(AlgorithmParameterSpec[] spec)
+ throws InvalidKeyException {
+ int keyLength = 24;
+ byte[] keyVal = new byte[keyLength];
+ new SecureRandom().nextBytes(keyVal);
+ SecretKey key1 = new MyOwnSecKey(keyVal, 0, this.toString());
+ return key1;
+ }
+ },
+ PBEWithMD5ANDdes {
+ @Override
+ SecretKey intSecurityKey(AlgorithmParameterSpec[] spec)
+ throws InvalidKeySpecException {
+ byte[] salt = new byte[8];
+ int iterCnt = 6;
+ new Random().nextBytes(salt);
+ spec[0] = new PBEParameterSpec(salt, iterCnt);
+ PBEKeySpec pbeKS = new PBEKeySpec(
+ new String("So far so good").toCharArray());
+ SecretKey key1 = new MyOwnSecKey(pbeKS);
+ return key1;
+ }
+ };
+ abstract SecretKey intSecurityKey(AlgorithmParameterSpec[] spec)
+ throws InvalidKeyException, InvalidKeySpecException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/script/SimpleScriptContextNameChecksTest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8072853
+ * @summary SimpleScriptContext used by NashornScriptEngine doesn't completely complies to the spec regarding exception throwing
+ * @run testng SimpleScriptContextNameChecksTest
+ */
+
+import java.util.List;
+import java.util.function.Consumer;
+import javax.script.*;
+import org.testng.annotations.Test;
+
+public class SimpleScriptContextNameChecksTest {
+ private List<ScriptEngineFactory> getFactories() {
+ return new ScriptEngineManager().getEngineFactories();
+ }
+
+ private void testAndExpect(Consumer<ScriptContext> c, Class<? extends RuntimeException> clazz) {
+ for (ScriptEngineFactory fac : getFactories()) {
+ ScriptContext sc = fac.getScriptEngine().getContext();
+ String name = fac.getEngineName();
+ try {
+ c.accept(sc);
+ throw new RuntimeException("no exception for " + name);
+ } catch (NullPointerException | IllegalArgumentException e) {
+ if (e.getClass() == clazz) {
+ System.out.println("got " + e + " as expected for " + name);
+ } else {
+ throw e;
+ }
+ }
+ }
+ }
+
+ private void testAndExpectIAE(Consumer<ScriptContext> c) {
+ testAndExpect(c, IllegalArgumentException.class);
+ }
+
+ private void testAndExpectNPE(Consumer<ScriptContext> c) {
+ testAndExpect(c, NullPointerException.class);
+ }
+
+ @Test
+ public void getAttributeEmptyName() {
+ testAndExpectIAE(sc -> sc.getAttribute("", ScriptContext.GLOBAL_SCOPE));
+ }
+
+ @Test
+ public void getAttributeNullName() {
+ testAndExpectNPE(sc -> sc.getAttribute(null, ScriptContext.GLOBAL_SCOPE));
+ }
+
+ @Test
+ public void removeAttributeEmptyName() {
+ testAndExpectIAE(sc -> sc.removeAttribute("", ScriptContext.GLOBAL_SCOPE));
+ }
+
+ @Test
+ public void removeAttributeNullName() {
+ testAndExpectNPE(sc -> sc.removeAttribute(null, ScriptContext.GLOBAL_SCOPE));
+ }
+
+ @Test
+ public void setAttributeEmptyName() {
+ testAndExpectIAE(sc -> sc.setAttribute("", "value", ScriptContext.GLOBAL_SCOPE));
+ }
+
+ @Test
+ public void setAttributeNullName() {
+ testAndExpectNPE(sc -> sc.setAttribute(null, "value", ScriptContext.GLOBAL_SCOPE));
+ }
+
+ @Test
+ public void getAttributesScopeEmptyName() {
+ testAndExpectIAE(sc -> sc.getAttributesScope(""));
+ }
+
+ @Test
+ public void getAttributesScopeNullName() {
+ testAndExpectNPE(sc -> sc.getAttributesScope(null));
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/ErrorHandlerPermissions.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.security.KeyFactory;
+import java.security.PublicKey;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Base64;
+import javax.xml.XMLConstants;
+import javax.xml.crypto.Data;
+import javax.xml.crypto.KeySelector;
+import javax.xml.crypto.OctetStreamData;
+import javax.xml.crypto.URIDereferencer;
+import javax.xml.crypto.URIReference;
+import javax.xml.crypto.URIReferenceException;
+import javax.xml.crypto.XMLCryptoContext;
+import javax.xml.crypto.dsig.XMLSignature;
+import javax.xml.crypto.dsig.XMLSignatureFactory;
+import javax.xml.crypto.dsig.dom.DOMValidateContext;
+import javax.xml.parsers.DocumentBuilderFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * @test
+ * @bug 8079140
+ * @summary Check if IgnoreAllErrorHandler doesn't require additional permission
+ * @run main/othervm/java.security.policy=ErrorHandlerPermissions.policy
+ * ErrorHandlerPermissions
+ */
+public class ErrorHandlerPermissions {
+
+ private final static String FS = System.getProperty("file.separator");
+ private final static String DIR = System.getProperty("test.src", ".");
+ private final static String DATA_DIR = DIR + FS + "data";
+ private final static String SIGNATURE = DATA_DIR + FS +
+ "signature-external-rsa.xml";
+
+ private static final String validationKey =
+ "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnx4TdvPSA5vcsPi0OJZi9Ox0Z" +
+ "2FRz2oeUCtuWoyEg0kUCeFd+jJZMstDJUiZNSOeuCO3FWSpdJgAwI4zlveHvuU/o" +
+ "qHSa1eYTObOCvxfVYGGflWsSvGXyiANtRWVUrYODBeyL+2pWxDYh+Fi5EKizPfTG" +
+ "wRjBVRSkRZKTnSjnQwIDAQAB";
+
+ private static final URIDereferencer dereferencer =
+ new DummyURIDereferencer();
+
+ public static void main(String[] args) throws Exception {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ dbf.setNamespaceAware(true);
+ dbf.setValidating(false);
+ dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
+ Document doc = dbf.newDocumentBuilder().parse(new File(SIGNATURE));
+ NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS,
+ "Signature");
+ if (nl.getLength() == 0) {
+ throw new RuntimeException("Couldn't find 'Signature' element");
+ }
+ Element element = (Element) nl.item(0);
+
+ byte[] keyBytes = Base64.getDecoder().decode(validationKey);
+ X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes);
+ KeyFactory kf = KeyFactory.getInstance("RSA");
+ PublicKey key = kf.generatePublic(spec);
+ KeySelector ks = KeySelector.singletonKeySelector(key);
+
+ DOMValidateContext vc = new DOMValidateContext(ks, element);
+
+ // disable secure validation mode
+ vc.setProperty("org.jcp.xml.dsig.secureValidation", Boolean.FALSE);
+
+ // set a dummy dereferencer to be able to get content by references
+ vc.setURIDereferencer(dereferencer);
+
+ XMLSignatureFactory factory = XMLSignatureFactory.getInstance();
+ XMLSignature signature = factory.unmarshalXMLSignature(vc);
+
+ // run validation
+ signature.validate(vc);
+ }
+
+ /**
+ * This URIDereferencer returns a static XML document.
+ */
+ private static class DummyURIDereferencer implements URIDereferencer {
+
+ @Override
+ public Data dereference(final URIReference ref, XMLCryptoContext ctx)
+ throws URIReferenceException {
+ // return static content
+ return new OctetStreamData(new ByteArrayInputStream(
+ "<test>test</test>".getBytes()), ref.getURI(),
+ ref.getType());
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/ErrorHandlerPermissions.policy Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,5 @@
+grant {
+ permission java.util.PropertyPermission "test.src", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.io.FilePermission "${test.src}/-", "read";
+};
--- a/jdk/test/javax/xml/crypto/dsig/GenerationTests.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/javax/xml/crypto/dsig/GenerationTests.java Fri May 29 12:49:31 2015 +0200
@@ -24,7 +24,7 @@
/**
* @test
* @bug 4635230 6283345 6303830 6824440 6867348 7094155 8038184 8038349 8046949
- * 8046724
+ * 8046724 8079693
* @summary Basic unit tests for generating XML Signatures with JSR 105
* @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java
* X509KeySelector.java GenerationTests.java
@@ -92,7 +92,8 @@
rsaSha256, rsaSha384, rsaSha512,
ecdsaSha1;
private static DigestMethod sha1, sha256, sha384, sha512;
- private static KeyInfo dsa1024, dsa2048, rsa, rsa1024, p256ki;
+ private static KeyInfo dsa1024, dsa2048, rsa, rsa1024,
+ p256ki, p384ki, p521ki;
private static KeySelector kvks = new KeySelectors.KeyValueKeySelector();
private static KeySelector sks;
private static Key signingKey;
@@ -131,6 +132,8 @@
test_create_signature_enveloping_hmac_sha512();
test_create_signature_enveloping_rsa();
test_create_signature_enveloping_p256_sha1();
+ test_create_signature_enveloping_p384_sha1();
+ test_create_signature_enveloping_p521_sha1();
test_create_signature_external_b64_dsa();
test_create_signature_external_dsa();
test_create_signature_keyname();
@@ -186,7 +189,11 @@
rsa1024 = kifac.newKeyInfo(Collections.singletonList
(kifac.newKeyValue(getPublicKey("RSA", 1024))));
p256ki = kifac.newKeyInfo(Collections.singletonList
- (kifac.newKeyValue(getECPublicKey())));
+ (kifac.newKeyValue(getECPublicKey("P256"))));
+ p384ki = kifac.newKeyInfo(Collections.singletonList
+ (kifac.newKeyValue(getECPublicKey("P384"))));
+ p521ki = kifac.newKeyInfo(Collections.singletonList
+ (kifac.newKeyValue(getECPublicKey("P521"))));
rsaSha1 = fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null);
rsaSha256 = fac.newSignatureMethod
("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", null);
@@ -359,7 +366,21 @@
static void test_create_signature_enveloping_p256_sha1() throws Exception {
System.out.println("* Generating signature-enveloping-p256-sha1.xml");
test_create_signature_enveloping(sha1, ecdsaSha1, p256ki,
- getECPrivateKey(), kvks, false);
+ getECPrivateKey("P256"), kvks, false);
+ System.out.println();
+ }
+
+ static void test_create_signature_enveloping_p384_sha1() throws Exception {
+ System.out.println("* Generating signature-enveloping-p384-sha1.xml");
+ test_create_signature_enveloping(sha1, ecdsaSha1, p384ki,
+ getECPrivateKey("P384"), kvks, false);
+ System.out.println();
+ }
+
+ static void test_create_signature_enveloping_p521_sha1() throws Exception {
+ System.out.println("* Generating signature-enveloping-p521-sha1.xml");
+ test_create_signature_enveloping(sha1, ecdsaSha1, p521ki,
+ getECPrivateKey("P521"), kvks, false);
System.out.println();
}
@@ -1189,37 +1210,63 @@
"237008997971129772408397621801631622129297063463868593083106979716" +
"204903524890556839550490384015324575598723478554854070823335021842" +
"210112348400928769";
- private static final String EC_X =
+ private static final String EC_P256_X =
"335863644451761614592446380116804721648611739647823420286081723541" +
"6166183710";
- private static final String EC_Y =
+ private static final String EC_P256_Y =
"951559601159729477487064127150143688502130342917782252098602422796" +
"95457910701";
- private static final String EC_S =
+ private static final String EC_P256_S =
"425976209773168452211813225517384419928639977904006759709292218082" +
"7440083936";
- private static final ECParameterSpec EC_PARAMS;
+ private static final ECParameterSpec EC_P256_PARAMS = initECParams(
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF",
+ "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC",
+ "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B",
+ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296",
+ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",
+ "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551",
+ 1
+ );
+ private static final String EC_P384_X =
+ "12144058647679082341340699736608428955270957565259459672517275506071643671835484144490620216582303669654008841724053";
+ private static final String EC_P384_Y =
+ "18287745972107701566600963632634101287058332546756092926848497481238534346489545826483592906634896557151987868614320";
+ private static final String EC_P384_S =
+ "10307785759830534742680442271492590599236624208247590184679565032330507874096079979152605984203102224450595283943382";
+ private static final ECParameterSpec EC_P384_PARAMS = initECParams(
+ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF",
+ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC",
+ "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF",
+ "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7",
+ "3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F",
+ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973",
+ 1
+ );
+ private static final String EC_P521_X =
+ "4157918188927862838251799402582135611021257663417126086145819679867926857146776190737187582274664373117054717389603317411991660346043842712448912355335343997";
+ private static final String EC_P521_Y =
+ "4102838062751704796157456866854813794620023146924181568434486703918224542844053923233919899911519054998554969832861957437850996213216829205401947264294066288";
+ private static final String EC_P521_S =
+ "4857798533181496041050215963883119936300918353498701880968530610687256097257307590162398707429640390843595868713096292822034014722985178583665959048714417342";
+ private static final ECParameterSpec EC_P521_PARAMS = initECParams(
+ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
+ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC",
+ "0051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00",
+ "00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66",
+ "011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650",
+ "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",
+ 1
+ );
- static {
- final String ec_sfield, ec_a, ec_b, ec_gx, ec_gy, ec_n;
- ec_sfield =
- "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF";
- ec_a =
- "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC";
- ec_b =
- "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B";
- ec_gx =
- "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296";
- ec_gy =
- "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5";
- ec_n =
- "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551";
- final int ec_h = 1;
- final ECField ec_field = new ECFieldFp(bigInt(ec_sfield));
- final EllipticCurve ec_curve = new EllipticCurve(ec_field,
- bigInt(ec_a), bigInt(ec_b));
- final ECPoint ec_g = new ECPoint(bigInt(ec_gx), bigInt(ec_gy));
- EC_PARAMS = new ECParameterSpec(ec_curve, ec_g, bigInt(ec_n), ec_h);
+ private static ECParameterSpec initECParams(
+ String sfield, String a, String b, String gx, String gy,
+ String n, int h) {
+ ECField field = new ECFieldFp(bigInt(sfield));
+ EllipticCurve curve = new EllipticCurve(field,
+ bigInt(a), bigInt(b));
+ ECPoint g = new ECPoint(bigInt(gx), bigInt(gy));
+ return new ECParameterSpec(curve, g, bigInt(n), h);
}
private static BigInteger bigInt(String s) {
@@ -1253,11 +1300,32 @@
return kf.generatePublic(kspec);
}
- private static PublicKey getECPublicKey() throws Exception {
+ private static PublicKey getECPublicKey(String curve) throws Exception {
KeyFactory kf = KeyFactory.getInstance("EC");
- KeySpec kspec = new ECPublicKeySpec(new ECPoint(new BigInteger(EC_X),
- new BigInteger(EC_Y)),
- EC_PARAMS);
+ String x, y;
+ ECParameterSpec params;
+ switch (curve) {
+ case "P256":
+ x = EC_P256_X;
+ y = EC_P256_Y;
+ params = EC_P256_PARAMS;
+ break;
+ case "P384":
+ x = EC_P384_X;
+ y = EC_P384_Y;
+ params = EC_P384_PARAMS;
+ break;
+ case "P521":
+ x = EC_P521_X;
+ y = EC_P521_Y;
+ params = EC_P521_PARAMS;
+ break;
+ default:
+ throw new Exception("Unsupported curve: " + curve);
+ }
+ KeySpec kspec = new ECPublicKeySpec(new ECPoint(new BigInteger(x),
+ new BigInteger(y)),
+ params);
return kf.generatePublic(kspec);
}
@@ -1287,9 +1355,27 @@
return kf.generatePrivate(kspec);
}
- private static PrivateKey getECPrivateKey() throws Exception {
+ private static PrivateKey getECPrivateKey(String curve) throws Exception {
+ String s;
+ ECParameterSpec params;
+ switch (curve) {
+ case "P256":
+ s = EC_P256_S;
+ params = EC_P256_PARAMS;
+ break;
+ case "P384":
+ s = EC_P384_S;
+ params = EC_P384_PARAMS;
+ break;
+ case "P521":
+ s = EC_P521_S;
+ params = EC_P521_PARAMS;
+ break;
+ default:
+ throw new Exception("Unsupported curve: " + curve);
+ }
KeyFactory kf = KeyFactory.getInstance("EC");
- KeySpec kspec = new ECPrivateKeySpec(new BigInteger(EC_S), EC_PARAMS);
+ KeySpec kspec = new ECPrivateKeySpec(new BigInteger(s), params);
return kf.generatePrivate(kspec);
}
--- a/jdk/test/javax/xml/crypto/dsig/ValidationTests.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/javax/xml/crypto/dsig/ValidationTests.java Fri May 29 12:49:31 2015 +0200
@@ -23,7 +23,7 @@
/**
* @test
- * @bug 4635230 6365103 6366054 6824440 7131084 8046724
+ * @bug 4635230 6365103 6366054 6824440 7131084 8046724 8079693
* @summary Basic unit tests for validating XML Signatures with JSR 105
* @compile -XDignore.symbol.file KeySelectors.java SignatureValidator.java
* X509KeySelector.java ValidationTests.java
@@ -35,6 +35,7 @@
import java.security.*;
import javax.xml.crypto.Data;
import javax.xml.crypto.KeySelector;
+import javax.xml.crypto.MarshalException;
import javax.xml.crypto.OctetStreamData;
import javax.xml.crypto.URIDereferencer;
import javax.xml.crypto.URIReference;
@@ -60,9 +61,17 @@
static class Test {
String file;
KeySelector ks;
- Test(String file, KeySelector ks) {
+ Class exception;
+
+ Test(String file, KeySelector ks, Class exception) {
this.file = file;
this.ks = ks;
+ this.exception = exception;
+ }
+
+ // XMLSignatureException is expected by default
+ Test(String file, KeySelector ks) {
+ this(file, ks, XMLSignatureException.class);
}
}
@@ -91,6 +100,8 @@
new Test("signature-enveloping-dsa.xml", KVKS),
new Test("signature-enveloping-rsa.xml", KVKS),
new Test("signature-enveloping-p256-sha1.xml", KVKS),
+ new Test("signature-enveloping-p384-sha1.xml", KVKS),
+ new Test("signature-enveloping-p521-sha1.xml", KVKS),
new Test("signature-enveloping-hmac-sha1.xml", SKKS),
new Test("signature-external-dsa.xml", KVKS),
new Test("signature-external-b64-dsa.xml", KVKS),
@@ -110,7 +121,17 @@
private final static Test[] INVALID_TESTS = {
new Test("signature-enveloping-hmac-sha1-40.xml", SKKS),
new Test("signature-enveloping-hmac-sha1-trunclen-0-attack.xml", SKKS),
- new Test("signature-enveloping-hmac-sha1-trunclen-8-attack.xml", SKKS)
+ new Test("signature-enveloping-hmac-sha1-trunclen-8-attack.xml", SKKS),
+ new Test("signature-extra-text-in-signed-info.xml", SKKS,
+ MarshalException.class),
+ new Test("signature-wrong-canonicalization-method-algorithm.xml", SKKS,
+ MarshalException.class),
+ new Test("signature-wrong-transform-algorithm.xml", SKKS,
+ MarshalException.class),
+ new Test("signature-no-reference-uri.xml", SKKS),
+ new Test("signature-wrong-signature-method-algorithm.xml", SKKS,
+ MarshalException.class),
+ new Test("signature-wrong-tag-names.xml", SKKS, MarshalException.class)
};
public static void main(String args[]) throws Exception {
@@ -143,9 +164,14 @@
test_signature(test);
System.out.println("FAILED");
atLeastOneFailed = true;
- } catch (XMLSignatureException xse) {
- System.out.println(xse.getMessage());
- System.out.println("PASSED");
+ } catch (Exception e) {
+ System.out.println("Exception: " + e);
+ if (e.getClass() != test.exception) {
+ System.out.println("FAILED: unexpected exception");
+ atLeastOneFailed = true;
+ } else {
+ System.out.println("PASSED");
+ }
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-enveloping-p384-sha1.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><Reference URI="#object"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>7/XTsHaBSOnJ/jXD5v0zL6VKYsk=</DigestValue></Reference></SignedInfo><SignatureValue>s15F4ng4a+TfNHlK+y18igexSe3wRspeyQi8hwhyMUh6I6kyzxO1wcqRulFyBNwh/Dplht+WS9dO
+GwL4xfDfozKss36ZsHACI3EYe0QI6pN7hcKp511muPI+cmoZzIN/</SignatureValue><KeyInfo><KeyValue><ECKeyValue xmlns="http://www.w3.org/2009/xmldsig11#"><NamedCurve URI="urn:oid:1.3.132.0.34"/><PublicKey>BE7my2bSrGpZ3jNFQ1I6baGP9CE4AIMIyN/ugWhbsCQz8ntwXf15NStBt9MBXolglXbRYMqV8vYB
+f7UJ1ixum8hzcEvgShn0L9l1VkWaU4bYr/Ss9ApimDvbF2g6Mw++sA==</PublicKey></ECKeyValue></KeyValue></KeyInfo><Object Id="object">some text</Object></Signature>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-enveloping-p521-sha1.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><Reference URI="#object"><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>7/XTsHaBSOnJ/jXD5v0zL6VKYsk=</DigestValue></Reference></SignedInfo><SignatureValue>AaVkRumHXD0vVtkn2ogcAoByVge1KWGVWE6vph+xr/hcZTqNNaiIyXb7Itu0FBHD9M47T/CuM7y4
+m60zEssaaHl0AUNm7xGpZy7Heqaoibb/gMU1ErrfSNs7yuPG/TCqs8YAd3RGnc6ZbloitWpycGCU
+LS4xxKms0KeRnbVpjk5OeVfK</SignatureValue><KeyInfo><KeyValue><ECKeyValue xmlns="http://www.w3.org/2009/xmldsig11#"><NamedCurve URI="urn:oid:1.3.132.0.35"/><PublicKey>BAE2HJjBQRbl0sdGa1+1cJwxtPJXcnrRdmRXs6TEQmU97US+CK0vsoDQtlnXxDx37mawN7Sh4Atp
+CUeYBbzvBmwPfQEyAO600W9xn4s5wSQvXod8v8brh5ISXhxYPFy3SCcGUxbQYqrVUnBrIXH8WEQX
+K0/T+FdF4CzlQswJY0UZGeQYcA==</PublicKey></ECKeyValue></KeyValue></KeyInfo><Object Id="object">some text</Object></Signature>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-external-rsa.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod><Reference URI="http://oracle.com"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</DigestValue></Reference></SignedInfo><SignatureValue>f6trDCcPsLLkIV/V4DGFbRf8b9Jwal8xGBDshNzEXwPmym2ChN85rbKIg/cbunf04F89/SXLo2v9
+AYjLcUr3G/Vz5YUmqNhnBvJukXgsIG0ddWl3mFi9Tk+CLINlbgfsaFqU9pQwFjmDyAqIrvZYqW7p
+rTHLetv218mbUVBBAkc=</SignatureValue></Signature></test>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-extra-text-in-signed-info.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</DigestValue><test>extra text</test></Reference></SignedInfo><SignatureValue>iTrgJERmYeD5hFwY8/MwJpkF+nd++AAOgf/Kxt9SwdE6BIYq2Vyxq4CQPhD+t2971BGTgvF6ejZd
++/Ko4Zs5Dqf4Lt65Vck0q43rM0PdP1e8gJov0IPYnZ1zeqFpah+N/OjmqTbshaZWRIjf3eqS6en5
+ZKjn+TkCQ1kOX/YUNDc=</SignatureValue></Signature></test>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-no-reference-uri.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod><Reference><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</DigestValue></Reference></SignedInfo><SignatureValue>BNPSYlNcyXcO/Tc1tr9mQ/KAZ40eFybLTDyB/HH1EHHMpc972A+nOX2EWBaLsVgG8apl0Isp1ZqV
+gmoDHNF6xrcJJQVydVJzU08GVV4GiXHMqRYQbted7STQLhlhssvNNdMEoVApsX5ByL66wxKZQXrT
+z1kZtOHAi88DOrmIJu0=</SignatureValue></Signature></test>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-wrong-canonicalization-method-algorithm.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://oracle.com"></CanonicalizationMethod><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</DigestValue></Reference></SignedInfo><SignatureValue>EBbyEV7e+1CTUsyCTyxiN8p+U3/za1oTjK7q+kF8Q87r8e/7C1z4ndGWbk6zyI3w6leT+I2suW9U
+KkdvkrDXX2OyLw0GfgJfLkNn+1pGK6kyWpL95NoWJZhHkUAKKBZ0ikfZ4j33gYxrYK+IYCLeZYzr
+hlZjdXXXCiSH0Sq+weQ=</SignatureValue></Signature></test>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-wrong-signature-method-algorithm.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod><SignatureMethod Algorithm="bogus://bogus"></SignatureMethod><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</DigestValue></Reference></SignedInfo><SignatureValue>RjL9nfQg9u6+KEFfAlBBH7E7ilFgB7YEQ5MxOIJN/fOdQmc5iDD+YuhiHzNGXGi/UOyo6t8LxTxl
+X4oFE1RNlPVkSAZK4LcTWhVa757WwgW1/EZo8PQYWp5NScLq6PumYaujoovSYBKW2N6+jQpnD/L6
+4cuEVNnwEFqvOLrjogY=</SignatureValue></Signature></test>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-wrong-tag-names.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><aSignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><aCanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></aCanonicalizationMethod><aSignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></aSignatureMethod><aReference URI=""><Transforms><aTransform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></aTransform></Transforms><aDigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></aDigestMethod><aDigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</aDigestValue></aReference></aSignedInfo><aSignatureValue>cbNpPGavhM0BGUtrvLxvy2SCIt+I27BPpVEt0Q9mXrdPYurMqWF/67AdY9m5RqS7+ZZlwUtem083
+MczRYbKoOIq7sMbCqKKdzbSE/U6rfmky/ACQ5wgemZl8jtipwu5LhAUzjhzT8hhTjVqOYpHdkVJz
+l9dnd9eWbLmEr3BI0VA=</aSignatureValue></Signature></test>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/crypto/dsig/data/signature-wrong-transform-algorithm.xml Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+<!-- This XML signature contains a Transform with wrong algorithm -->
+<test xmlns="http://example.org/envelope">test<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#"><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod><Reference URI=""><Transforms><Transform Algorithm="bogus://bogus"></Transform></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod><DigestValue>1Bq8FsjajUBYPD7stQeJSc66GlM=</DigestValue></Reference></SignedInfo><SignatureValue>Wzyx3jgEKGwY+pBXBmqWLWhASHQYCCGZVii5sKKKeZUBKxNBthjiSVfzKANuLgX6zAt16XRycrSL
+zFKTPuvGeWVPDvd+KTNKCJxN9ccrG7v23EM7RY2eMJGu2r5DLfKwV7H6YuJPsOuWifVkKAhvq7gd
+6akJshxyAj9Ud+mjo48=</SignatureValue></Signature></test>
\ No newline at end of file
--- a/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java Fri May 29 12:49:31 2015 +0200
@@ -111,6 +111,8 @@
try {
String[] launcher = getLauncher();
+ if (launcher == null) return; // launcher not available for the tested platform; skip
+
System.out.println("Starting custom launcher:");
System.out.println("=========================");
System.out.println(" launcher : " + launcher[0]);
--- a/jdk/test/sun/nio/cs/FindDecoderBugs.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/nio/cs/FindDecoderBugs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,19 @@
/*
* @test
* @bug 6380723
- * @summary Decode many byte sequences in many ways
+ * @summary Decode many byte sequences in many ways (use -Dseed=X to set PRNG seed)
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
* @run main/timeout=1800 FindDecoderBugs
* @author Martin Buchholz
- * @key randomness
+ * @key intermittent randomness
*/
import java.util.*;
import java.util.regex.*;
import java.nio.*;
import java.nio.charset.*;
+import jdk.testlibrary.RandomFactory;
public class FindDecoderBugs {
@@ -322,7 +325,7 @@
}
}
- private final static Random rnd = new Random();
+ private final static Random rnd = RandomFactory.getRandom();
private static byte randomByte() {
return (byte) rnd.nextInt(0x100);
}
--- a/jdk/test/sun/nio/cs/FindEncoderBugs.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/nio/cs/FindEncoderBugs.java Fri May 29 12:49:31 2015 +0200
@@ -25,15 +25,18 @@
* @test
* @bug 6233345 6381699 6381702 6381705 6381706
* @summary Encode many char sequences in many ways
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
* @run main/timeout=1200 FindEncoderBugs
* @author Martin Buchholz
- * @key randomness
+ * @key randomness intermittent
*/
import java.util.*;
import java.util.regex.*;
import java.nio.*;
import java.nio.charset.*;
+import jdk.testlibrary.RandomFactory;
public class FindEncoderBugs {
@@ -456,7 +459,7 @@
}
}
- private final static Random rnd = new Random();
+ private final static Random rnd = RandomFactory.getRandom();
private static char randomChar() {
return (char) rnd.nextInt(Character.MAX_VALUE);
}
--- a/jdk/test/sun/nio/cs/TestStringCoding.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/nio/cs/TestStringCoding.java Fri May 29 12:49:31 2015 +0200
@@ -22,7 +22,7 @@
*/
/* @test
- @bug 6636323 6636319 7040220 7096080 7183053
+ @bug 6636323 6636319 7040220 7096080 7183053 8080248
@summary Test if StringCoding and NIO result have the same de/encoding result
* @run main/othervm/timeout=2000 TestStringCoding
* @key randomness
@@ -200,6 +200,17 @@
*/
}
+ //encode mappable surrogates for hkscs
+ if (cs.name().equals("Big5-HKSCS") || cs.name().equals("x-MS950-HKSCS")) {
+ String str = "ab\uD840\uDD0Ccd";
+ byte[] expected = new byte[] {(byte)'a', (byte)'b',
+ (byte)0x88, (byte)0x45, (byte)'c', (byte)'d' };
+ if (!Arrays.equals(str.getBytes(cs.name()), expected) ||
+ !Arrays.equals(str.getBytes(cs), expected)) {
+ throw new RuntimeException("encode(surrogates) failed -> "
+ + cs.name());
+ }
+ }
}
static class PermissiveSecurityManger extends SecurityManager {
--- a/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/security/krb5/auto/HttpNegotiateServer.java Fri May 29 12:49:31 2015 +0200
@@ -40,21 +40,34 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.PasswordAuthentication;
import java.net.Proxy;
import java.net.URL;
-import java.security.PrivilegedExceptionAction;
+import java.net.URLConnection;
+import java.security.*;
import java.util.HashMap;
import java.util.Map;
import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.Configuration;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
import org.ietf.jgss.GSSContext;
import org.ietf.jgss.GSSCredential;
import org.ietf.jgss.GSSManager;
import sun.security.jgss.GSSUtil;
import sun.security.krb5.Config;
+import java.util.Base64;
import sun.util.logging.PlatformLogger;
import java.util.Base64;
@@ -197,7 +210,7 @@
proxyUrl = new URL("http://nosuchplace/a/b/c");
try {
- Exception e1 = null, e2 = null;
+ Exception e1 = null, e2 = null, e3 = null;
try {
test6578647();
} catch (Exception e) {
@@ -210,7 +223,14 @@
e2 = e;
e.printStackTrace();
}
- if (e1 != null || e2 != null) {
+ try {
+ test8077155();
+ } catch (Exception e) {
+ e3 = e;
+ e.printStackTrace();
+ }
+
+ if (e1 != null || e2 != null || e3 != null) {
throw new RuntimeException("Test error");
}
} finally {
@@ -254,6 +274,121 @@
}
}
+ static void testConnect() {
+ InputStream inputStream = null;
+ try {
+ URL url = webUrl;
+
+ URLConnection conn = url.openConnection();
+ conn.connect();
+ inputStream = conn.getInputStream();
+ byte[] b = new byte[inputStream.available()];
+ for (int j = 0; j < b.length; j++) {
+ b[j] = (byte) inputStream.read();
+ }
+ String s = new String(b);
+ System.out.println("Length: " + s.length());
+ System.out.println(s);
+ } catch (Exception ex) {
+ throw new RuntimeException(ex);
+ } finally {
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ static void test8077155() throws Exception {
+ final String username = WEB_USER;
+ final char[] password = WEB_PASS;
+
+ SecurityManager security = new SecurityManager();
+ Policy.setPolicy(new SecurityPolicy());
+ System.setSecurityManager(security);
+
+ CallbackHandler callback = new CallbackHandler() {
+ @Override
+ public void handle(Callback[] pCallbacks) throws IOException, UnsupportedCallbackException {
+ for (Callback cb : pCallbacks) {
+ if (cb instanceof NameCallback) {
+ NameCallback ncb = (NameCallback)cb;
+ ncb.setName(username);
+
+ } else if (cb instanceof PasswordCallback) {
+ PasswordCallback pwdcb = (PasswordCallback) cb;
+ pwdcb.setPassword(password);
+ }
+ }
+ }
+
+ };
+
+ final String jaasConfigName = "oracle.test.kerberos.login";
+ final String krb5LoginModule = "com.sun.security.auth.module.Krb5LoginModule";
+
+ Configuration loginConfig = new Configuration() {
+ @Override
+ public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
+ if (! jaasConfigName.equals(name)) {
+ return new AppConfigurationEntry[0];
+ }
+
+ Map<String, String> options = new HashMap<String, String>();
+ options.put("useTicketCache", Boolean.FALSE.toString());
+ options.put("useKeyTab", Boolean.FALSE.toString());
+
+ return new AppConfigurationEntry[] {
+ new AppConfigurationEntry(krb5LoginModule,
+ LoginModuleControlFlag.REQUIRED,
+ options)
+ };
+ }
+ };
+
+ // oracle context/subject/login
+ LoginContext context = null;
+ try {
+ context = new LoginContext("oracle.test.kerberos.login", null, callback, loginConfig);
+ context.login();
+
+ } catch (LoginException ex) {
+ ex.printStackTrace();
+ throw new RuntimeException(ex);
+ }
+
+
+ Subject subject = context.getSubject();
+
+ final PrivilegedExceptionAction<Object> test_action = new PrivilegedExceptionAction<Object>() {
+ public Object run() throws Exception {
+ testConnect();
+ return null;
+ }
+ };
+
+ System.err.println("\n\nExpecting to succeed when executing with the the logged in subject.");
+
+ try {
+ Subject.doAs(subject, test_action);
+ System.err.println("\n\nConnection succeed when executing with the the logged in subject.");
+ } catch (PrivilegedActionException e) {
+ System.err.println("\n\nFailure unexpected when executing with the the logged in subject.");
+ e.printStackTrace();
+ throw new RuntimeException("Failed to login as subject");
+ }
+
+ try {
+ System.err.println("\n\nExpecting to fail when running with the current user's login.");
+ testConnect();
+ } catch (Exception ex) {
+ System.err.println("\nConnect failed when running with the current user's login:\n" + ex.getMessage());
+ }
+ }
+
/**
* Creates and starts an HTTP or proxy server that requires
* Negotiate authentication.
@@ -366,3 +501,22 @@
}
}
}
+
+class SecurityPolicy extends Policy {
+
+ private static Permissions perms;
+
+ public SecurityPolicy() {
+ super();
+ if (perms == null) {
+ perms = new Permissions();
+ perms.add(new AllPermission());
+ }
+ }
+
+ @Override
+ public PermissionCollection getPermissions(CodeSource codesource) {
+ return perms;
+ }
+
+}
--- a/jdk/test/sun/security/krb5/config/ConfPlusProp.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/security/krb5/config/ConfPlusProp.java Fri May 29 12:49:31 2015 +0200
@@ -35,6 +35,12 @@
public class ConfPlusProp {
Config config;
public static void main(String[] args) throws Exception {
+ if (System.getenv("USERDNSDOMAIN") != null ||
+ System.getenv("LOGONSERVER") != null) {
+ System.out.println(
+ "Looks like a Windows machine in a domain. Skip test.");
+ return;
+ }
new ConfPlusProp().run();
}
@@ -90,23 +96,8 @@
check("R2", "old");
check("R3", null);
- int version = System.getProperty("java.version").charAt(2) - '0';
- System.out.println("JDK version is " + version);
-
- // Zero-config is supported since 1.7
- if (version >= 7) {
- // Point to a non-existing file
- System.setProperty("java.security.krb5.conf", "i-am-not-a file");
- refresh();
-
- // Default realm might come from DNS
- //checkDefaultRealm(null);
- check("R1", null);
- check("R2", null);
- check("R3", null);
- if (config.get("libdefaults", "forwardable") != null) {
- throw new Exception("Extra config error");
- }
+ if (config.get("libdefaults", "forwardable") != null) {
+ throw new Exception("Extra config error");
}
// Add prop
@@ -136,14 +127,6 @@
check("R2", "k2");
check("R3", "k2");
- // Point to a non-existing file
- System.setProperty("java.security.krb5.conf", "i-am-not-a file");
- refresh();
-
- checkDefaultRealm("R2");
- check("R1", "k2");
- check("R2", "k2");
- check("R3", "k2");
if (config.get("libdefaults", "forwardable") != null) {
throw new Exception("Extra config error");
}
--- a/jdk/test/sun/security/krb5/config/DNS.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/security/krb5/config/DNS.java Fri May 29 12:49:31 2015 +0200
@@ -23,12 +23,22 @@
// See dns.sh.
import sun.security.krb5.Config;
+import sun.security.krb5.KrbException;
public class DNS {
public static void main(String[] args) throws Exception {
System.setProperty("java.security.krb5.conf",
- System.getProperty("test.src", ".") +"/nothing.conf");
+ System.getProperty("test.src", ".") +"/no-such-file.conf");
Config config = Config.getInstance();
+ try {
+ String r = config.getDefaultRealm();
+ throw new Exception("What? There is a default realm " + r + "?");
+ } catch (KrbException ke) {
+ ke.printStackTrace();
+ if (ke.getCause() != null) {
+ throw new Exception("There should be no cause. Won't try DNS");
+ }
+ }
String kdcs = config.getKDCList("X");
if (!kdcs.equals("a.com.:88 b.com.:99") &&
!kdcs.equals("a.com. b.com.:99")) {
--- a/jdk/test/sun/security/krb5/config/DnsFallback.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/security/krb5/config/DnsFallback.java Fri May 29 12:49:31 2015 +0200
@@ -22,8 +22,7 @@
*/
/*
* @test
- * @bug 6673164
- * @bug 6552334
+ * @bug 6673164 6552334 8077102
* @run main/othervm DnsFallback
* @summary fix dns_fallback parse error, and use dns by default
*/
@@ -35,47 +34,66 @@
public class DnsFallback {
static Method useDNS_Realm;
+ static Method useDNS_KDC;
public static void main(String[] args) throws Exception {
useDNS_Realm = Config.class.getDeclaredMethod("useDNS_Realm");
useDNS_Realm.setAccessible(true);
+ useDNS_KDC = Config.class.getDeclaredMethod("useDNS_KDC");
+ useDNS_KDC.setAccessible(true);
// for 6673164
- check("true", "true", true);
- check("false", "true", false);
- check("true", "false", true);
- check("false", "false", false);
- check("true", null, true);
- check("false", null, false);
- check(null, "true", true);
- check(null, "false", false);
+ check("true", "true", true, true);
+ check("false", "true", false, false);
+ check("true", "false", true, true);
+ check("false", "false", false, false);
+ check("true", null, true, true);
+ check("false", null, false, false);
+ check(null, "true", true, true);
+ check(null, "false", false, false);
- // for 6552334
- check(null, null, true);
+ // for 6552334, no longer true
+ //check(null, null, true, true);
+
+ // 8077102
+ check(null, null, false, true);
}
- static void check(String realm, String fallback, boolean output)
+ /**
+ * Sets and checks.
+ *
+ * @param u dns_lookup_XXX value set, none if null
+ * @param f dns_fallback value set, none if null
+ * @param r expected useDNS_Realm
+ * @param k expected useDNS_KDC
+ */
+ static void check(String u, String f, boolean r, boolean k)
throws Exception {
try (PrintStream ps =
new PrintStream(new FileOutputStream("dnsfallback.conf"))) {
ps.println("[libdefaults]\n");
- if (realm != null) {
- ps.println("dns_lookup_realm=" + realm);
+ if (u != null) {
+ ps.println("dns_lookup_realm=" + u);
+ ps.println("dns_lookup_kdc=" + u);
}
- if (fallback != null) {
- ps.println("dns_fallback=" + fallback);
+ if (f != null) {
+ ps.println("dns_fallback=" + f);
}
}
System.setProperty("java.security.krb5.conf", "dnsfallback.conf");
Config.refresh();
- System.out.println("Testing " + realm + ", " + fallback + ", " + output);
+ System.out.println("Testing " + u + ", " + f + ", " + r + ", " + k);
- if (!useDNS_Realm.invoke(Config.getInstance()).equals(output)) {
- throw new Exception("Fail");
+ if (!useDNS_Realm.invoke(Config.getInstance()).equals(r)) {
+ throw new Exception("useDNS_Realm Fail");
+ }
+
+ if (!useDNS_KDC.invoke(Config.getInstance()).equals(k)) {
+ throw new Exception("useDNS_KDC Fail");
}
}
}
--- a/jdk/test/sun/security/krb5/config/confplusprop.conf Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/security/krb5/config/confplusprop.conf Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
[libdefaults]
default_realm = R1
forwardable = well
-dns_lookup_realm = false
+dns_lookup_kdc = false
[realms]
R1 = {
--- a/jdk/test/sun/security/krb5/config/confplusprop2.conf Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/security/krb5/config/confplusprop2.conf Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
[libdefaults]
-dns_lookup_realm = false
+dns_lookup_kdc = false
[realms]
R1 = {
--- a/jdk/test/sun/tools/common/ApplicationSetup.sh Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-# Support functions to start, stop, wait for or kill a given SimpleApplication
-
-# Starts a given app as background process, usage:
-# startApplication <class> port-file [args...]
-#
-# The following variables are set:
-#
-# appJavaPid - application's Java pid
-# appOtherPid - pid associated with the app other than appJavaPid
-# appPidList - all pids associated with the app
-# appOutput - file containing stdout and stderr from the app
-#
-# Waits for at least one line of output from the app to indicate
-# that it is up and running.
-#
-startApplication()
-{
- appOutput="${TESTCLASSES}/Application.out"
-
- ${JAVA} -XX:+UsePerfData -classpath "${TESTCLASSPATH:-${TESTCLASSES}}" "$@" > "$appOutput" 2>&1 &
- appJavaPid="$!"
- appOtherPid=
- appPidList="$appJavaPid"
-
- echo "INFO: waiting for $1 to initialize..."
- _cnt=0
- while true; do
- # if the app doesn't start then the JavaTest/JTREG timeout will
- # kick in so this isn't really a endless loop
- sleep 1
- out=`tail -1 "$appOutput"`
- if [ -n "$out" ]; then
- # we got some output from the app so it's running
- break
- fi
- _cnt=`expr $_cnt + 1`
- echo "INFO: waited $_cnt second(s) ..."
- done
- unset _cnt
-
- if $isWindows; then
- # Windows requires special handling
- appOtherPid="$appJavaPid"
-
- if $isCygwin; then
- appJavaPid=`ps -p "$appOtherPid" \
- | sed -n '
- # See if $appOtherPid is in PID column; there are sometimes
- # non-blanks in column 1 (I and S observed so far)
- /^.'"${PATTERN_WS}${PATTERN_WS}*${appOtherPid}${PATTERN_WS}"'/{
- # strip PID column
- s/^.'"${PATTERN_WS}${PATTERN_WS}*${appOtherPid}${PATTERN_WS}${PATTERN_WS}"'*//
- # strip PPID column
- s/^[1-9][0-9]*'"${PATTERN_WS}${PATTERN_WS}"'*//
- # strip PGID column
- s/^[1-9][0-9]*'"${PATTERN_WS}${PATTERN_WS}"'*//
- # strip everything after WINPID column
- s/'"${PATTERN_WS}"'.*//
- p
- q
- }
- '`
- echo "INFO: Cygwin pid=$appOtherPid maps to Windows pid=$appJavaPid"
- else
- # show PID, PPID and COMM columns only
- appJavaPid=`ps -o pid,ppid,comm \
- | sed -n '
- # see if appOtherPid is in either PID or PPID columns
- /'"${PATTERN_WS}${appOtherPid}${PATTERN_WS}"'/{
- # see if this is a java command
- /java'"${PATTERN_EOL}"'/{
- # strip leading white space
- s/^'"${PATTERN_WS}${PATTERN_WS}"'*//
- # strip everything after the first word
- s/'"${PATTERN_WS}"'.*//
- # print the pid and we are done
- p
- q
- }
- }
- '`
- echo "INFO: MKS shell pid=$appOtherPid; Java pid=$appJavaPid"
- fi
-
- if [ -z "$appJavaPid" ]; then
- echo "ERROR: could not find app's Java pid." >&2
- killApplication
- exit 2
- fi
- appPidList="$appOtherPid $appJavaPid"
- fi
-
- echo "INFO: $1 is process $appJavaPid"
- echo "INFO: $1 output is in $appOutput"
-}
-
-
-# Stops a simple application by invoking ShutdownSimpleApplication
-# class with a specific port-file, usage:
-# stopApplication port-file
-#
-# Note: When this function returns, the SimpleApplication (or a subclass)
-# may still be running because the application has not yet reached the
-# shutdown check.
-#
-stopApplication()
-{
- $JAVA -XX:+UsePerfData -classpath "${TESTCLASSPATH:-${TESTCLASSES}}" ShutdownSimpleApplication $1
-}
-
-
-# Wait for a simple application to stop running.
-#
-waitForApplication() {
- if [ $isWindows = false ]; then
- # non-Windows is easy; just one process
- echo "INFO: waiting for $appJavaPid"
- set +e
- wait "$appJavaPid"
- set -e
-
- elif $isCygwin; then
- # Cygwin pid and not the Windows pid
- echo "INFO: waiting for $appOtherPid"
- set +e
- wait "$appOtherPid"
- set -e
-
- else # implied isMKS
- # MKS has intermediate shell and Java process
- echo "INFO: waiting for $appJavaPid"
-
- # appJavaPid can be empty if pid search in startApplication() failed
- if [ -n "$appJavaPid" ]; then
- # only need to wait for the Java process
- set +e
- wait "$appJavaPid"
- set -e
- fi
- fi
-}
-
-
-# Kills a simple application by sending a SIGTERM to the appropriate
-# process(es); on Windows SIGQUIT (-9) is used.
-#
-killApplication()
-{
- if [ $isWindows = false ]; then
- # non-Windows is easy; just one process
- echo "INFO: killing $appJavaPid"
- set +e
- kill -TERM "$appJavaPid" # try a polite SIGTERM first
- sleep 2
- # send SIGQUIT (-9) just in case SIGTERM didn't do it
- # but don't show any complaints
- kill -QUIT "$appJavaPid" > /dev/null 2>&1
- wait "$appJavaPid"
- set -e
-
- elif $isCygwin; then
- # Cygwin pid and not the Windows pid
- echo "INFO: killing $appOtherPid"
- set +e
- kill -9 "$appOtherPid"
- wait "$appOtherPid"
- set -e
-
- else # implied isMKS
- # MKS has intermediate shell and Java process
- echo "INFO: killing $appPidList"
- set +e
- kill -9 $appPidList
- set -e
-
- # appJavaPid can be empty if pid search in startApplication() failed
- if [ -n "$appJavaPid" ]; then
- # only need to wait for the Java process
- set +e
- wait "$appJavaPid"
- set -e
- fi
- fi
-}
--- a/jdk/test/sun/tools/common/CommonSetup.sh Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-# Common setup for tool tests and other tests that use jtools.
-# Checks that TESTJAVA, TESTSRC, and TESTCLASSES environment variables are set.
-#
-# Creates the following constants for use by the caller:
-# JAVA - java launcher
-# JHAT - jhat utility
-# JINFO - jinfo utility
-# JMAP - jmap utility
-# JPS - jps utility
-# JSTACK - jstack utility
-# JCMD - jcmd utility
-# OS - operating system name
-# PATTERN_EOL - grep or sed end-of-line pattern
-# PATTERN_WS - grep or sed whitespace pattern
-# PS - path separator (";" or ":")
-#
-# Sets the following variables:
-#
-# isCygwin - true if environment is Cygwin
-# isMKS - true if environment is MKS
-# isLinux - true if OS is Linux
-# isSolaris - true if OS is Solaris
-# isWindows - true if OS is Windows
-# isMacos - true if OS is Macos X
-# isAIX - true if OS is AIX
-
-
-if [ -z "${TESTJAVA}" ]; then
- echo "ERROR: TESTJAVA not set. Test cannot execute. Failed."
- exit 1
-fi
-
-if [ -z "${TESTSRC}" ]; then
- echo "ERROR: TESTSRC not set. Test cannot execute. Failed."
- exit 1
-fi
-
-if [ -z "${TESTCLASSES}" ]; then
- echo "ERROR: TESTCLASSES not set. Test cannot execute. Failed."
- exit 1
-fi
-
-# only enable these after checking the expected incoming env variables
-set -eu
-
-JAVA="${TESTJAVA}/bin/java"
-JHAT="${TESTJAVA}/bin/jhat"
-JINFO="${TESTJAVA}/bin/jinfo"
-JMAP="${TESTJAVA}/bin/jmap"
-JPS="${TESTJAVA}/bin/jps"
-JSTACK="${TESTJAVA}/bin/jstack"
-JCMD="${TESTJAVA}/bin/jcmd"
-
-isCygwin=false
-isMKS=false
-isLinux=false
-isSolaris=false
-isUnknownOS=false
-isWindows=false
-isMacos=false
-isAIX=false
-
-OS=`uname -s`
-
-# start with some UNIX like defaults
-PATTERN_EOL='$'
-# blank and tab
-PATTERN_WS='[ ]'
-PS=":"
-
-case "$OS" in
- CYGWIN* )
- OS="Windows"
- PATTERN_EOL='[
]*$'
- # blank and tab
- PATTERN_WS='[ \t]'
- isCygwin=true
- isWindows=true
- ;;
- Linux )
- OS="Linux"
- isLinux=true
- ;;
- Darwin )
- OS="Mac OS X"
- isMacos=true
- ;;
- SunOS )
- OS="Solaris"
- isSolaris=true
- ;;
- AIX )
- OS="AIX"
- isAIX=true
- ;;
- Windows* )
- OS="Windows"
- PATTERN_EOL='[
]*$'
- PS=";"
- isWindows=true
- ;;
- * )
- isUnknownOS=true
- ;;
-esac
--- a/jdk/test/sun/tools/common/ShutdownSimpleApplication.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/*
- * Used to shutdown SimpleApplication (or a subclass). The argument to
- * this class is the name of a file that contains the TCP port number
- * on which SimpleApplication (or a subclass) is listening.
- *
- * Note: When this program returns, the SimpleApplication (or a subclass)
- * may still be running because the application has not yet reached the
- * shutdown check.
- */
-import java.net.Socket;
-import java.net.InetSocketAddress;
-import java.io.File;
-import java.io.FileInputStream;
-
-public class ShutdownSimpleApplication {
- public static void main(String args[]) throws Exception {
-
- if (args.length != 1) {
- throw new RuntimeException("Usage: ShutdownSimpleApplication" +
- " port-file");
- }
-
- // read the (TCP) port number from the given file
-
- File f = new File(args[0]);
- FileInputStream fis = new FileInputStream(f);
- byte b[] = new byte[8];
- int n = fis.read(b);
- if (n < 1) {
- throw new RuntimeException("Empty port-file");
- }
- fis.close();
-
- String str = new String(b, 0, n, "UTF-8");
- System.out.println("INFO: Port number of SimpleApplication: " + str);
- int port = Integer.parseInt(str);
-
- // Now connect to the port (which will shutdown application)
-
- System.out.println("INFO: Connecting to port " + port +
- " to shutdown SimpleApplication ...");
- System.out.flush();
-
- Socket s = new Socket();
- s.connect( new InetSocketAddress(port) );
- s.close();
-
- System.out.println("INFO: done connecting to SimpleApplication.");
- System.out.flush();
-
- System.exit(0);
- }
-}
--- a/jdk/test/sun/tools/common/SimpleApplication.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/*
- * A simple application used by unit tests. The first argument to this
- * class is the name of a file to which a TCP port number can be written.
- *
- * By default, this class does nothing other than bind to a TCP port,
- * write the TCP port number to a file, and wait for an incoming connection
- * in order to complete the application shutdown protocol.
- */
-import java.net.Socket;
-import java.net.ServerSocket;
-import java.io.File;
-import java.io.FileOutputStream;
-
-public class SimpleApplication {
- private static SimpleApplication myApp; // simple app or a subclass
- private static String myAppName; // simple app name
- private static int myPort; // coordination port #
- private static ServerSocket mySS; // coordination socket
-
- // protected so a subclass can extend it; not public so creation is
- // limited.
- protected SimpleApplication() {
- // save simple app (or subclass) name for messages
- myAppName = getClass().getName();
- }
-
- // return the simple application (or a subclass)
- final public static SimpleApplication getMyApp() {
- return myApp;
- }
-
- // set the simple application (for use by a subclass)
- final public static void setMyApp(SimpleApplication _myApp) {
- myApp = _myApp;
- }
-
- // execute the application finish protocol
- final public void doMyAppFinish(String[] args) throws Exception {
- System.out.println("INFO: " + myAppName + " is waiting on port: " +
- myPort);
- System.out.flush();
-
- // wait for test harness to connect
- Socket s = mySS.accept();
- s.close();
- mySS.close();
-
- System.out.println("INFO: " + myAppName + " is shutting down.");
- System.out.flush();
- }
-
- // execute the application start protocol
- final public void doMyAppStart(String[] args) throws Exception {
- if (args.length < 1) {
- throw new RuntimeException("Usage: " + myAppName +
- " port-file [arg(s)]");
- }
-
- // bind to a random port
- mySS = new ServerSocket(0);
- myPort = mySS.getLocalPort();
-
- // Write the port number to the given file
- File f = new File(args[0]);
- FileOutputStream fos = new FileOutputStream(f);
- fos.write( Integer.toString(myPort).getBytes("UTF-8") );
- fos.close();
-
- System.out.println("INFO: " + myAppName + " created socket on port: " +
- myPort);
- System.out.flush();
- }
-
- // execute the app work (subclass can override this)
- public void doMyAppWork(String[] args) throws Exception {
- }
-
- public static void main(String[] args) throws Exception {
- if (myApp == null) {
- // create myApp since a subclass hasn't done so
- myApp = new SimpleApplication();
- }
-
- myApp.doMyAppStart(args); // do the app start protocol
-
- System.out.println("INFO: " + myAppName + " is calling doMyAppWork()");
- System.out.flush();
- myApp.doMyAppWork(args); // do the app work
- System.out.println("INFO: " + myAppName + " returned from" +
- " doMyAppWork()");
- System.out.flush();
-
- myApp.doMyAppFinish(args); // do the app finish protocol
-
- System.exit(0);
- }
-}
--- a/jdk/test/sun/tools/common/SleeperApplication.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/*
- * An example subclass of SimpleApplication that illustrates how to
- * override the doMyAppWork() method.
- */
-
-public class SleeperApplication extends SimpleApplication {
- public static int DEFAULT_SLEEP_TIME = 60; // time is in seconds
-
- // execute the sleeper app work
- public void doMyAppWork(String[] args) throws Exception {
- int sleep_time = DEFAULT_SLEEP_TIME;
-
- // args[0] is the port-file
- if (args.length < 2) {
- System.out.println("INFO: using default sleep time of "
- + sleep_time + " seconds.");
- } else {
- try {
- sleep_time = Integer.parseInt(args[1]);
- } catch (NumberFormatException nfe) {
- throw new RuntimeException("Error: '" + args[1] +
- "': is not a valid seconds value.");
- }
- }
-
- Thread.sleep(sleep_time * 1000); // our "work" is to sleep
- }
-
- public static void main(String[] args) throws Exception {
- SleeperApplication myApp = new SleeperApplication();
-
- SimpleApplication.setMyApp(myApp);
-
- SimpleApplication.main(args);
- }
-}
--- a/jdk/test/sun/tools/jhat/HatHeapDump1Test.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.io.File;
-import java.util.Arrays;
-
-import jdk.testlibrary.Asserts;
-import jdk.testlibrary.JDKToolLauncher;
-import jdk.testlibrary.OutputAnalyzer;
-import jdk.testlibrary.ProcessTools;
-
-/* @test
- * @bug 5102009
- * @summary Sanity test of jhat functionality
- * @library /lib/testlibrary
- * @modules java.management
- * @build jdk.testlibarary.*
- * @compile -g HelloWorld.java
- * @run main HatHeapDump1Test
- */
-public class HatHeapDump1Test {
-
- private static final String TEST_CLASSES = System.getProperty("test.classes", ".");
-
- public static void main(String args[]) throws Exception {
- String className = "HelloWorld";
- File dumpFile = new File(className + ".hdump");
-
- // Generate a heap dump
- ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder("-cp",
- TEST_CLASSES,
- "-Xcheck:jni",
- "-Xverify:all",
- "-agentlib:hprof=heap=dump,format=b,file=" + dumpFile.getAbsolutePath(),
- className);
- OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
- System.out.println(output.getOutput());
- output.shouldHaveExitValue(0);
- output.shouldContain("Dumping Java heap ... done");
- Asserts.assertTrue(dumpFile.exists() && dumpFile.isFile(), "Invalid dump file " + dumpFile.getAbsolutePath());
-
- // Run jhat to analyze the heap dump
- output = jhat("-debug", "2", dumpFile.getAbsolutePath());
- output.shouldHaveExitValue(0);
- output.shouldContain("Snapshot resolved");
- output.shouldContain("-debug 2 was used");
- output.shouldNotContain("ERROR");
-
- dumpFile.delete();
- }
-
- private static OutputAnalyzer jhat(String... toolArgs) throws Exception {
- JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhat");
- if (toolArgs != null) {
- for (String toolArg : toolArgs) {
- launcher.addToolArg(toolArg);
- }
- }
-
- ProcessBuilder processBuilder = new ProcessBuilder();
- processBuilder.command(launcher.getCommand());
- System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
- OutputAnalyzer output = ProcessTools.executeProcess(processBuilder);
- System.out.println(output.getOutput());
-
- return output;
- }
-
-}
--- a/jdk/test/sun/tools/jhat/HelloWorld.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-
-/*
- *
- * Sample target application.
- *
- */
-
-public class HelloWorld {
- public static void main(String args[]) {
-
- /* Use a generic type */
- java.util.List<String> l = new java.util.ArrayList<String>();
- String.format("%s", "");
-
- /* Just some code with branches */
- try {
- if ( args.length == 0 ) {
- System.out.println("No arguments passed in");
- } else {
- System.out.println("Some arguments passed in");
- }
- } catch ( Throwable e ) {
- System.out.println("ERROR: System.out.println() did a throw");
- } finally {
- System.out.println("Hello, world!");
- }
- }
-}
--- a/jdk/test/sun/tools/jhat/ParseTest.sh Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-
-# @test
-# @summary Testing jhat parsing against pre-created dump files.
-# see also: README.TXT
-
-# @library ../common
-# @run shell ParseTest.sh
-
-. ${TESTSRC}/../common/CommonSetup.sh
-
-# all return statuses are checked in this test
-set +e
-
-failed=0
-
-DUMPFILE="minimal.bin"
-
-${JHAT} -parseonly true ${TESTSRC}/${DUMPFILE}
-if [ $? != 0 ]; then failed=1; fi
-
-DUMPFILE="jmap.bin"
-
-${JHAT} -parseonly true ${TESTSRC}/${DUMPFILE}
-if [ $? != 0 ]; then failed=1; fi
-
-DUMPFILE="hprof.bin"
-
-${JHAT} -parseonly true ${TESTSRC}/${DUMPFILE}
-if [ $? != 0 ]; then failed=1; fi
-
-# try something that is not heapdump and expect to fail!
-DUMPFILE="ParseTest.sh"
-
-${JHAT} -parseonly true ${TESTSRC}/${DUMPFILE}
-if [ $? = 0 ]; then failed=1; fi
-
-# try something that does not exist and expect to fail!
-DUMPFILE="FileThatDoesNotExist"
-
-${JHAT} -parseonly true ${TESTSRC}/${DUMPFILE}
-if [ $? = 0 ]; then failed=1; fi
-
-exit $failed
-
--- a/jdk/test/sun/tools/jhat/README.TXT Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#
-
-jhat heap dump parsing tests:
-
-There are three hprof binary format dump files in this directory.
-These dumps were created by jmap and hprof profiler against a
-simple infinite looping Java program.
-
-1. minimal.bin - minimal dump that has nothing! - not even java.lang.Class!
- - This was created by java -Xrunhprof:format=b,heap=sites MainClass.
-
-2. jmap.bin - created by jmap -dump option
-
-3. hprof.bin - created by java -Xrunhprof:heap=all,format=b MainClass
-
-We can run jhat -parseonly true <dump-file> against these dumps.
--- a/jdk/test/sun/tools/jmap/BasicJMapTest.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/sun/tools/jmap/BasicJMapTest.java Fri May 29 12:49:31 2015 +0200
@@ -21,10 +21,13 @@
* questions.
*/
+import static jdk.testlibrary.Asserts.assertTrue;
+import static jdk.testlibrary.Asserts.fail;
+
import java.io.File;
import java.util.Arrays;
-import static jdk.testlibrary.Asserts.*;
+import jdk.test.lib.hprof.HprofParser;
import jdk.testlibrary.JDKToolLauncher;
import jdk.testlibrary.OutputAnalyzer;
import jdk.testlibrary.ProcessTools;
@@ -34,8 +37,13 @@
* @bug 6321286
* @summary Unit test for jmap utility
* @library /lib/testlibrary
+ * @library /../../test/lib/share/classes
* @modules java.management
* @build jdk.testlibrary.*
+ * @build jdk.test.lib.hprof.*
+ * @build jdk.test.lib.hprof.module.*
+ * @build jdk.test.lib.hprof.parser.*
+ * @build jdk.test.lib.hprof.utils.*
* @run main BasicJMapTest
*/
public class BasicJMapTest {
@@ -60,24 +68,38 @@
}
private static void testDump() throws Exception {
- File dump = new File("java_pid$" + ProcessTools.getProcessId() + ".hprof");
- OutputAnalyzer output = jmap("-dump:format=b,file=" + dump.getName());
- output.shouldHaveExitValue(0);
- output.shouldContain("Heap dump file created");
- verifyDumpFile(dump);
+ dump(false);
}
private static void testDumpLive() throws Exception {
- File dump = new File("java_pid$" + ProcessTools.getProcessId() + ".hprof");
- OutputAnalyzer output = jmap("-dump:live,format=b,file=" + dump.getName());
+ dump(true);
+ }
+
+ private static void dump(boolean live) throws Exception {
+ File dump = new File("jmap.dump." + System.currentTimeMillis() + ".hprof");
+ if (dump.exists()) {
+ dump.delete();
+ }
+ OutputAnalyzer output;
+ if (live) {
+ output = jmap("-dump:live,format=b,file=" + dump.getName());
+ } else {
+ output = jmap("-dump:format=b,file=" + dump.getName());
+ }
output.shouldHaveExitValue(0);
output.shouldContain("Heap dump file created");
verifyDumpFile(dump);
+ dump.delete();
}
private static void verifyDumpFile(File dump) {
- assertTrue(dump.exists() && dump.isFile(), "Could not create dump file");
- dump.delete();
+ assertTrue(dump.exists() && dump.isFile(), "Could not create dump file " + dump.getAbsolutePath());
+ try {
+ HprofParser.parse(dump);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Could not parse dump file " + dump.getAbsolutePath());
+ }
}
private static OutputAnalyzer jmap(String... toolArgs) throws Exception {
--- a/jdk/test/tools/launcher/Arrrghs.java Fri May 22 09:14:18 2015 +0200
+++ b/jdk/test/tools/launcher/Arrrghs.java Fri May 29 12:49:31 2015 +0200
@@ -24,7 +24,7 @@
/**
* @test
* @bug 5030233 6214916 6356475 6571029 6684582 6742159 4459600 6758881 6753938
- * 6894719 6968053 7151434 7146424 8007333
+ * 6894719 6968053 7151434 7146424 8007333 8077822
* @summary Argument parsing validation.
* @compile -XDignore.symbol.file Arrrghs.java
* @run main/othervm Arrrghs
@@ -304,6 +304,16 @@
throw new RuntimeException("Error: compiling java wildcards");
}
+ // test if javac (the command) can compile *.java with a vmoption
+ tr = doExec(javacCmd, "-cp", ".",
+ "-J-showversion", "-J-Dsomeproperty=foo",
+ libDir.getName() + File.separator + "*.java");
+ if (!tr.isOK()) {
+ System.out.println(tr);
+ throw new RuntimeException("Error: compiling java wildcards with vmoptions");
+ }
+
+
// use the jar cmd to create jars using the ? wildcard
File jarFoo = new File(libDir, "Foo.jar");
tr = doExec(jarCmd, "cvf", jarFoo.getAbsolutePath(), "lib" + File.separator + "F?o.class");
--- a/langtools/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/langtools/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -307,3 +307,4 @@
40058141a4ec04a3d4cacdb693ad188a5ddf48ed jdk9-b62
a28b7f42dae9bd59513beaa5a2d6eb563dc09e08 jdk9-b63
809d66512998789b620d08c335d7c31211a0cf29 jdk9-b64
+4fcf722b811406a7db8f206d88446c82cda1b5f4 jdk9-b65
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Fri May 29 12:49:31 2015 +0200
@@ -1317,6 +1317,9 @@
return isSimpleReceiver(((JCAnnotatedType)rec).underlyingType);
case APPLY:
return true;
+ case NEWCLASS:
+ JCNewClass nc = (JCNewClass) rec;
+ return nc.encl == null && nc.def == null && !TreeInfo.isDiamond(nc);
default:
return false;
}
@@ -1371,17 +1374,24 @@
Type site;
if (rec != null) {
- if (rec.hasTag(APPLY)) {
- Symbol recSym = quicklyResolveMethod(env, (JCMethodInvocation) rec);
- if (recSym == null)
- return null;
- Symbol resolvedReturnType =
- analyzeCandidateMethods(recSym, syms.errSymbol, returnSymbolAnalyzer);
- if (resolvedReturnType == null)
- return null;
- site = resolvedReturnType.type;
- } else {
- site = attribSpeculative(rec, env, attr.unknownTypeExprInfo).type;
+ switch (rec.getTag()) {
+ case APPLY:
+ Symbol recSym = quicklyResolveMethod(env, (JCMethodInvocation) rec);
+ if (recSym == null)
+ return null;
+ Symbol resolvedReturnType =
+ analyzeCandidateMethods(recSym, syms.errSymbol, returnSymbolAnalyzer);
+ if (resolvedReturnType == null)
+ return null;
+ site = resolvedReturnType.type;
+ break;
+ case NEWCLASS:
+ JCNewClass nc = (JCNewClass) rec;
+ site = attribSpeculative(nc.clazz, env, attr.unknownTypeExprInfo).type;
+ break;
+ default:
+ site = attribSpeculative(rec, env, attr.unknownTypeExprInfo).type;
+ break;
}
} else {
site = env.enclClass.sym.type;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/ZipArchive.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/ZipArchive.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -278,12 +278,12 @@
ZipFileObject o = (ZipFileObject) other;
return zarch.getAbsoluteFile().equals(o.zarch.getAbsoluteFile())
- && name.equals(o.name);
+ && entry.getName().equals(o.entry.getName());
}
@Override
public int hashCode() {
- return zarch.getAbsoluteFile().hashCode() + name.hashCode();
+ return zarch.getAbsoluteFile().hashCode() + entry.getName().hashCode();
}
}
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -228,12 +228,12 @@
ZipFileIndexFileObject o = (ZipFileIndexFileObject) other;
return zfIndex.getAbsoluteFile().equals(o.zfIndex.getAbsoluteFile())
- && name.equals(o.name);
+ && entry.equals(o.entry);
}
@Override
public int hashCode() {
- return zfIndex.getAbsoluteFile().hashCode() + name.hashCode();
+ return zfIndex.getAbsoluteFile().hashCode() + entry.hashCode();
}
private String getPrefixedEntryName() {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java Fri May 29 12:49:31 2015 +0200
@@ -145,8 +145,8 @@
/**
* This class creates a graph of all dependencies as symbols are completed;
- * when compilation finishes, the resulting dependecy graph is then dumped
- * onto a dot file. Several options are provided to customise the output of the graph.
+ * when compilation finishes, the resulting dependency graph is then dumped
+ * onto a dot file. Several options are provided to customize the output of the graph.
*/
public static class GraphDependencies extends Dependencies implements Closeable, Completer {
@@ -233,13 +233,13 @@
* (either from source or classfile); (ii) attribution nodes, corresponding to
* attribution actions triggered during (source) completion.
*/
- static abstract class Node extends GraphUtils.AbstractNode<String, Node>
+ public static abstract class Node extends GraphUtils.AbstractNode<String, Node>
implements GraphUtils.DottableNode<String, Node> {
/**
* Model the dependencies between nodes.
*/
- enum DependencyKind implements GraphUtils.DependencyKind {
+ public enum DependencyKind implements GraphUtils.DependencyKind {
/**
* standard dependency - i.e. completion of the source node depends
* on completion of the sink node.
@@ -326,7 +326,7 @@
* This is a dependency node used to model symbol completion requests.
* Completion requests can come from either source or class.
*/
- static class CompletionNode extends Node {
+ public static class CompletionNode extends Node {
/**
* Completion kind (source vs. classfile)
@@ -349,9 +349,11 @@
}
final Kind ck;
+ final ClassSymbol sym;
CompletionNode(ClassSymbol sym) {
super(sym.getQualifiedName().toString());
+ this.sym = sym;
//infer completion kind by looking at the symbol fields
boolean fromClass = (sym.classfile == null && sym.sourcefile == null) ||
(sym.classfile != null && sym.classfile.getKind() == JavaFileObject.Kind.CLASS);
@@ -367,6 +369,10 @@
p.put("shape", "ellipse");
return p;
}
+
+ public ClassSymbol getClassSymbol() {
+ return sym;
+ }
}
/**
@@ -437,23 +443,23 @@
@Override
public void close() throws IOException {
+ if (!dependenciesModes.contains(DependenciesMode.REDUNDANT)) {
+ //prune spurious edges
+ new PruneVisitor().visit(dependencyNodeMap.values(), null);
+ }
+ if (!dependenciesModes.contains(DependenciesMode.CLASS)) {
+ //filter class completions
+ new FilterVisitor(CompletionNode.Kind.SOURCE).visit(dependencyNodeMap.values(), null);
+ }
+ if (!dependenciesModes.contains(DependenciesMode.SOURCE)) {
+ //filter source completions
+ new FilterVisitor(CompletionNode.Kind.CLASS).visit(dependencyNodeMap.values(), null);
+ }
+ if (dependenciesModes.contains(DependenciesMode.SIDE_EFFECTS)) {
+ //add side-effects edges
+ new SideEffectVisitor().visit(dependencyNodeMap.values(), null);
+ }
if (dependenciesFile != null) {
- if (!dependenciesModes.contains(DependenciesMode.REDUNDANT)) {
- //prune spurious edges
- new PruneVisitor().visit(dependencyNodeMap.values(), null);
- }
- if (!dependenciesModes.contains(DependenciesMode.CLASS)) {
- //filter class completions
- new FilterVisitor(CompletionNode.Kind.SOURCE).visit(dependencyNodeMap.values(), null);
- }
- if (!dependenciesModes.contains(DependenciesMode.SOURCE)) {
- //filter source completions
- new FilterVisitor(CompletionNode.Kind.CLASS).visit(dependencyNodeMap.values(), null);
- }
- if (dependenciesModes.contains(DependenciesMode.SIDE_EFFECTS)) {
- //add side-effects edges
- new SideEffectVisitor().visit(dependencyNodeMap.values(), null);
- }
//write to file
try (FileWriter fw = new FileWriter(dependenciesFile)) {
fw.append(GraphUtils.toDot(dependencyNodeMap.values(), "CompletionDeps", ""));
@@ -473,6 +479,10 @@
return true;
}
+ public Collection<Node> getNodes() {
+ return dependencyNodeMap.values();
+ }
+
/**
* This visitor is used to generate the special side-effect dependencies
* given a graph containing only standard dependencies.
--- a/langtools/test/com/sun/javadoc/5093723/T5093723.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/5093723/T5093723.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,7 @@
* @bug 5093723
* @summary REGRESSION: ClassCastException in SingleIndexWriter
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main T5093723
*/
--- a/langtools/test/com/sun/javadoc/AccessAsciiArt/AccessAsciiArt.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/AccessAsciiArt/AccessAsciiArt.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Add text equivalent of class tree ASCII art for accessibility
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main AccessAsciiArt
*/
--- a/langtools/test/com/sun/javadoc/AccessFrameTitle/AccessFrameTitle.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/AccessFrameTitle/AccessFrameTitle.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Add title attribute to <FRAME> tags for accessibility
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main AccessFrameTitle
*/
--- a/langtools/test/com/sun/javadoc/AccessH1/AccessH1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/AccessH1/AccessH1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Use <H1, <H2>, and <H3> in proper sequence for accessibility
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main AccessH1
*/
--- a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Add ability to skip over nav bar for accessibility
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main AccessSkipNav
*/
--- a/langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/AccessSummary/AccessSummary.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test the tables for summary attribute
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main AccessSummary
*/
--- a/langtools/test/com/sun/javadoc/AuthorDD/AuthorDD.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/AuthorDD/AuthorDD.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Javadoc wrongly inserts </DD> tags when using multiple @author tags
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main AuthorDD
*/
--- a/langtools/test/com/sun/javadoc/DocRootSlash/DocRootSlash.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/DocRootSlash/DocRootSlash.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary stddoclet: {@docRoot} inserts an extra trailing "/"
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main DocRootSlash
*/
--- a/langtools/test/com/sun/javadoc/InheritDocForUserTags/DocTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/InheritDocForUserTags/DocTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Using {@inheritDoc} in simple tag defined via -tag fails
* @author Mike Duigou
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main DocTest
*/
--- a/langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Window title shouldn't change when loading left frames (javascript)
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main JavascriptWinTitle
*/
--- a/langtools/test/com/sun/javadoc/MetaTag/MetaTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/MetaTag/MetaTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* class and member names to improve API search
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main MetaTag
*/
--- a/langtools/test/com/sun/javadoc/PackagesHeader/PackagesHeader.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/PackagesHeader/PackagesHeader.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* (2) -packagesheader, and (3) -header -packagesheader
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main PackagesHeader
*/
--- a/langtools/test/com/sun/javadoc/T6735320/T6735320.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/T6735320/T6735320.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6735320
* @summary javadoc throws exception if serialField value is missing
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main T6735320
*/
--- a/langtools/test/com/sun/javadoc/ValidHtml/ValidHtml.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/ValidHtml/ValidHtml.java Fri May 29 12:49:31 2015 +0200
@@ -30,6 +30,7 @@
* HTML table tags inserted in wrong place in pakcage use page
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main ValidHtml
*/
--- a/langtools/test/com/sun/javadoc/VersionNumber/VersionNumber.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/VersionNumber/VersionNumber.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary com.sun.tools.doclets.standard.Standard contains hard-coded version number
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main VersionNumber
*/
--- a/langtools/test/com/sun/javadoc/WindowTitles/WindowTitles.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/WindowTitles/WindowTitles.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary stddoclet: With frames off, window titles have "()" appended
* @author dkramer
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main WindowTitles
*/
--- a/langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/constantValues/TestConstantValuesDriver.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test the generation of constant-values.html.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestConstantValuesDriver
*/
--- a/langtools/test/com/sun/javadoc/dupThrowsTags/TestDupThrowsTags.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/dupThrowsTags/TestDupThrowsTags.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Determine if duplicate throws tags can be used.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDupThrowsTags
*/
--- a/langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary This test verifys that the -link option handles absolute paths.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestAbsLinkPath
*/
--- a/langtools/test/com/sun/javadoc/testAbstractMethod/TestAbstractMethod.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testAbstractMethod/TestAbstractMethod.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* if the abstract modifier is present explicitly or implicitly.
* @author bpatel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestAbstractMethod
*/
--- a/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Test for valid name attribute in HTML anchors.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestAnchorNames
*/
--- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Fri May 29 12:49:31 2015 +0200
@@ -28,6 +28,7 @@
* element headers
* @author Mahmood Ali
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestAnnotationOptional
*/
--- a/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* extra HR tags.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestAnnotationTypes
*/
--- a/langtools/test/com/sun/javadoc/testBackSlashInLink/TestBackSlashInLink.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testBackSlashInLink/TestBackSlashInLink.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* has a forward slash. It would be wrong to use a back slash.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestBackSlashInLink
*/
--- a/langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testBadPackageFileInJar/TestBadPackageFileInJar.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* when a bad package.html file is in the JAR.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestBadPackageFileInJar
*/
--- a/langtools/test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testBadSourceFile/TestBadSourceFile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* file in the same directory as the file being documented.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestBadSourceFile
*/
--- a/langtools/test/com/sun/javadoc/testBaseClass/TestBaseClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testBaseClass/TestBaseClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Javadoc does not process base class.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build BaseClass
* @build JavadocTester
* @run main TestBaseClass
--- a/langtools/test/com/sun/javadoc/testBreakIterator/TestBreakIterator.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testBreakIterator/TestBreakIterator.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* Wrong Answer: "The class is empty (i.e."
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestBreakIterator
*/
--- a/langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Make sure tool parses CR line separators properly.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestCRLineSeparator
*/
--- a/langtools/test/com/sun/javadoc/testCharset/TestCharset.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testCharset/TestCharset.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* part of the meta tag.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestCharset
*/
--- a/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary This test verifies that class cross references work properly.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @build TestClassCrossReferences
* @run main TestClassCrossReferences
--- a/langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testClassTree/TestClassTree.java Fri May 29 12:49:31 2015 +0200
@@ -30,6 +30,7 @@
* types.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestClassTree
*/
--- a/langtools/test/com/sun/javadoc/testCmndLineClass/TestCmndLineClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testCmndLineClass/TestCmndLineClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* classes.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestCmndLineClass
*/
--- a/langtools/test/com/sun/javadoc/testCompletionFailure/TestCompletionFailure.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testCompletionFailure/TestCompletionFailure.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test to verify javadoc executes without CompletionFailure exception.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestCompletionFailure
*/
--- a/langtools/test/com/sun/javadoc/testConstantValuesPage/TestConstantValuesPage.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testConstantValuesPage/TestConstantValuesPage.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* generated when doclet has nothing to document.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestConstantValuesPage
*/
--- a/langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* <dl></dl>. Check for this in the output.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestConstructorIndent
*/
--- a/langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testConstructors/TestConstructors.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Test for constructor name which should be a non-qualified name.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestConstructors
*/
--- a/langtools/test/com/sun/javadoc/testCustomTag/TestCustomTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testCustomTag/TestCustomTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary Test custom tag. Verify that an unknown tag generates appropriate warnings.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc/com.sun.tools.doclets.internal.toolkit
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit.taglets
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit.util
* @build JavadocTester taglets.CustomTag
* @run main TestCustomTag
*/
--- a/langtools/test/com/sun/javadoc/testDeprecatedDocs/TestDeprecatedDocs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDeprecatedDocs/TestDeprecatedDocs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary <DESC>
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDeprecatedDocs
*/
--- a/langtools/test/com/sun/javadoc/testDocEncoding/TestDocEncoding.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDocEncoding/TestDocEncoding.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
used for stylesheet as well.
* @author jayashree viswanathan
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDocEncoding
*/
--- a/langtools/test/com/sun/javadoc/testDocErrorReporter/TestDocErrorReporter.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDocErrorReporter/TestDocErrorReporter.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* DocErrorReporter.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDocErrorReporter
*/
--- a/langtools/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* Also test that -docfilessubdirs and -excludedocfilessubdir both work.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDocFileDir
*/
--- a/langtools/test/com/sun/javadoc/testDocFiles/TestDocFiles.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDocFiles/TestDocFiles.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8008949
* @summary verify that doc-files get copied
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDocFiles
*/
--- a/langtools/test/com/sun/javadoc/testDocRootInlineTag/TestDocRootInlineTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDocRootInlineTag/TestDocRootInlineTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* Make sure that the docRoot tag works with the -bottom option.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDocRootInlineTag
*/
--- a/langtools/test/com/sun/javadoc/testDocRootLink/TestDocRootLink.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDocRootLink/TestDocRootLink.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary This test verifies the -Xdocrootparent option.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDocRootLink
*/
--- a/langtools/test/com/sun/javadoc/testDupParamWarn/TestDupParamWarn.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testDupParamWarn/TestDupParamWarn.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* warning messages about duplicate param tags.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestDupParamWarn
*/
--- a/langtools/test/com/sun/javadoc/testEmptyClass/TestEmptyClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testEmptyClass/TestEmptyClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* run on a completely empty class (no comments or members).
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestEmptyClass
*/
--- a/langtools/test/com/sun/javadoc/testEnclosingClass/TestEnclosingClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testEnclosingClass/TestEnclosingClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Check the outer class when documenting enclosing class/interface.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestEnclosingClass
*/
--- a/langtools/test/com/sun/javadoc/testEncoding/TestEncoding.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testEncoding/TestEncoding.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* properly passed from Javadoc to the source file parser.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestEncoding
*/
--- a/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* "overrides" documentation even though the method is external.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester TestExternalOverridenMethod
* @run main TestExternalOverridenMethod
*/
--- a/langtools/test/com/sun/javadoc/testGeneratedBy/TestGeneratedBy.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testGeneratedBy/TestGeneratedBy.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8000418 8024288
* @summary Verify that files use a common Generated By string
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestGeneratedBy
*/
--- a/langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* to be printed.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestGroupOption
*/
--- a/langtools/test/com/sun/javadoc/testHeadings/TestHeadings.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHeadings/TestHeadings.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Make sure that headings use the TH tag instead of the TD tag.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @build TestHeadings
* @run main TestHeadings
--- a/langtools/test/com/sun/javadoc/testHelpFile/TestHelpFile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHelpFile/TestHelpFile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Make sure that the help file is generated correctly.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHelpFile
*/
--- a/langtools/test/com/sun/javadoc/testHelpOption/TestHelpOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHelpOption/TestHelpOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* the help link appears in the documentation.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester TestHelpOption
* @run main TestHelpOption
*/
--- a/langtools/test/com/sun/javadoc/testHiddenMembers/TestHiddenMembers.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHiddenMembers/TestHiddenMembers.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* documented as inherited.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHiddenMembers
*/
--- a/langtools/test/com/sun/javadoc/testHref/TestHref.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHref/TestHref.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Verify that spaces do not appear in hrefs and anchors.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHref
*/
--- a/langtools/test/com/sun/javadoc/testHrefInDocComment/TestHrefInDocComment.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHrefInDocComment/TestHrefInDocComment.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* appear in doc comments.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHrefInDocComment
*/
--- a/langtools/test/com/sun/javadoc/testHtmlComments/TestHtmlComments.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlComments/TestHtmlComments.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* are no fields to document.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlComments
*/
--- a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @summary This test verifies the nesting of definition list tags.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlDefinitionListTag
*/
--- a/langtools/test/com/sun/javadoc/testHtmlDocument/TestHtmlDocument.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlDocument/TestHtmlDocument.java Fri May 29 12:49:31 2015 +0200
@@ -28,6 +28,8 @@
* @bug 6851834
* @summary This test verifies the HTML document generation for javadoc output.
* @library ../lib
+ * @modules jdk.javadoc/com.sun.tools.doclets.formats.html.markup
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit
* @build JavadocTester
* @author Bhavesh Patel
* @run main TestHtmlDocument
--- a/langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @summary This test verifies the use of <strong> HTML tag instead of <B> by Javadoc std doclet.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlStrongTag
*/
--- a/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Test styles on HTML tables generated by javadoc.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlTableStyles
*/
--- a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary HTML tables should have table summary, caption and table headers.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlTableTags
*/
--- a/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @summary This test verifies the use of lang attribute by <HTML>.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlTag
*/
--- a/langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlVersion/TestHtmlVersion.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Test the version of HTML generated by the javadoc tool.
* @author bpatel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestHtmlVersion
*/
--- a/langtools/test/com/sun/javadoc/testIndentation/TestIndentation.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testIndentation/TestIndentation.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8011288
* @summary Erratic/inconsistent indentation of signatures
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestIndentation
*/
--- a/langtools/test/com/sun/javadoc/testIndex/TestIndex.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testIndex/TestIndex.java Fri May 29 12:49:31 2015 +0200
@@ -29,6 +29,7 @@
* Test for unnamed package in index.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestIndex
*/
--- a/langtools/test/com/sun/javadoc/testInlineLinkLabel/TestInlineLinkLabel.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testInlineLinkLabel/TestInlineLinkLabel.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test to make sure label is used for inline links.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestInlineLinkLabel
*/
--- a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* implementing classes in the documentation for I.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestInterface
*/
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Test of the JavaFX doclet features.
* @author jvalenta
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestJavaFX
*/
--- a/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Verify that the output has the right javascript.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestJavascript
*/
--- a/langtools/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* javadoc.
* @author bpatel
* @library ../lib/
+ * @modules jdk.javadoc
* @build JavadocTester TestLambdaFeature
* @run main TestLambdaFeature
*/
--- a/langtools/test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* spaces stripped
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main LeadingSpaces
*/
--- a/langtools/test/com/sun/javadoc/testLegacyTaglet/TestLegacyTaglet.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLegacyTaglet/TestLegacyTaglet.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* doclet still works with Taglets that implement the 1.4.0 interface.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester ToDoTaglet UnderlineTaglet Check
* @run main TestLegacyTaglet
*/
--- a/langtools/test/com/sun/javadoc/testLinkOption/TestBadLinkOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkOption/TestBadLinkOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Make sure that bad -link arguments trigger warnings.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestBadLinkOption
*/
--- a/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* right files, and URLs with and without trailing slash are accepted.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestLinkOption
*/
--- a/langtools/test/com/sun/javadoc/testLinkOption/TestNewLineInLink.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkOption/TestNewLineInLink.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* link and label.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestNewLineInLink
*/
--- a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* non-qualified name, furthermore, ensure the right one is linked.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestLinkTaglet
*/
--- a/langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkToSerialForm/TestLinkToSerialForm.java Fri May 29 12:49:31 2015 +0200
@@ -28,6 +28,7 @@
* from a serializable class to serialized-form.html.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestLinkToSerialForm
*/
--- a/langtools/test/com/sun/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8002387 8014636
* @summary Improve rendered HTML formatting for {@code}
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestLiteralCodeInPre
*/
--- a/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Verify that inheritence labels are correct.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestMemberInheritence
*/
--- a/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Fri May 29 12:49:31 2015 +0200
@@ -29,6 +29,7 @@
* documentation is inherited but the return type isn't.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestMemberSummary
*/
--- a/langtools/test/com/sun/javadoc/testMethodTypes/TestMethodTypes.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testMethodTypes/TestMethodTypes.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test for various method types in the method summary table
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestMethodTypes
*/
--- a/langtools/test/com/sun/javadoc/testModifier/TestModifier.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testModifier/TestModifier.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Javadoc declares interfaces to be "abstract".
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build ModifierAbstract
* @build JavadocTester
* @run main TestModifier
--- a/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java Fri May 29 12:49:31 2015 +0200
@@ -28,6 +28,7 @@
* Make sure the navagation is 2 columns, not 3.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestNavigation
*/
--- a/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test HTML output for nested generic types.
* @author bpatel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestNestedGenerics
*/
--- a/langtools/test/com/sun/javadoc/testNestedInlineTag/TestNestedInlineTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testNestedInlineTag/TestNestedInlineTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @summary Test for nested inline tags. *
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc/com.sun.tools.doclets.internal.toolkit
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit.taglets
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit.util
* @build JavadocTester
* @build testtaglets.UnderlineTaglet
* @build testtaglets.BoldTaglet
--- a/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* language features are properly documented.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestNewLanguageFeatures
*/
--- a/langtools/test/com/sun/javadoc/testNoPackagesFile/TestNoPackagesFile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testNoPackagesFile/TestNoPackagesFile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* longer used.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestNoPackagesFile
*/
--- a/langtools/test/com/sun/javadoc/testNotifications/TestNotifications.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testNotifications/TestNotifications.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* Make sure classname is not include in javadoc usage message.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestNotifications
*/
--- a/langtools/test/com/sun/javadoc/testOptions/TestOptions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOptions/TestOptions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test the output for -header and -footer options.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestOptions
*/
--- a/langtools/test/com/sun/javadoc/testOrdering/TestOrdering.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOrdering/TestOrdering.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary test to determine if members are ordered correctly
* @author ksrini
* @library ../lib/
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestOrdering
*/
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestMultiInheritence.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestMultiInheritence.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* interfaces are documented
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestMultiInheritence
*/
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* class
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestOverridenMethodDocCopy
*/
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* -protected (default) visibility flag is used.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestOverridenPrivateMethods
*/
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* -protected (default) visibility flag is used.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestOverridenPrivateMethodsWithPackageFlag
*/
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* -protected (default) visibility flag is used.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestOverridenPrivateMethodsWithPrivateFlag
*/
--- a/langtools/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test package deprecation.
* @author bpatel
* @library ../lib/
+ * @modules jdk.javadoc
* @build JavadocTester TestPackageDeprecation
* @run main TestPackageDeprecation
*/
--- a/langtools/test/com/sun/javadoc/testPackagePage/TestPackagePage.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testPackagePage/TestPackagePage.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* when single or multiple packages are documented.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestPackagePage
*/
--- a/langtools/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* Make sure inheritDoc cannot be used in an invalid param tag.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestParamTaglet
*/
--- a/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
* signature is displayed correctly without extra space at the beginning.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestPrivateClasses
*/
--- a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Test javadoc support for profiles.
* @author Bhavesh Patel, Evgeniya Stepanova
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestProfiles
*/
--- a/langtools/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test javadoc options support for profiles.
* @author Evgeniya Stepanova
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestProfilesConfiguration
*/
--- a/langtools/test/com/sun/javadoc/testRecurseSubPackages/TestRecurseSubPackages.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testRecurseSubPackages/TestRecurseSubPackages.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Make Javadoc capable of traversing/recursing all of given subpackages.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestRecurseSubPackages
*/
--- a/langtools/test/com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* output so that they are not broken.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestRelativeLinks
*/
--- a/langtools/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test repeated annotations output.
* @author bpatel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestRepeatedAnnotations
*/
--- a/langtools/test/com/sun/javadoc/testReturnTag/TestReturnTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testReturnTag/TestReturnTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Warn when a return tag is used on a method without a return type.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestReturnTag
*/
--- a/langtools/test/com/sun/javadoc/testSeeTag/TestSeeTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSeeTag/TestSeeTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Javadoc is confused by at-link to imported classes outside of the set of generated packages
* @author jjg
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSeeTag
*/
--- a/langtools/test/com/sun/javadoc/testSerialVersionUID/TestSerialVersionUID.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSerialVersionUID/TestSerialVersionUID.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* documented in the serialized form.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSerialVersionUID
*/
--- a/langtools/test/com/sun/javadoc/testSerializedForm/TestSerializedForm.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSerializedForm/TestSerializedForm.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
* Make sure see tags work in serialized form.
* @author jamieh
* @library ../lib/
+ * @modules jdk.javadoc
* @build JavadocTester
* @build TestSerializedForm
* @run main TestSerializedForm
--- a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @summary This test verifies deprecation info in serialized-form.html.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSerializedFormDeprecationInfo
*/
--- a/langtools/test/com/sun/javadoc/testSimpleTag/TestSimpleTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSimpleTag/TestSimpleTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* considered a separator when parsing the simple tag argument.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSimpleTag
*/
--- a/langtools/test/com/sun/javadoc/testSimpleTagExclude/TestSimpleTagExclude.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSimpleTagExclude/TestSimpleTagExclude.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* exclude a simple tag by using -tag tagname:X
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSimpleTagExclude
*/
--- a/langtools/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8008768 8026567
* @summary Using {@inheritDoc} in simple tag defined via -tag fails
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSimpleTagInherit
*/
--- a/langtools/test/com/sun/javadoc/testSinceTag/TestSinceTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSinceTag/TestSinceTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test to make sure that the since tag works correctly
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSinceTag
*/
--- a/langtools/test/com/sun/javadoc/testSingleQuotedLink/TestSingleQuotedLink.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSingleQuotedLink/TestSingleQuotedLink.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify that a link in single quotes copied to the class-use page as is.
* @author Yuri Nesterenko
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSingleQuotedLink
*/
--- a/langtools/test/com/sun/javadoc/testSourceTab/TestSourceTab.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSourceTab/TestSourceTab.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* when -linksourcetab is used.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSourceTab
*/
--- a/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testStylesheet/TestStylesheet.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary Run tests on doclet stylesheet.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestStylesheet
*/
--- a/langtools/test/com/sun/javadoc/testSubTitle/TestSubTitle.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSubTitle/TestSubTitle.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test for correct sub title generation.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSubTitle
*/
--- a/langtools/test/com/sun/javadoc/testSummaryHeading/TestSummaryHeading.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSummaryHeading/TestSummaryHeading.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* inherits methods.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSummaryHeading
*/
--- a/langtools/test/com/sun/javadoc/testSuperclassInSerialForm/TestSuperClassInSerialForm.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSuperclassInSerialForm/TestSuperClassInSerialForm.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* each class in serialized form page.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSuperClassInSerialForm
*/
--- a/langtools/test/com/sun/javadoc/testSupplementary/TestSupplementary.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testSupplementary/TestSupplementary.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* characters correctly. This test case needs to be run in en_US locale.
* @author Naoto Sato
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestSupplementary
*/
--- a/langtools/test/com/sun/javadoc/testTagHolderMethod/TestTagHolderMethod.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTagHolderMethod/TestTagHolderMethod.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Determine if the new Tag.holder() method works properly.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @build TestTagHolderMethod
* @run main TestTagHolderMethod
--- a/langtools/test/com/sun/javadoc/testTagInheritence/TestTagInheritence.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTagInheritence/TestTagInheritence.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary <DESC>
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestTagInheritence
*/
--- a/langtools/test/com/sun/javadoc/testTagMisuse/TestTagMisuse.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTagMisuse/TestTagMisuse.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @summary Determine if proper warning messages are printed when know.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @build TestTagMisuse
* @run main TestTagMisuse
--- a/langtools/test/com/sun/javadoc/testTagOutput/TestTagOutput.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTagOutput/TestTagOutput.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @summary This test checks the generated tag output.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestTagOutput
*/
--- a/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,9 @@
* sure that only the first sentence shows up in the summary table.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc/com.sun.tools.doclets.internal.toolkit
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit.taglets
+ * jdk.javadoc/com.sun.tools.doclets.internal.toolkit.util
* @build JavadocTester taglets.Foo
* @run main TestTaglets
*/
--- a/langtools/test/com/sun/javadoc/testThrowsHead/TestThrowsHead.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testThrowsHead/TestThrowsHead.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* throws section. Make sure that the link is below a Throws heading.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestThrowsHead
*/
--- a/langtools/test/com/sun/javadoc/testThrowsInheritence/TestThrowsTagInheritence.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testThrowsInheritence/TestThrowsTagInheritence.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* the case where the name of one exception is not fully qualified.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestThrowsTagInheritence
*/
--- a/langtools/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* correct order.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestThrowsTag
*/
--- a/langtools/test/com/sun/javadoc/testTitleInHref/TestTitleInHref.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTitleInHref/TestTitleInHref.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test to make sure that the title attribute shows up in links.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestTitleInHref
*/
--- a/langtools/test/com/sun/javadoc/testTopOption/TestTopOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTopOption/TestTopOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test the new -top option.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestTopOption
*/
--- a/langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Make sure that type annotations are displayed correctly
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @ignore 8006735 output type annotations in javadoc
* @build JavadocTester
* @run main TestTypeAnnotations
--- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Fri May 29 12:49:31 2015 +0200
@@ -31,6 +31,7 @@
* parameter links in the class/annotation signature section when -linksource is set.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestTypeParameters
*/
--- a/langtools/test/com/sun/javadoc/testUnnamedPackage/TestUnnamedPackage.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testUnnamedPackage/TestUnnamedPackage.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Generate a package summary for the unnamed package.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestUnnamedPackage
*/
--- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @summary A simple test to ensure class-use files are correct.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestUseOption
*/
--- a/langtools/test/com/sun/javadoc/testValueTag/TestValueTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testValueTag/TestValueTag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* use cases. The explainations for each test case are written below.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestValueTag
*/
--- a/langtools/test/com/sun/javadoc/testWarnBadParamNames/TestWarnBadParamNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testWarnBadParamNames/TestWarnBadParamNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* name is used with param.
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestWarnBadParamNames
*/
--- a/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
* Make sure error message starts with "error -".
* @author jamieh
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestWarnings
*/
--- a/langtools/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test for window title.
* @author Bhavesh Patel
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestWindowTitle
*/
--- a/langtools/test/com/sun/javadoc/testXOption/TestXOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/testXOption/TestXOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8007687
* @summary Make sure that the -X option works properly.
* @library ../lib
+ * @modules jdk.javadoc
* @build JavadocTester
* @run main TestXOption
*/
--- a/langtools/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
*
* @author Mahmood Ali <mali>
* @library ../../lib
+ * @modules jdk.javadoc
* @ignore
* @build JavadocTester
* @run main TestSmoke
--- a/langtools/test/tools/all/RunCodingRules.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/all/RunCodingRules.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8043643
* @summary Run the langtools coding rules over the langtools source code.
+ * @modules java.base/sun.reflect.annotation
+ * java.logging
+ * java.xml
+ * jdk.compiler/com.sun.tools.javac.resources
*/
--- a/langtools/test/tools/doclint/AccessTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref AccessTest.protected.out AccessTest.java
* @run main DocLintTester -Xmsgs -ref AccessTest.private.out AccessTest.java
--- a/langtools/test/tools/doclint/AccessTest.package.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessTest.package.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-AccessTest.java:23: error: malformed HTML
+AccessTest.java:24: error: malformed HTML
* public a < b
^
-AccessTest.java:28: error: malformed HTML
+AccessTest.java:29: error: malformed HTML
* protected a < b
^
-AccessTest.java:33: error: malformed HTML
+AccessTest.java:34: error: malformed HTML
* package-private a < b
^
-AccessTest.java:46: error: malformed HTML
+AccessTest.java:47: error: malformed HTML
* public a < b
^
-AccessTest.java:51: error: malformed HTML
+AccessTest.java:52: error: malformed HTML
* protected a < b
^
-AccessTest.java:56: error: malformed HTML
+AccessTest.java:57: error: malformed HTML
* package-private a < b
^
6 errors
--- a/langtools/test/tools/doclint/AccessTest.private.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessTest.private.out Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,25 @@
-AccessTest.java:23: error: malformed HTML
+AccessTest.java:24: error: malformed HTML
* public a < b
^
-AccessTest.java:28: error: malformed HTML
+AccessTest.java:29: error: malformed HTML
* protected a < b
^
-AccessTest.java:33: error: malformed HTML
+AccessTest.java:34: error: malformed HTML
* package-private a < b
^
-AccessTest.java:38: error: malformed HTML
+AccessTest.java:39: error: malformed HTML
* private a < b
^
-AccessTest.java:46: error: malformed HTML
+AccessTest.java:47: error: malformed HTML
* public a < b
^
-AccessTest.java:51: error: malformed HTML
+AccessTest.java:52: error: malformed HTML
* protected a < b
^
-AccessTest.java:56: error: malformed HTML
+AccessTest.java:57: error: malformed HTML
* package-private a < b
^
-AccessTest.java:61: error: malformed HTML
+AccessTest.java:62: error: malformed HTML
* private a < b
^
8 errors
--- a/langtools/test/tools/doclint/AccessTest.protected.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessTest.protected.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-AccessTest.java:23: error: malformed HTML
+AccessTest.java:24: error: malformed HTML
* public a < b
^
-AccessTest.java:28: error: malformed HTML
+AccessTest.java:29: error: malformed HTML
* protected a < b
^
2 errors
--- a/langtools/test/tools/doclint/AccessTest.public.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessTest.public.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-AccessTest.java:23: error: malformed HTML
+AccessTest.java:24: error: malformed HTML
* public a < b
^
1 error
--- a/langtools/test/tools/doclint/AccessibilityTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessibilityTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-accessibility AccessibilityTest.java
* @run main DocLintTester -ref AccessibilityTest.out AccessibilityTest.java
--- a/langtools/test/tools/doclint/AccessibilityTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AccessibilityTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,13 +1,13 @@
-AccessibilityTest.java:14: error: header used out of sequence: <H2>
+AccessibilityTest.java:15: error: header used out of sequence: <H2>
* <h2> ... </h2>
^
-AccessibilityTest.java:20: error: header used out of sequence: <H3>
+AccessibilityTest.java:21: error: header used out of sequence: <H3>
* <h3> ... </h3>
^
-AccessibilityTest.java:25: error: no "alt" attribute for image
+AccessibilityTest.java:26: error: no "alt" attribute for image
* <img src="x.jpg">
^
-AccessibilityTest.java:40: error: no summary or caption for table
+AccessibilityTest.java:41: error: no summary or caption for table
* <table><tr><th>head<tr><td>data</table>
^
4 errors
--- a/langtools/test/tools/doclint/AnchorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AnchorTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref AnchorTest.out AnchorTest.java
*/
--- a/langtools/test/tools/doclint/AnchorTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AnchorTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,49 +1,49 @@
-AnchorTest.java:19: error: anchor already defined: "foo"
+AnchorTest.java:20: error: anchor already defined: "foo"
* <a name=foo></a>
^
-AnchorTest.java:24: error: invalid name for anchor: ""
+AnchorTest.java:25: error: invalid name for anchor: ""
* <a name=></a>
^
-AnchorTest.java:29: error: invalid name for anchor: "123"
+AnchorTest.java:30: error: invalid name for anchor: "123"
* <a name=123 ></a>
^
-AnchorTest.java:34: error: no value given for anchor
+AnchorTest.java:35: error: no value given for anchor
* <a name ></a>
^
-AnchorTest.java:46: error: anchor already defined: "foo"
+AnchorTest.java:47: error: anchor already defined: "foo"
* <a id=foo></a>
^
-AnchorTest.java:51: error: invalid name for anchor: ""
+AnchorTest.java:52: error: invalid name for anchor: ""
* <a id=></a>
^
-AnchorTest.java:51: error: anchor already defined: ""
+AnchorTest.java:52: error: anchor already defined: ""
* <a id=></a>
^
-AnchorTest.java:56: error: invalid name for anchor: "123"
+AnchorTest.java:57: error: invalid name for anchor: "123"
* <a id=123 ></a>
^
-AnchorTest.java:56: error: anchor already defined: "123"
+AnchorTest.java:57: error: anchor already defined: "123"
* <a id=123 ></a>
^
-AnchorTest.java:61: error: no value given for anchor
+AnchorTest.java:62: error: no value given for anchor
* <a id ></a>
^
-AnchorTest.java:73: error: anchor already defined: "foo"
+AnchorTest.java:74: error: anchor already defined: "foo"
* <p id=foo>text</p>
^
-AnchorTest.java:78: error: invalid name for anchor: ""
+AnchorTest.java:79: error: invalid name for anchor: ""
* <p id=>text</p>
^
-AnchorTest.java:78: error: anchor already defined: ""
+AnchorTest.java:79: error: anchor already defined: ""
* <p id=>text</p>
^
-AnchorTest.java:83: error: invalid name for anchor: "123"
+AnchorTest.java:84: error: invalid name for anchor: "123"
* <p id=123 >text</p>
^
-AnchorTest.java:83: error: anchor already defined: "123"
+AnchorTest.java:84: error: anchor already defined: "123"
* <p id=123 >text</p>
^
-AnchorTest.java:88: error: no value given for anchor
+AnchorTest.java:89: error: no value given for anchor
* <p id >text</p>
^
16 errors
--- a/langtools/test/tools/doclint/AnchorTest2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AnchorTest2.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8020313
* @summary doclint doesn't reset HTML anchors correctly
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref AnchorTest2.out AnchorTest2.java AnchorTest2a.java
* @run main DocLintTester -ref AnchorTest2.out AnchorTest2a.java AnchorTest2.java
--- a/langtools/test/tools/doclint/AnchorTest2.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/AnchorTest2.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-AnchorTest2.java:15: error: anchor already defined: "AnchorTest2"
+AnchorTest2.java:16: error: anchor already defined: "AnchorTest2"
/** <a name="AnchorTest2"> </a> */
^
1 error
--- a/langtools/test/tools/doclint/BadPackageCommentTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/BadPackageCommentTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8020278
* @summary NPE in javadoc (bad handling of bad tag in package-info.java)
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref BadPackageCommentTest.out BadPackageCommentTest.java
*/
--- a/langtools/test/tools/doclint/BadPackageCommentTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/BadPackageCommentTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,13 +1,13 @@
-BadPackageCommentTest.java:13: warning: documentation comment not expected here
+BadPackageCommentTest.java:14: warning: documentation comment not expected here
package p;
^
-BadPackageCommentTest.java:11: error: no tag name after @
+BadPackageCommentTest.java:12: error: no tag name after @
* @@@
^
-BadPackageCommentTest.java:11: error: no tag name after @
+BadPackageCommentTest.java:12: error: no tag name after @
* @@@
^
-BadPackageCommentTest.java:11: error: no tag name after @
+BadPackageCommentTest.java:12: error: no tag name after @
* @@@
^
3 errors
--- a/langtools/test/tools/doclint/CoverageExtras.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/CoverageExtras.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006263
* @summary Supplementary test cases needed for doclint
+ * @modules jdk.compiler/com.sun.tools.doclint
*/
import com.sun.tools.doclint.Checker;
--- a/langtools/test/tools/doclint/CustomTagTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/CustomTagTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8006248 8028318
* @summary DocLint should report unknown tags
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester CustomTagTest.java
* @run main DocLintTester -XcustomTags: -ref CustomTagTest.out CustomTagTest.java
--- a/langtools/test/tools/doclint/CustomTagTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/CustomTagTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,10 +1,10 @@
-CustomTagTest.java:14: error: unknown tag: customTag
+CustomTagTest.java:15: error: unknown tag: customTag
* @customTag Text for a custom tag.
^
-CustomTagTest.java:15: error: unknown tag: custom.tag
+CustomTagTest.java:16: error: unknown tag: custom.tag
* @custom.tag Text for another custom tag.
^
-CustomTagTest.java:16: error: unknown tag: unknownTag
+CustomTagTest.java:17: error: unknown tag: unknownTag
* @unknownTag Text for an unknown tag.
^
3 errors
--- a/langtools/test/tools/doclint/CustomTagTestWithOption.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/CustomTagTestWithOption.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-CustomTagTest.java:16: error: unknown tag: unknownTag
+CustomTagTest.java:17: error: unknown tag: unknownTag
* @unknownTag Text for an unknown tag.
^
1 error
--- a/langtools/test/tools/doclint/EmptyAuthorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyAuthorTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptyAuthorTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptyAuthorTest.out EmptyAuthorTest.java
--- a/langtools/test/tools/doclint/EmptyAuthorTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyAuthorTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptyAuthorTest.java:10: warning: no description for @author
+EmptyAuthorTest.java:11: warning: no description for @author
/** @author */
^
1 warning
--- a/langtools/test/tools/doclint/EmptyExceptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyExceptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptyExceptionTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptyExceptionTest.out EmptyExceptionTest.java
--- a/langtools/test/tools/doclint/EmptyExceptionTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyExceptionTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptyExceptionTest.java:12: warning: no description for @exception
+EmptyExceptionTest.java:13: warning: no description for @exception
/** @exception NullPointerException */
^
1 warning
--- a/langtools/test/tools/doclint/EmptyParamTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyParamTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptyParamTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptyParamTest.out EmptyParamTest.java
--- a/langtools/test/tools/doclint/EmptyParamTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyParamTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptyParamTest.java:12: warning: no description for @param
+EmptyParamTest.java:13: warning: no description for @param
/** @param i */
^
1 warning
--- a/langtools/test/tools/doclint/EmptyPreTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyPreTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8010317
* @summary DocLint incorrectly reports some <pre> tags as empty
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:html EmptyPreTest.java
*/
--- a/langtools/test/tools/doclint/EmptyReturnTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyReturnTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptyReturnTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptyReturnTest.out EmptyReturnTest.java
--- a/langtools/test/tools/doclint/EmptyReturnTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyReturnTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptyReturnTest.java:12: warning: no description for @return
+EmptyReturnTest.java:13: warning: no description for @return
/** @return */
^
1 warning
--- a/langtools/test/tools/doclint/EmptySerialDataTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptySerialDataTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptySerialDataTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptySerialDataTest.out EmptySerialDataTest.java
--- a/langtools/test/tools/doclint/EmptySerialDataTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptySerialDataTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptySerialDataTest.java:15: warning: no description for @serialData
+EmptySerialDataTest.java:16: warning: no description for @serialData
/** @serialData */
^
1 warning
--- a/langtools/test/tools/doclint/EmptySerialFieldTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptySerialFieldTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptySerialFieldTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptySerialFieldTest.out EmptySerialFieldTest.java
--- a/langtools/test/tools/doclint/EmptySerialFieldTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptySerialFieldTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptySerialFieldTest.java:17: warning: no description for @serialField
+EmptySerialFieldTest.java:18: warning: no description for @serialField
* @serialField empty String
^
1 warning
--- a/langtools/test/tools/doclint/EmptySinceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptySinceTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptySinceTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptySinceTest.out EmptySinceTest.java
--- a/langtools/test/tools/doclint/EmptySinceTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptySinceTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptySinceTest.java:12: warning: no description for @since
+EmptySinceTest.java:13: warning: no description for @since
/** @since */
^
1 warning
--- a/langtools/test/tools/doclint/EmptyVersionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyVersionTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax EmptyVersionTest.java
* @run main DocLintTester -Xmsgs:syntax -ref EmptyVersionTest.out EmptyVersionTest.java
--- a/langtools/test/tools/doclint/EmptyVersionTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EmptyVersionTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-EmptyVersionTest.java:12: warning: no description for @version
+EmptyVersionTest.java:13: warning: no description for @version
/** @version */
^
1 warning
--- a/langtools/test/tools/doclint/EndTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EndTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8006236
* @summary doclint: structural issue hidden
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-html EndTagsTest.java
* @run main DocLintTester -ref EndTagsTest.out EndTagsTest.java
--- a/langtools/test/tools/doclint/EndTagsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EndTagsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,25 @@
-EndTagsTest.java:18: error: unexpected end tag: </a>
+EndTagsTest.java:19: error: unexpected end tag: </a>
/** </a> */
^
-EndTagsTest.java:21: error: unexpected end tag: </a>
+EndTagsTest.java:22: error: unexpected end tag: </a>
/** <p> </a> */
^
-EndTagsTest.java:24: error: unexpected end tag: </a>
+EndTagsTest.java:25: error: unexpected end tag: </a>
/** <p> text </p> </a> */
^
-EndTagsTest.java:27: error: invalid end tag: </img>
+EndTagsTest.java:28: error: invalid end tag: </img>
/** <img alt="image" src="image.png"> </img> */
^
-EndTagsTest.java:30: error: unknown tag: invalid
+EndTagsTest.java:31: error: unknown tag: invalid
/** <invalid> </invalid> */
^
-EndTagsTest.java:30: error: unknown tag: invalid
+EndTagsTest.java:31: error: unknown tag: invalid
/** <invalid> </invalid> */
^
-EndTagsTest.java:33: error: unknown tag: invalid
+EndTagsTest.java:34: error: unknown tag: invalid
/** <invalid> */
^
-EndTagsTest.java:36: error: unknown tag: invalid
+EndTagsTest.java:37: error: unknown tag: invalid
/** </invalid> */
^
8 errors
--- a/langtools/test/tools/doclint/EndWithIdentifierTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EndWithIdentifierTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8007096
* @summary DocLint parsing problems with some comments
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-html EndWithIdentifierTest.java
* @run main DocLintTester -Xmsgs -ref EndWithIdentifierTest.out EndWithIdentifierTest.java
--- a/langtools/test/tools/doclint/EndWithIdentifierTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/EndWithIdentifierTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-EndWithIdentifierTest.java:14: error: syntax error in reference
+EndWithIdentifierTest.java:15: error: syntax error in reference
/**{@link*/
^
-EndWithIdentifierTest.java:17: error: reference not found
+EndWithIdentifierTest.java:18: error: reference not found
/**@see List*/
^
-EndWithIdentifierTest.java:20: error: semicolon missing
+EndWithIdentifierTest.java:21: error: semicolon missing
/**&*/
^
-EndWithIdentifierTest.java:23: error: malformed HTML
+EndWithIdentifierTest.java:24: error: malformed HTML
/**<a*/
^
-EndWithIdentifierTest.java:26: error: malformed HTML
+EndWithIdentifierTest.java:27: error: malformed HTML
/**</a*/
^
-EndWithIdentifierTest.java:29: error: malformed HTML
+EndWithIdentifierTest.java:30: error: malformed HTML
/**<a name*/
^
6 errors
--- a/langtools/test/tools/doclint/HtmlAttrsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/HtmlAttrsTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-html HtmlAttrsTest.java
* @run main DocLintTester -ref HtmlAttrsTest.out HtmlAttrsTest.java
--- a/langtools/test/tools/doclint/HtmlAttrsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/HtmlAttrsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,10 +1,10 @@
-HtmlAttrsTest.java:13: error: unknown attribute: xyz
+HtmlAttrsTest.java:14: error: unknown attribute: xyz
* <p xyz> text </p>
^
-HtmlAttrsTest.java:18: warning: attribute obsolete: name
+HtmlAttrsTest.java:19: warning: attribute obsolete: name
* <img name="x" alt="alt">
^
-HtmlAttrsTest.java:23: warning: attribute obsolete, use CSS instead: size
+HtmlAttrsTest.java:24: warning: attribute obsolete, use CSS instead: size
* <font size="3"> text </font>
^
1 error
--- a/langtools/test/tools/doclint/HtmlTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/HtmlTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-html HtmlTagsTest.java
* @run main DocLintTester -ref HtmlTagsTest.out HtmlTagsTest.java
--- a/langtools/test/tools/doclint/HtmlTagsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/HtmlTagsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,47 +1,47 @@
-HtmlTagsTest.java:13: error: unknown tag: xyz
+HtmlTagsTest.java:14: error: unknown tag: xyz
* <xyz> ... </xyz>
^
-HtmlTagsTest.java:13: error: unknown tag: xyz
+HtmlTagsTest.java:14: error: unknown tag: xyz
* <xyz> ... </xyz>
^
-HtmlTagsTest.java:18: error: unknown tag: xyz
+HtmlTagsTest.java:19: error: unknown tag: xyz
* <div> <xyz> </div>
^
-HtmlTagsTest.java:23: error: self-closing element not allowed
+HtmlTagsTest.java:24: error: self-closing element not allowed
* <br/>
^
-HtmlTagsTest.java:28: error: element not allowed in documentation comments: <html>
- * <html>
- ^
-HtmlTagsTest.java:28: error: element not closed: html
+HtmlTagsTest.java:29: error: element not allowed in documentation comments: <html>
* <html>
^
-HtmlTagsTest.java:33: error: block element not allowed within inline element <span>: p
+HtmlTagsTest.java:29: error: element not closed: html
+ * <html>
+ ^
+HtmlTagsTest.java:34: error: block element not allowed within inline element <span>: p
* <span> <p> </span>
^
-HtmlTagsTest.java:38: error: block element not allowed within @link: p
- * {@link java.lang.String <p> }
- ^
HtmlTagsTest.java:39: error: block element not allowed within @link: p
* {@link java.lang.String <p> }
^
-HtmlTagsTest.java:44: error: invalid end tag: </img>
+HtmlTagsTest.java:40: error: block element not allowed within @link: p
+ * {@link java.lang.String <p> }
+ ^
+HtmlTagsTest.java:45: error: invalid end tag: </img>
* <img src="any.jpg" alt="alt"> </img>
^
-HtmlTagsTest.java:49: error: end tag missing: </b>
+HtmlTagsTest.java:50: error: end tag missing: </b>
* <i> <b> </i>
^
-HtmlTagsTest.java:54: error: unexpected end tag: </b>
+HtmlTagsTest.java:55: error: unexpected end tag: </b>
* <i> </b> </i>
^
-HtmlTagsTest.java:54: warning: empty <i> tag
+HtmlTagsTest.java:55: warning: empty <i> tag
* <i> </b> </i>
^
-HtmlTagsTest.java:59: error: text not allowed in <ul> element
+HtmlTagsTest.java:60: error: text not allowed in <ul> element
* <ul> text <li> ... </li> </ul>
^
-HtmlTagsTest.java:64: error: tag not allowed here: <b>
+HtmlTagsTest.java:65: error: tag not allowed here: <b>
* <ul> <b>text</b> <li> ... </li> </ul>
^
14 errors
-1 warning
\ No newline at end of file
+1 warning
--- a/langtools/test/tools/doclint/HtmlVersionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/HtmlVersionTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,7 @@
* @bug 8072945
* @summary test HTML version
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -XhtmlVersion:html5 HtmlVersionTest.java
* @run main DocLintTester -XhtmlVersion:html4 HtmlVersionTest.java
--- a/langtools/test/tools/doclint/LiteralTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/LiteralTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8006228
* @summary Doclint doesn't detect <code> {@code nested inline} </code>
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref LiteralTest.out LiteralTest.java
*/
--- a/langtools/test/tools/doclint/LiteralTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/LiteralTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-LiteralTest.java:14: warning: {@code} within <code>
+LiteralTest.java:15: warning: {@code} within <code>
/** <code> abc {@code < & > } def </code> */
^
1 warning
--- a/langtools/test/tools/doclint/MissingCommentTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingCommentTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,6 @@
/*
* @test /nodynamiccopyright/
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-missing MissingCommentTest.java
* @run main DocLintTester -Xmsgs:missing -ref MissingCommentTest.out MissingCommentTest.java
--- a/langtools/test/tools/doclint/MissingCommentTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingCommentTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,13 +1,13 @@
-MissingCommentTest.java:8: warning: no comment
+MissingCommentTest.java:9: warning: no comment
public class MissingCommentTest {
^
-MissingCommentTest.java:9: warning: no comment
+MissingCommentTest.java:10: warning: no comment
MissingCommentTest() { }
^
-MissingCommentTest.java:11: warning: no comment
+MissingCommentTest.java:12: warning: no comment
int missingComment;
^
-MissingCommentTest.java:13: warning: no comment
+MissingCommentTest.java:14: warning: no comment
void missingComment() { }
^
4 warnings
--- a/langtools/test/tools/doclint/MissingParamsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingParamsTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-missing MissingParamsTest.java
* @run main DocLintTester -Xmsgs:missing -ref MissingParamsTest.out MissingParamsTest.java
--- a/langtools/test/tools/doclint/MissingParamsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingParamsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,13 +1,13 @@
-MissingParamsTest.java:13: warning: no @param for param
+MissingParamsTest.java:14: warning: no @param for param
MissingParamsTest(int param) { }
^
-MissingParamsTest.java:16: warning: no @param for <T>
+MissingParamsTest.java:17: warning: no @param for <T>
<T> MissingParamsTest() { }
^
-MissingParamsTest.java:19: warning: no @param for param
+MissingParamsTest.java:20: warning: no @param for param
void missingParam(int param) { }
^
-MissingParamsTest.java:22: warning: no @param for <T>
+MissingParamsTest.java:23: warning: no @param for <T>
<T> void missingTyparam() { }
^
4 warnings
--- a/langtools/test/tools/doclint/MissingReturnTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingReturnTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-missing MissingReturnTest.java
* @run main DocLintTester -Xmsgs:missing -ref MissingReturnTest.out MissingReturnTest.java
--- a/langtools/test/tools/doclint/MissingReturnTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingReturnTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-MissingReturnTest.java:22: warning: no @return
+MissingReturnTest.java:23: warning: no @return
int missingReturn() { }
^
1 warning
--- a/langtools/test/tools/doclint/MissingThrowsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingThrowsTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-missing MissingThrowsTest.java
* @run main DocLintTester -Xmsgs:missing -ref MissingThrowsTest.out MissingThrowsTest.java
--- a/langtools/test/tools/doclint/MissingThrowsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/MissingThrowsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-MissingThrowsTest.java:13: warning: no @throws for java.lang.Exception
+MissingThrowsTest.java:14: warning: no @throws for java.lang.Exception
void missingThrows() throws Exception { }
^
1 warning
--- a/langtools/test/tools/doclint/OptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/OptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
*/
import com.sun.tools.doclint.DocLint;
--- a/langtools/test/tools/doclint/OverridesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/OverridesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:all OverridesTest.java
*/
--- a/langtools/test/tools/doclint/ParaTagTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ParaTagTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8007566
* @summary DocLint too aggressive with not allowed here: <p>
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs ParaTagTest.java
*/
--- a/langtools/test/tools/doclint/ReferenceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ReferenceTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832 8020556 8002154
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-reference ReferenceTest.java
* @run main DocLintTester -ref ReferenceTest.out ReferenceTest.java
--- a/langtools/test/tools/doclint/ReferenceTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ReferenceTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,40 +1,40 @@
-ReferenceTest.java:13: error: invalid use of @param
+ReferenceTest.java:14: error: invalid use of @param
* @param x description
^
-ReferenceTest.java:18: error: invalid use of @param
+ReferenceTest.java:19: error: invalid use of @param
* @param x description
^
-ReferenceTest.java:23: error: @param name not found
+ReferenceTest.java:24: error: @param name not found
* @param x description
^
-ReferenceTest.java:25: warning: no @param for a
+ReferenceTest.java:26: warning: no @param for a
public void param_name_not_found(int a) { }
^
-ReferenceTest.java:28: error: @param name not found
+ReferenceTest.java:29: error: @param name not found
* @param <X> description
^
-ReferenceTest.java:33: error: reference not found
+ReferenceTest.java:34: error: reference not found
* @see Object#tooStrong()
^
-ReferenceTest.java:38: error: invalid use of @return
+ReferenceTest.java:39: error: invalid use of @return
* @return x description
^
-ReferenceTest.java:43: error: invalid use of @return
+ReferenceTest.java:44: error: invalid use of @return
* @return x description
^
-ReferenceTest.java:48: error: exception not thrown: java.lang.Exception
+ReferenceTest.java:49: error: exception not thrown: java.lang.Exception
* @throws Exception description
^
-ReferenceTest.java:59: error: type arguments not allowed here
+ReferenceTest.java:60: error: type arguments not allowed here
* {@link java.util.List<String>}
^
-ReferenceTest.java:60: error: type arguments not allowed here
+ReferenceTest.java:61: error: type arguments not allowed here
* {@link java.util.List<String>#equals}
^
-ReferenceTest.java:61: error: type arguments not allowed here
+ReferenceTest.java:62: error: type arguments not allowed here
* @see java.util.List<String>
^
-ReferenceTest.java:62: error: type arguments not allowed here
+ReferenceTest.java:63: error: type arguments not allowed here
* @see java.util.List<String>#equals
^
12 errors
--- a/langtools/test/tools/doclint/ResourceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ResourceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006615
* @summary move remaining messages into resource bundle
+ * @modules jdk.compiler/com.sun.tools.doclint
*/
import java.io.IOException;
--- a/langtools/test/tools/doclint/RunTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/RunTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @bug 8004832 8000103
* @summary Add new doclint package
* @summary Create doclint utility
+ * @modules jdk.compiler/com.sun.tools.doclint
*/
import java.io.File;
--- a/langtools/test/tools/doclint/SyntaxTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/SyntaxTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-syntax SyntaxTest.java
* @run main DocLintTester -ref SyntaxTest.out SyntaxTest.java
--- a/langtools/test/tools/doclint/SyntaxTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/SyntaxTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-SyntaxTest.java:13: error: malformed HTML
+SyntaxTest.java:14: error: malformed HTML
* a < b
^
1 error
--- a/langtools/test/tools/doclint/SyntheticTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/SyntheticTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004832
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:all SyntheticTest.java
*/
--- a/langtools/test/tools/doclint/UnfinishedInlineTagTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/UnfinishedInlineTagTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8007096
* @summary DocLint parsing problems with some comments
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-html UnfinishedInlineTagTest.java
* @run main DocLintTester -Xmsgs -ref UnfinishedInlineTagTest.out UnfinishedInlineTagTest.java
--- a/langtools/test/tools/doclint/UnfinishedInlineTagTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/UnfinishedInlineTagTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-UnfinishedInlineTagTest.java:14: error: unterminated inline tag
+UnfinishedInlineTagTest.java:15: error: unterminated inline tag
*/
^
1 error
--- a/langtools/test/tools/doclint/ValidTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ValidTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004832 8048806
* @summary Add new doclint package
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester ValidTest.java
*/
--- a/langtools/test/tools/doclint/ValueTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ValueTest.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8025272
* @summary doclint needs to check for valid usage of at-value tag
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref ValueTest.out ValueTest.java
*/
--- a/langtools/test/tools/doclint/ValueTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/ValueTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,22 +1,22 @@
-ValueTest.java:39: error: {@value} not allowed here
+ValueTest.java:40: error: {@value} not allowed here
/** invalid class C: {@value} */
^
-ValueTest.java:42: error: {@value} not allowed here
+ValueTest.java:43: error: {@value} not allowed here
/** invalid enum E: {@value} */
^
-ValueTest.java:44: error: {@value} not allowed here
+ValueTest.java:45: error: {@value} not allowed here
/** invalid enum constant E1: {@value} */
^
-ValueTest.java:48: error: {@value} not allowed here
+ValueTest.java:49: error: {@value} not allowed here
/** invalid field 1: {@value} */
^
-ValueTest.java:51: error: {@value} not allowed here
+ValueTest.java:52: error: {@value} not allowed here
/** invalid field 2: {@value} */
^
-ValueTest.java:62: error: value does not refer to a constant
+ValueTest.java:63: error: value does not refer to a constant
/** invalid method: {@value Object#toString} */
^
-ValueTest.java:65: error: value does not refer to a constant
+ValueTest.java:66: error: value does not refer to a constant
/** invalid enum constant: {@value Thread.State#NEW} */
^
7 errors
--- a/langtools/test/tools/doclint/anchorTests/p/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/anchorTests/p/Test.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @bug 8025246
* @summary doclint is showing error on anchor already defined when it's not
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref Test.out Test.java
* @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java
--- a/langtools/test/tools/doclint/anchorTests/p/Test.javac.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/anchorTests/p/Test.javac.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-Test.java:14:7: compiler.err.proc.messager: anchor already defined: "dupTest"
-Test.java:24:12: compiler.err.proc.messager: anchor already defined: "dupTestField"
-Test.java:27:12: compiler.err.proc.messager: anchor already defined: "dupTestMethod"
-Test.java:32:11: compiler.err.proc.messager: anchor already defined: "dupNested"
-Test.java:40:15: compiler.err.proc.messager: anchor already defined: "dupNestedField"
-Test.java:47:15: compiler.err.proc.messager: anchor already defined: "dupNestedMethod"
+Test.java:15:7: compiler.err.proc.messager: anchor already defined: "dupTest"
+Test.java:25:12: compiler.err.proc.messager: anchor already defined: "dupTestField"
+Test.java:28:12: compiler.err.proc.messager: anchor already defined: "dupTestMethod"
+Test.java:33:11: compiler.err.proc.messager: anchor already defined: "dupNested"
+Test.java:41:15: compiler.err.proc.messager: anchor already defined: "dupNestedField"
+Test.java:48:15: compiler.err.proc.messager: anchor already defined: "dupNestedMethod"
6 errors
--- a/langtools/test/tools/doclint/anchorTests/p/Test.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/anchorTests/p/Test.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-Test.java:14: error: anchor already defined: "dupTest"
+Test.java:15: error: anchor already defined: "dupTest"
* <a name="dupTest">dupTest again</a>
^
-Test.java:24: error: anchor already defined: "dupTestField"
+Test.java:25: error: anchor already defined: "dupTestField"
/** <a name="dupTestField">dupTestField again</a> */
^
-Test.java:27: error: anchor already defined: "dupTestMethod"
+Test.java:28: error: anchor already defined: "dupTestMethod"
/** <a name="dupTestMethod">dupTestMethod again</a> */
^
-Test.java:32: error: anchor already defined: "dupNested"
+Test.java:33: error: anchor already defined: "dupNested"
* <a name="dupNested">dupNested again</a>
^
-Test.java:40: error: anchor already defined: "dupNestedField"
+Test.java:41: error: anchor already defined: "dupNestedField"
* <a name="dupNestedField">dupNestedField</a>
^
-Test.java:47: error: anchor already defined: "dupNestedMethod"
+Test.java:48: error: anchor already defined: "dupNestedMethod"
* <a name="dupNestedMethod">dupNestedMethod</a>
^
6 errors
--- a/langtools/test/tools/doclint/anchorTests/p/package-info.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/anchorTests/p/package-info.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @bug 8025246
* @summary doclint is showing error on anchor already defined when it's not
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref package-info.out package-info.java
* @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java
--- a/langtools/test/tools/doclint/anchorTests/p/package-info.javac.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/anchorTests/p/package-info.javac.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-package-info.java:12:7: compiler.err.proc.messager: anchor already defined: "here"
+package-info.java:13:7: compiler.err.proc.messager: anchor already defined: "here"
1 error
--- a/langtools/test/tools/doclint/anchorTests/p/package-info.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/anchorTests/p/package-info.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-package-info.java:12: error: anchor already defined: "here"
+package-info.java:13: error: anchor already defined: "here"
* <a name=here>here again</a>
^
1 error
--- a/langtools/test/tools/doclint/html/BlockTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/BlockTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8006251
* @summary test block tags
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs BlockTagsTest.java
*/
--- a/langtools/test/tools/doclint/html/EntitiesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/EntitiesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8006263
* @summary Supplementary test cases needed for doclint
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-html EntitiesTest.java
* @run main DocLintTester -Xmsgs:html -ref EntitiesTest.out EntitiesTest.java
--- a/langtools/test/tools/doclint/html/EntitiesTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/EntitiesTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-EntitiesTest.java:300: error: invalid entity &bad;
+EntitiesTest.java:301: error: invalid entity &bad;
* &bad;
^
-EntitiesTest.java:305: error: invalid entity 
+EntitiesTest.java:306: error: invalid entity 
* 
^
-EntitiesTest.java:306: error: invalid entity ࡏ
+EntitiesTest.java:307: error: invalid entity ࡏ
* ࡏ
^
-EntitiesTest.java:311: error: invalid entity ―
+EntitiesTest.java:312: error: invalid entity ―
* ―
^
-EntitiesTest.java:312: error: invalid entity ⌫
+EntitiesTest.java:313: error: invalid entity ⌫
* ⌫
^
-EntitiesTest.java:313: error: invalid entity 
+EntitiesTest.java:314: error: invalid entity 
* 
^
6 errors
--- a/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8072945
* @summary test tags and attributes specific to the output HTML version
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -XhtmlVersion:html5 -ref HtmlVersionTagsAttrsTestHtml5.out HtmlVersionTagsAttrsTest.java
* @run main DocLintTester -XhtmlVersion:html4 -ref HtmlVersionTagsAttrsTestHtml4.out HtmlVersionTagsAttrsTest.java
--- a/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTestHtml4.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTestHtml4.out Fri May 29 12:49:31 2015 +0200
@@ -1,211 +1,211 @@
-HtmlVersionTagsAttrsTest.java:21: warning: attribute obsolete: name
+HtmlVersionTagsAttrsTest.java:22: warning: attribute obsolete: name
* <img name="name_test" alt="alt">
^
-HtmlVersionTagsAttrsTest.java:25: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:26: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:28: warning: attribute obsolete, use CSS instead: align
+HtmlVersionTagsAttrsTest.java:29: warning: attribute obsolete, use CSS instead: align
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: warning: attribute obsolete, use CSS instead: bgcolor
+HtmlVersionTagsAttrsTest.java:29: warning: attribute obsolete, use CSS instead: bgcolor
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:29: warning: attribute obsolete, use CSS instead: align
+HtmlVersionTagsAttrsTest.java:30: warning: attribute obsolete, use CSS instead: align
* <caption align="center">Test table, caption, col, colgroup, tbody,
^
-HtmlVersionTagsAttrsTest.java:36: warning: attribute obsolete, use CSS instead: bgcolor
+HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: bgcolor
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
-HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: bgcolor
+HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: bgcolor
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: height
+HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: height
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: width
+HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: width
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: warning: attribute obsolete, use CSS instead: nowrap
+HtmlVersionTagsAttrsTest.java:38: warning: attribute obsolete, use CSS instead: nowrap
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: bgcolor
+HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: bgcolor
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: height
+HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: height
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: width
+HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: width
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: warning: attribute obsolete, use CSS instead: nowrap
+HtmlVersionTagsAttrsTest.java:50: warning: attribute obsolete, use CSS instead: nowrap
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:54: warning: attribute obsolete, use CSS instead: clear
+HtmlVersionTagsAttrsTest.java:55: warning: attribute obsolete, use CSS instead: clear
* <br clear="left">
^
-HtmlVersionTagsAttrsTest.java:55: warning: attribute obsolete, use CSS instead: compact
+HtmlVersionTagsAttrsTest.java:56: warning: attribute obsolete, use CSS instead: compact
* <ol compact>
^
-HtmlVersionTagsAttrsTest.java:60: warning: attribute obsolete, use CSS instead: type
+HtmlVersionTagsAttrsTest.java:61: warning: attribute obsolete, use CSS instead: type
* <li type="square">Test list</li>
^
-HtmlVersionTagsAttrsTest.java:63: warning: attribute obsolete, use CSS instead: compact
+HtmlVersionTagsAttrsTest.java:64: warning: attribute obsolete, use CSS instead: compact
* <dl compact>
^
-HtmlVersionTagsAttrsTest.java:67: warning: attribute obsolete, use CSS instead: hspace
+HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: hspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
-HtmlVersionTagsAttrsTest.java:67: warning: attribute obsolete, use CSS instead: vspace
+HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: vspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
-HtmlVersionTagsAttrsTest.java:67: warning: attribute obsolete, use CSS instead: border
+HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: border
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
-HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: size
+HtmlVersionTagsAttrsTest.java:69: warning: attribute obsolete, use CSS instead: size
* <hr size="20" noshade>
^
-HtmlVersionTagsAttrsTest.java:68: warning: attribute obsolete, use CSS instead: noshade
+HtmlVersionTagsAttrsTest.java:69: warning: attribute obsolete, use CSS instead: noshade
* <hr size="20" noshade>
^
-HtmlVersionTagsAttrsTest.java:69: warning: attribute obsolete, use CSS instead: width
+HtmlVersionTagsAttrsTest.java:70: warning: attribute obsolete, use CSS instead: width
* <pre width="25">Test Pre</pre>
^
-HtmlVersionTagsAttrsTest.java:73: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:74: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:78: error: attribute not supported in HTML4: reversed
+HtmlVersionTagsAttrsTest.java:79: error: attribute not supported in HTML4: reversed
* <ol reversed="reversed">
^
-HtmlVersionTagsAttrsTest.java:83: error: attribute not supported in HTML4: crossorigin
+HtmlVersionTagsAttrsTest.java:84: error: attribute not supported in HTML4: crossorigin
* <img src="testImg.jpg" alt="imgTest" crossorigin="anonymous">
^
-HtmlVersionTagsAttrsTest.java:84: error: attribute not supported in HTML4: aria-labelledby
+HtmlVersionTagsAttrsTest.java:85: error: attribute not supported in HTML4: aria-labelledby
* <div aria-labelledby="Topics" aria-describedby="t1">
^
-HtmlVersionTagsAttrsTest.java:84: error: attribute not supported in HTML4: aria-describedby
+HtmlVersionTagsAttrsTest.java:85: error: attribute not supported in HTML4: aria-describedby
* <div aria-labelledby="Topics" aria-describedby="t1">
^
-HtmlVersionTagsAttrsTest.java:87: error: attribute not supported in HTML4: aria-label
+HtmlVersionTagsAttrsTest.java:88: error: attribute not supported in HTML4: aria-label
* <p id="t2" aria-label="Label">Label test</p>
^
-HtmlVersionTagsAttrsTest.java:95: warning: attribute obsolete, use CSS instead: size
+HtmlVersionTagsAttrsTest.java:96: warning: attribute obsolete, use CSS instead: size
* <font size="3">Font test</font>
^
-HtmlVersionTagsAttrsTest.java:98: error: tag not supported in the generated HTML version: section
+HtmlVersionTagsAttrsTest.java:99: error: tag not supported in the generated HTML version: section
* <section>
^
-HtmlVersionTagsAttrsTest.java:99: error: unknown tag: hgroup
+HtmlVersionTagsAttrsTest.java:100: error: unknown tag: hgroup
* <hgroup>
^
-HtmlVersionTagsAttrsTest.java:102: error: unknown tag: hgroup
+HtmlVersionTagsAttrsTest.java:103: error: unknown tag: hgroup
* </hgroup>
^
-HtmlVersionTagsAttrsTest.java:105: error: unknown tag: details
+HtmlVersionTagsAttrsTest.java:106: error: unknown tag: details
* <details>
^
-HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary
* <summary>Summary</summary>
^
-HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary
* <summary>Summary</summary>
^
-HtmlVersionTagsAttrsTest.java:108: error: unknown tag: details
+HtmlVersionTagsAttrsTest.java:109: error: unknown tag: details
* </details>
^
-HtmlVersionTagsAttrsTest.java:113: error: tag not supported in the generated HTML version: section
+HtmlVersionTagsAttrsTest.java:114: error: tag not supported in the generated HTML version: section
* <section>
^
-HtmlVersionTagsAttrsTest.java:118: error: tag not supported in the generated HTML version: article
+HtmlVersionTagsAttrsTest.java:119: error: tag not supported in the generated HTML version: article
* <article>
^
-HtmlVersionTagsAttrsTest.java:123: error: tag not supported in the generated HTML version: header
+HtmlVersionTagsAttrsTest.java:124: error: tag not supported in the generated HTML version: header
* <header>
^
-HtmlVersionTagsAttrsTest.java:124: error: tag not supported in the generated HTML version: nav
+HtmlVersionTagsAttrsTest.java:125: error: tag not supported in the generated HTML version: nav
* <nav>Navigation</nav>
^
-HtmlVersionTagsAttrsTest.java:127: error: tag not supported in the generated HTML version: footer
+HtmlVersionTagsAttrsTest.java:128: error: tag not supported in the generated HTML version: footer
* <footer>
^
-HtmlVersionTagsAttrsTest.java:128: error: tag not supported in the generated HTML version: nav
+HtmlVersionTagsAttrsTest.java:129: error: tag not supported in the generated HTML version: nav
* <nav>Navigation</nav>
^
-HtmlVersionTagsAttrsTest.java:131: error: tag not supported in the generated HTML version: main
+HtmlVersionTagsAttrsTest.java:132: error: tag not supported in the generated HTML version: main
* <main>
^
-HtmlVersionTagsAttrsTest.java:134: error: tag not supported in the generated HTML version: aside
+HtmlVersionTagsAttrsTest.java:135: error: tag not supported in the generated HTML version: aside
* <aside>
^
-HtmlVersionTagsAttrsTest.java:139: error: tag not supported in the generated HTML version: bdi
+HtmlVersionTagsAttrsTest.java:140: error: tag not supported in the generated HTML version: bdi
* <li>Testing<bdi>BDI</bdi></li>
^
-HtmlVersionTagsAttrsTest.java:141: error: tag not supported in the generated HTML version: figure
+HtmlVersionTagsAttrsTest.java:142: error: tag not supported in the generated HTML version: figure
* <figure>
^
-HtmlVersionTagsAttrsTest.java:143: error: tag not supported in the generated HTML version: figcaption
+HtmlVersionTagsAttrsTest.java:144: error: tag not supported in the generated HTML version: figcaption
* <figcaption>Fig. 1</figcaption>
^
-HtmlVersionTagsAttrsTest.java:145: error: tag not supported in the generated HTML version: mark
+HtmlVersionTagsAttrsTest.java:146: error: tag not supported in the generated HTML version: mark
* <p><mark>Marked</mark> text test</p>
^
-HtmlVersionTagsAttrsTest.java:146: error: tag not supported in the generated HTML version: nav
+HtmlVersionTagsAttrsTest.java:147: error: tag not supported in the generated HTML version: nav
* <nav>
^
-HtmlVersionTagsAttrsTest.java:152: error: tag not supported in the generated HTML version: template
+HtmlVersionTagsAttrsTest.java:153: error: tag not supported in the generated HTML version: template
* <template id="testTemplate">
^
-HtmlVersionTagsAttrsTest.java:155: error: tag not supported in the generated HTML version: time
+HtmlVersionTagsAttrsTest.java:156: error: tag not supported in the generated HTML version: time
* <p>Test current time is <time>10:00</time> at night</p>
^
-HtmlVersionTagsAttrsTest.java:156: error: tag not supported in the generated HTML version: wbr
+HtmlVersionTagsAttrsTest.java:157: error: tag not supported in the generated HTML version: wbr
* <p>Test <wbr>WBR</wbr> text</p>
^
-HtmlVersionTagsAttrsTest.java:161: error: tag not supported in the generated HTML version: section
+HtmlVersionTagsAttrsTest.java:162: error: tag not supported in the generated HTML version: section
* <section>
^
-HtmlVersionTagsAttrsTest.java:164: error: tag not supported in the generated HTML version: article
+HtmlVersionTagsAttrsTest.java:165: error: tag not supported in the generated HTML version: article
* <article>
^
-HtmlVersionTagsAttrsTest.java:167: error: tag not supported in the generated HTML version: header
- * <header>
- ^
HtmlVersionTagsAttrsTest.java:168: error: tag not supported in the generated HTML version: header
* <header>
^
-HtmlVersionTagsAttrsTest.java:171: error: tag not supported in the generated HTML version: footer
+HtmlVersionTagsAttrsTest.java:169: error: tag not supported in the generated HTML version: header
+ * <header>
+ ^
+HtmlVersionTagsAttrsTest.java:172: error: tag not supported in the generated HTML version: footer
* <footer>
^
-HtmlVersionTagsAttrsTest.java:174: error: tag not supported in the generated HTML version: main
+HtmlVersionTagsAttrsTest.java:175: error: tag not supported in the generated HTML version: main
* <main>
^
-HtmlVersionTagsAttrsTest.java:179: error: tag not supported in the generated HTML version: footer
+HtmlVersionTagsAttrsTest.java:180: error: tag not supported in the generated HTML version: footer
* <footer>
^
-HtmlVersionTagsAttrsTest.java:180: error: tag not supported in the generated HTML version: header
+HtmlVersionTagsAttrsTest.java:181: error: tag not supported in the generated HTML version: header
* <header>
^
-HtmlVersionTagsAttrsTest.java:183: error: tag not supported in the generated HTML version: footer
+HtmlVersionTagsAttrsTest.java:184: error: tag not supported in the generated HTML version: footer
* <footer>
^
-HtmlVersionTagsAttrsTest.java:186: error: tag not supported in the generated HTML version: main
+HtmlVersionTagsAttrsTest.java:187: error: tag not supported in the generated HTML version: main
* <main>
^
-HtmlVersionTagsAttrsTest.java:193: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:194: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:198: error: tag not supported in the generated HTML version: header
+HtmlVersionTagsAttrsTest.java:199: error: tag not supported in the generated HTML version: header
* <header role="banner">Main text</header>
^
-HtmlVersionTagsAttrsTest.java:198: error: attribute not supported in HTML4: role
+HtmlVersionTagsAttrsTest.java:199: error: attribute not supported in HTML4: role
* <header role="banner">Main text</header>
^
-HtmlVersionTagsAttrsTest.java:199: error: attribute not supported in HTML4: role
+HtmlVersionTagsAttrsTest.java:200: error: attribute not supported in HTML4: role
* <div role="navigation">
^
-HtmlVersionTagsAttrsTest.java:204: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:205: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:207: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:208: error: no summary or caption for table
* </table>
^
46 errors
--- a/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTestHtml5.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/HtmlVersionTagsAttrsTestHtml5.out Fri May 29 12:49:31 2015 +0200
@@ -1,298 +1,298 @@
-HtmlVersionTagsAttrsTest.java:18: error: attribute not supported in HTML5: rev
+HtmlVersionTagsAttrsTest.java:19: error: attribute not supported in HTML5: rev
* <a rev="help" href="rev_test.html">Help Page</a>
^
-HtmlVersionTagsAttrsTest.java:19: error: attribute not supported in HTML5: charset
+HtmlVersionTagsAttrsTest.java:20: error: attribute not supported in HTML5: charset
* <a charset="UTF-8" href="charset_test.html">Test page</a>
^
-HtmlVersionTagsAttrsTest.java:20: error: attribute not supported in HTML5: shape
+HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: shape
* <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
^
-HtmlVersionTagsAttrsTest.java:20: error: attribute not supported in HTML5: coords
+HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: coords
* <a href="shape_test.html" shape="poly" coords="10,30,56,142">Location</a>
^
-HtmlVersionTagsAttrsTest.java:21: error: attribute not supported in HTML5: name
+HtmlVersionTagsAttrsTest.java:22: error: attribute not supported in HTML5: name
* <img name="name_test" alt="alt">
^
-HtmlVersionTagsAttrsTest.java:23: error: attribute not supported in HTML5: axis
+HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: axis
* <tr><th axis="desc">Description</th></tr>
^
-HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: axis
+HtmlVersionTagsAttrsTest.java:25: error: attribute not supported in HTML5: axis
* <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
^
-HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: abbr
+HtmlVersionTagsAttrsTest.java:25: error: attribute not supported in HTML5: abbr
* <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
^
-HtmlVersionTagsAttrsTest.java:24: error: attribute not supported in HTML5: scope
+HtmlVersionTagsAttrsTest.java:25: error: attribute not supported in HTML5: scope
* <tr><td axis="desc" abbr="abbr_test" scope="row">Axis_Test</td></tr>
^
-HtmlVersionTagsAttrsTest.java:25: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:26: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:26: error: attribute not supported in HTML5: summary
+HtmlVersionTagsAttrsTest.java:27: error: attribute not supported in HTML5: summary
* <table summary="summary_test"><tr><td>Test Row</td></tr></table>
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: align
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: bgcolor
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: bgcolor
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: cellpadding
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: cellpadding
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: cellspacing
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: cellspacing
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: frame
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: frame
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: rules
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: rules
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:28: error: attribute not supported in HTML5: width
+HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: width
* <table align="left" bgcolor="#EAEAEA" cellpadding="10" cellspacing="2" frame="box" rules="rows" width="200">
^
-HtmlVersionTagsAttrsTest.java:29: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:30: error: attribute not supported in HTML5: align
* <caption align="center">Test table, caption, col, colgroup, tbody,
^
-HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: align
* <colgroup align="char" char="." charoff="2" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: char
* <colgroup align="char" char="." charoff="2" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: charoff
* <colgroup align="char" char="." charoff="2" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: valign
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: valign
* <colgroup align="char" char="." charoff="2" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:31: error: attribute not supported in HTML5: width
+HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: width
* <colgroup align="char" char="." charoff="2" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: align
* <col align="center" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: valign
+HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: valign
* <col align="center" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:32: error: attribute not supported in HTML5: width
+HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: width
* <col align="center" valign="top" width="200">
^
-HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: align
* <col align="char" char="." charoff="2">
^
-HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: char
* <col align="char" char="." charoff="2">
^
-HtmlVersionTagsAttrsTest.java:33: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:34: error: attribute not supported in HTML5: charoff
* <col align="char" char="." charoff="2">
^
-HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: align
* <thead align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: char
* <thead align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:35: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: charoff
* <thead align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: align
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
-HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: char
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
-HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: charoff
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
-HtmlVersionTagsAttrsTest.java:36: error: attribute not supported in HTML5: bgcolor
+HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: bgcolor
* <tr align="char" char="." charoff="2" bgcolor="#EAEAEA" valign="top">
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: align
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: char
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: charoff
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: bgcolor
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: bgcolor
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: height
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: height
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: width
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: width
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:37: error: attribute not supported in HTML5: nowrap
+HtmlVersionTagsAttrsTest.java:38: error: attribute not supported in HTML5: nowrap
* <th align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>HeadCol1</th>
^
-HtmlVersionTagsAttrsTest.java:41: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:42: error: attribute not supported in HTML5: align
* <tfoot align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:41: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:42: error: attribute not supported in HTML5: char
* <tfoot align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:41: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:42: error: attribute not supported in HTML5: charoff
* <tfoot align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:48: error: attribute not supported in HTML5: align
* <tbody align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:48: error: attribute not supported in HTML5: char
* <tbody align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:47: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:48: error: attribute not supported in HTML5: charoff
* <tbody align="char" char="." charoff="2" valign="top">
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: align
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: align
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: char
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: char
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: charoff
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: charoff
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: bgcolor
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: bgcolor
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: height
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: height
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: width
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: width
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:49: error: attribute not supported in HTML5: nowrap
+HtmlVersionTagsAttrsTest.java:50: error: attribute not supported in HTML5: nowrap
* <td align="char" char="." charoff="2" bgcolor="#EAEAEA" height="200" valign="top" width="200" nowrap>BodyCol1</td>
^
-HtmlVersionTagsAttrsTest.java:54: error: attribute not supported in HTML5: clear
+HtmlVersionTagsAttrsTest.java:55: error: attribute not supported in HTML5: clear
* <br clear="left">
^
-HtmlVersionTagsAttrsTest.java:55: error: attribute not supported in HTML5: compact
+HtmlVersionTagsAttrsTest.java:56: error: attribute not supported in HTML5: compact
* <ol compact>
^
-HtmlVersionTagsAttrsTest.java:59: error: attribute not supported in HTML5: type
+HtmlVersionTagsAttrsTest.java:60: error: attribute not supported in HTML5: type
* <ul type="circle" compact>
^
-HtmlVersionTagsAttrsTest.java:59: error: attribute not supported in HTML5: compact
+HtmlVersionTagsAttrsTest.java:60: error: attribute not supported in HTML5: compact
* <ul type="circle" compact>
^
-HtmlVersionTagsAttrsTest.java:60: error: attribute not supported in HTML5: type
+HtmlVersionTagsAttrsTest.java:61: error: attribute not supported in HTML5: type
* <li type="square">Test list</li>
^
-HtmlVersionTagsAttrsTest.java:63: error: attribute not supported in HTML5: compact
+HtmlVersionTagsAttrsTest.java:64: error: attribute not supported in HTML5: compact
* <dl compact>
^
-HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: hspace
+HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: hspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
-HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: vspace
+HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: vspace
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
-HtmlVersionTagsAttrsTest.java:67: error: attribute not supported in HTML5: border
+HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: border
* <img src="testImg.jpg" alt="imgTest" hspace="10" vspace="10" border="0">
^
-HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: size
+HtmlVersionTagsAttrsTest.java:69: error: attribute not supported in HTML5: size
* <hr size="20" noshade>
^
-HtmlVersionTagsAttrsTest.java:68: error: attribute not supported in HTML5: noshade
+HtmlVersionTagsAttrsTest.java:69: error: attribute not supported in HTML5: noshade
* <hr size="20" noshade>
^
-HtmlVersionTagsAttrsTest.java:69: error: attribute not supported in HTML5: width
+HtmlVersionTagsAttrsTest.java:70: error: attribute not supported in HTML5: width
* <pre width="25">Test Pre</pre>
^
-HtmlVersionTagsAttrsTest.java:70: error: attribute not supported in HTML5: name
+HtmlVersionTagsAttrsTest.java:71: error: attribute not supported in HTML5: name
* <a name="AnchorTest">Anchor Test</a>
^
-HtmlVersionTagsAttrsTest.java:71: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER
+HtmlVersionTagsAttrsTest.java:72: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER
* <table border="0">
^
-HtmlVersionTagsAttrsTest.java:73: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:74: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:93: error: tag not supported in the generated HTML version: big
+HtmlVersionTagsAttrsTest.java:94: error: tag not supported in the generated HTML version: big
* <p><big>Bigger text test</big></p>
^
-HtmlVersionTagsAttrsTest.java:93: warning: empty <p> tag
+HtmlVersionTagsAttrsTest.java:94: warning: empty <p> tag
* <p><big>Bigger text test</big></p>
^
-HtmlVersionTagsAttrsTest.java:94: error: tag not supported in the generated HTML version: center
+HtmlVersionTagsAttrsTest.java:95: error: tag not supported in the generated HTML version: center
* <center>Center text test</center>
^
-HtmlVersionTagsAttrsTest.java:95: error: tag not supported in the generated HTML version: font
+HtmlVersionTagsAttrsTest.java:96: error: tag not supported in the generated HTML version: font
* <font size="3">Font test</font>
^
-HtmlVersionTagsAttrsTest.java:95: error: attribute not supported in HTML5: size
+HtmlVersionTagsAttrsTest.java:96: error: attribute not supported in HTML5: size
* <font size="3">Font test</font>
^
-HtmlVersionTagsAttrsTest.java:96: error: tag not supported in the generated HTML version: strike
+HtmlVersionTagsAttrsTest.java:97: error: tag not supported in the generated HTML version: strike
* <p>Text <strike>strike</strike></p>
^
-HtmlVersionTagsAttrsTest.java:97: error: tag not supported in the generated HTML version: tt
+HtmlVersionTagsAttrsTest.java:98: error: tag not supported in the generated HTML version: tt
* <p><tt>Teletype text</tt></p>
^
-HtmlVersionTagsAttrsTest.java:97: warning: empty <p> tag
+HtmlVersionTagsAttrsTest.java:98: warning: empty <p> tag
* <p><tt>Teletype text</tt></p>
^
-HtmlVersionTagsAttrsTest.java:99: error: unknown tag: hgroup
+HtmlVersionTagsAttrsTest.java:100: error: unknown tag: hgroup
* <hgroup>
^
-HtmlVersionTagsAttrsTest.java:102: error: unknown tag: hgroup
+HtmlVersionTagsAttrsTest.java:103: error: unknown tag: hgroup
* </hgroup>
^
-HtmlVersionTagsAttrsTest.java:105: error: unknown tag: details
+HtmlVersionTagsAttrsTest.java:106: error: unknown tag: details
* <details>
^
-HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary
* <summary>Summary</summary>
^
-HtmlVersionTagsAttrsTest.java:106: error: unknown tag: summary
+HtmlVersionTagsAttrsTest.java:107: error: unknown tag: summary
* <summary>Summary</summary>
^
-HtmlVersionTagsAttrsTest.java:108: error: unknown tag: details
+HtmlVersionTagsAttrsTest.java:109: error: unknown tag: details
* </details>
^
-HtmlVersionTagsAttrsTest.java:131: error: element not allowed in documentation comments: <main>
+HtmlVersionTagsAttrsTest.java:132: error: element not allowed in documentation comments: <main>
* <main>
^
-HtmlVersionTagsAttrsTest.java:163: error: heading not found for </section>
+HtmlVersionTagsAttrsTest.java:164: error: heading not found for </section>
* </section>
^
-HtmlVersionTagsAttrsTest.java:166: error: heading not found for </article>
+HtmlVersionTagsAttrsTest.java:167: error: heading not found for </article>
* </article>
^
-HtmlVersionTagsAttrsTest.java:168: error: tag not allowed here: <header>
+HtmlVersionTagsAttrsTest.java:169: error: tag not allowed here: <header>
* <header>
^
-HtmlVersionTagsAttrsTest.java:171: error: tag not allowed here: <footer>
+HtmlVersionTagsAttrsTest.java:172: error: tag not allowed here: <footer>
* <footer>
^
-HtmlVersionTagsAttrsTest.java:174: error: element not allowed in documentation comments: <main>
+HtmlVersionTagsAttrsTest.java:175: error: element not allowed in documentation comments: <main>
* <main>
^
-HtmlVersionTagsAttrsTest.java:180: error: tag not allowed here: <header>
+HtmlVersionTagsAttrsTest.java:181: error: tag not allowed here: <header>
* <header>
^
-HtmlVersionTagsAttrsTest.java:183: error: tag not allowed here: <footer>
+HtmlVersionTagsAttrsTest.java:184: error: tag not allowed here: <footer>
* <footer>
^
-HtmlVersionTagsAttrsTest.java:186: error: element not allowed in documentation comments: <main>
+HtmlVersionTagsAttrsTest.java:187: error: element not allowed in documentation comments: <main>
* <main>
^
-HtmlVersionTagsAttrsTest.java:191: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER
+HtmlVersionTagsAttrsTest.java:192: error: attribute border for table only accepts "" or "1", use CSS instead: BORDER
* <table border="2">
^
-HtmlVersionTagsAttrsTest.java:193: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:194: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:204: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:205: error: no summary or caption for table
* </table>
^
-HtmlVersionTagsAttrsTest.java:207: error: no summary or caption for table
+HtmlVersionTagsAttrsTest.java:208: error: no summary or caption for table
* </table>
^
97 errors
--- a/langtools/test/tools/doclint/html/InlineTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/InlineTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8006251
* @summary test inline tags
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs InlineTagsTest.java
*/
--- a/langtools/test/tools/doclint/html/ListTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/ListTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8006251 8013405 8022173
* @summary test list tags
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs -ref ListTagsTest.out ListTagsTest.java
*/
--- a/langtools/test/tools/doclint/html/ListTagsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/ListTagsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-ListTagsTest.java:16: error: attribute lacks value
+ListTagsTest.java:17: error: attribute lacks value
* <ol> <li value> bad </ol>
^
-ListTagsTest.java:17: error: attribute value is not a number
+ListTagsTest.java:18: error: attribute value is not a number
* <ol> <li value="a"> bad </ol>
^
2 errors
--- a/langtools/test/tools/doclint/html/OtherTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/OtherTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8006251 8022173
* @summary test other tags
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs -ref OtherTagsTest.out OtherTagsTest.java
*/
--- a/langtools/test/tools/doclint/html/OtherTagsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/OtherTagsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,28 +1,28 @@
-OtherTagsTest.java:13: error: element not allowed in documentation comments: <body>
+OtherTagsTest.java:14: error: element not allowed in documentation comments: <body>
* <body> <p> abc </body>
^
-OtherTagsTest.java:14: error: element not allowed in documentation comments: <frame>
+OtherTagsTest.java:15: error: element not allowed in documentation comments: <frame>
* <frame>
^
-OtherTagsTest.java:15: error: element not allowed in documentation comments: <frameset>
+OtherTagsTest.java:16: error: element not allowed in documentation comments: <frameset>
* <frameset> </frameset>
^
-OtherTagsTest.java:16: error: element not allowed in documentation comments: <head>
+OtherTagsTest.java:17: error: element not allowed in documentation comments: <head>
* <head> </head>
^
-OtherTagsTest.java:18: error: element not allowed in documentation comments: <link>
+OtherTagsTest.java:19: error: element not allowed in documentation comments: <link>
* <link>
^
-OtherTagsTest.java:19: error: element not allowed in documentation comments: <meta>
+OtherTagsTest.java:20: error: element not allowed in documentation comments: <meta>
* <meta>
^
-OtherTagsTest.java:20: error: element not allowed in documentation comments: <noframes>
+OtherTagsTest.java:21: error: element not allowed in documentation comments: <noframes>
* <noframes> </noframes>
^
-OtherTagsTest.java:21: error: element not allowed in documentation comments: <script>
+OtherTagsTest.java:22: error: element not allowed in documentation comments: <script>
* <script> </script>
^
-OtherTagsTest.java:22: error: element not allowed in documentation comments: <title>
+OtherTagsTest.java:23: error: element not allowed in documentation comments: <title>
* <title> </title>
^
9 errors
--- a/langtools/test/tools/doclint/html/TableTagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/TableTagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8006251 8022173
* @summary test table tags
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -Xmsgs TableTagsTest.java
*/
--- a/langtools/test/tools/doclint/html/TagNotAllowed.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/TagNotAllowed.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref TagNotAllowed.out TagNotAllowed.java
*/
--- a/langtools/test/tools/doclint/html/TagNotAllowed.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/TagNotAllowed.out Fri May 29 12:49:31 2015 +0200
@@ -1,61 +1,61 @@
-TagNotAllowed.java:11: error: tag not allowed here: <b>
- * <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
- ^
-TagNotAllowed.java:11: error: tag not allowed here: <b>
+TagNotAllowed.java:12: error: tag not allowed here: <b>
* <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
- ^
-TagNotAllowed.java:11: error: tag not allowed here: <b>
- * <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
- ^
-TagNotAllowed.java:12: error: tag not allowed here: <b>
- * <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
^
TagNotAllowed.java:12: error: tag not allowed here: <b>
+ * <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
+ ^
+TagNotAllowed.java:12: error: tag not allowed here: <b>
+ * <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
+ ^
+TagNotAllowed.java:13: error: tag not allowed here: <b>
+ * <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
+ ^
+TagNotAllowed.java:13: error: tag not allowed here: <b>
* <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
^
-TagNotAllowed.java:12: error: tag not allowed here: <b>
+TagNotAllowed.java:13: error: tag not allowed here: <b>
* <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
^
-TagNotAllowed.java:13: error: tag not allowed here: <b>
+TagNotAllowed.java:14: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^
-TagNotAllowed.java:13: error: tag not allowed here: <b>
+TagNotAllowed.java:14: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^
-TagNotAllowed.java:13: error: tag not allowed here: <b>
+TagNotAllowed.java:14: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^
-TagNotAllowed.java:15: error: tag not allowed here: <b>
+TagNotAllowed.java:16: error: tag not allowed here: <b>
* <table summary=description> <b>abc</b> </table>
^
-TagNotAllowed.java:16: error: tag not allowed here: <b>
+TagNotAllowed.java:17: error: tag not allowed here: <b>
* <table summary=description> <thead> <b>abc</b> </thead> </table>
^
-TagNotAllowed.java:17: error: tag not allowed here: <b>
+TagNotAllowed.java:18: error: tag not allowed here: <b>
* <table summary=description> <tbody> <b>abc</b> </tbody> </table>
^
-TagNotAllowed.java:18: error: tag not allowed here: <b>
+TagNotAllowed.java:19: error: tag not allowed here: <b>
* <table summary=description> <tfoot> <b>abc</b> </tfoot> </table>
^
-TagNotAllowed.java:19: error: tag not allowed here: <b>
+TagNotAllowed.java:20: error: tag not allowed here: <b>
* <table summary=description> <tr> <b>abc</b> </tr> </table>
^
-TagNotAllowed.java:22: error: tag not allowed here: <img>
+TagNotAllowed.java:23: error: tag not allowed here: <img>
* <img alt="image" src="image.png">
^
-TagNotAllowed.java:23: error: tag not allowed here: <p>
+TagNotAllowed.java:24: error: tag not allowed here: <p>
* <p> para </p>
^
-TagNotAllowed.java:24: error: tag not allowed here: <big>
+TagNotAllowed.java:25: error: tag not allowed here: <big>
* <big> text </big>
^
-TagNotAllowed.java:25: error: tag not allowed here: <small>
+TagNotAllowed.java:26: error: tag not allowed here: <small>
* <small> text </small>
^
-TagNotAllowed.java:26: error: tag not allowed here: <sub>
+TagNotAllowed.java:27: error: tag not allowed here: <sub>
* <sub> text </sub>
^
-TagNotAllowed.java:27: error: tag not allowed here: <sup>
+TagNotAllowed.java:28: error: tag not allowed here: <sup>
* <sup> text </sup>
^
20 errors
--- a/langtools/test/tools/doclint/html/TextNotAllowed.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/TextNotAllowed.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java
*/
--- a/langtools/test/tools/doclint/html/TextNotAllowed.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/html/TextNotAllowed.out Fri May 29 12:49:31 2015 +0200
@@ -1,85 +1,85 @@
-TextNotAllowed.java:11: error: text not allowed in <dl> element
+TextNotAllowed.java:12: error: text not allowed in <dl> element
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
^
-TextNotAllowed.java:11: error: text not allowed in <dl> element
+TextNotAllowed.java:12: error: text not allowed in <dl> element
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
^
-TextNotAllowed.java:11: error: text not allowed in <dl> element
+TextNotAllowed.java:12: error: text not allowed in <dl> element
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
^
-TextNotAllowed.java:12: error: text not allowed in <ol> element
+TextNotAllowed.java:13: error: text not allowed in <ol> element
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
^
-TextNotAllowed.java:12: error: text not allowed in <ol> element
+TextNotAllowed.java:13: error: text not allowed in <ol> element
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
^
-TextNotAllowed.java:12: error: text not allowed in <ol> element
+TextNotAllowed.java:13: error: text not allowed in <ol> element
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
^
-TextNotAllowed.java:13: error: text not allowed in <ul> element
+TextNotAllowed.java:14: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^
-TextNotAllowed.java:13: error: text not allowed in <ul> element
+TextNotAllowed.java:14: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^
-TextNotAllowed.java:13: error: text not allowed in <ul> element
+TextNotAllowed.java:14: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^
-TextNotAllowed.java:15: error: text not allowed in <table> element
+TextNotAllowed.java:16: error: text not allowed in <table> element
* <table summary=description> abc </table>
^
-TextNotAllowed.java:16: error: text not allowed in <thead> element
+TextNotAllowed.java:17: error: text not allowed in <thead> element
* <table summary=description> <thead> abc </thead> </table>
^
-TextNotAllowed.java:17: error: text not allowed in <tbody> element
+TextNotAllowed.java:18: error: text not allowed in <tbody> element
* <table summary=description> <tbody> abc </tbody> </table>
^
-TextNotAllowed.java:18: error: text not allowed in <tfoot> element
+TextNotAllowed.java:19: error: text not allowed in <tfoot> element
* <table summary=description> <tfoot> abc </tfoot> </table>
^
-TextNotAllowed.java:19: error: text not allowed in <tr> element
+TextNotAllowed.java:20: error: text not allowed in <tr> element
* <table summary=description> <tr> abc </tr> </table>
^
-TextNotAllowed.java:21: error: text not allowed in <dl> element
+TextNotAllowed.java:22: error: text not allowed in <dl> element
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
^
-TextNotAllowed.java:21: error: text not allowed in <dl> element
+TextNotAllowed.java:22: error: text not allowed in <dl> element
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
^
-TextNotAllowed.java:21: error: text not allowed in <dl> element
+TextNotAllowed.java:22: error: text not allowed in <dl> element
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
^
-TextNotAllowed.java:22: error: text not allowed in <ol> element
+TextNotAllowed.java:23: error: text not allowed in <ol> element
* <ol> & <li> item </li> < <li> item </li> > </ol>
^
-TextNotAllowed.java:22: error: text not allowed in <ol> element
+TextNotAllowed.java:23: error: text not allowed in <ol> element
* <ol> & <li> item </li> < <li> item </li> > </ol>
^
-TextNotAllowed.java:22: error: text not allowed in <ol> element
+TextNotAllowed.java:23: error: text not allowed in <ol> element
* <ol> & <li> item </li> < <li> item </li> > </ol>
^
-TextNotAllowed.java:23: error: text not allowed in <ul> element
+TextNotAllowed.java:24: error: text not allowed in <ul> element
* <ul> & <li> item </li> < <li> item </li> > </ul>
^
-TextNotAllowed.java:23: error: text not allowed in <ul> element
+TextNotAllowed.java:24: error: text not allowed in <ul> element
* <ul> & <li> item </li> < <li> item </li> > </ul>
^
-TextNotAllowed.java:23: error: text not allowed in <ul> element
+TextNotAllowed.java:24: error: text not allowed in <ul> element
* <ul> & <li> item </li> < <li> item </li> > </ul>
^
-TextNotAllowed.java:25: error: text not allowed in <table> element
+TextNotAllowed.java:26: error: text not allowed in <table> element
* <table summary=description> & </table>
^
-TextNotAllowed.java:26: error: text not allowed in <thead> element
+TextNotAllowed.java:27: error: text not allowed in <thead> element
* <table summary=description> <thead> & </thead> </table>
^
-TextNotAllowed.java:27: error: text not allowed in <tbody> element
+TextNotAllowed.java:28: error: text not allowed in <tbody> element
* <table summary=description> <tbody> & </tbody> </table>
^
-TextNotAllowed.java:28: error: text not allowed in <tfoot> element
+TextNotAllowed.java:29: error: text not allowed in <tfoot> element
* <table summary=description> <tfoot> & </tfoot> </table>
^
-TextNotAllowed.java:29: error: text not allowed in <tr> element
+TextNotAllowed.java:30: error: text not allowed in <tr> element
* <table summary=description> <tr> & </tr> </table>
^
28 errors
--- a/langtools/test/tools/doclint/packageTests/bad/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/bad/Test.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8020664 8021215
* @summary doclint gives incorrect warnings on normal package statements
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref Test.out Test.java
* @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java
--- a/langtools/test/tools/doclint/packageTests/bad/Test.javac.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/bad/Test.javac.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-Test.java:12:1: compiler.warn.proc.messager: documentation comment not expected here
+Test.java:13:1: compiler.warn.proc.messager: documentation comment not expected here
- compiler.err.warnings.and.werror
1 error
1 warning
--- a/langtools/test/tools/doclint/packageTests/bad/Test.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/bad/Test.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-Test.java:12: warning: documentation comment not expected here
+Test.java:13: warning: documentation comment not expected here
package bad;
^
1 warning
--- a/langtools/test/tools/doclint/packageTests/bad/package-info.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/bad/package-info.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8020664 8021215
* @summary doclint gives incorrect warnings on normal package statements
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref package-info.out package-info.java
* @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java
--- a/langtools/test/tools/doclint/packageTests/bad/package-info.javac.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/bad/package-info.javac.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-package-info.java:12:1: compiler.warn.proc.messager: no comment
+package-info.java:13:1: compiler.warn.proc.messager: no comment
- compiler.err.warnings.and.werror
1 error
1 warning
--- a/langtools/test/tools/doclint/packageTests/bad/package-info.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/bad/package-info.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-package-info.java:12: warning: no comment
+package-info.java:13: warning: no comment
package bad;
^
1 warning
--- a/langtools/test/tools/doclint/packageTests/good/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/good/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8020664 8021215
* @summary doclint gives incorrect warnings on normal package statements
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester Test.java
* @compile -Xdoclint:all Test.java
--- a/langtools/test/tools/doclint/packageTests/good/package-info.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/packageTests/good/package-info.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8020664 8021215
* @summary doclint gives incorrect warnings on normal package statements
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester package-info.java
* @compile -Xdoclint:all package-info.java
--- a/langtools/test/tools/doclint/tidy/AnchorAlreadyDefined.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/AnchorAlreadyDefined.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref AnchorAlreadyDefined.out AnchorAlreadyDefined.java
*/
--- a/langtools/test/tools/doclint/tidy/AnchorAlreadyDefined.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/AnchorAlreadyDefined.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-AnchorAlreadyDefined.java:14: error: anchor already defined: "here"
+AnchorAlreadyDefined.java:15: error: anchor already defined: "here"
* <a name="here">duplicate</a>
^
-AnchorAlreadyDefined.java:15: error: anchor already defined: "here"
+AnchorAlreadyDefined.java:16: error: anchor already defined: "here"
* <h1 id="here">duplicate</h1>
^
2 errors
--- a/langtools/test/tools/doclint/tidy/BadEnd.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/BadEnd.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref BadEnd.out BadEnd.java
*/
--- a/langtools/test/tools/doclint/tidy/BadEnd.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/BadEnd.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-BadEnd.java:14: warning: nested tag not allowed: <code>
+BadEnd.java:15: warning: nested tag not allowed: <code>
* <code> text <code>
^
-BadEnd.java:14: warning: empty <code> tag
+BadEnd.java:15: warning: empty <code> tag
* <code> text <code>
^
-BadEnd.java:14: error: element not closed: code
+BadEnd.java:15: error: element not closed: code
* <code> text <code>
^
-BadEnd.java:14: error: element not closed: code
+BadEnd.java:15: error: element not closed: code
* <code> text <code>
^
-BadEnd.java:13: error: element not closed: a
+BadEnd.java:14: error: element not closed: a
* <a name="here"> text <a>
^
-BadEnd.java:13: error: element not closed: a
+BadEnd.java:14: error: element not closed: a
* <a name="here"> text <a>
^
4 errors
--- a/langtools/test/tools/doclint/tidy/InsertImplicit.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InsertImplicit.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref InsertImplicit.out InsertImplicit.java
*/
--- a/langtools/test/tools/doclint/tidy/InsertImplicit.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InsertImplicit.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-InsertImplicit.java:13: error: unexpected end tag: </p>
+InsertImplicit.java:14: error: unexpected end tag: </p>
* </p>
^
-InsertImplicit.java:14: error: block element not allowed within inline element <i>: blockquote
+InsertImplicit.java:15: error: block element not allowed within inline element <i>: blockquote
* <i> <blockquote> abc </blockquote> </i>
^
2 errors
--- a/langtools/test/tools/doclint/tidy/InvalidEntity.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidEntity.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref InvalidEntity.out InvalidEntity.java
*/
--- a/langtools/test/tools/doclint/tidy/InvalidEntity.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidEntity.out Fri May 29 12:49:31 2015 +0200
@@ -1,10 +1,10 @@
-InvalidEntity.java:17: error: invalid entity 
+InvalidEntity.java:18: error: invalid entity 
* 
^
-InvalidEntity.java:18: error: invalid entity 
+InvalidEntity.java:19: error: invalid entity 
* 
^
-InvalidEntity.java:19: error: invalid entity &splodge;
+InvalidEntity.java:20: error: invalid entity &splodge;
* &splodge;
^
3 errors
--- a/langtools/test/tools/doclint/tidy/InvalidName.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidName.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref InvalidName.out InvalidName.java
*/
--- a/langtools/test/tools/doclint/tidy/InvalidName.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidName.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-InvalidName.java:16: error: invalid name for anchor: "foo()"
+InvalidName.java:17: error: invalid name for anchor: "foo()"
* <a name="foo()">invalid</a>
^
1 error
--- a/langtools/test/tools/doclint/tidy/InvalidTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidTag.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref InvalidTag.out InvalidTag.java
*/
--- a/langtools/test/tools/doclint/tidy/InvalidTag.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidTag.out Fri May 29 12:49:31 2015 +0200
@@ -1,10 +1,10 @@
-InvalidTag.java:13: error: unknown tag: String
+InvalidTag.java:14: error: unknown tag: String
* List<String> list = new ArrayList<>();
^
-InvalidTag.java:13: error: malformed HTML
+InvalidTag.java:14: error: malformed HTML
* List<String> list = new ArrayList<>();
^
-InvalidTag.java:13: error: bad use of '>'
+InvalidTag.java:14: error: bad use of '>'
* List<String> list = new ArrayList<>();
^
3 errors
--- a/langtools/test/tools/doclint/tidy/InvalidURI.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidURI.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref InvalidURI.out InvalidURI.java
*/
--- a/langtools/test/tools/doclint/tidy/InvalidURI.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/InvalidURI.out Fri May 29 12:49:31 2015 +0200
@@ -1,13 +1,13 @@
-InvalidURI.java:16: error: invalid uri: "abc def"
+InvalidURI.java:17: error: invalid uri: "abc def"
* <a href="abc def">invalid</a>
^
-InvalidURI.java:17: error: attribute lacks value
+InvalidURI.java:18: error: attribute lacks value
* <a href>no value</a>
^
-InvalidURI.java:18: error: attribute lacks value
+InvalidURI.java:19: error: attribute lacks value
* <a href= >no value</a>
^
-InvalidURI.java:19: error: attribute lacks value
+InvalidURI.java:20: error: attribute lacks value
* <a href="" >no value</a>
^
4 errors
--- a/langtools/test/tools/doclint/tidy/MissingGT.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/MissingGT.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref MissingGT.out MissingGT.java
*/
--- a/langtools/test/tools/doclint/tidy/MissingGT.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/MissingGT.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-MissingGT.java:13: error: malformed HTML
+MissingGT.java:14: error: malformed HTML
* <img src="image.gif"
^
1 error
--- a/langtools/test/tools/doclint/tidy/MissingTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/MissingTag.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref MissingTag.out MissingTag.java
*/
--- a/langtools/test/tools/doclint/tidy/MissingTag.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/MissingTag.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-MissingTag.java:14: error: unexpected end tag: </p>
+MissingTag.java:15: error: unexpected end tag: </p>
* </p>
^
-MissingTag.java:15: error: end tag missing: </b>
+MissingTag.java:16: error: end tag missing: </b>
* <h1> <b> text </h1>
^
2 errors
--- a/langtools/test/tools/doclint/tidy/NestedTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/NestedTag.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref NestedTag.out NestedTag.java
*/
--- a/langtools/test/tools/doclint/tidy/NestedTag.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/NestedTag.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-NestedTag.java:13: warning: nested tag not allowed: <b>
+NestedTag.java:14: warning: nested tag not allowed: <b>
* <b><b> text </b></b>
^
-NestedTag.java:14: warning: nested tag not allowed: <code>
+NestedTag.java:15: warning: nested tag not allowed: <code>
* {@link java.lang.String <code>String</code>}
^
2 warnings
--- a/langtools/test/tools/doclint/tidy/ParaInPre.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/ParaInPre.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref ParaInPre.out ParaInPre.java
*/
--- a/langtools/test/tools/doclint/tidy/ParaInPre.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/ParaInPre.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-ParaInPre.java:16: error: tag not allowed here: <p>
+ParaInPre.java:17: error: tag not allowed here: <p>
* <p>
^
1 error
--- a/langtools/test/tools/doclint/tidy/RepeatedAttr.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/RepeatedAttr.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref RepeatedAttr.out RepeatedAttr.java
*/
--- a/langtools/test/tools/doclint/tidy/RepeatedAttr.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/RepeatedAttr.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-RepeatedAttr.java:13: error: repeated attribute: alt
+RepeatedAttr.java:14: error: repeated attribute: alt
* <img src="image.gif" alt alt="summary">
^
1 error
--- a/langtools/test/tools/doclint/tidy/TextNotAllowed.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/TextNotAllowed.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java
*/
--- a/langtools/test/tools/doclint/tidy/TextNotAllowed.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/TextNotAllowed.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-TextNotAllowed.java:13: error: text not allowed in <table> element
+TextNotAllowed.java:14: error: text not allowed in <table> element
* <table summary=description> abc </table>
^
-TextNotAllowed.java:14: error: text not allowed in <tbody> element
+TextNotAllowed.java:15: error: text not allowed in <tbody> element
* <table summary=description> <tbody> abc </tbody> </table>
^
-TextNotAllowed.java:15: error: text not allowed in <tr> element
+TextNotAllowed.java:16: error: text not allowed in <tr> element
* <table summary=description> <tr> abc </tr> </table>
^
-TextNotAllowed.java:17: error: text not allowed in <dl> element
+TextNotAllowed.java:18: error: text not allowed in <dl> element
* <dl> abc </dl>
^
-TextNotAllowed.java:18: error: text not allowed in <ol> element
+TextNotAllowed.java:19: error: text not allowed in <ol> element
* <ol> abc </ol>
^
-TextNotAllowed.java:19: error: text not allowed in <ul> element
+TextNotAllowed.java:20: error: text not allowed in <ul> element
* <ul> abc </ul>
^
6 errors
--- a/langtools/test/tools/doclint/tidy/TrimmingEmptyTag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/TrimmingEmptyTag.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832 8026368
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref TrimmingEmptyTag.out TrimmingEmptyTag.java
*/
--- a/langtools/test/tools/doclint/tidy/TrimmingEmptyTag.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/TrimmingEmptyTag.out Fri May 29 12:49:31 2015 +0200
@@ -1,52 +1,52 @@
-TrimmingEmptyTag.java:13: warning: empty <b> tag
+TrimmingEmptyTag.java:14: warning: empty <b> tag
* <b></b>
^
-TrimmingEmptyTag.java:14: warning: empty <table> tag
+TrimmingEmptyTag.java:15: warning: empty <table> tag
* <table summary=description></table>
^
-TrimmingEmptyTag.java:15: warning: empty <caption> tag
+TrimmingEmptyTag.java:16: warning: empty <caption> tag
* <table><caption></caption></table>
^
-TrimmingEmptyTag.java:16: warning: empty <code> tag
+TrimmingEmptyTag.java:17: warning: empty <code> tag
* <code></code>
^
-TrimmingEmptyTag.java:17: warning: empty <dl> tag
+TrimmingEmptyTag.java:18: warning: empty <dl> tag
* <dl></dl>
^
-TrimmingEmptyTag.java:18: warning: empty <dt> tag
+TrimmingEmptyTag.java:19: warning: empty <dt> tag
* <dl><dt></dt><dd></dd></dl>
^
-TrimmingEmptyTag.java:18: warning: empty <dd> tag
+TrimmingEmptyTag.java:19: warning: empty <dd> tag
* <dl><dt></dt><dd></dd></dl>
^
-TrimmingEmptyTag.java:19: warning: empty <font> tag
+TrimmingEmptyTag.java:20: warning: empty <font> tag
* <font></font>
^
-TrimmingEmptyTag.java:20: warning: empty <i> tag
+TrimmingEmptyTag.java:21: warning: empty <i> tag
* <i></i>
^
-TrimmingEmptyTag.java:21: warning: empty <ol> tag
+TrimmingEmptyTag.java:22: warning: empty <ol> tag
* <ol></ol>
^
-TrimmingEmptyTag.java:22: warning: empty <p> tag
+TrimmingEmptyTag.java:23: warning: empty <p> tag
* <p></p>
^
-TrimmingEmptyTag.java:23: warning: empty <pre> tag
+TrimmingEmptyTag.java:24: warning: empty <pre> tag
* <pre></pre>
^
-TrimmingEmptyTag.java:24: warning: empty <span> tag
+TrimmingEmptyTag.java:25: warning: empty <span> tag
* <span></span>
^
-TrimmingEmptyTag.java:25: warning: empty <tt> tag
+TrimmingEmptyTag.java:26: warning: empty <tt> tag
* <tt></tt>
^
-TrimmingEmptyTag.java:26: warning: empty <ul> tag
+TrimmingEmptyTag.java:27: warning: empty <ul> tag
* <ul></ul>
^
-TrimmingEmptyTag.java:30: warning: empty <p> tag
+TrimmingEmptyTag.java:31: warning: empty <p> tag
/** <p> */
^
-TrimmingEmptyTag.java:32: warning: empty <p> tag
+TrimmingEmptyTag.java:33: warning: empty <p> tag
/** <p> <ul><li>text</ul> */
^
17 warnings
--- a/langtools/test/tools/doclint/tidy/UnescapedOrUnknownEntity.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/UnescapedOrUnknownEntity.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8004832
* @summary Add new doclint package
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref UnescapedOrUnknownEntity.out UnescapedOrUnknownEntity.java
*/
--- a/langtools/test/tools/doclint/tidy/UnescapedOrUnknownEntity.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tidy/UnescapedOrUnknownEntity.out Fri May 29 12:49:31 2015 +0200
@@ -1,10 +1,10 @@
-UnescapedOrUnknownEntity.java:15: error: semicolon missing
+UnescapedOrUnknownEntity.java:16: error: semicolon missing
* L&F
^
-UnescapedOrUnknownEntity.java:16: error: semicolon missing
+UnescapedOrUnknownEntity.java:17: error: semicolon missing
* Drag&Drop
^
-UnescapedOrUnknownEntity.java:17: error: bad HTML entity
+UnescapedOrUnknownEntity.java:18: error: bad HTML entity
* if (a & b);
^
3 errors
--- a/langtools/test/tools/doclint/tool/HelpTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/HelpTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8006263
* @summary Supplementary test cases needed for doclint
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref HelpTest.out
* @run main DocLintTester -ref HelpTest.out -h
--- a/langtools/test/tools/doclint/tool/MaxDiagsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/MaxDiagsTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8006263
* @summary Supplementary test cases needed for doclint
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref MaxDiagsTest.out -Xmaxerrs 2 -Xmaxwarns 2 MaxDiagsTest.java
* @run main DocLintTester -badargs -Xmaxerrs
--- a/langtools/test/tools/doclint/tool/MaxDiagsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/MaxDiagsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,13 +1,13 @@
-MaxDiagsTest.java:13: warning: no comment
+MaxDiagsTest.java:14: warning: no comment
public class MaxDiagsTest {
^
-MaxDiagsTest.java:15: error: invalid entity �
+MaxDiagsTest.java:16: error: invalid entity �
* � � � �
^
-MaxDiagsTest.java:15: error: invalid entity �
+MaxDiagsTest.java:16: error: invalid entity �
* � � � �
^
-MaxDiagsTest.java:20: warning: no @param for a1
+MaxDiagsTest.java:21: warning: no @param for a1
public int warnings(int a1, int a2) throws Exception { return 0; }
^
2 errors
--- a/langtools/test/tools/doclint/tool/PathsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/PathsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 8006263
* @summary Supplementary test cases needed for doclint
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.doclint
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main PathsTest
*/
--- a/langtools/test/tools/doclint/tool/RunTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/RunTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8006263
* @summary Supplementary test cases needed for doclint
+ * @modules jdk.compiler/com.sun.tools.doclint
+ * jdk.compiler/com.sun.tools.javac.api
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/doclint/tool/StatsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/StatsTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @bug 8006263
* @summary Supplementary test cases needed for doclint
* @library ..
+ * @modules jdk.compiler/com.sun.tools.doclint
* @build DocLintTester
* @run main DocLintTester -ref StatsTest.out -stats -Xmsgs:all StatsTest.java
*/
--- a/langtools/test/tools/doclint/tool/StatsTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/doclint/tool/StatsTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,28 +1,28 @@
-StatsTest.java:11: warning: no comment
+StatsTest.java:12: warning: no comment
public class StatsTest {
^
-StatsTest.java:13: error: invalid entity �
+StatsTest.java:14: error: invalid entity �
* � � � �
^
-StatsTest.java:13: error: invalid entity �
+StatsTest.java:14: error: invalid entity �
* � � � �
^
-StatsTest.java:13: error: invalid entity �
+StatsTest.java:14: error: invalid entity �
* � � � �
^
-StatsTest.java:13: error: invalid entity �
+StatsTest.java:14: error: invalid entity �
* � � � �
^
-StatsTest.java:18: warning: no @param for a1
+StatsTest.java:19: warning: no @param for a1
public int warnings(int a1, int a2) throws Exception { return 0; }
^
-StatsTest.java:18: warning: no @param for a2
+StatsTest.java:19: warning: no @param for a2
public int warnings(int a1, int a2) throws Exception { return 0; }
^
-StatsTest.java:18: warning: no @return
+StatsTest.java:19: warning: no @return
public int warnings(int a1, int a2) throws Exception { return 0; }
^
-StatsTest.java:18: warning: no @throws for java.lang.Exception
+StatsTest.java:19: warning: no @throws for java.lang.Exception
public int warnings(int a1, int a2) throws Exception { return 0; }
^
By group...
--- a/langtools/test/tools/javac/4241573/T4241573.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/4241573/T4241573.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4241573
* @summary SourceFile attribute includes full path
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.Attribute;
--- a/langtools/test/tools/javac/4846262/CheckEBCDICLocaleTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/4846262/CheckEBCDICLocaleTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4846262
* @summary check that javac operates correctly in EBCDIC locale
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main CheckEBCDICLocaleTest
*/
--- a/langtools/test/tools/javac/5005368.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 5005368
- * @summary com/sun/tools/javac/comp/Check.java refers to the undefined resource
- * @author gafter
- *
- * @compile -Werror 5005368.java
- * @compile/fail -Werror -Xlint:unchecked 5005368.java
- */
-
-package p5005368;
-
-import java.util.*;
-
-interface A {
- List<String> f();
-}
-
-interface B extends A {
- List f();
-}
--- a/langtools/test/tools/javac/6302184/HiddenOptionsShouldUseGivenEncodingTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6302184/HiddenOptionsShouldUseGivenEncodingTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary javac hidden options that generate source should use the given
* encoding, if available
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run compile -encoding iso-8859-1 -XD-printsource T6302184.java
* @run main HiddenOptionsShouldUseGivenEncodingTest
--- a/langtools/test/tools/javac/6304921/TestLog.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6304921/TestLog.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,10 @@
* @test
* @bug 6304912
* @summary unit test for Log
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.lang.reflect.Field;
import java.io.InputStream;
--- a/langtools/test/tools/javac/6330997/T6330997.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6330997/T6330997.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 6330997 7025789 8000961
* @summary javac should accept class files with major version of the next release
* @author Wei Tao
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @clean T1 T2
* @compile -source 8 -target 8 T1.java
* @compile -source 8 -target 8 T2.java
--- a/langtools/test/tools/javac/6341866/T6341866.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6341866/T6341866.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6341866
* @summary Source files loaded from source path are not subject to annotation processing
+ * @modules java.compiler
+ * jdk.compiler
* @build Anno T6341866
* @run main T6341866
*/
--- a/langtools/test/tools/javac/6394683/T6394683.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6394683/T6394683.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6394683
* @summary need to resolve different file-type precedence semantics for javac and 269
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/6400383/T6400383.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6400383/T6400383.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6400383
* @summary directory foo.java on javac command line causes javac to crash
+ * @modules jdk.compiler/com.sun.tools.javac.api
*/
import java.io.*;
--- a/langtools/test/tools/javac/6400872/T6400872.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6400872/T6400872.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6400872
* @summary REGRESSION: Java Compiler cannot find jar files referenced by other
+ * @modules java.compiler
+ * jdk.compiler
* @run main T6400872
*/
--- a/langtools/test/tools/javac/6402516/CheckClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6402516/CheckClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 6402516
* @summary need Trees.getScope(TreePath)
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build Checker CheckClass
* @run main CheckClass
*/
--- a/langtools/test/tools/javac/6402516/CheckIsAccessible.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6402516/CheckIsAccessible.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 6402516
* @summary need Trees.getScope(TreePath)
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build Checker CheckIsAccessible
* @run main CheckIsAccessible
*/
--- a/langtools/test/tools/javac/6402516/CheckLocalElements.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6402516/CheckLocalElements.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 6402516 8031569
* @summary need Trees.getScope(TreePath)
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build Checker CheckLocalElements
* @run main CheckLocalElements
*/
--- a/langtools/test/tools/javac/6402516/CheckMethod.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6402516/CheckMethod.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 6402516
* @summary need Trees.getScope(TreePath)
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build Checker CheckMethod
* @run main CheckMethod
*/
--- a/langtools/test/tools/javac/6403424/T6403424.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6403424/T6403424.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6403424
* @summary JavacFileManager.inferBinaryName is not case-insensitive on Windows
+ * @modules jdk.compiler/com.sun.tools.javac.api
*/
import java.io.*;
--- a/langtools/test/tools/javac/6410653/T6410653.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6410653/T6410653.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6410653 6401277
* @summary REGRESSION: javac crashes if -d or -s argument is a file
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.lang.reflect.Field;
--- a/langtools/test/tools/javac/6440583/T6440583.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6440583/T6440583.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6440583
* @summary better error recovery
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/6457284/T6457284.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6457284/T6457284.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6457284
* @summary Internationalize "unnamed package" when the term is used in diagnostics
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.IOException;
--- a/langtools/test/tools/javac/6508981/TestInferBinaryName.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6508981/TestInferBinaryName.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary cleanup file separator handling in JavacFileManager
* (This test is specifically to test the new impl of inferBinaryName)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox p.A
* @run main TestInferBinaryName
*/
--- a/langtools/test/tools/javac/6567415/T6567415.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6567415/T6567415.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6567415
* @summary Test to ensure javac does not go into an infinite loop, while
* reading a classfile of a specific length.
+ * @modules jdk.compiler
* @compile -XDignore.symbol.file T6567415.java
* @run main T6567415
* @author ksrini
--- a/langtools/test/tools/javac/6589361/T6589361.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6589361/T6589361.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,8 @@
* @test
* @bug 6589361
* @summary 6589361:Failing building ct.sym file as part of the control build
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.javac.file.JavacFileManager;
--- a/langtools/test/tools/javac/6627362/T6627362.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6627362/T6627362.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6627362
* @summary javac generates code that uses array.clone,
* which is not available on JavaCard
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/6668794/badClass/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6668794/badClass/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 6668794 6668796
* @summary javac puts localized text in raw diagnostics
* bad diagnostic "bad class file" given for source files
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/6863465/TestCircularClassfile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6863465/TestCircularClassfile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6863465
* @summary javac doesn't detect circular subclass dependencies via qualified names
+ * @modules jdk.compiler
* @run main TestCircularClassfile
*/
--- a/langtools/test/tools/javac/6889255/T6889255.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6889255/T6889255.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6889255
* @summary ClassReader does not read parameter names correctly
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.jvm
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/6902720/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6902720/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,9 @@
* @test
* @bug 6902720
* @summary javac pretty printer does not handle enums correctly
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
*/
public class Test {
--- a/langtools/test/tools/javac/6917288/GraphicalInstallerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6917288/GraphicalInstallerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
/* @test
* @bug 6917288
* @summary Unnamed nested class is not generated
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/6917288/T6917288.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/6917288/T6917288.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
/* @test
* @bug 6917288
* @summary Unnamed nested class is not generated
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/7003595/T7003595.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7003595/T7003595.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7003595
* @summary IncompatibleClassChangeError with unreferenced local class with subclass
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/7079713/TestCircularClassfile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7079713/TestCircularClassfile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7079713
* @summary javac hangs when compiling a class that references a cyclically inherited class
+ * @modules jdk.compiler
* @run main TestCircularClassfile
*/
--- a/langtools/test/tools/javac/7118412/ShadowingTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7118412/ShadowingTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7118412
* @summary Shadowing of type-variables vs. member types
+ * @modules jdk.compiler
*/
import java.io.File;
import java.io.FileWriter;
--- a/langtools/test/tools/javac/7129225/NegTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7129225/NegTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-TestImportStar.java:14:1: compiler.err.doesnt.exist: xxx
+TestImportStar.java:16:1: compiler.err.doesnt.exist: xxx
1 error
--- a/langtools/test/tools/javac/7129225/TestImportStar.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7129225/TestImportStar.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,8 @@
* @bug 7129225
* @summary import xxx.* isn't handled correctly by annotation processing
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile/fail/ref=NegTest.out -XDrawDiagnostics TestImportStar.java
* @compile Anno.java AnnoProcessor.java
--- a/langtools/test/tools/javac/7129225/TestImportStar.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7129225/TestImportStar.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
- compiler.note.proc.messager: RUNNING - lastRound = false
-TestImportStar.java:14:1: compiler.err.doesnt.exist: xxx
+TestImportStar.java:16:1: compiler.err.doesnt.exist: xxx
- compiler.note.proc.messager: RUNNING - lastRound = true
1 error
--- a/langtools/test/tools/javac/7142086/T7142086.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7142086/T7142086.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7142086
* @summary performance problem in Check.checkOverrideClashes(...)
+ * @modules jdk.compiler
* @run main/timeout=10 T7142086
*/
--- a/langtools/test/tools/javac/7144981/IgnoreIgnorableCharactersInInput.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7144981/IgnoreIgnorableCharactersInInput.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @test /nodynamiccopyright/
* @bug 7144981
* @summary javac should ignore ignorable characters in input
+ * @modules jdk.compiler
* @run main IgnoreIgnorableCharactersInInput
*/
--- a/langtools/test/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7153958/CPoolRefClassContainingInlinedCts.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 7153958
* @summary add constant pool reference to class containing inlined constants
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile pkg/ClassToBeStaticallyImported.java CPoolRefClassContainingInlinedCts.java
* @run main CPoolRefClassContainingInlinedCts
*/
--- a/langtools/test/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7166455/CheckACC_STRICTFlagOnclinitTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 7166455
* @summary javac doesn't set ACC_STRICT bit on <clinit> for strictfp class
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main CheckACC_STRICTFlagOnclinitTest
*/
--- a/langtools/test/tools/javac/7199823/InnerClassCannotBeVerified.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/7199823/InnerClassCannotBeVerified.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7199823
* @summary javac generates inner class that can't be verified
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main InnerClassCannotBeVerified
*/
--- a/langtools/test/tools/javac/8000518/DuplicateConstantPoolEntry.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/8000518/DuplicateConstantPoolEntry.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8000518
* @summary Javac generates duplicate name_and_type constant pool entry for
* class BinaryOpValueExp.java
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main DuplicateConstantPoolEntry
*/
--- a/langtools/test/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/8005931/CheckACC_STRICTFlagOnPkgAccessClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8005931
* @summary javac doesn't set ACC_STRICT for classes with package access
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main CheckACC_STRICTFlagOnPkgAccessClassTest
*/
--- a/langtools/test/tools/javac/8009170/RedundantByteCodeInArrayTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/8009170/RedundantByteCodeInArrayTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8009170
* @summary Regression: javac generates redundant bytecode in assignop involving
* arrays
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main RedundantByteCodeInArrayTest
*/
--- a/langtools/test/tools/javac/AnonymousSubclassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/AnonymousSubclassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8023945
* @summary javac wrongly allows a subclass of an anonymous class
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main AnonymousSubclassTest
*/
--- a/langtools/test/tools/javac/BadOptimization/DeadCode6.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/BadOptimization/DeadCode6.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* longer removes live code.
* @author dps
*
+ * @modules java.desktop
* @run clean DeadCode6
* @run compile -O DeadCode6.java
*/
--- a/langtools/test/tools/javac/ClassCycle/ClassCycle1a.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle1a.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4500240
* @summary javac throws StackOverflowError for recursive inheritance
*
* @compile ClassCycle1a.java
- * @compile/fail ClassCycle1b.java
+ * @compile/fail/ref=ClassCycle1a.out -XDrawDiagnostics ClassCycle1b.java
*/
interface ClassCycle1b {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle1a.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+ClassCycle1b.java:28:1: compiler.err.cyclic.inheritance: ClassCycle1b
+1 error
--- a/langtools/test/tools/javac/ClassCycle/ClassCycle1b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle1b.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/langtools/test/tools/javac/ClassCycle/ClassCycle2a.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle2a.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4500240
* @summary javac throws StackOverflowError for recursive inheritance
*
* @compile ClassCycle2a.java
- * @compile/fail ClassCycle2b.java
+ * @compile/fail/ref=ClassCycle2a.out -XDrawDiagnostics ClassCycle2b.java
*/
class ClassCycle2b {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle2a.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+ClassCycle2b.java:28:1: compiler.err.cyclic.inheritance: ClassCycle2b
+1 error
--- a/langtools/test/tools/javac/ClassCycle/ClassCycle2b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle2b.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/langtools/test/tools/javac/ClassCycle/ClassCycle3a.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle3a.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4497044
* @summary java.lang.StackOverflowError for cyclic inheritance
*
* @compile ClassCycle3a.java
- * @compile/fail ClassCycle3b.java
+ * @compile/fail/ref=ClassCycle3a.out -XDrawDiagnostics ClassCycle3b.java
*/
interface ClassCycle3b {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle3a.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+ClassCycle3b.java:28:1: compiler.err.cyclic.inheritance: ClassCycle3b
+1 error
--- a/langtools/test/tools/javac/ClassCycle/ClassCycle3b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassCycle/ClassCycle3b.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/langtools/test/tools/javac/ClassPathTest/ClassPathTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ClassPathTest/ClassPathTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4241229 4785453
* @summary Test -classpath option and classpath defaults.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ClassPathTest
*/
--- a/langtools/test/tools/javac/ConstFoldTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ConstFoldTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,9 @@
* @bug 8025505
* @summary Constant folding deficiency
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ConstFoldTest
*/
--- a/langtools/test/tools/javac/DefiniteAssignment/DefAssignNestedArg.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/DefiniteAssignment/DefAssignNestedArg.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify bug fix for 4306909
* @author Neal Gafter (gafter)
*
+ * @modules java.desktop
* @run compile DefAssignNestedArg.java
*/
--- a/langtools/test/tools/javac/Diagnostics/6769027/T6769027.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/Diagnostics/6769027/T6769027.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* temporarily workaround combo tests are causing time out in several platforms
* @author Maurizio Cimadamore
* @library ../../lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm T6769027
*/
--- a/langtools/test/tools/javac/Diagnostics/7010608/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/Diagnostics/7010608/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7010608
* @summary the string 'error' should appear in error messages
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/Diagnostics/7116676/T7116676.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/Diagnostics/7116676/T7116676.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7116676
* @summary RichDiagnosticFormatter throws NPE when formatMessage is called directly
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/ExtDirs/ExtDirTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ExtDirs/ExtDirTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4204897 4256097 4785453 4863609
* @summary Test that '.jar' files in -extdirs are found.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ExtDirTest
*/
--- a/langtools/test/tools/javac/FinalInitializer.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/FinalInitializer.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify absence of bug in analysis of final initializers that caused crash.
* @author maddox
*
+ * @modules java.desktop
* @run compile FinalInitializer.java
*/
--- a/langtools/test/tools/javac/FinallyWarn.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/FinallyWarn.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4821353
* @summary new warning "finally cannot complete normally" should not be enabled by default
* @author gafter
*
- * @compile/fail -Xlint:finally -Werror FinallyWarn.java
+ * @compile/fail/ref=FinallyWarn.out -XDrawDiagnostics -Xlint:finally -Werror FinallyWarn.java
* @compile -Werror FinallyWarn.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/FinallyWarn.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+FinallyWarn.java:16:9: compiler.warn.finally.cannot.complete
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/HiddenAbstractMethod/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/HiddenAbstractMethod/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,3 +1,26 @@
+/*
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
/*
* @test
* @bug 1240831
@@ -8,5 +31,5 @@
* the method has the same name, it does not override.
* @author turnidge
*
- * @compile/fail one/Parent.java two/Child.java
+ * @compile/fail/ref=Test.out -XDrawDiagnostics one/Parent.java two/Child.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/HiddenAbstractMethod/Test.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Child.java:5:8: compiler.err.does.not.override.abstract: two.Child, method(), one.Parent
+1 error
--- a/langtools/test/tools/javac/HiddenAbstractMethod/one/Parent.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/HiddenAbstractMethod/one/Parent.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
+/* /nodynamiccopyright/ */
package one;
--- a/langtools/test/tools/javac/HiddenAbstractMethod/two/Child.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/HiddenAbstractMethod/two/Child.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
+/* /nodynamiccopyright/ */
package two;
--- a/langtools/test/tools/javac/IllegalAnnotation.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/IllegalAnnotation.java Fri May 29 12:49:31 2015 +0200
@@ -3,8 +3,7 @@
* @bug 5012028 6384539
* @summary javac crash when declare an annotation type illegally
*
- * @compile/fail IllegalAnnotation.java
- * @compile/fail/ref=IllegalAnnotation.out -XDdev -XDrawDiagnostics IllegalAnnotation.java
+ * @compile/fail/ref=IllegalAnnotation.out -XDrawDiagnostics IllegalAnnotation.java
*/
class IllegalAnnotation {
{
--- a/langtools/test/tools/javac/IllegalAnnotation.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/IllegalAnnotation.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-IllegalAnnotation.java:11:10: compiler.err.intf.not.allowed.here
+IllegalAnnotation.java:10:10: compiler.err.intf.not.allowed.here
1 error
--- a/langtools/test/tools/javac/ImportUnnamed/Dummy.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ImportUnnamed/Dummy.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
* @summary Correct scoping and diagnostics for import declarations.
* @author gafter
*
- * @compile/fail foo/A.java
+ * @compile/fail/ref=Dummy.out -XDrawDiagnostics foo/A.java
*/
public class Dummy {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/ImportUnnamed/Dummy.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+A.java:3:13: compiler.err.expected: '.'
+1 error
--- a/langtools/test/tools/javac/ImportUnnamed/foo/A.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ImportUnnamed/foo/A.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
+/* /nodynamiccopyright/ */
import Dummy;
--- a/langtools/test/tools/javac/IncorrectInheritance/IncorrectInheritanceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/IncorrectInheritance/IncorrectInheritanceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8034924
* @summary Incorrect inheritance of inaccessible static method
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main IncorrectInheritanceTest
*/
--- a/langtools/test/tools/javac/InnerMethSig.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/InnerMethSig.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary 1.5 beta-b15 java compiler throws NPE
* @author gafter
*
+ * @modules java.desktop
* @compile InnerMethSig.java
*/
--- a/langtools/test/tools/javac/MethodParameters/AnnotationTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/AnnotationTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters AnnotationTest.java
* @run main Tester AnnotationTest AnnotationTest.out
--- a/langtools/test/tools/javac/MethodParameters/AnonymousClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/AnonymousClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters AnonymousClass.java
* @run main Tester AnonymousClass AnonymousClass.out
--- a/langtools/test/tools/javac/MethodParameters/Constructors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/Constructors.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters Constructors.java
* @run main Tester Constructors Constructors.out
--- a/langtools/test/tools/javac/MethodParameters/EnumTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/EnumTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582 8008658
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters EnumTest.java
* @run main Tester EnumTest EnumTest.out
--- a/langtools/test/tools/javac/MethodParameters/InstanceMethods.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/InstanceMethods.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters InstanceMethods.java
* @run main Tester InstanceMethods InstanceMethods.out
--- a/langtools/test/tools/javac/MethodParameters/LambdaTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/LambdaTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582 8037546
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters LambdaTest.java
* @run main Tester LambdaTest LambdaTest.out
--- a/langtools/test/tools/javac/MethodParameters/LocalClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/LocalClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582 8008658
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters LocalClassTest.java
* @run main Tester LocalClassTest LocalClassTest.out
--- a/langtools/test/tools/javac/MethodParameters/MemberClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/MemberClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582 8008658
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters MemberClassTest.java
* @run main Tester MemberClassTest MemberClassTest.out
--- a/langtools/test/tools/javac/MethodParameters/StaticMethods.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/StaticMethods.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters StaticMethods.java
* @run main Tester StaticMethods StaticMethods.out
--- a/langtools/test/tools/javac/MethodParameters/UncommonParamNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParameters/UncommonParamNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006582
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build Tester
* @compile -parameters UncommonParamNames.java
* @run main Tester UncommonParamNames UncommonParamNames.out
--- a/langtools/test/tools/javac/MethodParametersTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MethodParametersTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 8004727
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
*/
// key: opt.arg.parameters
import com.sun.tools.classfile.*;
--- a/langtools/test/tools/javac/MissingInclude/MissingIncludeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/MissingInclude/MissingIncludeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary javac <AT>sourcefiles should catch Exception, when sourcefiles
* doesn't exist.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main MissingIncludeTest
*/
--- a/langtools/test/tools/javac/NoStringToLower.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/NoStringToLower.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8029800
* @summary String.toLowerCase()/toUpperCase is generally dangerous, check it is not used in langtools
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javac/NonAmbiguousField/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/NonAmbiguousField/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,10 +1,33 @@
+/*
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
/*
* @test
* @bug 4053724
* @summary Certain non-ambiguous field references were reported by the
- * compiler as ambigous.
+ * compiler as ambiguous.
* @author turnidge
*
* @compile one/Parent.java two/Child.java
- * @compile/fail one/Parent2.java two/Child2.java
+ * @compile/fail/ref=Test.out -XDrawDiagnostics one/Parent2.java two/Child2.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/NonAmbiguousField/Test.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Child2.java:11:28: compiler.err.ref.ambiguous: i, kindname.variable, i, one.Parent2, kindname.variable, i, two.I
+1 error
--- a/langtools/test/tools/javac/NonAmbiguousField/two/Child2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/NonAmbiguousField/two/Child2.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.
- */
+/* /nodynamiccopyright/ */
package two;
--- a/langtools/test/tools/javac/PackageClassAmbiguity/Bad.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/PackageClassAmbiguity/Bad.java Fri May 29 12:49:31 2015 +0200
@@ -1,36 +1,12 @@
/*
- * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4101529
* @summary The compiler used to create class names which were the same as
* existing package names and vice-versa. The compiler now checks
* for this before creating a package or a class.
* @author turnidge
*
- * @compile/fail Bad.java
- * @compile/fail util.java
+ * @compile/fail/ref=Bad.out -XDrawDiagnostics Bad.java
*/
package java.lang.String;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/PackageClassAmbiguity/Bad.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Bad.java:12:1: compiler.err.pkg.clashes.with.class.of.same.name: java.lang.String
+1 error
--- a/langtools/test/tools/javac/PackageClassAmbiguity/util.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/PackageClassAmbiguity/util.java Fri May 29 12:49:31 2015 +0200
@@ -1,28 +1,15 @@
/*
- * Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
- * 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.
+ * @test /nodynamiccopyright/
+ * @bug 4101529
+ * @summary The compiler used to create class names which were the same as
+ * existing package names and vice-versa. The compiler now checks
+ * for this before creating a package or a class.
+ * @author turnidge
*
- * 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.
+ * @compile/fail/ref=util.out -XDrawDiagnostics util.java
*/
package java;
-
import java.util.Set;
class util {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/PackageClassAmbiguity/util.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+util.java:13:17: compiler.err.cant.resolve.location: kindname.class, Set, , , (compiler.misc.location: kindname.class, java.util, null)
+util.java:16:5: compiler.err.cant.resolve.location: kindname.class, Set, , , (compiler.misc.location: kindname.class, java.util, null)
+2 errors
--- a/langtools/test/tools/javac/Paths/6638501/JarFromManifestFailure.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/Paths/6638501/JarFromManifestFailure.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6638501
* @summary REGRESSION: Java Compiler cannot find jar files referenced by other
+ * @modules jdk.compiler
* @run main JarFromManifestFailure
*/
--- a/langtools/test/tools/javac/Paths/AbsolutePathTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/Paths/AbsolutePathTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary javac incorrectly handles absolute paths in manifest classpath
* @author govereau
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @ignore 8055768 ToolBox does not close opened files
* @build ToolBox
* @run main AbsolutePathTest
--- a/langtools/test/tools/javac/Paths/TestCompileJARInClassPath.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/Paths/TestCompileJARInClassPath.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test to make sure that java Compilation with JSR199 does not ignore
* Class-Path in manifest
* @author vicente.romero
+ * @modules jdk.compiler
+ * jdk.jartool/sun.tools.jar
* @build TestCompileJARInClassPath
* @run main TestCompileJARInClassPath
*/
--- a/langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClassesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClassesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4087314 4800342 4307565
* @summary Verify allowed access to protected class from another package
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ProtectedInnerClassesTest
*/
--- a/langtools/test/tools/javac/StdoutCloseTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StdoutCloseTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7118295
* @summary javac does not explicitly close -Xstdout file
+ * @modules jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @run main StdoutCloseTest
*/
--- a/langtools/test/tools/javac/StringsInSwitch/BadlyTypedLabel1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StringsInSwitch/BadlyTypedLabel1.java Fri May 29 12:49:31 2015 +0200
@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 6827009
* @summary Check for case labels of different types.
- * @compile/fail -source 6 BadlyTypedLabel1.java
+ * @compile/fail/ref=BadlyTypedLabel1_6.out -XDrawDiagnostics -source 6 BadlyTypedLabel1.java
* @compile/fail/ref=BadlyTypedLabel1.out -XDrawDiagnostics BadlyTypedLabel1.java
*/
class BadlyTypedLabel1 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringsInSwitch/BadlyTypedLabel1_6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+BadlyTypedLabel1.java:10:15: compiler.err.string.switch.not.supported.in.source: 1.6
+1 error
+3 warnings
--- a/langtools/test/tools/javac/StringsInSwitch/BadlyTypedLabel2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StringsInSwitch/BadlyTypedLabel2.java Fri May 29 12:49:31 2015 +0200
@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 6827009
* @summary Check for case lables of different types.
- * @compile/fail -source 6 BadlyTypedLabel2.java
+ * @compile/fail/ref=BadlyTypedLabel2_6.out -XDrawDiagnostics -source 6 BadlyTypedLabel2.java
* @compile/fail/ref=BadlyTypedLabel2.out -XDrawDiagnostics BadlyTypedLabel2.java
*/
import static java.math.RoundingMode.*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringsInSwitch/BadlyTypedLabel2_6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,7 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+BadlyTypedLabel2.java:12:15: compiler.err.string.switch.not.supported.in.source: 1.6
+BadlyTypedLabel2.java:15:14: compiler.err.const.expr.req
+2 errors
+3 warnings
--- a/langtools/test/tools/javac/StringsInSwitch/NonConstantLabel.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StringsInSwitch/NonConstantLabel.java Fri May 29 12:49:31 2015 +0200
@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 6827009
* @summary Check for non-constant case labels.
- * @compile/fail -source 6 NonConstantLabel.java
+ * @compile/fail/ref=NonConstantLabel6.out -XDrawDiagnostics -source 6 NonConstantLabel.java
* @compile/fail/ref=NonConstantLabel.out -XDrawDiagnostics NonConstantLabel.java
*/
class NonConstantLabel {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringsInSwitch/NonConstantLabel6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,7 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+NonConstantLabel.java:11:15: compiler.err.string.switch.not.supported.in.source: 1.6
+NonConstantLabel.java:14:14: compiler.err.const.expr.req
+2 errors
+3 warnings
--- a/langtools/test/tools/javac/StringsInSwitch/OneCaseSwitches.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StringsInSwitch/OneCaseSwitches.java Fri May 29 12:49:31 2015 +0200
@@ -1,32 +1,9 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 6827009
* @summary Positive tests for strings in switch with few alternatives.
- * @compile/fail -source 6 OneCaseSwitches.java
- * @compile OneCaseSwitches.java
+ * @compile/fail/ref=OneCaseSwitches.out -XDrawDiagnostics -source 6 OneCaseSwitches.java
+ * @compile OneCaseSwitches.java
* @run main OneCaseSwitches
* @author Joseph D. Darcy
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringsInSwitch/OneCaseSwitches.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,14 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+OneCaseSwitches.java:23:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:33:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:52:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:66:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:85:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:99:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:119:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:130:15: compiler.err.string.switch.not.supported.in.source: 1.6
+OneCaseSwitches.java:242:16: compiler.err.string.switch.not.supported.in.source: 1.6
+9 errors
+3 warnings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringsInSwitch/RSCL1_6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,7 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+RepeatedStringCaseLabels1.java:10:15: compiler.err.string.switch.not.supported.in.source: 1.6
+RepeatedStringCaseLabels1.java:13:9: compiler.err.duplicate.case.label
+2 errors
+3 warnings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/StringsInSwitch/RSCL2_6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,7 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+RepeatedStringCaseLabels2.java:11:15: compiler.err.string.switch.not.supported.in.source: 1.6
+RepeatedStringCaseLabels2.java:14:9: compiler.err.duplicate.case.label
+2 errors
+3 warnings
--- a/langtools/test/tools/javac/StringsInSwitch/RepeatedStringCaseLabels1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StringsInSwitch/RepeatedStringCaseLabels1.java Fri May 29 12:49:31 2015 +0200
@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 6827009
* @summary Check for repeated string case labels.
- * @compile/fail -source 6 RepeatedStringCaseLabels1.java
+ * @compile/fail/ref=RSCL1_6.out -XDrawDiagnostics -source 6 RepeatedStringCaseLabels1.java
* @compile/fail/ref=RSCL1.out -XDrawDiagnostics RepeatedStringCaseLabels1.java
*/
class RepeatedStringCaseLabels1 {
--- a/langtools/test/tools/javac/StringsInSwitch/RepeatedStringCaseLabels2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/StringsInSwitch/RepeatedStringCaseLabels2.java Fri May 29 12:49:31 2015 +0200
@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 6827009
* @summary Check for repeated string case labels.
- * @compile/fail -source 6 RepeatedStringCaseLabels2.java
+ * @compile/fail/ref=RSCL2_6.out -XDrawDiagnostics -source 6 RepeatedStringCaseLabels2.java
* @compile/fail/ref=RSCL2.out -XDrawDiagnostics RepeatedStringCaseLabels2.java
*/
class RepeatedStringCaseLabels2 {
--- a/langtools/test/tools/javac/T4965689/ClassLiteralWastesByteTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T4965689/ClassLiteralWastesByteTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4965689
* @summary class literal code wastes a byte
+ * @modules jdk.compiler
*/
import java.io.PrintWriter;
--- a/langtools/test/tools/javac/T5053846/MethodRefDupInConstantPoolTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T5053846/MethodRefDupInConstantPoolTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 5053846 8011432
* @summary javac: MethodRef entries are duplicated in the constant pool
* @summary javac, compiler regression iterable + captured type
+ * @modules jdk.compiler
*/
import java.io.PrintWriter;
--- a/langtools/test/tools/javac/T5090006/AssertionFailureTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T5090006/AssertionFailureTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 5090006
* @summary javac fails with assertion error
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main AssertionFailureTest
*/
--- a/langtools/test/tools/javac/T6181889/EmptyFinallyTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6181889/EmptyFinallyTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6181889
* @summary Empty try/finally results in bytecodes being generated
+ * @modules jdk.compiler
*/
import java.io.PrintWriter;
--- a/langtools/test/tools/javac/T6238612.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6238612.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
/*
* @test
* @summary com.sun.tools.util.List.toArray violates Collection spec
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.javac.util.List;
--- a/langtools/test/tools/javac/T6265400.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6265400.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6265400
* @summary Javac should be shielded from client code errors in JSR 199
+ * @modules java.compiler
+ * jdk.compiler
* @run main T6265400
*/
--- a/langtools/test/tools/javac/T6340549.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6340549.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
/*
* @test 6403456
* @summary javax.tools.JavaCompilerTool.getStandardFileManager().list() includes directories
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.tools.*;
--- a/langtools/test/tools/javac/T6351767.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6351767.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6351767
* @summary javax.tools.JavaCompilerTool.getStandardFileManager().list() treats directories as package
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/T6358024.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6358024.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 6358024
* @summary TaskListener should be propogated between processing rounds
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6358166.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6358166.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6358166
* @summary -verbose reports absurd times when annotation processing involved
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6358168.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6358168.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6358168
* @summary JavaCompiler.hasBeenUsed is not set in delegateCompiler
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6361619.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6361619.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6361619 6392118
* @summary AssertionError from ClassReader; mismatch between JavacTaskImpl.context and JSR 269
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6366196.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6366196.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6359661 6366196
* @summary Unit test for corner cases of position encoding
* @author Wei Tao
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main T6366196
*/
--- a/langtools/test/tools/javac/T6395974.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6395974.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6395974
* @summary files are parsed even after failure to find annotation processor is reported
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6397044.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6397044.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6397044
* @summary JCModifiers.getModifiers() returns incorrect Modifiers set.
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6397286.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6397286.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6397286
* @summary TaskListener calls are not protected agains user exceptions
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6403466.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6403466.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6403466
* @summary javac TaskListener should be informed when annotation processing occurs
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.util.*;
--- a/langtools/test/tools/javac/T6404756.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6404756.java Fri May 29 12:49:31 2015 +0200
@@ -1,31 +1,8 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 6404756
* @summary javac mishandles deprecation warnings on some elements marked deprecated
- * @compile/fail -Werror -Xlint:deprecation T6404756.java
+ * @compile/fail/ref=T6404756.out -XDrawDiagnostics -Werror -Xlint:deprecation T6404756.java
*/
public class T6404756 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6404756.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+T6404756.java:10:34: compiler.warn.has.been.deprecated: foo, Foo
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/T6405099.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6405099.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6405099
* @summary Compiler crashes when javac encounters /usr/jdk/packges/lib/ext with no 777 permissions
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6406771.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6406771.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,9 @@
* @test /nodynamiccopyright/
* @bug 6406771
* @summary CompilationUnitTree needs access to a line map
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
*/
// WARNING: White-space and layout is important in this file, especially tab characters.
@@ -21,9 +24,9 @@
@SupportedAnnotationTypes("*")
public class T6406771 extends AbstractProcessor {
String[] tests = {
- "line:24",
- "line:25",
- "line:26", "line:26",
+ "line:27",
+ "line:28",
+ "line:29", "line:29",
// 1 2 3 4 5 6
//3456789012345678901234567890123456789012345678901234567890
"col:7", "col:16", "col:26", // this line uses spaces
--- a/langtools/test/tools/javac/T6407066.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6407066.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6407066
* @summary Paths code should not discard non-existent directories
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/T6410706.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6410706.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6410706
* @summary CONFORMANCE Mandatory warnings in Tree API
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.File;
--- a/langtools/test/tools/javac/T6411379.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6411379.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6411379
* @summary NPE from JavacTrees.getPath
+ * @modules jdk.compiler
* @build T6411379
* @compile -processor T6411379 -proc:only T6411379 T6411379.java
*/
--- a/langtools/test/tools/javac/T6413876.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6413876.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6413876
* @summary REGRESSION javac -d /directory/ creates destination directories
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6423583.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6423583.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6423583
* @summary LiteralTree.getValue() should return Boolean for Kind.BOOLEAN_LITERAL literals
+ * @modules jdk.compiler
* @build T6423583
* @compile -proc:only -processor T6423583 T6423583.java
*/
--- a/langtools/test/tools/javac/T6435291/T6435291.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6435291/T6435291.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 6435291
* @summary javac shouldn't throw NPE while compiling invalid RuntimeInvisibleParameterAnnotations
* @author Wei Tao
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @run main/othervm T6435291
*/
--- a/langtools/test/tools/javac/T6458749.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6458749.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6458749
* @summary TypeParameterElement.getEnclosedElements() throws NPE within javac
+ * @modules java.compiler
+ * jdk.compiler
* @build T6458749
* @compile -processor T6458749 -proc:only T6458749.java
*/
--- a/langtools/test/tools/javac/T6458823/T6458823.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6458823/T6458823.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6458823
* @summary Messager messages on TypeParamterElements to not include position information.
*
+ * @modules java.compiler
+ * jdk.compiler
* @compile MyProcessor.java T6458823.java
* @run main T6458823
*/
--- a/langtools/test/tools/javac/T6472751.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6472751.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6472751
* @summary SourcePositions.getStartPos returns incorrect value for enum constants
* @author Peter Ahe
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.tree.CompilationUnitTree;
--- a/langtools/test/tools/javac/T6534287.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6534287.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 6534287
* @summary empty arg caused a StringIndexOutOfBoundsException
+ * @modules jdk.compiler
*/
public class T6534287 {
public static void main(String... args) throws Exception {
--- a/langtools/test/tools/javac/T6558476.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6558476.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,9 @@
* @bug 6558476 5071352
* @summary com/sun/tools/javac/Main.compile don't release file handles on return
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main/othervm -Xmx512m -Xms512m T6558476
*/
--- a/langtools/test/tools/javac/T6595666.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6595666.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6595666
* @summary fix -Werror
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6625520.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6625520.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
* @test
* @bug 6625520
* @summary javac handles missing entries on classpath badly
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
public class T6625520 {
public static void main(String[] args) throws Exception {
--- a/langtools/test/tools/javac/T6654037.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6654037.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6654037
* @summary JCTree.pos may be incorrect for BinaryTrees
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import com.sun.source.tree.BinaryTree;
--- a/langtools/test/tools/javac/T6665791.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6665791.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6665791
* @summary com.sun.source.tree.MethodTree.toString() does not output default values
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/T6668802.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6668802.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 6668802
* @summary javac handles diagnostics for last line badly, if line not terminated by newline
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6695379/AnnotationsAreNotCopiedToBridgeMethodsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6695379
* @summary Copy method annotations and parameter annotations to synthetic
* bridge methods
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
* @run main AnnotationsAreNotCopiedToBridgeMethodsTest
*/
--- a/langtools/test/tools/javac/T6705935.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6705935.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6705935
* @summary javac reports path name of entry in ZipFileIndex incorectly
+ * @modules jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6725036.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6725036.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary javac returns incorrect value for lastModifiedTime() when
* source is a zip file archive
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main T6725036
*/
--- a/langtools/test/tools/javac/T6759996.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6759996.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6759996
* @summary javac should ignore empty entries on paths
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/T6794959.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6794959.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,11 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 6794959
* @summary add new switch -XDexpectKeys=key,key,...
* @compile T6794959.java
- * @compile/fail -XDfailcomplete=java.lang.String T6794959.java
+ * @compile/fail/ref=T6794959a.out -XDrawDiagnostics -XDfailcomplete=java.lang.String T6794959.java
* @compile -XDfailcomplete=java.lang.String -XDexpectKeys=compiler.err.cant.resolve.location T6794959.java
- * @compile/fail -XDexpectKeys=compiler.err.cant.resolve.location T6794959.java
+ * @compile/fail/ref=T6794959b.out -XDrawDiagnostics -XDexpectKeys=compiler.err.cant.resolve.location T6794959.java
*/
class T6794959 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6794959a.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T6794959.java:12:5: compiler.err.cant.resolve.location: kindname.class, String, , , (compiler.misc.location: kindname.class, T6794959, null)
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T6794959b.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,1 @@
+expected diagnostic keys not found: [compiler.err.cant.resolve.location]
--- a/langtools/test/tools/javac/T6855236.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6855236.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6855236
* @summary Compiler Tree API TreePath class generates NullPointerException from Iterator
+ * @modules jdk.compiler
* @compile T6855236.java
* @compile -processor T6855236 -proc:only T6855236.java
*/
--- a/langtools/test/tools/javac/T6873845.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6873845.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,8 @@
* @test /nodynamiccopyright/
* @bug 6873845
* @summary refine access to symbol file
+ * @modules java.base/sun.misc
+ * jdk.compiler
*/
import java.io.*;
@@ -19,8 +21,8 @@
if (out.contains("sunapi"))
throw new Exception("unexpected output for -X");
- String warn1 = "T6873845.java:73:9: compiler.warn.sun.proprietary: sun.misc.Unsafe" + newline;
- String warn2 = "T6873845.java:78:9: compiler.warn.sun.proprietary: sun.misc.Unsafe" + newline;
+ String warn1 = "T6873845.java:75:9: compiler.warn.sun.proprietary: sun.misc.Unsafe" + newline;
+ String warn2 = "T6873845.java:80:9: compiler.warn.sun.proprietary: sun.misc.Unsafe" + newline;
String note1 = "- compiler.note.sunapi.filename: T6873845.java" + newline;
String note2 = "- compiler.note.sunapi.recompile" + newline;
--- a/langtools/test/tools/javac/T6873849.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6873849.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
* @test
* @bug 6873849
* @summary suppress notes generated by javac
+ * @modules jdk.compiler
*/
public class T6873849 {
--- a/langtools/test/tools/javac/T6882235.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6882235.java Fri May 29 12:49:31 2015 +0200
@@ -3,7 +3,6 @@
* @bug 6882235
* @summary invalid exponent causes silent javac crash
*
- * @compile/fail T6882235.java
* @compile/fail/ref=T6882235.out -XDrawDiagnostics T6882235.java
*/
--- a/langtools/test/tools/javac/T6882235.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6882235.out Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
-T6882235.java:11:13: compiler.err.illegal.start.of.expr
-T6882235.java:12:15: compiler.err.malformed.fp.lit
-T6882235.java:12:18: compiler.err.illegal.start.of.expr
-T6882235.java:13:13: compiler.err.illegal.start.of.expr
+T6882235.java:10:13: compiler.err.illegal.start.of.expr
+T6882235.java:11:15: compiler.err.malformed.fp.lit
+T6882235.java:11:18: compiler.err.illegal.start.of.expr
+T6882235.java:12:13: compiler.err.illegal.start.of.expr
4 errors
--- a/langtools/test/tools/javac/T6900149.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6900149.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6900149
* @summary IllegalStateException when compiling same files and DiagnosticListener is set
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6942649.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6942649.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @test
* @bug 6942649
* @summary add hidden option to identify location and version of javac classes
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6956462/T6956462.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6956462/T6956462.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6956462
* @summary AssertionError exception throws in the Compiler Tree API in JDK 7.
*
+ * @modules jdk.compiler
* @build TestClass T6956462
* @run main T6956462
*/
--- a/langtools/test/tools/javac/T6956638.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6956638.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -44,6 +44,7 @@
* @test
* @bug 6956638
* @summary JavacTask.generate does not generate all required files
+ * @modules jdk.compiler
*/
public class T6956638 {
public static void main(String[] args) throws Exception {
--- a/langtools/test/tools/javac/T6970173/DebugPointerAtBadPositionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6970173/DebugPointerAtBadPositionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 6970173
* @summary Debug pointer at bad position
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main DebugPointerAtBadPositionTest
*/
--- a/langtools/test/tools/javac/T6972327.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6972327.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6972327
* @summary JCTree.pos incorrect for annotations without modifiers and package
+ * @modules jdk.compiler/com.sun.tools.javac.api
*/
import com.sun.source.tree.*;
--- a/langtools/test/tools/javac/T6985181.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6985181.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6985181
* @summary Annotations lost from classfile
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T6993301.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6993301.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,7 @@
/**
*
* @author Jan Lahoda
+ * @modules jdk.compiler/com.sun.tools.javac.api
*/
public class T6993301 {
public static void main(String... args) throws Exception {
--- a/langtools/test/tools/javac/T6999210.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T6999210.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6999210
* @summary javac should be able to warn of anomalous conditions in classfiles
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7008643/InlinedFinallyConfuseDebuggersTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 7008643
* @summary inlined finally clauses confuse debuggers
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main InlinedFinallyConfuseDebuggersTest
*/
--- a/langtools/test/tools/javac/T7040592/CoerceNullToMoreSpecificTypeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7040592/CoerceNullToMoreSpecificTypeTest.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* @bug 7040592
* @summary Test that the assertion in State.forceStackTop does not fail at compile time.
+ * @modules java.xml
*/
import java.lang.reflect.Field;
--- a/langtools/test/tools/javac/T7040592/T7040592.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7040592/T7040592.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* @bug 7040592
* @summary Verify that null can be assigned freely to array types without a checkcast
+ * @modules jdk.compiler
*/
import java.io.PrintWriter;
--- a/langtools/test/tools/javac/T7053059/DoubleCastTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7053059/DoubleCastTest.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,8 @@
* @test
* @bug 8015499
* @summary javac, Gen is generating extra checkcast instructions in some corner cases
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
* @run main DoubleCastTest
*/
--- a/langtools/test/tools/javac/T7093325.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7093325.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Redundant entry in bytecode exception table
* temporarily workaround combo tests are causing time out in several platforms
* @library lib
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build JavacTestingAbstractThreadedTest
* @run main/othervm T7093325
*/
--- a/langtools/test/tools/javac/T7142672/Bug.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7142672/Bug.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 7142672
* @summary Problems with the value passed to the 'classes' param of JavaCompiler.CompilationTask.getTask(...)
* @author holmlund
+ * @modules java.compiler
+ * jdk.compiler
* @compile AnnoProcessor.java Bug.java Test3.java
* @run main Bug Test2.java
* @run main Bug Test2.foo
--- a/langtools/test/tools/javac/T7159016.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7159016.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 7159016
* @summary Static import of member in processor-generated class fails in JDK 7
* @library lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @run main T7159016
* @author Jessie Glick
--- a/langtools/test/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T7165659/InnerClassAttrMustNotHaveStrictFPFlagTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @test
* @bug 7165659
* @summary javac incorrectly sets strictfp access flag on inner-classes
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.File;
--- a/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8003967/DetectMutableStaticFields.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @test
* @bug 8003967
* @summary detect and remove all mutable implicit static enum fields in langtools
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
* @run main DetectMutableStaticFields
*/
--- a/langtools/test/tools/javac/T8009640/CheckRejectProfileBCPOptionsIfUsedTogetherTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8009640/CheckRejectProfileBCPOptionsIfUsedTogetherTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @bug 8009640
* @summary -profile <compact> does not work when -bootclasspath specified
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main CheckRejectProfileBCPOptionsIfUsedTogetherTest
*/
--- a/langtools/test/tools/javac/T8010659/CompilerCrashWhenMixingBinariesAndSourcesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8010659/CompilerCrashWhenMixingBinariesAndSourcesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* @bug 8010659
* @summary Javac Crashes while building OpenJFX
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main CompilerCrashWhenMixingBinariesAndSourcesTest
*/
--- a/langtools/test/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8010737/ParameterNamesAreNotCopiedToAnonymousInitTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 8010737
* @summary javac, known parameter's names should be copied to automatically
* generated constructors for inner classes
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @run main ParameterNamesAreNotCopiedToAnonymousInitTest check_class_file check_init_symbol
*/
--- a/langtools/test/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8011181/EmptyUTF8ForInnerClassNameTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @test
* @bug 8011181
* @summary javac, empty UTF8 entry generated for inner class
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.BufferedInputStream;
--- a/langtools/test/tools/javac/T8013394/CompileErrorWithIteratorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8013394/CompileErrorWithIteratorTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* @bug 8013394
* @summary compile of iterator use fails with error "defined in an inaccessible class or interface"
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main CompileErrorWithIteratorTest
*/
--- a/langtools/test/tools/javac/T8019486/WrongLNTForLambdaTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8019486/WrongLNTForLambdaTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,11 @@
* @bug 8019486 8026861 8027142
* @summary javac, generates erroneous LVT for a test case with lambda code
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main WrongLNTForLambdaTest
*/
--- a/langtools/test/tools/javac/T8022162/IncorrectSignatureDeterminationForInnerClassesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8022162/IncorrectSignatureDeterminationForInnerClassesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8022162
* @summary Incorrect signature determination for certain inner class generics
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main IncorrectSignatureDeterminationForInnerClassesTest
*/
--- a/langtools/test/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8022186/DeadCodeGeneratedForEmptyTryTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @test
* @bug 8022186
* @summary javac generates dead code if a try with an empty body has a finalizer
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.classfile.Attribute;
--- a/langtools/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,11 @@
* @bug 8024039
* @summary javac, previous solution for JDK-8022186 was incorrect
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main NoDeadCodeGenerationOnTrySmtTest
*/
--- a/langtools/test/tools/javac/T8024437/ExceptionInferenceFromClassFileTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8024437/ExceptionInferenceFromClassFileTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* @bug 8024437
* @summary Inferring the exception thrown by a lambda: sometimes fails to compile
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ExceptionInferenceFromClassFileTest
*/
--- a/langtools/test/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8028504/DontGenerateLVTForGNoneOpTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8028504
* @summary javac generates LocalVariableTable even with -g:none
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g:none DontGenerateLVTForGNoneOpTest.java
* @run main DontGenerateLVTForGNoneOpTest
*/
--- a/langtools/test/tools/javac/T8071847/T8071847.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/T8071847/T8071847.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* bug 8071847
* @summary Verify proper termination when instance initialization method uses invalid flags
+ * @modules jdk.compiler
* @compile T8071847.java
* @run main T8071847
*/
--- a/langtools/test/tools/javac/TestPkgInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TestPkgInfo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary new option -Xpkginfo for better control of when package-info.class
* is generated, also ensures no failures if package-info.java is
* not available.
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/TryWithResources/BadTwr.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TryWithResources/BadTwr.java Fri May 29 12:49:31 2015 +0200
@@ -3,7 +3,7 @@
* @bug 6911256 6964740
* @author Joseph D. Darcy
* @summary Verify bad TWRs don't compile
- * @compile/fail -source 6 TwrFlow.java
+ * @compile/fail/ref=BadTwr6.out -XDrawDiagnostics -source 6 BadTwr.java
* @compile/fail/ref=BadTwr.out -XDrawDiagnostics BadTwr.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/TryWithResources/BadTwr6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+BadTwr.java:13:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
+1 error
+3 warnings
--- a/langtools/test/tools/javac/TryWithResources/BadTwrSyntax.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TryWithResources/BadTwrSyntax.java Fri May 29 12:49:31 2015 +0200
@@ -3,7 +3,7 @@
* @bug 6911256 6964740
* @author Joseph D. Darcy
* @summary Verify bad TWRs don't compile
- * @compile/fail -source 6 BadTwrSyntax.java
+ * @compile/fail/ref=BadTwrSyntax6.out -XDrawDiagnostics -source 6 BadTwrSyntax.java
* @compile/fail/ref=BadTwrSyntax.out -XDrawDiagnostics BadTwrSyntax.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/TryWithResources/BadTwrSyntax6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,7 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+BadTwrSyntax.java:14:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
+BadTwrSyntax.java:14:43: compiler.err.illegal.start.of.expr
+2 errors
+3 warnings
--- a/langtools/test/tools/javac/TryWithResources/InterruptedExceptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TryWithResources/InterruptedExceptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7027157
* @summary Project Coin: javac warnings for AutoCloseable.close throwing InterruptedException
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/TryWithResources/TwrOnNonResource.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TryWithResources/TwrOnNonResource.java Fri May 29 12:49:31 2015 +0200
@@ -3,7 +3,7 @@
* @bug 6911256 6964740 7013420
* @author Joseph D. Darcy
* @summary Verify invalid TWR block is not accepted.
- * @compile/fail -source 6 TwrOnNonResource.java
+ * @compile/fail/ref=TwrOnNonResource6.out -XDrawDiagnostics -source 6 TwrOnNonResource.java
* @compile/fail/ref=TwrOnNonResource.out -XDrawDiagnostics TwrOnNonResource.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/TryWithResources/TwrOnNonResource6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+TwrOnNonResource.java:12:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
+1 error
+3 warnings
--- a/langtools/test/tools/javac/TryWithResources/UnusedResourcesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TryWithResources/UnusedResourcesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7023233
* @summary False positive for -Xlint:try with nested try with resources blocks
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/TryWithResources/WeirdTwr.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/TryWithResources/WeirdTwr.java Fri May 29 12:49:31 2015 +0200
@@ -1,32 +1,9 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 6911256 6964740
* @author Joseph D. Darcy
* @summary Strange TWRs
- * @compile/fail -source 6 WeirdTwr.java
+ * @compile/fail/ref=WeirdTwr.out -XDrawDiagnostics -source 6 WeirdTwr.java
* @compile WeirdTwr.java
* @run main WeirdTwr
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/TryWithResources/WeirdTwr.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,6 @@
+- compiler.warn.source.no.bootclasspath: 1.6
+- compiler.warn.option.obsolete.source: 1.6
+- compiler.warn.option.obsolete.suppression
+WeirdTwr.java:14:12: compiler.err.try.with.resources.not.supported.in.source: 1.6
+1 error
+3 warnings
--- a/langtools/test/tools/javac/VersionOpt.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/VersionOpt.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary tools/javac/versionOpt.sh fails on OpenJDK builds
* Test checks the version strings displayed by javac, using
* strings that come out of the Java runtime.
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/annotations/6550655/T6550655.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/6550655/T6550655.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6550655
* @summary javac crashes when compiling against an annotated class
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/annotations/SyntheticParameters.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/SyntheticParameters.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8065132
* @summary Test generation of annotations on inner class parameters.
* @library /lib/annotations/
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main SyntheticParameters
*/
--- a/langtools/test/tools/javac/annotations/TestAnnotationPackageInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/TestAnnotationPackageInfo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6993311
* @summary annotations on packages are not validated
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/annotations/neg/8022765/T8022765.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/neg/8022765/T8022765.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,8 @@
* @test /nodynamiccopyright/
* @bug 8022765
* @summary javac should not crash for incorrect attribute values
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @build VerifyAnnotationsAttributed
* @run main VerifyAnnotationsAttributed T8022765.java
* @compile/fail/ref=T8022765.out -XDrawDiagnostics T8022765.java
--- a/langtools/test/tools/javac/annotations/neg/8022765/T8022765.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/neg/8022765/T8022765.out Fri May 29 12:49:31 2015 +0200
@@ -1,53 +1,53 @@
-T8022765.java:10:12: compiler.err.annotation.not.valid.for.type: int
-T8022765.java:11:6: compiler.err.annotation.not.valid.for.type: java.lang.String
-T8022765.java:12:5: compiler.err.annotation.not.valid.for.type: E
-T8022765.java:14:15: compiler.err.annotation.not.valid.for.type: int
-T8022765.java:15:9: compiler.err.annotation.not.valid.for.type: java.lang.String
-T8022765.java:16:8: compiler.err.annotation.not.valid.for.type: E
-T8022765.java:21:10: compiler.err.annotation.value.must.be.annotation
-T8022765.java:23:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
-T8022765.java:24:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
-T8022765.java:25:13: compiler.err.annotation.value.must.be.annotation
-T8022765.java:27:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
-T8022765.java:28:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
-T8022765.java:37:10: compiler.err.annotation.value.must.be.annotation
-T8022765.java:38:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
-T8022765.java:40:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
-T8022765.java:41:13: compiler.err.annotation.value.must.be.annotation
-T8022765.java:42:19: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
-T8022765.java:44:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
-T8022765.java:49:7: compiler.err.annotation.value.must.be.annotation
-T8022765.java:50:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
-T8022765.java:51:7: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
-T8022765.java:53:10: compiler.err.annotation.value.must.be.annotation
-T8022765.java:54:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
-T8022765.java:55:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
-T8022765.java:59:6: compiler.err.annotation.value.not.allowable.type
-T8022765.java:60:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:12:12: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:13:6: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:14:5: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:16:15: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:17:9: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:18:8: compiler.err.annotation.not.valid.for.type: E
+T8022765.java:23:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:25:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:26:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:27:13: compiler.err.annotation.value.must.be.annotation
+T8022765.java:29:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:30:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
+T8022765.java:39:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:40:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:42:9: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:43:13: compiler.err.annotation.value.must.be.annotation
+T8022765.java:44:19: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:46:12: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
+T8022765.java:51:7: compiler.err.annotation.value.must.be.annotation
+T8022765.java:52:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:53:7: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+T8022765.java:55:10: compiler.err.annotation.value.must.be.annotation
+T8022765.java:56:16: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:57:10: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
T8022765.java:61:6: compiler.err.annotation.value.not.allowable.type
-T8022765.java:62:5: compiler.err.annotation.value.not.allowable.type
-T8022765.java:64:16: compiler.err.annotation.not.valid.for.type: int
-T8022765.java:65:10: compiler.err.annotation.not.valid.for.type: java.lang.String
-T8022765.java:66:9: compiler.err.annotation.not.valid.for.type: E
-T8022765.java:71:10: compiler.err.annotation.value.not.allowable.type
-T8022765.java:72:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:62:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:63:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:64:5: compiler.err.annotation.value.not.allowable.type
+T8022765.java:66:16: compiler.err.annotation.not.valid.for.type: int
+T8022765.java:67:10: compiler.err.annotation.not.valid.for.type: java.lang.String
+T8022765.java:68:9: compiler.err.annotation.not.valid.for.type: E
T8022765.java:73:10: compiler.err.annotation.value.not.allowable.type
-T8022765.java:74:9: compiler.err.annotation.value.not.allowable.type
-T8022765.java:75:14: compiler.err.annotation.value.must.be.annotation
-T8022765.java:77:14: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
-T8022765.java:78:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
-T8022765.java:85:10: compiler.err.annotation.value.not.allowable.type
-T8022765.java:86:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:74:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:75:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:76:9: compiler.err.annotation.value.not.allowable.type
+T8022765.java:77:14: compiler.err.annotation.value.must.be.annotation
+T8022765.java:79:14: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, java.lang.String)
+T8022765.java:80:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: int, E)
T8022765.java:87:10: compiler.err.annotation.value.not.allowable.type
-T8022765.java:88:9: compiler.err.annotation.value.not.allowable.type
-T8022765.java:89:14: compiler.err.annotation.value.must.be.annotation
-T8022765.java:90:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
-T8022765.java:92:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
-T8022765.java:97:6: compiler.err.annotation.value.not.allowable.type
-T8022765.java:98:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:88:16: compiler.err.annotation.value.not.allowable.type
+T8022765.java:89:10: compiler.err.annotation.value.not.allowable.type
+T8022765.java:90:9: compiler.err.annotation.value.not.allowable.type
+T8022765.java:91:14: compiler.err.annotation.value.must.be.annotation
+T8022765.java:92:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, int)
+T8022765.java:94:13: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
T8022765.java:99:6: compiler.err.annotation.value.not.allowable.type
-T8022765.java:100:5: compiler.err.annotation.value.not.allowable.type
-T8022765.java:101:11: compiler.err.annotation.value.must.be.annotation
-T8022765.java:102:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
-T8022765.java:103:11: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
+T8022765.java:100:12: compiler.err.annotation.value.not.allowable.type
+T8022765.java:101:6: compiler.err.annotation.value.not.allowable.type
+T8022765.java:102:5: compiler.err.annotation.value.not.allowable.type
+T8022765.java:103:11: compiler.err.annotation.value.must.be.annotation
+T8022765.java:104:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, int)
+T8022765.java:105:11: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: E, java.lang.String)
52 errors
--- a/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/neg/8022765/VerifyErroneousAnnotationsAttributed.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
/*
* @test
* @bug 8029161 8029376
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.tree.CompilationUnitTree;
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/BasicSyntaxCombo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/BasicSyntaxCombo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8002157
* @author sogoel
* @summary Basic Syntax test for repeating annotations on all elements
+ * @modules jdk.compiler
* @build Helper
* @compile BasicSyntaxCombo.java
* @run main BasicSyntaxCombo
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DeprecatedAnnoCombo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DeprecatedAnnoCombo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8002157
* @author sogoel
* @summary Combo test to check for usage of Deprecated
+ * @modules jdk.compiler
* @build Helper
* @compile DeprecatedAnnoCombo.java
* @run main DeprecatedAnnoCombo
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DocumentedAnnoCombo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/DocumentedAnnoCombo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8002157
* @author sogoel
* @summary Positive combo test for use of Documented on baseAnno/containerAnno
+ * @modules jdk.compiler
* @build Helper
* @compile DocumentedAnnoCombo.java
* @run main DocumentedAnnoCombo
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/InheritedAnnoCombo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/InheritedAnnoCombo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8002157
* @author sogoel
* @summary Positive combo test for use of Inherited on baseAnno/containerAnno
+ * @modules jdk.compiler
* @build Helper
* @compile InheritedAnnoCombo.java
* @run main InheritedAnnoCombo
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/ReflectionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/ReflectionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8001457 8027477
* @author sogoel
* @summary Reflection api tests
+ * @modules jdk.compiler
* @build Helper
* @compile expectedFiles/ExpectedBase.java expectedFiles/ExpectedContainer.java
* @run main ReflectionTest
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/RetentionAnnoCombo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/RetentionAnnoCombo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8002157
* @author sogoel
* @summary Combo test for all possible combinations for Retention Values
+ * @modules jdk.compiler
* @build Helper
* @compile RetentionAnnoCombo.java
* @run main RetentionAnnoCombo
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/TargetAnnoCombo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/combo/TargetAnnoCombo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7151010 8006547 8007766 8029017
* @summary Default test cases for running combinations for Target values
+ * @modules jdk.compiler
* @build Helper
* @run main TargetAnnoCombo
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/TypeProcOnly.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/TypeProcOnly.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,10 @@
*
* @author Mahmood Ali
* @author Werner Dietl
+ * @modules jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
*/
@SupportedAnnotationTypes("*")
public class TypeProcOnly extends AbstractProcessor {
--- a/langtools/test/tools/javac/annotations/typeAnnotations/api/AnnotatedArrayOrder.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/api/AnnotatedArrayOrder.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,8 @@
* @test
* @bug 8031744
* @summary Checks the annotation types targeting array types
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.tools.javac.api.JavacTool;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/api/ArrayCreationTree.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/api/ArrayCreationTree.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @summary Checks that the interaction between annotated and unannotated
* array levels in array creation trees
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.javac.api.JavacTool;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/api/ArrayPositionConsistency.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/api/ArrayPositionConsistency.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @summary Checks that the interaction between annotated and unannotated
* array levels
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.tools.javac.api.JavacTool;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8005085 8005877 8004829 8005681 8006734 8006775
* @summary Combinations of Target ElementTypes on (repeated)type annotations.
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8005085 8005877 8004829 8005681 8006734 8006775 8006507
* @summary Combinations of Target ElementTypes on (repeated)type annotations.
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/CombinationsTargetTest3.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8005085 8005681 8008769 8010015
* @summary Check (repeating)type annotations on lambda usage.
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main CombinationsTargetTest3
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/DeadCode.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
* @test
* @bug 6917130 8006775
* @summary test that optimized away annotations are not emited to classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class DeadCode extends ClassfileTestHelper {
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/NewTypeArguments.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
/*
* @test ClassLiterals
* @summary test that new type arguments are emitted to classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class NewTypeArguments extends ClassfileTestHelper{
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/NoTargetAnnotations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @test NoTargetAnnotations
* @summary test that annotations with no Target meta type is emitted
* only once as declaration annotation
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class NoTargetAnnotations {
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/Scopes.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/Scopes.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
* @test
* @bug 6843077 8006775
* @summary Qualified inner type annotation accessible to the class.
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
@Scopes.UniqueInner
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/SyntheticParameters.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test SyntheticParameters
* @summary Test generation of annotations on inner class parameters.
* @library /lib/annotations/
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main SyntheticParameters
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/T8008762.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/T8008762.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8008762
* @summary Type annotation on inner class in anonymous class
* shows up as regular annotation
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/T8008769.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/T8008769.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @summary Repeated type-annotations on type parm of local variable
* are not written to classfile.
* @bug 8008769
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.lang.annotation.*;
import static java.lang.annotation.RetentionPolicy.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/T8010015.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/T8010015.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @summary Wrong classfile attribution in inner class of lambda expression.
* @bug 8010015
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.lang.annotation.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
* results in 2). Elements with no annotations expect 0.
* Source template is read in from testanoninner.template
*
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.lang.annotation.*;
import java.io.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TestNewCastArray.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8005681
* @summary Repeated annotations on new,array,cast.
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.lang.annotation.*;
import java.io.*;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TypeCasts.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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 @@
* @bug 6843077 8006775
* @summary test that typecasts annotation are emitted if only the cast
* expression is optimized away
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class TypeCasts extends ClassfileTestHelper{
--- a/langtools/test/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/Wildcards.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
* @test Wildcards
* @bug 6843077 8006775
* @summary test that annotations target wildcards get emitted to classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class Wildcards extends ClassfileTestHelper {
public static void main(String[] args) throws Exception {
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/CheckErrorsForSource7.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/CheckErrorsForSource7.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @bug 8035890
* @summary Verify that the parser correctly checks for source level 8 on the new places where
* annotations can appear in 8.
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @run main CheckErrorsForSource7 CheckErrorsForSource7.java
*/
import java.io.File;
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
* annotation processor.
* @author Werner Dietl
*
+ * @modules java.compiler
+ * jdk.compiler
* @compile DummyProcessor.java
* @compile/fail/ref=TypeVariableMissingTA.out -XDrawDiagnostics TypeVariableMissingTA.java
* @compile/fail/ref=TypeVariableMissingTA.out -XDrawDiagnostics -cp . -processor DummyProcessor TypeVariableMissingTA.java
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/TypeVariableMissingTA.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-TypeVariableMissingTA.java:39:40: compiler.err.cant.resolve: kindname.class, MISSING, ,
-1 error
\ No newline at end of file
+TypeVariableMissingTA.java:41:40: compiler.err.cant.resolve: kindname.class, MISSING, ,
+1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/AfterMethodTypeParams.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8038788
* @summary Verify proper handling of annotations after method's type parameters.
+ * @modules jdk.compiler
* @build AfterMethodTypeParams
* @run main AfterMethodTypeParams
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/packageanno/PackageProcessor.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/packageanno/PackageProcessor.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,10 @@
* @author Mahmood Ali
* @author Werner Dietl
*
+ * @modules jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @compile PackageProcessor.java
* @compile -cp . -processor PackageProcessor mypackage/Anno.java mypackage/MyClass.java mypackage/package-info.java
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ClassExtends.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for class extends clauses
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java ClassExtends.java
* @run main Driver ClassExtends
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ClassTypeParam.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for class type parameters
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java ClassTypeParam.java
* @run main Driver ClassTypeParam
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ConstructorInvocationTypeArgument.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for constructor invocation type argument
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java ConstructorInvocationTypeArgument.java
* @run main Driver ConstructorInvocationTypeArgument
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Constructors.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8026791 8042451
* @summary Test population of reference info for constructor results
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java Constructors.java
* @run main Driver Constructors
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ExceptionParameters.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 8028576 8042451
* @summary Test population of reference info for exception parameters
* @author Werner Dietl
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java ExceptionParameters.java
* @run main Driver ExceptionParameters
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Fields.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for field
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java Fields.java
* @run main Driver Fields
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/FromSpecification.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test that the examples from the manual are stored as expected
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java FromSpecification.java
* @run main Driver FromSpecification
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Initializers.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 8013852 8042451
* @summary Test population of reference info for instance and class initializers
* @author Werner Dietl
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java Initializers.java
* @run main Driver Initializers
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8008077 8029721 8042451 8043974
* @summary Test population of reference info for lambda expressions
* javac crash for annotated parameter type of lambda in a field
+ * @modules jdk.compiler/com.sun.tools.classfile
* @ignore 8057687 emit correct byte code an attributes for type annotations
* @compile -g Driver.java ReferenceInfoUtil.java Lambda.java
* @run main Driver Lambda
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodInvocationTypeArgument.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method invocation type arguments
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MethodInvocationTypeArgument.java
* @run main Driver MethodInvocationTypeArgument
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodParameters.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method parameters
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MethodParameters.java
* @run main Driver MethodParameters
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReceivers.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method receivers
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MethodReceivers.java
* @run main Driver MethodReceivers
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodReturns.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method return
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MethodReturns.java
* @run main Driver MethodReturns
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodThrows.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method exception clauses
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MethodThrows.java
* @run main Driver MethodThrows
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MethodTypeParam.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for method type parameters
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MethodTypeParam.java
* @run main Driver MethodTypeParam
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 8006732 8006775 8042451
* @summary Test population of reference info for multicatch exception parameters
* @author Werner Dietl
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java MultiCatch.java
* @run main Driver MultiCatch
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451 8044009 8044010
* @summary Test population of reference info for nested types
+ * @modules jdk.compiler/com.sun.tools.classfile
* @ignore 8057687 emit correct byte code an attributes for type annotations
* @compile -g Driver.java ReferenceInfoUtil.java NestedTypes.java
* @run main Driver NestedTypes
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/NewObjects.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for new object creations
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java NewObjects.java
* @run main Driver NewObjects
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/RepeatingTypeAnnotations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
/*
* @test
* @summary Test population of reference info for repeating type annotations
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java RepeatingTypeAnnotations.java
* @run main Driver RepeatingTypeAnnotations
* @author Werner Dietl
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for resource variable
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java ResourceVariable.java
* @run main Driver ResourceVariable
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/TypeCasts.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for type casts
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java TypeCasts.java
* @run main Driver TypeCasts
*/
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/TypeTests.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8042451
* @summary Test population of reference info for class literals
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g Driver.java ReferenceInfoUtil.java TypeTests.java
* @run main Driver TypeTests
*/
--- a/langtools/test/tools/javac/api/6400303/T6400303.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6400303/T6400303.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 6400303
* @summary REGRESSION: javadoc crashes in b75
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @compile Test1.java
* @compile Test2.java
* @run main/othervm -esa T6400303
--- a/langtools/test/tools/javac/api/6406133/T6406133.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6406133/T6406133.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Compiler API ignores locale settings
* @author Maurizio Cimadamore
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6406133
*/
--- a/langtools/test/tools/javac/api/6410643/T6410643.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6410643/T6410643.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: The method JavaCompilerTool.run fails to handle null arguments
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6410643
*/
--- a/langtools/test/tools/javac/api/6411310/T6411310.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6411310/T6411310.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: FileObject should support user-friendly names via getName()
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6411310.java
* @run main T6411310
--- a/langtools/test/tools/javac/api/6411333/T6411333.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6411333/T6411333.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Ensure 6400208, 6400225, and 6400267 are tested
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6411333.java
* @run main T6411333
--- a/langtools/test/tools/javac/api/6412656/T6412656.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6412656/T6412656.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: pass annotation processor instances to compiler
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6412656
*/
--- a/langtools/test/tools/javac/api/6415780/T6415780.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6415780/T6415780.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @author igor.tseytin@...
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6415780
*/
--- a/langtools/test/tools/javac/api/6418694/T6418694.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6418694/T6418694.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: JavaFileManager.hasLocation(Location)
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6418694.java
* @run main T6418694
--- a/langtools/test/tools/javac/api/6420409/T6420409.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6420409/T6420409.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6420409
* @summary JSR 199: StandardFileManager: cannot set CLASS_PATH location
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/6420464/T6420464.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6420464/T6420464.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6420464
* @summary JSR 199: JavaFileObject.isNameCompatible throws unspecified exception (IllegalArgumentException)
* @author Igor Tseytin
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.tools.*;
--- a/langtools/test/tools/javac/api/6421111/T6421111.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6421111/T6421111.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary NullPointerException thrown when retrieving bounds for the type parameter
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile -Xlint:all T6421111.java
* @run main T6421111
--- a/langtools/test/tools/javac/api/6421756/T6421756.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6421756/T6421756.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary 6421756 JSR 199: In the method JavaCompilerTool.getTask 'options' can be supplied in the place of 'classes'
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6421756.java
* @run main T6421756
--- a/langtools/test/tools/javac/api/6422215/T6422215.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6422215/T6422215.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: What happens if a directory is missing
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6422215
*/
--- a/langtools/test/tools/javac/api/6422327/T6422327.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6422327/T6422327.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: JavaCompilerTool can compile and generate '.class' of non '.java' files
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6422327
*/
--- a/langtools/test/tools/javac/api/6423003/T6423003.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6423003/T6423003.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: confusing help message with compiler API
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6423003.java
* @run main T6423003
--- a/langtools/test/tools/javac/api/6431257/T6431257.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6431257/T6431257.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: Changes to JavaFileManager to support JSR 269 Filer API
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6431257.java package-info.java
* @run main T6431257 foo.bar.baz foo/bar/baz
--- a/langtools/test/tools/javac/api/6431435/T6431435.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6431435/T6431435.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6431435 6439406
* @summary Tree API: source files loaded implicitly from source path
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @run main T6431435
*/
--- a/langtools/test/tools/javac/api/6437349/T6437349.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6437349/T6437349.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6437349
* @summary JSR 199: JavaFileObject.isNameCompatible() will give true with some incompatible kinds
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6437349.java
* @run main T6437349
--- a/langtools/test/tools/javac/api/6437999/T6437999.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6437999/T6437999.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Unit test for encoding argument to standard file manager
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6437999.java
* @run main T6437999
--- a/langtools/test/tools/javac/api/6440333/T6440333.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6440333/T6440333.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary SimpleJavaFileObject.toString() generates URI with some extra message
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6440333.java
* @run main T6440333
--- a/langtools/test/tools/javac/api/6440528/T6440528.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6440528/T6440528.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary javac deposits package-info.class in bogus directory
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6440528.java
* @run main T6440528
--- a/langtools/test/tools/javac/api/6452876/T6452876.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6452876/T6452876.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JSR 199: DiagnosticCollector.report(null) should throw NPE
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @compile T6452876.java
* @run main T6452876
*/
--- a/langtools/test/tools/javac/api/6468404/T6468404.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6468404/T6468404.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @author jesse.glick@...
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile T6468404.java
* @run main T6468404
--- a/langtools/test/tools/javac/api/6471599/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6471599/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6471599
* @summary Type of rhs cannot be obtained when assigning to erroneous symbol
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @compile Main.java
* @run main Main
*/
--- a/langtools/test/tools/javac/api/6557752/T6557752.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6557752/T6557752.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @bug 6557752
* @summary Test for wrapping the original type in ErrorType.
* @library ../lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @compile T6557752.java
* @run main T6557752
*/
--- a/langtools/test/tools/javac/api/6598108/T6598108.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6598108/T6598108.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6598108
* @summary com.sun.source.util.Trees.isAccessible incorrect
* @author Jan Lahoda
+ * @modules jdk.compiler
*/
import com.sun.source.tree.CompilationUnitTree;
--- a/langtools/test/tools/javac/api/6608214/T6608214.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6608214/T6608214.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 6608214
* @summary Exception throw while analysing a file with error
* @author Maurizio Cimadamore
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/api/6731573/T6731573.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6731573/T6731573.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary diagnostic output should optionally include source line
* @author Maurizio Cimadamore
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @run main T6731573
*/
--- a/langtools/test/tools/javac/api/6733837/T6733837.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6733837/T6733837.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Compiler API ignores locale settings
* @author Maurizio Cimadamore
* @library ../lib
+ * @modules jdk.compiler
* @build ToolTester
* @run main T6733837
*/
--- a/langtools/test/tools/javac/api/6852595/T6852595.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/6852595/T6852595.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 6852595
* @summary Accessing scope using JSR199 API on erroneous tree causes Illegal Argument Exception
* @author mcimadamore
+ * @modules jdk.compiler/com.sun.tools.javac.tree
*/
import java.io.IOException;
--- a/langtools/test/tools/javac/api/7086261/T7086261.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/7086261/T7086261.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7086261
* @summary javac doesn't report error as expected, it only reports ClientCodeWrapper$DiagnosticSourceUnwrapper
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
*/
import javax.tools.*;
--- a/langtools/test/tools/javac/api/8007344/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/8007344/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary javac may not make tree end positions and/or doc comments
* available to processors and listeners
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor
* @run main Test
*/
--- a/langtools/test/tools/javac/api/EndPositions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/EndPositions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 7196760
* @summary javac doesn't report Diagnostic end positions properly when
* an annotation processor is present
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/api/Sibling.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/Sibling.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6399602
* @summary Verify that files are created relative to sibling
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/T6257235.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6257235.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6257235
* @summary setOption() and setExtendedOption() of JavacTool throws NullPointerException for undefined options
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.util.Arrays;
--- a/langtools/test/tools/javac/api/T6258271.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6258271.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6258271
* @summary DiagnosticMessage exposes internal name __input
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6265137.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6265137.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6265137
* @summary setOption() and setExtendedOption() of JavacTool will throw exception for some defined options
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/T6306137.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6306137.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6306137
* @summary JSR 199: encoding option doesn't affect standard file manager
+ * @modules java.compiler
+ * jdk.compiler
* @compile -encoding utf-8 T6306137.java
* @run main T6306137
* @author Peter von der Ah\u00e9
--- a/langtools/test/tools/javac/api/T6345974.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6345974.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6345974
* @summary JCPrimitiveTypeTree.getPrimitiveTypeKind() inappropriately throws an
* AssertionError for "void"
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.tools.javac.api.JavacTool;
--- a/langtools/test/tools/javac/api/T6357331.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6357331.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6357331
* @summary NPE from JavacTask.getElements() after calling CompilationTask.run
+ * @modules jdk.compiler
*/
import java.io.*;
import java.util.*;
--- a/langtools/test/tools/javac/api/T6358786.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6358786.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 6358786
* @summary Doccomments are not returned from Tree API
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.api
* @run main T6358786 T6358786.java
*/
--- a/langtools/test/tools/javac/api/T6358955.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6358955.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6358955
* @summary JavacFileManager.getFileForInput(dir) shuld throw IAE
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/T6392782.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6392782.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6392782
* @summary TreeScanner.visitImport returns null, not result of nested scan
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6395981.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6395981.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6395981 6458819 7025784 8028543
* @summary JavaCompilerTool and Tool must specify version of JLS and JVMS
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
* @run main/fail T6395981
* @run main/fail T6395981 RELEASE_3 RELEASE_5 RELEASE_6
* @run main/fail T6395981 RELEASE_0 RELEASE_1 RELEASE_2 RELEASE_3 RELEASE_4 RELEASE_5 RELEASE_6
--- a/langtools/test/tools/javac/api/T6397104.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6397104.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6397104
* @summary JSR 199: JavaFileManager.getFileForOutput should have sibling argument
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/T6400205.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6400205.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6400205
* @summary getClassLoader(location) returns null if getLocation(location) returns null
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.IOException;
--- a/langtools/test/tools/javac/api/T6400207.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6400207.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6400207
* @summary JSR 199: JavaFileManager.list and unset location
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.util.*;
--- a/langtools/test/tools/javac/api/T6407011.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6407011.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6407011 6407066
* @summary javac crashes in b78 with NPE in JavacFileManager:293
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/T6412669.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6412669.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6412669 6997958
* @summary Should be able to get SourcePositions from 269 world
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6419926.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6419926.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6419926
* @summary JSR 199: FileObject.toUri() generates URI without schema (Solaris)
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6430241.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6430241.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 6430241
* @summary Hard to disable symbol file feature through API
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox
* @run main T6430241
*/
--- a/langtools/test/tools/javac/api/T6431879.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6431879.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6431879
* @summary TreePathSCanner(CompilationUnitTree tree, P p) overloading forces use of most specific type
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6437138.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6437138.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6437138
* @summary JSR 199: Compiler doesn't diagnose crash in user code
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.net.URI;
--- a/langtools/test/tools/javac/api/T6483788.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6483788.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6483788
* @summary DefaultFileManager.ZipFileObject.toUri() fails to escape space characters
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6501502.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6501502.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6501502 6877206 6483788
* @summary JSR 199: FileObject.toUri should return file:///c:/ or file:/c:/ not file://c:/
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6838467.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6838467.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6838467
* @summary JSR199 FileObjects don't obey general contract of equals.
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/T6877206.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/T6877206.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6877206
* @summary JavaFileObject.toUri returns bogus URI (win)
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/TestClientCodeWrapper.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestClientCodeWrapper.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6437138 6482554
* @summary JSR 199: Compiler doesn't diagnose crash in user code
* @library ../lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
* @build JavacTestingAbstractProcessor TestClientCodeWrapper
* @run main TestClientCodeWrapper
*/
--- a/langtools/test/tools/javac/api/TestContainTypes.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestContainTypes.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6981185
* @summary com.sun.tools.model.JavacTypes.contains() calls Type.contains instead of Types.containsType
+ * @modules jdk.compiler
* @run main TestContainTypes
*/
--- a/langtools/test/tools/javac/api/TestDocComments.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestDocComments.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
/* @test
* @bug 6985202
* @summary no access to doc comments from Tree API
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/TestEvalExpression.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestEvalExpression.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,9 @@
* @bug 4164450
* @summary JSR 199: Standard interface for Java compilers
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * java.desktop
+ * jdk.compiler
* @compile TestEvalExpression.java evalexpr/ByteArrayClassLoader.java evalexpr/CompileFromString.java evalexpr/MemoryFileManager.java
* @run main TestEvalExpression
*/
--- a/langtools/test/tools/javac/api/TestGetElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestGetElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6930507
* @summary Symbols for anonymous and local classes made too late for use by java tree API
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/TestGetElementReference.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestGetElementReference.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8012929
* @summary Trees.getElement should work not only for declaration trees, but also for use-trees
+ * @modules jdk.compiler
* @build TestGetElementReference
* @run main TestGetElementReference
*/
--- a/langtools/test/tools/javac/api/TestGetScope.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestGetScope.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7090249
* @summary IllegalStateException from Trees.getScope when called from JSR 199
+ * @modules jdk.compiler
*/
import com.sun.source.tree.IdentifierTree;
--- a/langtools/test/tools/javac/api/TestGetTree.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestGetTree.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 6344177 6392177
* @summary Can't get tree from a top level class
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler
* @compile TestGetTree.java
* @compile -processor TestGetTree -proc:only TestGetTree.java
*/
--- a/langtools/test/tools/javac/api/TestJavacTask.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestJavacTask.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4813736 8015073
* @summary Provide a basic test of access to the Java Model from javac, and error messages
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.api
* @run main TestJavacTask TestJavacTask.java
*/
--- a/langtools/test/tools/javac/api/TestJavacTaskScanner.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestJavacTaskScanner.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary Additional functionality test of task and JSR 269
* @author Peter von der Ah\u00e9
* @library ./lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolTester
* @run main TestJavacTaskScanner TestJavacTaskScanner.java
*/
--- a/langtools/test/tools/javac/api/TestJavacTask_Lock.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestJavacTask_Lock.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7026509
* @summary Cannot use JavaCompiler to create multiple CompilationTasks for partial compilations
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/TestJavacTask_Multiple.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestJavacTask_Multiple.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7026509
* @summary Cannot use JavaCompiler to create multiple CompilationTasks for partial compilations
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/TestJavacTask_ParseAttrGen.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestJavacTask_ParseAttrGen.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7026509
* @summary Cannot use JavaCompiler to create multiple CompilationTasks for partial compilations
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/TestOperators.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestOperators.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Tree API: can't determine kind of operator
* @author Peter von der Ah\u00e9
* @library ../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestOperators
* @compile -processor TestOperators -proc:only TestOperators.java
*/
--- a/langtools/test/tools/javac/api/TestResolveError.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestResolveError.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6930108
* @summary IllegalArgumentException in AbstractDiagnosticFormatter for tools/javac/api/TestJavacTaskScanner.java
* @library ./lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
* @build ToolTester
* @run main TestResolveError
*/
--- a/langtools/test/tools/javac/api/TestResolveIdent.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestResolveIdent.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 6374357 6308351
* @summary PackageElement.getEnclosedElements() throws ClassReader$BadClassFileException
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @run main TestResolveIdent
*/
--- a/langtools/test/tools/javac/api/TestSearchPaths.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestSearchPaths.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7026941
* @summary path options ignored when reusing filemanager across tasks
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/api/TestTreePath.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestTreePath.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6473148
* @summary TreePath.iterator() throws NPE
+ * @modules jdk.compiler
*/
import java.io.*;
import java.util.Arrays;
--- a/langtools/test/tools/javac/api/TestTrees.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/TestTrees.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6346249 6392177 6411385
* @summary new Trees API
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import com.sun.source.tree.*;
--- a/langtools/test/tools/javac/api/ToolProvider/HelloWorldTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/ToolProvider/HelloWorldTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 6604599
* @summary ToolProvider should be less compiler-specific
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main HelloWorldTest
*/
--- a/langtools/test/tools/javac/api/ToolProvider/ToolProviderTest1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/ToolProvider/ToolProviderTest1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 6604599
* @summary ToolProvider should be less compiler-specific
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ToolProviderTest1
*/
--- a/langtools/test/tools/javac/api/ToolProvider/ToolProviderTest2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/ToolProvider/ToolProviderTest2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 6604599
* @summary ToolProvider should be less compiler-specific
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ToolProviderTest2
*/
--- a/langtools/test/tools/javac/api/file/SJFM_AsPath.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/file/SJFM_AsPath.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,8 @@
* @bug 8059977
* @summary StandardJavaFileManager should support java.nio.file.Path.
* Test asPath method.
+ * @modules java.compiler
+ * jdk.compiler
* @build SJFM_TestBase
* @run main SJFM_AsPath
*/
--- a/langtools/test/tools/javac/api/file/SJFM_GetFileObjects.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/file/SJFM_GetFileObjects.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,8 @@
* @bug 8059977
* @summary StandardJavaFileManager should support java.nio.file.Path.
* Test getFileObject methods.
+ * @modules java.compiler
+ * jdk.compiler
* @build SJFM_TestBase
* @run main SJFM_GetFileObjects
*/
--- a/langtools/test/tools/javac/api/file/SJFM_IsSameFile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/file/SJFM_IsSameFile.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,8 @@
* @bug 8059977
* @summary StandardJavaFileManager should support java.nio.file.Path.
* Test isSameFile method.
+ * @modules java.compiler
+ * jdk.compiler
* @build SJFM_TestBase
* @run main SJFM_IsSameFile
*/
--- a/langtools/test/tools/javac/api/file/SJFM_Locations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/file/SJFM_Locations.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,8 @@
* @bug 8059977
* @summary StandardJavaFileManager should support java.nio.file.Path.
* Test get/setLocation methods.
+ * @modules java.compiler
+ * jdk.compiler
* @build SJFM_TestBase
* @run main SJFM_Locations
*/
--- a/langtools/test/tools/javac/api/guide/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/guide/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Various bugs fixed while writing Compiler API Guide
* @author Peter von der Ah\u0081
* @library ../lib
+ * @modules java.compiler
+ * jdk.compiler
* @build ToolTester
* @compile Test.java
* @run main Test
--- a/langtools/test/tools/javac/api/taskListeners/CompileEvent.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/taskListeners/CompileEvent.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8033414
* @summary Verify that the TaskEvent.COMPILATION is fired properly.
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
* @run main CompileEvent
*/
--- a/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/taskListeners/EventsBalancedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 8040822
* @summary Check that all TaskEvents are balanced.
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/api/taskListeners/TestSimpleAddRemove.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/api/taskListeners/TestSimpleAddRemove.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7093891
* @summary support multiple task listeners
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.File;
--- a/langtools/test/tools/javac/cast/4916620/T4916620.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/cast/4916620/T4916620.java Fri May 29 12:49:31 2015 +0200
@@ -1,32 +1,9 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4916620
* @summary legal cast is rejected
* @author Christian Plesner Hansen
- * @compile/fail -Xlint:unchecked -Werror T4916620.java
+ * @compile/ref=T4916620.out -XDrawDiagnostics -Xlint:unchecked T4916620.java
* @compile -Xlint:unchecked T4916620.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/4916620/T4916620.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T4916620.java:17:33: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T4916620.BB<compiler.misc.type.captureof: 1, ? extends java.lang.Number,compiler.misc.type.captureof: 2, ? super java.lang.Integer>, T4916620.BD<java.lang.Number>
+1 warning
--- a/langtools/test/tools/javac/cast/6295056/T6295056.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/cast/6295056/T6295056.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,10 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 6295056
* @summary Unchecked cast not reported as unsafe
- * @compile/fail -Xlint:unchecked -Werror T6295056.java
+ * @compile/ref=T6295056.out -XDrawDiagnostics -Xlint:unchecked T6295056.java
* @compile T6295056.java
*/
-
public class T6295056 {
interface Foo {}
interface Bar<X> {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/6295056/T6295056.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T6295056.java:13:29: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6295056.Foo, T6295056.Bar<java.lang.Object>
+1 warning
--- a/langtools/test/tools/javac/cast/6467183/T6467183b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/cast/6467183/T6467183b.java Fri May 29 12:49:31 2015 +0200
@@ -1,32 +1,9 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @author mcimadamore
* @bug 6467183
- * @summary
- * @compile/fail -Xlint:unchecked -Werror -XDrawDiagnostics T6467183b.java
+ * @summary unchecked warning on cast of parameterized generic subclass
+ * @compile/ref=T6467183b.out -XDrawDiagnostics -Xlint:unchecked T6467183b.java
*/
class T6665356b<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/cast/6467183/T6467183b.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T6467183b.java:15:42: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6665356b<T>.A<compiler.misc.type.captureof: 1, ? extends java.lang.Number>, T6665356b<T>.B<? extends java.lang.Integer>
+1 warning
--- a/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Add support for intersection types in cast expression
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm/timeout=360 IntersectionTypeCastTest
*/
--- a/langtools/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8002099
* @summary Add support for intersection types in cast expression
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/cast/intersection/model/Model01.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/cast/intersection/model/Model01.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 8002099 6499673
* @summary Add support for intersection types in cast expression
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.tree
* @build JavacTestingAbstractProcessor ModelChecker
* @compile -processor ModelChecker Model01.java
*/
--- a/langtools/test/tools/javac/classfiles/ClassVersionChecker.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/ClassVersionChecker.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test major version for all legal combinations for -source and -target
* @author sgoel
*
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/classfiles/InnerClasses/SyntheticClasses.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/InnerClasses/SyntheticClasses.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @bug 8034854
* @summary Verify that the InnerClasses attribute has outer_class_info_index zero if it has
* inner_name_index zero (for synthetic classes)
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile SyntheticClasses.java
* @run main SyntheticClasses
*/
--- a/langtools/test/tools/javac/classfiles/InnerClasses/T8068517.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/InnerClasses/T8068517.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,10 @@
* @bug 8034854
* @summary Verify that nested enums have correct abstract flag in the InnerClasses attribute.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build ToolBox T8068517
* @run main T8068517
*/
--- a/langtools/test/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/AnnotationDefault/AnnotationDefaultTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042947
* @summary Checking AnnotationDefault attribute.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build AnnotationDefaultTest TestBase TestResult InMemoryFileManager ToolBox AnnotationDefaultVerifier
* @run main AnnotationDefaultTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/EnclosingMethod/EnclosingMethodTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042931
* @summary Checking EnclosingMethod attribute of anonymous/local class.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build EnclosingMethodTest TestBase TestResult InMemoryFileManager ToolBox
* @run main EnclosingMethodTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/LineNumberTable/LineNumberTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @bug 8040131
*
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox TestBase InMemoryFileManager LineNumberTestBase Container TestCase
* @run main LineNumberTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTableTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary local variable table attribute test.
* @bug 8040097
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox LocalVariableTestBase TestBase InMemoryFileManager
* @compile -g LocalVariableTableTest.java
* @run main LocalVariableTableTest
--- a/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTypeTableTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary local variable type table attribute test.
* @bug 8040097
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox LocalVariableTestBase TestBase InMemoryFileManager
* @compile -g LocalVariableTypeTableTest.java
* @run main LocalVariableTypeTableTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/ConstructorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/ConstructorTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for constructors.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build ConstructorTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver ConstructorTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/EnumTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/EnumTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for enum.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build EnumTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver EnumTest
@@ -36,4 +40,4 @@
// see 8026480
@ExpectedSignature(descriptor = "<init>(java.lang.String, int)", signature = "()V")
private EnumTest() {}
-}
\ No newline at end of file
+}
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/ExceptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/ExceptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for methods which throw exceptions.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build ExceptionTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver ExceptionTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/FieldTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/FieldTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for fields.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build FieldTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver FieldTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/InnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/InnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for inner classes.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build InnerClassTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver InnerClassTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/MethodParameterTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for method parameters.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build MethodParameterTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver MethodParameterTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/MethodTypeBoundTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8049238
* @summary Checks Signature attribute for type bounds.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build MethodTypeBoundTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver MethodTypeBoundTest
--- a/langtools/test/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/Signature/ReturnTypeTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,11 @@
* @bug 8049238
* @summary Checks Signature attribute for array return type of method.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules java.desktop
+ * jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @build ReturnTypeTest Driver ExpectedSignature ExpectedSignatureContainer
* @run main Driver ReturnTypeTest
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/AnonymousClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for anonymous class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @run main AnonymousClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/InnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for inner class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @run main InnerClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/LocalClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for local class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @run main LocalClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/MixTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/MixTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for complex structure of nested classes and other types.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @run main MixTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/NoSourceFileAttribute.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for file compiled without debug information.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @compile -g:none NoSourceFileAttribute.java
* @run main NoSourceFileAttribute
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/SyntheticClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/SyntheticClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for synthetic class.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @run main SyntheticClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/SourceFile/TopLevelClassesOneFileTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary sourcefile attribute test for two type in one file.
* @bug 8040129
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox SourceFileTestBase TestBase InMemoryFileManager
* @run main TopLevelClassesOneFileTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/deprecated/DeprecatedPackageTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/deprecated/DeprecatedPackageTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042261
* @summary Checking that deprecated attribute does not apply to classes of deprecated package.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox TestBase TestResult InMemoryFileManager
* @run main DeprecatedPackageTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/deprecated/DeprecatedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/deprecated/DeprecatedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary Checking what attribute is generated by annotation Deprecated
* or javadoc deprecated for field, method, class(inner/local), interface.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox TestBase TestResult InMemoryFileManager
* @run main DeprecatedTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerAnnotationTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerAnnotationsInInnerAnnotationTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner class.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerAnnotationsInInnerClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerAnnotationsInInnerEnumTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerInterfaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner annotations in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerAnnotationsInInnerInterfaceTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesHierarchyTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Test that inner classes have in its inner classes attribute enclosing classes and its immediate members.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesHierarchyTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,10 @@
* @bug 8042251 8062373
* @summary Testing InnerClasses_attribute of inner classes in anonymous class.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesInAnonymousClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesInInnerAnnotationTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8034854 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner class.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesInInnerClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8034854 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesInInnerEnumTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner classes in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesInInnerInterfaceTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner classes in local class.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesTestBase TestResult TestBase InMemoryFileManager ToolBox
* @run main InnerClassesInLocalClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesIndexTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Test that outer_class_info_index of local and anonymous class is zero.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerClassesIndexTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @bug 8034854 8042251
* @summary Testing inner classes attributes.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerClassesTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerEnumInInnerAnnotationTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerEnumInInnerEnumTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerEnumInInnerInterfaceTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner enums in inner class.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerEnumsInInnerClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerAnnotationTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner interfaces in inner annotation.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerInterfacesInInnerAnnotationTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @summary Testing InnerClasses_attribute of inner interfaces in inner class.
* @author aeremeev
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerInterfacesInInnerClassTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner interfaces in inner enum.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerInterfacesInInnerEnumTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerInterfaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Testing InnerClasses_attribute of inner interfaces in inner interface.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build InnerClassesInInnerClassTestBase InnerClassesTestBase TestBase TestResult InMemoryFileManager ToolBox
* @run main InnerInterfacesInInnerInterfaceTest
*/
--- a/langtools/test/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classfiles/attributes/innerclasses/NoInnerClassesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8042251
* @summary Test that there are no inner classes attributes in case of there are no inner classes.
* @library /tools/lib /tools/javac/lib ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build TestBase InMemoryFileManager ToolBox
* @run main NoInnerClassesTest
*/
--- a/langtools/test/tools/javac/classreader/BadClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classreader/BadClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6898851
* @summary Compiling against this corrupt class file causes a stacktrace from javac
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.File;
--- a/langtools/test/tools/javac/classreader/T7031108.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/classreader/T7031108.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 7031108
* @summary NPE in javac.jvm.ClassReader.findMethod in PackageElement.enclosedElements from AP in incr build
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor T7031108
* @run main T7031108
*/
--- a/langtools/test/tools/javac/code/ArrayClone.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/code/ArrayClone.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4329886
* @summary Clone() on arrays compiled incorrectly
* @author gafter jjg
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/conditional/Conditional.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/conditional/Conditional.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,11 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5077054
* @summary Conditional operator applies assignment conversion
* @author Tim Hanson, BEA
*
* @compile Conditional.java
- * @compile/fail -source 7 Conditional.java
+ * @compile/fail/ref=Conditional.out -XDrawDiagnostics -source 7 Conditional.java
*/
import java.util.*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/conditional/Conditional.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+- compiler.warn.source.no.bootclasspath: 1.7
+Conditional.java:16:38: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.util.List<? extends java.lang.Object>, java.util.List<java.lang.String>)
+1 error
+1 warning
--- a/langtools/test/tools/javac/constDebug/ConstDebugTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/constDebug/ConstDebugTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4645152 4785453
* @summary javac compiler incorrectly inserts <clinit> when -g is specified
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run compile -g ConstDebugTest.java
* @run main ConstDebugTest
*/
--- a/langtools/test/tools/javac/defaultMethods/AssertionsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/AssertionsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary Interfaces must not contain non-public fields, ensure $assertionsDisabled
* is not generated into an interface
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox Assertions AssertionsTest
* @run main AssertionsTest -da
* @run main AssertionsTest -ea:test.Assertions Inner
--- a/langtools/test/tools/javac/defaultMethods/BadClassfile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/BadClassfile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,12 @@
* @bug 8025087
* @summary Verify that pre-JDK8 classfiles with default and/or static methods
* are refused correctly.
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.jvm
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build BadClassfile
* @run main BadClassfile
*/
--- a/langtools/test/tools/javac/defaultMethods/CheckACC_STRICTFlagOnDefaultMethodTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/CheckACC_STRICTFlagOnDefaultMethodTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8012723
* @summary strictfp interface misses strictfp modifer on default method
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main CheckACC_STRICTFlagOnDefaultMethodTest
*/
--- a/langtools/test/tools/javac/defaultMethods/DefaultMethodFlags.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/DefaultMethodFlags.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8011383
* @summary Symbol.getModifiers omits ACC_ABSTRACT from interface with default methods
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import java.io.File;
--- a/langtools/test/tools/javac/defaultMethods/TestDefaultBody.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/TestDefaultBody.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7192246
* @summary check that code attributed for default methods is correctly generated
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.AccessFlags;
--- a/langtools/test/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/TestNoBridgeOnDefaults.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7192246
* @summary check that javac does not generate bridge methods for defaults
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.ClassFile;
--- a/langtools/test/tools/javac/defaultMethods/static/hiding/InterfaceMethodHidingTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/static/hiding/InterfaceMethodHidingTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8005166
* @summary Add support for static interface methods
* Smoke test for static interface method hiding
+ * @modules jdk.compiler
* @run main/timeout=600 InterfaceMethodHidingTest
*/
--- a/langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Automatic test for checking correctness of default super/this resolution
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm TestDefaultSuperCall
*/
--- a/langtools/test/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8027281
* @summary As per JVMS 4.9.2, invokespecial can only refer to direct superinterfaces
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile TestDirectSuperInterfaceInvoke.java
* @run main TestDirectSuperInterfaceInvoke
*/
--- a/langtools/test/tools/javac/defaultMethods/syntax/TestDefaultMethodsSyntax.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethods/syntax/TestDefaultMethodsSyntax.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* @bug 7192245 8005851 8005166 8071453
* @summary Automatic test for checking set of allowed modifiers on interface methods
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/defaultMethodsVisibility/DefaultMethodsNotVisibleForSourceLessThan8Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/defaultMethodsVisibility/DefaultMethodsNotVisibleForSourceLessThan8Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary Default methods not always visible under -source 7
* Default methods should be visible under source previous to 8
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main DefaultMethodsNotVisibleForSourceLessThan8Test
*/
--- a/langtools/test/tools/javac/diags/CheckExamples.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/diags/CheckExamples.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6968063 7127924
* @summary provide examples of code that generate diagnostics
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Example CheckExamples DocCommentProcessor
* @run main/othervm CheckExamples
*/
--- a/langtools/test/tools/javac/diags/CheckResourceKeys.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6964768 6964461 6964469 6964487 6964460 6964481 6980021
* @summary need test program to validate javac resource bundles
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.code
*/
import java.io.*;
--- a/langtools/test/tools/javac/diags/MessageInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/diags/MessageInfo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,12 @@
* @test
* @bug 7013272 7127924
* @summary Automatically generate info about how compiler resource keys are used
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.util
* @build Example ArgTypeCompilerFactory MessageFile MessageInfo
* @run main/othervm MessageInfo
*/
--- a/langtools/test/tools/javac/diags/RunExamples.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/diags/RunExamples.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,12 @@
* @test
* @bug 6968063 7127924
* @summary provide examples of code that generate diagnostics
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.util
* @build ArgTypeCompilerFactory Example HTMLWriter RunExamples DocCommentProcessor
* @run main/othervm RunExamples
*/
--- a/langtools/test/tools/javac/diags/examples/MrefInferAndExplicitParams.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/diags/examples/MrefInferAndExplicitParams.java Fri May 29 12:49:31 2015 +0200
@@ -8,7 +8,7 @@
*
* 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
+ * 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).
*
--- a/langtools/test/tools/javac/doclint/DocLintTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doclint/DocLintTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004833
* @summary Integrate doclint support into javac
+ * @modules jdk.compiler/com.sun.tools.javac.main
*/
import java.io.File;
--- a/langtools/test/tools/javac/doclint/IncludePackagesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doclint/IncludePackagesTest.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* @bug 8071851
* @summary Test the -Xdoclint/package option
+ * @modules jdk.compiler/com.sun.tools.javac.main
*/
import java.io.File;
--- a/langtools/test/tools/javac/doctree/AttrTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/AttrTest.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,10 @@
* @test
* @bug 7021614 8076026
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester AttrTest.java
*/
--- a/langtools/test/tools/javac/doctree/AuthorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/AuthorTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester AuthorTest.java
*/
--- a/langtools/test/tools/javac/doctree/BadTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/BadTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester Bad.java
*/
--- a/langtools/test/tools/javac/doctree/CodeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/CodeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester CodeTest.java
*/
--- a/langtools/test/tools/javac/doctree/DeprecatedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/DeprecatedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester DeprecatedTest.java
*/
--- a/langtools/test/tools/javac/doctree/DocRootTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/DocRootTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester DocRootTest.java
*/
--- a/langtools/test/tools/javac/doctree/DocTreePathScannerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/DocTreePathScannerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8009724
* @summary adding DocTreePath and DocTreePathScanner
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.doctree.DocCommentTree;
--- a/langtools/test/tools/javac/doctree/ElementTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ElementTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester ElementTest.java
*/
--- a/langtools/test/tools/javac/doctree/EntityTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/EntityTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester EntityTest.java
*/
--- a/langtools/test/tools/javac/doctree/ExceptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ExceptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester ExceptionTest.java
*/
--- a/langtools/test/tools/javac/doctree/FirstSentenceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/FirstSentenceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester FirstSentenceTest.java
*/
--- a/langtools/test/tools/javac/doctree/InheritDocTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/InheritDocTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester InheritDocTest.java
*/
--- a/langtools/test/tools/javac/doctree/LinkPlainTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/LinkPlainTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester LinkPlainTest.java
*/
--- a/langtools/test/tools/javac/doctree/LinkTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/LinkTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester LinkTest.java
*/
--- a/langtools/test/tools/javac/doctree/LiteralTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/LiteralTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester LiteralTest.java
*/
--- a/langtools/test/tools/javac/doctree/ParamTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ParamTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester ParamTest.java
*/
--- a/langtools/test/tools/javac/doctree/ReferenceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ReferenceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
* @summary check references in at-see and {at-link} tags
+ * @modules jdk.compiler
* @build ReferenceTest
* @compile -processor ReferenceTest -proc:only ReferenceTest.java
*/
--- a/langtools/test/tools/javac/doctree/ReturnTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ReturnTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester ReturnTest.java
*/
--- a/langtools/test/tools/javac/doctree/SeeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/SeeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614 8031212
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester SeeTest.java
*/
--- a/langtools/test/tools/javac/doctree/SerialDataTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/SerialDataTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester SerialDataTest.java
*/
--- a/langtools/test/tools/javac/doctree/SerialFieldTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/SerialFieldTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester SerialFieldTest.java
*/
--- a/langtools/test/tools/javac/doctree/SerialTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/SerialTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester SerialTest.java
*/
--- a/langtools/test/tools/javac/doctree/SimpleDocTreeVisitorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/SimpleDocTreeVisitorTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.doctree.DocCommentTree;
--- a/langtools/test/tools/javac/doctree/SinceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/SinceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester SinceTest.java
*/
--- a/langtools/test/tools/javac/doctree/TagTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/TagTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester TagTest.java
*/
--- a/langtools/test/tools/javac/doctree/ThrowableTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ThrowableTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester ThrowableTest.java
*/
--- a/langtools/test/tools/javac/doctree/ValueTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/ValueTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester ValueTest.java
*/
--- a/langtools/test/tools/javac/doctree/VersionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/VersionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 7021614
* @summary extend com.sun.source API to support parsing javadoc comments
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DocCommentTester
* @run main DocCommentTester VersionTest.java
*/
--- a/langtools/test/tools/javac/doctree/positions/TestPosition.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/doctree/positions/TestPosition.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8008174
* @summary proper source positions for doc comments
+ * @modules jdk.compiler
* @build TestPosition
* @compile/ref=TestPosition.out -processor TestPosition -proc:only TestPositionSource.java
*/
--- a/langtools/test/tools/javac/enum/6350057/T6350057.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/enum/6350057/T6350057.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test that parameters on implicit enum methods have the right kind
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor T6350057
* @compile -processor T6350057 -proc:only TestEnum.java
*/
--- a/langtools/test/tools/javac/enum/6424358/T6424358.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/enum/6424358/T6424358.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Synthesized static enum method values() is final
* @author Peter von der Ah\u00e9
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor T6424358
* @compile -processor T6424358 -proc:only T6424358.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/expression/DeeplyChainedNonPolyExpressionTest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8079613
+ * @summary Ensure that compiler ascertains a class of patently non-poly expressions as such
+ * @run main/timeout=10 DeeplyChainedNonPolyExpressionTest
+ */
+
+public class DeeplyChainedNonPolyExpressionTest {
+ static class JSO {
+
+ JSO put(String s, Object y) {
+ return null;
+ }
+
+ JSO put(java.lang.String x, java.util.Collection<String> y) {
+ return null;
+ }
+
+ JSO put(java.lang.String x, int y) {
+ return null;
+ }
+
+ JSO put(java.lang.String x, long y) {
+ return null;
+ }
+
+ JSO put(java.lang.String x, double y) {
+ return null;
+ }
+
+ JSO put(java.lang.String x, java.util.Map<String, String> y) {
+ return null;
+ }
+
+ JSO put(java.lang.String x, boolean y) {
+ return null;
+ }
+ }
+
+ static class JSA {
+
+ JSA put(Object o) {
+ return null;
+ }
+
+ JSA put(int i, Object x) {
+ return null;
+ }
+
+ JSA put(boolean x) {
+ return null;
+ }
+
+ JSA put(int x) {
+ return null;
+ }
+
+ JSA put(int i, int x) {
+ return null;
+ }
+
+ JSA put(int x, boolean y) {
+ return null;
+ }
+
+ JSA put(int i, long x) {
+ return null;
+ }
+
+ JSA put(long x) {
+ return null;
+ }
+
+ JSA put(java.util.Collection<String> x) {
+ return null;
+ }
+
+ JSA put(int i, java.util.Collection<String> x) {
+ return null;
+ }
+
+ JSA put(int i, java.util.Map<String, String> x) {
+ return null;
+ }
+
+ JSA put(java.util.Map<String, String> x) {
+ return null;
+ }
+
+ JSA put(int i, double x) {
+ return null;
+ }
+
+ JSA put(double x) {
+ return null;
+ }
+ }
+
+ public static void main(String [] args) {
+ }
+ public static void foo() {
+ new JSO()
+ .put("s", new JSA())
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s"))
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s").put("s"))
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s").put("s").put("s")
+ .put("s").put("s").put("s")
+ .put("s").put("s"))
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s"))
+ .put("s", new JSA())
+ )
+ )
+ )
+ )
+ )
+ .put("s", new JSO()
+ .put("s", new JSA().put("s"))
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s").put("s"))
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s").put("s").put("s")
+ .put("s").put("s").put("s")
+ .put("s").put("s"))
+ .put("s", new JSA())
+ .put("s", new JSO()
+ .put("s", new JSO()
+ .put("s", new JSA().put("s"))
+ .put("s", new JSA()))
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ );
+ }
+}
--- a/langtools/test/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8027789
* @summary check that the direct superclass is used as the site when calling
* a superclass' method
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile Base.java NonDirectSuper.java
* @run main test.NonDirectSuper
*/
--- a/langtools/test/tools/javac/failover/CheckAttributedTree.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,10 @@
* @summary assorted position errors in compiler syntax trees
* temporarily workaround combo tests are causing time out in several platforms
* @library ../lib
+ * @modules java.desktop
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm CheckAttributedTree -q -r -et ERRONEOUS .
*/
--- a/langtools/test/tools/javac/fatalErrors/NoJavaLangTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/fatalErrors/NoJavaLangTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4263768 4785453
* @summary Verify that the compiler does not crash when java.lang is not
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main NoJavaLangTest
*/
--- a/langtools/test/tools/javac/file/BootClassPathPrepend.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/BootClassPathPrepend.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8067445
* @summary Verify that file.Locations analyze sun.boot.class.path for BCP prepends/appends
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
*/
import java.io.IOException;
@@ -73,4 +76,4 @@
throw new AssertionError("Cannot find class that was prepended on BCP");
}
}
-}
\ No newline at end of file
+}
--- a/langtools/test/tools/javac/file/ExplodedImage.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/ExplodedImage.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,10 @@
* @summary Verify that compiling against the exploded JDK image works, and that Locations close
* the directory streams properly when working with exploded JDK image.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox ExplodedImage
* @run main ExplodedImage
*/
--- a/langtools/test/tools/javac/file/T7018098.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/T7018098.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 7018098
* @summary CacheFSInfo persists too long
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor T7018098
* @run main T7018098
*/
--- a/langtools/test/tools/javac/file/T7068437.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/T7068437.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7068437
* @summary Filer.getResource(SOURCE_OUTPUT, ...) no longer works in JDK 7 w/o -s
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.FileNotFoundException;
--- a/langtools/test/tools/javac/file/T7068451.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/T7068451.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 7068451
* @summary Regression: javac compiles fixed sources against previous,
* not current, version of generated sources
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/file/zip/8003512/LoadClassFromJava6CreatedJarTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/zip/8003512/LoadClassFromJava6CreatedJarTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @test
* @bug 8003512
* @summary javac doesn't work with jar files with >64k entries
+ * @modules jdk.compiler
+ * jdk.jartool/sun.tools.jar
* @compile -target 6 -source 6 -XDignore.symbol.file LoadClassFromJava6CreatedJarTest.java ../Utils.java
* @run main/timeout=360 LoadClassFromJava6CreatedJarTest
*/
--- a/langtools/test/tools/javac/file/zip/T6836682.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/zip/T6836682.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6836682 7025988
* @summary JavacFileManager handling of zip64 archives (Scenario A and B)
+ * @modules jdk.compiler
+ * jdk.jartool/sun.tools.jar
* @compile -XDignore.symbol.file T6836682.java Utils.java
* @run main T6836682
*/
--- a/langtools/test/tools/javac/file/zip/T6865530.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/file/zip/T6865530.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6865530
* @summary ensure JavacFileManager handles non-standard zipfiles.
+ * @modules jdk.compiler
+ * jdk.jartool/sun.tools.jar
* @compile -XDignore.symbol.file T6865530.java
* @run main T6865530
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/file/zip/T8076104.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8076104
+ * @summary Verify that ZipFileIndexFileObject and ZipFileObject's getCharContent method
+ * do not return cached content for another file.
+ * @run main T8076104
+ */
+import com.sun.tools.javac.Main;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+import javax.tools.FileObject;
+import javax.tools.JavaCompiler;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+
+@SupportedAnnotationTypes("*")
+public class T8076104 extends AbstractProcessor {
+
+ public static void main(String [] args) throws Exception {
+ new T8076104().run();
+ }
+
+ void run() throws Exception {
+ File testJar = createJar();
+ doTest(testJar);
+ doTest(testJar, "-XDuseOptimizedZip=false");
+ }
+
+ File createJar() throws Exception {
+ File testJar = new File(System.getProperty("test.classes"), "T8076104-test.jar");
+ testJar.delete();
+ try (OutputStream fileOut = new FileOutputStream(testJar);
+ JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(fileOut))) {
+ jarOut.putNextEntry(new JarEntry("d1/A.java"));
+ jarOut.write("1".getBytes());
+ jarOut.putNextEntry(new JarEntry("d2/A.java"));
+ jarOut.write("2".getBytes());
+ }
+
+ return testJar;
+ }
+
+ JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+
+ void doTest(File testJar, String... additionalArgs) {
+ List<String> options = new ArrayList<>();
+ options.add("-proc:only");
+ options.add("-processor");
+ options.add("T8076104");
+ options.add("-classpath");
+ options.add(System.getProperty("test.classes") + File.pathSeparator + testJar.getAbsolutePath());
+ options.addAll(Arrays.asList(additionalArgs));
+ options.add(System.getProperty("test.src") + File.separator + "T8076104.java");
+
+ int res = Main.compile(options.toArray(new String[0]));
+
+ if (res != 0) {
+ throw new AssertionError("Unexpected error code: " + res);
+ }
+ }
+
+ @Override
+ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+ assertFileContent("d1/A.java", "1");
+ assertFileContent("d2/A.java", "2");
+ return false;
+ }
+
+ void assertFileContent(String relPath,
+ String expectedContent) {
+ try {
+ FileObject fo = processingEnv.getFiler()
+ .getResource(StandardLocation.CLASS_PATH, "", relPath);
+ String actualContent = fo.getCharContent(false).toString();
+
+ if (!expectedContent.equals(actualContent)) {
+ throw new AssertionError("Actual content not matching the expected content: " +
+ actualContent);
+ }
+ } catch (IOException ex) {
+ throw new AssertionError("Unexpected exception: ", ex);
+ }
+ }
+
+ @Override
+ public SourceVersion getSupportedSourceVersion() {
+ return SourceVersion.latest();
+ }
+}
--- a/langtools/test/tools/javac/flow/LVTHarness.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/flow/LVTHarness.java Fri May 29 12:49:31 2015 +0200
@@ -28,6 +28,7 @@
* javac crash while creating LVT entry for a local variable defined in
* an inner block
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
* @build JavacTestingAbstractProcessor LVTHarness
* @run main LVTHarness
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/4453032/InterfaceCast1.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4453032
+ * @summary overridden interface method causes the compiler to reject cast
+ * @author gafter
+ *
+ * @compile InterfaceCast1.java
+ */
+
+public class InterfaceCast1 {
+ public static void main(String[] args) throws Exception {
+ }
+}
+
+interface Collection<E> {
+ <T> T[] toArray(T[] a);
+}
+
+interface Set<E> extends Collection<E> {
+ <T> T[] toArray(T[] a);
+}
+
+interface SortedSet<E> extends Set<E> {
+}
+
+class TreeSet<E> {
+ public void addAll(Collection<E> c) {
+ if (c instanceof SortedSet) {
+ SortedSet<E> ss = (SortedSet<E>) c;
+ }
+ }
+}
--- a/langtools/test/tools/javac/generics/6413682/TestPos.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/6413682/TestPos.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6413682
* @summary Compiler confused about implicit type args and arrays
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler
*/
import com.sun.source.tree.CompilationUnitTree;
--- a/langtools/test/tools/javac/generics/CastCrash.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/CastCrash.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5025346
* @summary Crash on cast
* @author gafter
*
- * @compile/fail CastCrash.java
+ * @compile/fail/ref=CastCrash.out -XDrawDiagnostics CastCrash.java
*/
package cast.crash;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/CastCrash.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+CastCrash.java:19:22: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: cast.crash.LI, cast.crash.SN)
+1 error
--- a/langtools/test/tools/javac/generics/Covar3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/Covar3.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4907941
* @summary missing ambiguity error
* @author gafter
*
- * @compile/fail Covar3.java
+ * @compile/fail/ref=Covar3.out -XDrawDiagnostics Covar3.java
*/
package covar3;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/Covar3.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Covar3.java:19:10: compiler.err.ref.ambiguous: f, kindname.method, f(T), covar3.Test3, kindname.method, f(java.lang.String), covar3.Test3
+1 error
--- a/langtools/test/tools/javac/generics/Covar4.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/Covar4.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4965756
* @summary no covariant returns involving primitives
* @author gafter
*
- * @compile/fail Covar4.java
+ * @compile/fail/ref=Covar4.out -XDrawDiagnostics Covar4.java
*/
public class Covar4 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/Covar4.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Covar4.java:15:20: compiler.err.override.incompatible.ret: (compiler.misc.cant.override: f(), Covar4.B1, f(), Covar4.A1), int, long
+1 error
--- a/langtools/test/tools/javac/generics/ErasureClashCrash.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/ErasureClashCrash.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4951670
* @summary javac crash with improper overrider
* @author gafter
*
- * @compile/fail ErasureClashCrash.java
+ * @compile/fail/ref=ErasureClashCrash.out -XDrawDiagnostics ErasureClashCrash.java
*/
interface Compar<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/ErasureClashCrash.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+ErasureClashCrash.java:14:16: compiler.err.name.clash.same.erasure.no.override: compareTo(java.lang.Object), ErasureClashCrash, compareTo(T), Compar, compareTo(java.lang.Object), ErasureClashCrash
+1 error
--- a/langtools/test/tools/javac/generics/GenLit1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/GenLit1.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4987844
* @summary compiler crash with ill-formed annotation
* @author gafter
*
- * @compile/fail GenLit1.java
+ * @compile/fail/ref=GenLit1.out -XDrawDiagnostics GenLit1.java
*/
package genLit1;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/GenLit1.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+GenLit1.java:16:5: compiler.err.type.var.cant.be.deref
+1 error
--- a/langtools/test/tools/javac/generics/GenLit2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/GenLit2.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4942201
* @summary java allows class literal on generic type parameter array
* @author gafter
*
- * @compile/fail GenLit2.java
+ * @compile/fail/ref=GenLit2.out -XDrawDiagnostics GenLit2.java
*/
package genLit2;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/GenLit2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+GenLit2.java:13:18: compiler.err.type.var.cant.be.deref
+1 error
--- a/langtools/test/tools/javac/generics/GenericThrowable.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/GenericThrowable.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4984157
* @summary java.lang.Throwable inheritance in parameterized type
* @author gafter
*
- * @compile/fail GenericThrowable.java
+ * @compile/fail/ref=GenericThrowable.out -XDrawDiagnostics GenericThrowable.java
*/
class GenericThrowable<T> extends NullPointerException {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/GenericThrowable.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+GenericThrowable.java:10:35: compiler.err.generic.throwable
+1 error
--- a/langtools/test/tools/javac/generics/GetClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/GetClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4919255 4982096 5004321
* @summary the type of x.getClass() is no longer Class<? extends X>
* @author gafter
*
- * @compile/fail GetClass.java
+ * @compile/fail/ref=GetClass.out -XDrawDiagnostics GetClass.java
*/
public class GetClass {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/GetClass.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+GetClass.java:12:69: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.Class<compiler.misc.type.captureof: 1, ? extends java.lang.Class>, java.lang.Class<? extends java.lang.Class<GetClass>>)
+1 error
--- a/langtools/test/tools/javac/generics/InheritanceConflict.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/InheritanceConflict.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4984158
* @summary two inherited methods with same signature
* @author gafter, Maurizio Cimadamore
*
- * @compile/fail InheritanceConflict.java
+ * @compile/fail/ref=InheritanceConflict.out -XDrawDiagnostics InheritanceConflict.java
*/
package inheritance.conflict;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/InheritanceConflict.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+InheritanceConflict.java:20:1: compiler.err.concrete.inheritance.conflict: f(T), inheritance.conflict.B<java.lang.String>, f(java.lang.String), inheritance.conflict.A<java.lang.String>, inheritance.conflict.B<java.lang.String>
+1 error
--- a/langtools/test/tools/javac/generics/InheritanceConflict3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/InheritanceConflict3.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4984158
* @summary two inherited methods with same signature
* @author darcy
*
- * @compile/fail InheritanceConflict3.java
+ * @compile/fail/ref=InheritanceConflict3.out -XDrawDiagnostics InheritanceConflict3.java
*/
package inheritance.conflict3;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/InheritanceConflict3.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+InheritanceConflict3.java:14:10: compiler.err.name.clash.same.erasure: f(java.lang.Object), f(T)
+InheritanceConflict3.java:17:1: compiler.err.concrete.inheritance.conflict: f(java.lang.Object), inheritance.conflict3.X1, f(T), inheritance.conflict3.X1, inheritance.conflict3.X1
+2 errors
--- a/langtools/test/tools/javac/generics/InstanceOf2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/InstanceOf2.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4982096 5004321
* @summary the type in an instanceof expression must be reifiable
* @author seligman
*
- * @compile/fail InstanceOf2.java
+ * @compile/fail/ref=InstanceOf2.out -XDrawDiagnostics InstanceOf2.java
*/
public class InstanceOf2 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/InstanceOf2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+InstanceOf2.java:12:48: compiler.err.illegal.generic.type.for.instof
+1 error
--- a/langtools/test/tools/javac/generics/InstanceOf3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/InstanceOf3.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4982096 5004321
+ * @test /nodynamiccopyright/
+ * @ bug
* @summary the type in an instanceof expression must be reifiable
* @author seligman
*
- * @compile/fail InstanceOf3.java
+ * @compile/fail/ref=InstanceOf3.out -XDrawDiagnostics InstanceOf3.java
*/
public class InstanceOf3 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/InstanceOf3.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+InstanceOf3.java:12:48: compiler.err.illegal.generic.type.for.instof
+1 error
--- a/langtools/test/tools/javac/generics/InterfaceCast1.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4453032
- * @summary overridden interface method causes the compiler to reject cast
- * @author gafter
- *
- * @compile InterfaceCast1.java
- */
-
-public class InterfaceCast1 {
- public static void main(String[] args) throws Exception {
- }
-}
-
-interface Collection<E> {
- <T> T[] toArray(T[] a);
-}
-
-interface Set<E> extends Collection<E> {
- <T> T[] toArray(T[] a);
-}
-
-interface SortedSet<E> extends Set<E> {
-}
-
-class TreeSet<E> {
- public void addAll(Collection<E> c) {
- if (c instanceof SortedSet) {
- SortedSet<E> ss = (SortedSet<E>) c;
- }
- }
-}
--- a/langtools/test/tools/javac/generics/Multibound1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/Multibound1.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4482403
* @summary javac failed to check second bound
* @author gafter
*
- * @compile/fail Multibound1.java
+ * @compile/fail/ref=Multibound1.out -XDrawDiagnostics Multibound1.java
*/
package Multibound1;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/Multibound1.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Multibound1.java:16:19: compiler.err.not.within.bounds: Multibound1.D, T
+1 error
--- a/langtools/test/tools/javac/generics/Nonlinear.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/Nonlinear.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4607420
* @summary A bug in the original JSR14 generics specification
* created a loophole in the type system.
*
- * @compile/fail Nonlinear.java
+ * @compile/fail/ref=Nonlinear.out -XDrawDiagnostics Nonlinear.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/Nonlinear.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+Nonlinear.java:35:36: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.bounds: A, B,A)
+Nonlinear.java:71:45: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.bounds: A, B,A,A)
+2 errors
--- a/langtools/test/tools/javac/generics/PrimitiveVariant.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/PrimitiveVariant.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4471667
* @summary compiler allows overriding with different primitive return type
* @author gafter
*
- * @compile/fail PrimitiveVariant.java
+ * @compile/fail/ref=PrimitiveVariant.out -XDrawDiagnostics PrimitiveVariant.java
*/
package PrimitiveVariant;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/PrimitiveVariant.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+PrimitiveVariant.java:20:1: compiler.err.does.not.override.abstract: PrimitiveVariant.Main, m(), PrimitiveVariant.I
+PrimitiveVariant.java:21:18: compiler.err.override.incompatible.ret: (compiler.misc.cant.implement: m(), PrimitiveVariant.Main, m(), PrimitiveVariant.I), short, double
+2 errors
--- a/langtools/test/tools/javac/generics/RefEqual.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/RefEqual.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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
+ * @test /nodynamiccopyright/
* @bug 4948130
* @summary casting conversion checks changed for covariant returns
* @author gafter
*
- * @compile/fail RefEqual.java
+ * @compile/fail/ref=RefEqual.out -XDrawDiagnostics RefEqual.java
*/
class RefEqual {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/RefEqual.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+RefEqual.java:13:26: compiler.err.incomparable.types: java.lang.Class<java.lang.String>, java.lang.Class<java.lang.Integer>
+1 error
--- a/langtools/test/tools/javac/generics/SelfImplement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/SelfImplement.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4725668
* @summary generics: reject implementation with incorrect return type
* @author gafter
*
- * @compile/fail SelfImplement.java
+ * @compile/fail/ref=SelfImplement.out -XDrawDiagnostics SelfImplement.java
*/
class SelfImplement {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/SelfImplement.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+SelfImplement.java:15:21: compiler.err.concrete.inheritance.conflict: f(T), SelfImplement.A<java.lang.Integer>, f(java.lang.Integer), SelfImplement.A<java.lang.Integer>, SelfImplement.A<java.lang.Integer>
+1 error
--- a/langtools/test/tools/javac/generics/T4695348.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/T4695348.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4695348
* @summary generics: compiler allows ref to type bounds in static members
* @author gafter
*
- * @compile/fail T4695348.java
+ * @compile/fail/ref=T4695348.out -XDrawDiagnostics T4695348.java
*/
class T4695348<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/T4695348.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T4695348.java:11:12: compiler.err.non-static.cant.be.ref: kindname.type.variable, T
+1 error
--- a/langtools/test/tools/javac/generics/T4738171.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/T4738171.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4738171
* @summary generics: problem with equivalence of generic types
* @author gafter
*
- * @compile/fail T4738171.java
+ * @compile/fail/ref=T4738171.out -XDrawDiagnostics T4738171.java
*/
interface If<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/T4738171.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T4738171.java:11:14: compiler.err.non-static.cant.be.ref: kindname.type.variable, T
+1 error
--- a/langtools/test/tools/javac/generics/T4739399.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/T4739399.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4739399
* @summary generics: crash after error regarding bounds on type variable
* @author gafter
*
- * @compile/fail T4739399.java
+ * @compile/fail/ref=T4739399.out -XDrawDiagnostics T4739399.java
*/
class T4739399 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/T4739399.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T4739399.java:18:64: compiler.err.type.var.may.not.be.followed.by.other.bounds
+1 error
--- a/langtools/test/tools/javac/generics/T4757416.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/T4757416.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4756416
* @summary generics: erasure clash not detected
* @author gafter
*
- * @compile/fail T4757416.java
+ * @compile/fail/ref=T4757416.out -XDrawDiagnostics T4757416.java
*/
class T4756416 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/T4757416.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,3 @@
+T4757416.java:14:23: compiler.err.name.clash.same.erasure.no.override.1: id(java.lang.String), T4756416.D, id(A), T4756416.I, id(A), T4756416.C
+T4757416.java:15:24: compiler.err.name.clash.same.erasure.no.override.1: id(java.lang.Integer), T4756416.D, id(A), T4756416.C, id(A), T4756416.I
+2 errors
--- a/langtools/test/tools/javac/generics/T5011073.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/T5011073.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5011073
* @summary javac should implement JLS3 three-pass overload resolution
* @author gafter
*
- * @compile/fail T5011073.java
+ * @compile/fail/ref=T5011073.out -XDrawDiagnostics T5011073.java
*/
import java.util.*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/T5011073.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T5011073.java:15:9: compiler.err.cant.apply.symbol: kindname.method, f, java.util.Set<java.lang.String>,java.lang.Class<java.lang.String>, java.util.Set<java.lang.Integer>,java.lang.Class, kindname.class, T5011073, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.Set<java.lang.Integer>, java.util.Set<java.lang.String>))
+1 error
--- a/langtools/test/tools/javac/generics/TyparamLit.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/TyparamLit.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4881265
* @summary generics: compiler allows T.class for type variable T
* @author gafter
*
- * @compile/fail TyparamLit.java
+ * @compile/fail/ref=TyparamLit.out -XDrawDiagnostics TyparamLit.java
*/
class TyparamLit<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/TyparamLit.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+TyparamLit.java:11:16: compiler.err.type.var.cant.be.deref
+1 error
--- a/langtools/test/tools/javac/generics/TyparamStaticScope2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/TyparamStaticScope2.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5046972
* @summary type parameter referenced in static inner class improperly allowed!
* @author gafter
*
- * @compile/fail TyparamStaticScope2.java
+ * @compile/fail/ref=TyparamStaticScope2.out -XDrawDiagnostics TyparamStaticScope2.java
*/
package typaram.static_.scope2;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/TyparamStaticScope2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+TyparamStaticScope2.java:13:40: compiler.err.non-static.cant.be.ref: kindname.type.variable, T
+1 error
--- a/langtools/test/tools/javac/generics/UncheckedArray.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/UncheckedArray.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4992316
* @summary compiler allows new array of array of type parameter
* @author gafter
*
- * @compile/fail UncheckedArray.java
+ * @compile/fail/ref=UncheckedArray.out -XDrawDiagnostics UncheckedArray.java
*/
package unchecked.array;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/UncheckedArray.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+UncheckedArray.java:14:20: compiler.err.generic.array.creation
+1 error
--- a/langtools/test/tools/javac/generics/UncheckedConstructor.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/UncheckedConstructor.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,11 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4951260
* @summary compiler disallows raw call to generic constructor
* @author gafter
*
* @compile -Werror UncheckedConstructor.java
- * @compile/fail -Werror -Xlint:unchecked UncheckedConstructor.java
+ * @compile/fail/ref=UncheckedConstructor.out -XDrawDiagnostics -Werror -Xlint:unchecked UncheckedConstructor.java
*/
import java.util.*;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/UncheckedConstructor.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,5 @@
+UncheckedConstructor.java:18:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.util.Enumeration<java.lang.Object>, compiler.misc.anonymous.class: java.util.Enumeration, kindname.class, G3
+UncheckedConstructor.java:18:16: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), compiler.misc.anonymous.class: java.util.Enumeration, java.util.Enumeration<java.lang.Object>
+- compiler.err.warnings.and.werror
+1 error
+2 warnings
--- a/langtools/test/tools/javac/generics/UncheckedCovariance.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/UncheckedCovariance.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,11 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4949303
* @summary A method returning a raw type cannot override a method returning a generic type
* @author gafter
*
* @compile UncheckedCovariance.java
- * @compile/fail -Xlint:unchecked -Werror UncheckedCovariance.java
+ * @compile/fail/ref=UncheckedCovariance.out -XDrawDiagnostics -Xlint:unchecked -Werror UncheckedCovariance.java
*/
class UncheckedCovariance {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/UncheckedCovariance.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+UncheckedCovariance.java:17:13: compiler.warn.override.unchecked.ret: (compiler.misc.unchecked.override: f(), UncheckedCovariance.B, f(), UncheckedCovariance.A), UncheckedCovariance.Box, UncheckedCovariance.Box<java.lang.Integer>
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/generics/UnsoundInference.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/UnsoundInference.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5020448
* @summary Generic method allowing passing of types that don't match collection types
* @author gafter
*
- * @compile/fail UnsoundInference.java
+ * @compile/fail/ref=UnsoundInference.out -XDrawDiagnostics UnsoundInference.java
*/
import java.util.ArrayList;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/UnsoundInference.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+UnsoundInference.java:18:9: compiler.err.cant.apply.symbol: kindname.method, transferBug, Var[],java.util.Collection<Var>, java.lang.Object[],java.util.ArrayList<java.lang.String>, kindname.class, UnsoundInference, (compiler.misc.incompatible.eq.lower.bounds: Var, java.lang.String, java.lang.Object)
+1 error
--- a/langtools/test/tools/javac/generics/abstract/T4717181c.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/abstract/T4717181c.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4717181
* @summary javac treats inherited abstract method as an overrider
* @author gafter
*
- * @compile/fail T4717181c.java
+ * @compile/fail/ref=T4717181c.out -XDrawDiagnostics T4717181c.java
*/
class T4717181c {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/abstract/T4717181c.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T4717181c.java:15:21: compiler.err.types.incompatible.diff.ret: T4717181c.A<java.lang.Integer>, T4717181c.A<java.lang.Integer>, f(java.lang.Integer)
+1 error
--- a/langtools/test/tools/javac/generics/bridges/BridgeHarness.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/bridges/BridgeHarness.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8013789
* @summary Compiler should emit bridges in interfaces
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor BridgeHarness
* @run main BridgeHarness
*/
--- a/langtools/test/tools/javac/generics/diamond/6996914/T6996914a.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/diamond/6996914/T6996914a.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* @bug 6996914 7020044 8062373
* @summary Diamond inference: problem when accessing protected constructor
+ * @modules jdk.compiler
* @run main T6996914a
*/
--- a/langtools/test/tools/javac/generics/diamond/7030150/GenericConstructorAndDiamondTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/diamond/7030150/GenericConstructorAndDiamondTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7030150 7039931
* @summary Type inference for generic instance creation failed for formal type parameter
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/generics/diamond/7030687/ParserTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/diamond/7030687/ParserTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7030687
* @summary Diamond: compiler accepts erroneous code where diamond is used with non-generic inner class
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Project Coin: problem with diamond and member inner classes
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm DiamondAndInnerClassTest
*/
--- a/langtools/test/tools/javac/generics/inference/5044646/T5044646.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/5044646/T5044646.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,5 +26,5 @@
* @bug 5044646
* @summary package-private indirect noninherited generic overriders
* @compile p1/A1.java p2/A2.java p1/B.java
- * @compile/fail p1/C.java
+ * @compile/fail/ref=T5044646.out -XDrawDiagnostics p1/C.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/5044646/T5044646.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+C.java:5:8: compiler.err.does.not.override.abstract: p1.C, f(java.lang.String), p1.B
+1 error
--- a/langtools/test/tools/javac/generics/inference/5044646/p1/C.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/5044646/p1/C.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
+/* /nodynamiccopyright/ */
package p1;
--- a/langtools/test/tools/javac/generics/inference/5073060/Neg.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/5073060/Neg.java Fri May 29 12:49:31 2015 +0200
@@ -1,32 +1,9 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5073060
* @summary Package private members not found for intersection types
* @author Peter von der Ah\u00e9
- * @compile/fail NegHelper.java Neg.java
+ * @compile/fail/ref=Neg.out -XDrawDiagnostics NegHelper.java Neg.java
*/
public class Neg<T extends test.NegHelper & Cloneable> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/5073060/Neg.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Neg.java:10:23: compiler.err.not.def.public.cant.access: foo(), test.NegHelper
+1 error
--- a/langtools/test/tools/javac/generics/inference/6278587/T6278587Neg.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/6278587/T6278587Neg.java Fri May 29 12:49:31 2015 +0200
@@ -1,32 +1,9 @@
/*
- * 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
- * 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
+ * @test /nodynamiccopyright/
* @bug 6278587 8007464
* @summary Inference broken for subtypes of subtypes of F-bounded types
* @author Peter von der Ah\u00e9
- * @compile/fail -source 7 T6278587Neg.java
+ * @compile/fail/ref=T6278587Neg.out -XDrawDiagnostics -source 7 T6278587Neg.java
* @compile T6278587Neg.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/6278587/T6278587Neg.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+- compiler.warn.source.no.bootclasspath: 1.7
+T6278587Neg.java:18:10: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.lower.bounds: T, T6278587Neg.C)
+1 error
+1 warning
--- a/langtools/test/tools/javac/generics/inference/7086601/T7086601b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/7086601/T7086601b.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7086601
* @summary Error message bug: cause for method mismatch is 'null'
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/generics/inference/7177306/T7177306e.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306e.java Fri May 29 12:49:31 2015 +0200
@@ -1,9 +1,9 @@
-/**
+/*
* @test /nodynamiccopyright/
* @bug 7177306 8007464
* @summary Regression: unchecked method call does not erase return type
- * @compile/fail/ref=T7177306e.out -source 7 -Xlint:-options -XDrawDiagnostics T7177306e.java
- * @compile/fail T7177306e.java
+ * @compile/fail/ref=T7177306e_7.out -XDrawDiagnostics -source 7 -Xlint:-options -XDrawDiagnostics T7177306e.java
+ * @compile/fail/ref=T7177306e.out -XDrawDiagnostics T7177306e.java
*/
import java.util.List;
--- a/langtools/test/tools/javac/generics/inference/7177306/T7177306e.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306e.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-T7177306e.java:16:9: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.util.List<?>, java.util.List<compiler.misc.type.captureof: 1, ?>)
+T7177306e.java:16:8: compiler.err.cant.apply.symbol: kindname.method, m, java.util.List<U>, java.util.List<java.util.List<?>>, kindname.class, T7177306e, (compiler.misc.incompatible.eq.upper.bounds: U, java.util.List<?>, java.util.List<compiler.misc.type.captureof: 1, ?>)
1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306e_7.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T7177306e.java:16:9: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.util.List<?>, java.util.List<compiler.misc.type.captureof: 1, ?>)
+1 error
--- a/langtools/test/tools/javac/generics/odersky/BadTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,9 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @ bug
+ * @test /nodynamiccopyright/
* @summary Negative regression test from odersky
* @author odersky
*
- * @compile/fail BadTest.java
+ * @compile/fail/ref=BadTest.out -XDrawDiagnostics BadTest.java
*/
class BadTest {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/odersky/BadTest.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,5 @@
+BadTest.java:18:50: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: List<java.lang.Object>, List<Cell<java.lang.String>>)
+BadTest.java:22:48: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: List<java.lang.Object>, List<java.lang.String>)
+BadTest.java:23:54: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: List<java.lang.Object>, List<Cell<java.lang.String>>)
+BadTest.java:25:53: compiler.err.illegal.generic.type.for.instof
+4 errors
--- a/langtools/test/tools/javac/generics/odersky/BadTest3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest3.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,9 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @ bug
+ * @test /nodynamiccopyright/
* @summary Negative regression test from odersky
* @author odersky
*
- * @compile/fail BadTest3.java
+ * @compile/fail/ref=BadTest3.out -XDrawDiagnostics BadTest3.java
*/
class BadTest3 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/odersky/BadTest3.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+BadTest3.java:31:34: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.upper.bounds: B, java.lang.String, BadTest3.Ord)
+BadTest3.java:33:13: compiler.err.cant.apply.symbol: kindname.method, f, B, List<BadTest3.Ord>, kindname.class, BadTest3.Main, (compiler.misc.incompatible.upper.lower.bounds: B, BadTest3.I,BadTest3.J, List<B>)
+BadTest3.java:35:19: compiler.err.cant.apply.symbol: kindname.method, f, B, List<BadTest3.Ord>, kindname.class, BadTest3.Main, (compiler.misc.incompatible.upper.lower.bounds: B, BadTest3.I,BadTest3.J, List<B>)
+3 errors
--- a/langtools/test/tools/javac/generics/odersky/BadTest4.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/odersky/BadTest4.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8007464
+ * @test /nodynamiccopyright/
+ * @bug 4736963
* @summary Negative regression test from odersky
* @author odersky
*
- * @compile/fail -source 7 BadTest4.java
+ * @compile/fail/ref=BadTest4.out -XDrawDiagnostics -source 7 BadTest4.java
* @compile BadTest4.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/odersky/BadTest4.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+- compiler.warn.source.no.bootclasspath: 1.7
+BadTest4.java:38:17: compiler.err.cant.apply.symbol: kindname.method, f, A,B, java.lang.Integer,java.lang.Number, kindname.class, BadTest4.Main, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Number, java.lang.Integer)
+1 error
+1 warning
--- a/langtools/test/tools/javac/generics/rare/Rare2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare2.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024308
* @summary "rare" types
* @author gafter
*
- * @compile/fail Rare2.java
+ * @compile/fail/ref=Rare2.out -XDrawDiagnostics Rare2.java
*/
package rare2;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rare/Rare2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Rare2.java:20:14: compiler.err.improperly.formed.type.param.missing
+1 error
--- a/langtools/test/tools/javac/generics/rare/Rare3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare3.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024308
* @summary "rare" types
* @author gafter
*
- * @compile/fail Rare3.java
+ * @compile/fail/ref=Rare3.out -XDrawDiagnostics Rare3.java
*/
package rare3;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rare/Rare3.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Rare3.java:20:8: compiler.err.improperly.formed.type.inner.raw.param
+1 error
--- a/langtools/test/tools/javac/generics/rare/Rare4.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare4.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024308
* @summary "rare" types
* @author gafter
*
- * @compile/fail Rare4.java
+ * @compile/fail/ref=Rare4.out -XDrawDiagnostics Rare4.java
*/
package rare4;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rare/Rare4.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Rare4.java:20:14: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/rare/Rare5.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare5.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024308
* @summary "rare" types
* @author gafter
*
- * @compile/fail Rare5.java
+ * @compile/fail/ref=Rare5.out -XDrawDiagnostics Rare5.java
*/
package rare5;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rare/Rare5.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Rare5.java:20:14: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/rare/Rare6.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare6.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024308
* @summary "rare" types
* @author gafter
*
- * @compile/fail Rare6.java
+ * @compile/fail/ref=Rare6.out -XDrawDiagnostics Rare6.java
*/
package rare6;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rare/Rare6.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Rare6.java:19:13: compiler.err.non-static.cant.be.ref: kindname.class, rare6.A.B
+1 error
--- a/langtools/test/tools/javac/generics/rare/Rare7.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rare/Rare7.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024308
* @summary "rare" types
* @author gafter
*
- * @compile/fail Rare7.java
+ * @compile/fail/ref=Rare7.out -XDrawDiagnostics Rare7.java
*/
package rare7;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rare/Rare7.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Rare7.java:19:13: compiler.err.non-static.cant.be.ref: kindname.class, rare7.A.B
+1 error
--- a/langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* are maximally specific
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm GenericOverrideTest
*/
--- a/langtools/test/tools/javac/generics/rawOverride/Warn1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rawOverride/Warn1.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,12 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5073079
* @summary Allow unchecked override of generified methods in
* parameterless classes
* @author Peter von der Ah\u00e9
*
* @compile Warn1.java
- * @compile/fail -Xlint:unchecked -Werror Warn1.java
+ * @compile/fail/ref=Warn1.out -XDrawDiagnostics -Xlint:unchecked -Werror Warn1.java
*/
interface Attribute<T> { }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rawOverride/Warn1.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+Warn1.java:19:22: compiler.warn.override.unchecked.ret: (compiler.misc.unchecked.implement: get(java.lang.Class), AttributeSet1Impl, <T>get(java.lang.Class<T>), AttributeSet1), Attribute, Attribute<T>
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/generics/rawOverride/Warn2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/rawOverride/Warn2.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,12 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5073079
* @summary Allow unchecked override of generified methods in
* parameterless classes
* @author Peter von der Ah\u00e9
*
* @compile Warn2.java
- * @compile/fail -Xlint:unchecked -Werror Warn2.java
+ * @compile/fail/ref=Warn2.out -XDrawDiagnostics -Xlint:unchecked -Werror Warn2.java
*/
interface I3 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rawOverride/Warn2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+Warn2.java:17:19: compiler.warn.override.unchecked.ret: (compiler.misc.unchecked.implement: foo(), C3, <T>foo(), I3), java.lang.Object, T
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary Test subtyping for wildcards with related type bounds.
+ *
+ * @compile/fail/ref=AssignmentDifferentTypes.out -XDrawDiagnostics AssignmentDifferentTypes.java
+ */
+
+public class AssignmentDifferentTypes {
+
+ public static void main(String[] args) {
+ Ref<Der> derexact = null;
+ Ref<Base> baseexact = null;
+ Ref<? extends Der> derext = null;
+ Ref<? extends Base> baseext = null;
+ Ref<? super Der> dersuper = null;
+ Ref<? super Base> basesuper = null;
+
+ baseext = derext; // <<pass>> <? extends Base> = <? extends Der>
+ baseext = derexact; // <<pass>> <? extends Base> = <Der>
+ dersuper = basesuper; // <<pass>> <? super Der> = <? super Base>
+ dersuper = baseexact; // <<pass>> <? super Der> = <Base>
+
+ derexact = baseexact; // <<fail>> <Der> = <Base>
+ baseexact = derexact; // <<fail>> <Base> = <Der>
+ derext = baseext; // <<fail>> <? extends Der> = <? extends Base>
+ derext = baseexact; // <<fail>> <? extends Der> = <Base>
+ derext = basesuper; // <<fail>> <? extends Der> = <? super Base>
+ baseext = dersuper; // <<fail>> <? extends Base> = <? super Der>
+ basesuper = dersuper; // <<fail>> <? super Base> = <? super Der>
+ basesuper = derexact; // <<fail>> <? super Base> = <Der>
+ }
+}
+
+class Ref<T> {}
+class Base {}
+class Der extends Base {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,9 @@
+AssignmentDifferentTypes.java:46:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<Base>, Ref<Der>)
+AssignmentDifferentTypes.java:47:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<Der>, Ref<Base>)
+AssignmentDifferentTypes.java:48:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? extends Base>, Ref<? extends Der>)
+AssignmentDifferentTypes.java:49:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<Base>, Ref<? extends Der>)
+AssignmentDifferentTypes.java:50:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? super Base>, Ref<? extends Der>)
+AssignmentDifferentTypes.java:51:19: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? super Der>, Ref<? extends Base>)
+AssignmentDifferentTypes.java:52:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? super Der>, Ref<? super Base>)
+AssignmentDifferentTypes.java:53:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<Der>, Ref<? super Base>)
+8 errors
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes1.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile AssignmentDifferentTypes1.java
- */
-
-public class AssignmentDifferentTypes1 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- baseext = derext; // <<pass>> <? extends Base> = <? extends Der>
- baseext = derexact; // <<pass>> <? extends Base> = <Der>
- dersuper = basesuper; // <<pass>> <? super Der> = <? super Base>
- dersuper = baseexact; // <<pass>> <? super Der> = <Base>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes2.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes2.java
- */
-
-public class AssignmentDifferentTypes2 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- derexact = baseexact; // <<fail>> <Der> = <Base>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes3.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes3.java
- */
-
-public class AssignmentDifferentTypes3 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- baseexact = derexact; // <<fail>> <Base> = <Der>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes4.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes4.java
- */
-
-public class AssignmentDifferentTypes4 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- derext = baseext; // <<fail>> <? extends Der> = <? extends Base>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes5.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes5.java
- */
-
-public class AssignmentDifferentTypes5 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- derext = baseexact; // <<fail>> <? extends Der> = <Base>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes6.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes6.java
- */
-
-public class AssignmentDifferentTypes6 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- derext = basesuper; // <<fail>> <? extends Der> = <? super Base>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes7.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes7.java
- */
-
-public class AssignmentDifferentTypes7 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- baseext = dersuper; // <<fail>> <? extends Base> = <? super Der>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes8.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes8.java
- */
-
-public class AssignmentDifferentTypes8 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- basesuper = dersuper; // <<fail>> <? super Base> = <? super Der>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentDifferentTypes9.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with related type bounds.
- *
- * @compile/fail AssignmentDifferentTypes9.java
- */
-
-public class AssignmentDifferentTypes9 {
-
- public static void main(String[] args) {
- Ref<Der> derexact = null;
- Ref<Base> baseexact = null;
- Ref<? extends Der> derext = null;
- Ref<? extends Base> baseext = null;
- Ref<? super Der> dersuper = null;
- Ref<? super Base> basesuper = null;
-
- basesuper = derexact; // <<fail>> <? super Base> = <Der>
- }
-}
-
-class Ref<T> {}
-class Base {}
-class Der extends Base {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @summary Test subtyping for wildcards with the same type bound.
+ *
+ * @compile/fail/ref=AssignmentSameType.out -XDrawDiagnostics AssignmentSameType.java
+ */
+
+public class AssignmentSameType {
+
+ public static void main(String[] args) {
+ Ref<B> exact = null;
+ Ref<? extends B> ebound = null;
+ Ref<? super B> sbound = null;
+ Ref<?> unbound = null;
+
+; exact = exact; // <<pass>> <A> = <A>
+
+ ebound = exact; // <<pass>> <? extends A> = <A>
+ ebound = ebound; // <<pass>> <? extends A> = <? extends A>
+
+ sbound = exact; // <<pass>> <? super A> = <A>
+ sbound = sbound; // <<pass>> <? super A> = <? super A>
+
+ unbound = exact; // <<pass>> <?> = <A>
+ unbound = ebound; // <<pass>> <?> = <? extends A>
+ unbound = sbound; // <<pass>> <?> = <? super A>
+ unbound = unbound; // <<pass>> <?> = <?>
+
+ exact = ebound; // <<fail>> <A> = <? extends A>
+ exact = sbound; // <<fail>> <A> = <? super A>
+ exact = unbound; // <<fail>> <A> = <?>
+ ebound = sbound; // <<fail>> <? extends A> = <? super A>
+ ebound = unbound; // <<fail>> <? extends A> = <?>
+ sbound = ebound; // <<fail>> <? super A> = <? extends A>
+ sbound = unbound; // <<fail>> <? super A> = <?>
+ }
+}
+
+class Ref<A> {}
+class B {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/AssignmentSameType.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,8 @@
+AssignmentSameType.java:52:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? extends B>, Ref<B>)
+AssignmentSameType.java:53:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? super B>, Ref<B>)
+AssignmentSameType.java:54:17: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ?>, Ref<B>)
+AssignmentSameType.java:55:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? super B>, Ref<? extends B>)
+AssignmentSameType.java:56:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ?>, Ref<? extends B>)
+AssignmentSameType.java:57:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ? extends B>, Ref<? super B>)
+AssignmentSameType.java:58:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: Ref<compiler.misc.type.captureof: 1, ?>, Ref<? super B>)
+7 errors
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType1.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile AssignmentSameType1.java
- */
-
-public class AssignmentSameType1 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
-; exact = exact; // <<pass>> <A> = <A>
-
- ebound = exact; // <<pass>> <? extends A> = <A>
- ebound = ebound; // <<pass>> <? extends A> = <? extends A>
-
- sbound = exact; // <<pass>> <? super A> = <A>
- sbound = sbound; // <<pass>> <? super A> = <? super A>
-
- unbound = exact; // <<pass>> <?> = <A>
- unbound = ebound; // <<pass>> <?> = <? extends A>
- unbound = sbound; // <<pass>> <?> = <? super A>
- unbound = unbound; // <<pass>> <?> = <?>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType2.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType2.java
- */
-
-public class AssignmentSameType2 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- exact = ebound; // <<fail>> <A> = <? extends A>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType3.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType3.java
- */
-
-public class AssignmentSameType3 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- exact = sbound; // <<fail>> <A> = <? super A>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType4.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType4.java
- */
-
-public class AssignmentSameType4 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- exact = unbound; // <<fail>> <A> = <?>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType5.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType5.java
- */
-
-public class AssignmentSameType5 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- ebound = sbound; // <<fail>> <? extends A> = <? super A>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType6.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType6.java
- */
-
-public class AssignmentSameType6 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- ebound = unbound; // <<fail>> <? extends A> = <?>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType7.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType7.java
- */
-
-public class AssignmentSameType7 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- sbound = ebound; // <<fail>> <? super A> = <? extends A>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/AssignmentSameType8.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @summary Test subtyping for wildcards with the same type bound.
- *
- * @compile/fail AssignmentSameType8.java
- */
-
-public class AssignmentSameType8 {
-
- public static void main(String[] args) {
- Ref<B> exact = null;
- Ref<? extends B> ebound = null;
- Ref<? super B> sbound = null;
- Ref<?> unbound = null;
-
- sbound = unbound; // <<fail>> <? super A> = <?>
- }
-}
-
-class Ref<A> {}
-class B {}
--- a/langtools/test/tools/javac/generics/wildcards/neg/AmbiguousCast.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/AmbiguousCast.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4897892
* @summary cast to parameterized type is accepted although it should be rejected
* @author gafter
*
- * @compile/fail -Werror -Xlint:unchecked AmbiguousCast.java
+ * @compile/ref=AmbiguousCast.out -XDrawDiagnostics -Xlint:unchecked AmbiguousCast.java
*/
class Test {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/AmbiguousCast.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+AmbiguousCast.java:25:41: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), java.lang.Object, Test.GenericWrapper<java.lang.String>
+1 warning
--- a/langtools/test/tools/javac/generics/wildcards/neg/Capture.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Capture.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4916634
* @summary Wildcard capture
* @author gafter
*
- * @compile/fail Capture.java
+ * @compile/fail/ref=Capture.out -XDrawDiagnostics Capture.java
*/
class X<T> {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Capture.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Capture.java:14:9: compiler.err.cant.apply.symbol: kindname.method, f4, X<X<T>>, X<X<? extends java.lang.Number>>, kindname.class, Capture, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: X<X<? extends java.lang.Number>>, X<X<T>>))
+1 error
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4916607
+ * @summary Test casts (errors)
+ * @author gafter
+ *
+ * @compile/fail/ref=CastFail.out -XDrawDiagnostics CastFail.java
+ */
+
+import java.util.*;
+
+class CastFail {
+
+ // --- Directly transferring parameters ---
+
+ private class AA<T> { }
+
+ private class AB<T> extends AA<T> { }
+ private class AC<T> extends AA<Vector<T>> { }
+ private class AD<T> extends AA<Vector<? extends T>> { }
+ private class AE<T> extends AA<Vector<? super T>> { }
+ private class AF<T> extends AA<T[]> { }
+ private class AG<T> extends AA<String> { }
+
+ private void parameterTransfer() {
+ Object o;
+
+ o = (AB<String>) (AA<Number>) null; // <<fail 1>>
+ o = (AC<String>) (AA<Vector<Number>>) null; // <<fail 2>>
+ o = (AC<String>) (AA<Stack<String>>) null; // <<fail 3>>
+ o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
+ o = (AE<Number>) (AA<Vector<? super String>>) null; // <<fail 5>>
+ o = (AF<String>) (AA<Number[]>) null; // <<fail 6>>
+ o = (AG<?>) (AA<Number>) null; // <<fail 7>>
+ }
+
+ // --- Inconsistent matches ---
+
+ private class BA<T> { }
+ private class BB<T, S> { }
+
+ private class BC<T> extends BA<Integer> { }
+ private class BD<T> extends BB<T, T> { }
+
+ private void inconsistentMatches() {
+ Object o;
+
+ o = (BC<?>) (BA<String>) null; // <<fail 8>>
+ o = (BD<String>) (BB<String, Number>) null; // <<fail 9>>
+ o = (BD<String>) (BB<Number, String>) null; // <<fail 10>>
+ }
+
+ // --- Transferring parameters via supertypes ---
+
+ private interface CA<T> { }
+ private interface CB<T> extends CA<T> { }
+ private interface CC<T> extends CA<T> { }
+
+ private class CD<T> implements CB<T> { }
+ private interface CE<T> extends CC<T> { }
+
+ private interface CF<S> { }
+ private interface CG<T> { }
+ private class CH<S, T> implements CF<S>, CG<T> { }
+ private interface CI<S> extends CF<S> { }
+ private interface CJ<T> extends CG<T> { }
+ private interface CK<S, T> extends CI<S>, CJ<T> { }
+
+ private void supertypeParameterTransfer() {
+ Object o;
+ CD<?> cd = (CE<?>) null; // <<fail 11>>
+ CE<?> ce = (CD<?>) null; // <<fail 12>>
+ o = (CE<Number>) (CD<String>) null; // <<fail 13>>
+
+ // 4916622: unnecessary warning with cast
+ // o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
+ }
+
+ // --- Disjoint ---
+
+ private interface DA<T> { }
+ private interface DB<T> extends DA<T> { }
+ private interface DC<T> extends DA<Integer> { }
+
+ private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
+ Object o;
+
+ // Classes
+ o = (DA<Number>) (DA<Integer>) null; // <<fail 14>>
+ o = (DA<? extends Integer>) (DA<Number>) null; // <<fail 15>>
+ o = (DA<? super Number>) (DA<Integer>) null; // <<fail 16>>
+ o = (DA<? extends Runnable>) (DA<? extends String>) null; // <<fail 17>>
+ o = (DA<? super Number>) (DA<? extends Integer>) null; // <<fail 18>>
+
+ // Typevars
+ o = (DA<? extends String>) (DA<I>) null; // <<fail 19>>
+ o = (DA<S>) (DA<R>) null; // <<fail 20>>
+
+ // Raw (asymmetrical!)
+ o = (DC<?>) (DA<? super String>) null; // <<fail 21>>
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastFail.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,22 @@
+CastFail.java:51:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.lang.Number>, CastFail.AB<java.lang.String>)
+CastFail.java:52:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Vector<java.lang.Number>>, CastFail.AC<java.lang.String>)
+CastFail.java:53:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Stack<java.lang.String>>, CastFail.AC<java.lang.String>)
+CastFail.java:54:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Vector<? extends java.lang.Number>>, CastFail.AD<java.lang.String>)
+CastFail.java:55:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.util.Vector<? super java.lang.String>>, CastFail.AE<java.lang.Number>)
+CastFail.java:56:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.lang.Number[]>, CastFail.AF<java.lang.String>)
+CastFail.java:57:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.AA<java.lang.Number>, CastFail.AG<?>)
+CastFail.java:71:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.BA<java.lang.String>, CastFail.BC<?>)
+CastFail.java:72:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.BB<java.lang.String,java.lang.Number>, CastFail.BD<java.lang.String>)
+CastFail.java:73:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.BB<java.lang.Number,java.lang.String>, CastFail.BD<java.lang.String>)
+CastFail.java:94:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.CE<compiler.misc.type.captureof: 1, ?>, CastFail.CD<?>)
+CastFail.java:95:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.CD<compiler.misc.type.captureof: 1, ?>, CastFail.CE<?>)
+CastFail.java:96:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.CD<java.lang.String>, CastFail.CE<java.lang.Number>)
+CastFail.java:112:26: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<java.lang.Integer>, CastFail.DA<java.lang.Number>)
+CastFail.java:113:37: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<java.lang.Number>, CastFail.DA<? extends java.lang.Integer>)
+CastFail.java:114:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<java.lang.Integer>, CastFail.DA<? super java.lang.Number>)
+CastFail.java:115:38: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<compiler.misc.type.captureof: 1, ? extends java.lang.String>, CastFail.DA<? extends java.lang.Runnable>)
+CastFail.java:116:34: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Integer>, CastFail.DA<? super java.lang.Number>)
+CastFail.java:119:36: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<I>, CastFail.DA<? extends java.lang.String>)
+CastFail.java:120:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<R>, CastFail.DA<S>)
+CastFail.java:123:21: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: CastFail.DA<compiler.misc.type.captureof: 1, ? super java.lang.String>, CastFail.DC<?>)
+21 errors
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail1.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail1.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AB<String>) (AA<Number>) null; // <<fail 1>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail10.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail10.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Inconsistent matches ---
-
- private class BA<T> { }
- private class BB<T, S> { }
-
- private class BC<T> extends BA<Integer> { }
- private class BD<T> extends BB<T, T> { }
-
- private void inconsistentMatches() {
- Object o;
-
- o = (BD<String>) (BB<Number, String>) null; // <<fail 10>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail11.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail11.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Transferring parameters via supertypes ---
-
- private interface CA<T> { }
- private interface CB<T> extends CA<T> { }
- private interface CC<T> extends CA<T> { }
-
- private class CD<T> implements CB<T> { }
- private interface CE<T> extends CC<T> { }
-
- private interface CF<S> { }
- private interface CG<T> { }
- private class CH<S, T> implements CF<S>, CG<T> { }
- private interface CI<S> extends CF<S> { }
- private interface CJ<T> extends CG<T> { }
- private interface CK<S, T> extends CI<S>, CJ<T> { }
-
- private void supertypeParameterTransfer() {
- Object o;
- CD<?> cd = (CE<?>) null; // <<fail 11>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail12.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail12.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Transferring parameters via supertypes ---
-
- private interface CA<T> { }
- private interface CB<T> extends CA<T> { }
- private interface CC<T> extends CA<T> { }
-
- private class CD<T> implements CB<T> { }
- private interface CE<T> extends CC<T> { }
-
- private interface CF<S> { }
- private interface CG<T> { }
- private class CH<S, T> implements CF<S>, CG<T> { }
- private interface CI<S> extends CF<S> { }
- private interface CJ<T> extends CG<T> { }
- private interface CK<S, T> extends CI<S>, CJ<T> { }
-
- private void supertypeParameterTransfer() {
- Object o;
- CE<?> ce = (CD<?>) null; // <<fail 12>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail13.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail13.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Transferring parameters via supertypes ---
-
- private interface CA<T> { }
- private interface CB<T> extends CA<T> { }
- private interface CC<T> extends CA<T> { }
-
- private class CD<T> implements CB<T> { }
- private interface CE<T> extends CC<T> { }
-
- private interface CF<S> { }
- private interface CG<T> { }
- private class CH<S, T> implements CF<S>, CG<T> { }
- private interface CI<S> extends CF<S> { }
- private interface CJ<T> extends CG<T> { }
- private interface CK<S, T> extends CI<S>, CJ<T> { }
-
- private void supertypeParameterTransfer() {
- Object o;
- o = (CE<Number>) (CD<String>) null; // <<fail 13>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail14.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail14.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- // Classes
- o = (DA<Number>) (DA<Integer>) null; // <<fail 14>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail15.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail15.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? extends Integer>) (DA<Number>) null; // <<fail 15>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail16.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail16.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? super Number>) (DA<Integer>) null; // <<fail 16>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail17.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail17.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? extends Runnable>) (DA<? extends String>) null; // <<fail 17>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail18.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail18.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? super Number>) (DA<? extends Integer>) null; // <<fail 18>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail19.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail19.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? extends String>) (DA<I>) null; // <<fail 19>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail2.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail2.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AC<String>) (AA<Vector<Number>>) null; // <<fail 2>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail20.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail20.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<S>) (DA<R>) null; // <<fail 20>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail21.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail20.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DC<?>) (DA<? super String>) null; // <<fail 21>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail3.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail3.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AC<String>) (AA<Stack<String>>) null; // <<fail 3>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail4.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail4.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail5.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail5.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AE<Number>) (AA<Vector<? super String>>) null; // <<fail 5>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail6.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail6.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AF<String>) (AA<Number[]>) null; // <<fail 6>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail7.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail7.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AG<?>) (AA<Number>) null; // <<fail 7>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail8.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail8.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Inconsistent matches ---
-
- private class BA<T> { }
- private class BB<T, S> { }
-
- private class BC<T> extends BA<Integer> { }
- private class BD<T> extends BB<T, T> { }
-
- private void inconsistentMatches() {
- Object o;
-
- o = (BC<?>) (BA<String>) null; // <<fail 8>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastFail9.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail CastFail9.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Inconsistent matches ---
-
- private class BA<T> { }
- private class BB<T, S> { }
-
- private class BC<T> extends BA<Integer> { }
- private class BD<T> extends BB<T, T> { }
-
- private void inconsistentMatches() {
- Object o;
-
- o = (BD<String>) (BB<String, Number>) null; // <<fail 9>>
- }
-
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastTest.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4916607
+ * @summary Test casts (legal)
+ * @author gafter
+ *
+ * @compile CastTest.java
+ */
+
+import java.util.*;
+
+class CastTest {
+
+ // --- Directly transferring parameters ---
+
+ private class AA<T> { }
+
+ private class AB<T> extends AA<T> { }
+ private class AC<T> extends AA<Vector<T>> { }
+ private class AD<T> extends AA<Vector<? extends T>> { }
+ private class AE<T> extends AA<Vector<? super T>> { }
+ private class AF<T> extends AA<T[]> { }
+ private class AG<T> extends AA<String> { }
+
+ private void parameterTransfer() {
+ Object o;
+
+ o = (AB<String>) (AA<String>) null; // <<pass>>
+ o = (AC<String>) (AA<Vector<String>>) null; // <<pass>>
+ o = (AD<Number>) (AA<Vector<? extends Number>>) null; // <<pass>>
+ o = (AD<?>) (AA<Vector<? extends Object>>) null; // <<pass>>
+ o = (AD<Object>) (AA<Vector<?>>) null; // <<pass>>
+ o = (AE<String>) (AA<Vector<? super String>>) null; // <<pass>>
+ o = (AF<String>) (AA<String[]>) null; // <<pass>>
+ o = (AG<?>) (AA<String>) null; // <<pass>>
+ }
+
+ // --- Inconsistent matches ---
+
+ private class BA<T> { }
+ private class BB<T, S> { }
+
+ private class BC<T> extends BA<Integer> { }
+ private class BD<T> extends BB<T, T> { }
+
+ private void inconsistentMatches() {
+ Object o;
+
+ o = (BC<?>) (BA<Integer>) null; // <<pass>>
+ o = (BD<String>) (BB<String, String>) null; // <<pass>>
+ }
+
+ private void whyMustEverythingBeSo_______Complicated() {
+ // This has to work...
+ BD<Number> bd = new BD<Number>();
+ BB<? extends Number, ? super Integer> bb = bd;
+ // 4916620: wildcards: legal cast is rejected
+ // bd = (BD<Number>) bb; // <<warn>> <<todo: cast-infer>>
+ }
+
+ // --- Transferring parameters via supertypes ---
+
+ private interface CA<T> { }
+ private interface CB<T> extends CA<T> { }
+ private interface CC<T> extends CA<T> { }
+
+ private class CD<T> implements CB<T> { }
+ private interface CE<T> extends CC<T> { }
+
+ private interface CF<S> { }
+ private interface CG<T> { }
+ private class CH<S, T> implements CF<S>, CG<T> { }
+ private interface CI<S> extends CF<S> { }
+ private interface CJ<T> extends CG<T> { }
+ private interface CK<S, T> extends CI<S>, CJ<T> { }
+
+ private void supertypeParameterTransfer() {
+ Object o;
+ o = (CE<String>) (CD<String>) null; // <<pass>>
+
+ // 4916622: unnecessary warning with cast
+ // o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
+ }
+
+ // --- Disjoint ---
+
+ private interface DA<T> { }
+ private interface DB<T> extends DA<T> { }
+ private interface DC<T> extends DA<Integer> { }
+
+ private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
+ Object o;
+
+ // Classes
+ o = (DA<? extends Number>) (DA<Integer>) null; // <<pass>>
+ o = (DA<? super Integer>) (DA<Number>) null; // <<pass>>
+ o = (DA<?>) (DA<Integer>) null; // <<pass>>
+ o = (DA<?>) (DA<? extends Integer>) null; // <<pass>>
+ o = (DA<?>) (DA<? super String>) null; // <<pass>>
+ o = (DA<?>) (DA<?>) null; // <<pass>>
+
+ // Typevars
+ o = (DA<? extends Number>) (DA<I>) null; // <<pass>>
+
+ // Raw (asymmetrical!)
+ o = (DA) (DB<Number>) null; // <<pass>>
+ o = (DA<?>) (DB) null; // <<pass>>
+ o = (DA<? extends Object>) (DB) null; // <<pass>>
+ o = (DB) (DA<Number>) null; // <<pass>>
+ o = (DB<?>) (DA) null; // <<pass>>
+ o = (DB<? extends Object>) (DA) null; // <<pass>>
+ o = (DC<?>) (DA<?>) null; // <<pass>>
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4916607
+ * @summary Test casts (warning)
+ * @author gafter
+ *
+ * @compile/ref=CastWarn.out -XDrawDiagnostics -Xlint:unchecked CastWarn.java
+ */
+
+import java.util.*;
+
+class CastWarn {
+
+ // --- Disjoint ---
+
+ private interface DA<T> { }
+ private interface DB<T> extends DA<T> { }
+ private interface DC<T> extends DA<Integer> { }
+
+ private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
+ Object o;
+
+ // Classes
+ o = (DA<? extends Runnable>) (DA<? extends Number>) null; // <<warn 2>>
+ o = (DA<? super Integer>) (DA<? extends Number>) null; // <<warn 3>>
+ o = (DA<? super String>) (DA<? super Number>) null; // <<warn 4>>
+
+ // Typevars
+ o = (DA<? extends Integer>) (DA<N>) null; // <<warn 5>>
+ o = (DA<I>) (DA<? extends Number>) null; // <<warn 6>>
+ o = (DA<N>) (DA<? extends Integer>) null; // <<warn 7>>
+ o = (DA<N>) (DA<? extends Runnable>) null; // <<warn 8>>
+
+ o = (DA<N>) (DA<I>) null; // <<warn 9>>
+ o = (DA<N>) (DA<R>) null; // <<warn 10>>
+
+ // Raw (asymmetrical!)
+ o = (DA<Number>) (DB) null; // <<warn 11>>
+ o = (DA<? extends Number>) (DB) null; // <<warn 12>>
+ o = (DB<Number>) (DA) null; // <<warn 13>>
+ o = (DB<? extends Number>) (DA) null; // <<warn 14>>
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/CastWarn.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,14 @@
+CastWarn.java:47:38: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Number>, CastWarn.DA<? extends java.lang.Runnable>
+CastWarn.java:48:35: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Number>, CastWarn.DA<? super java.lang.Integer>
+CastWarn.java:49:34: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<compiler.misc.type.captureof: 1, ? super java.lang.Number>, CastWarn.DA<? super java.lang.String>
+CastWarn.java:52:37: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<N>, CastWarn.DA<? extends java.lang.Integer>
+CastWarn.java:53:21: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Number>, CastWarn.DA<I>
+CastWarn.java:54:21: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Integer>, CastWarn.DA<N>
+CastWarn.java:55:21: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<compiler.misc.type.captureof: 1, ? extends java.lang.Runnable>, CastWarn.DA<N>
+CastWarn.java:57:21: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<I>, CastWarn.DA<N>
+CastWarn.java:58:21: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA<R>, CastWarn.DA<N>
+CastWarn.java:61:26: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DB, CastWarn.DA<java.lang.Number>
+CastWarn.java:62:36: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DB, CastWarn.DA<? extends java.lang.Number>
+CastWarn.java:63:26: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA, CastWarn.DB<java.lang.Number>
+CastWarn.java:64:36: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), CastWarn.DA, CastWarn.DB<? extends java.lang.Number>
+13 warnings
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn10.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn10.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<N>) (DA<R>) null; // <<warn 10>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn11.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn11.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<Number>) (DB) null; // <<warn 11>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn12.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn12.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? extends Number>) (DB) null; // <<warn 12>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn13.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn13.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DB<Number>) (DA) null; // <<warn 13>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn14.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn14.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Directly transferring parameters ---
-
- private class AA<T> { }
-
- private class AB<T> extends AA<T> { }
- private class AC<T> extends AA<Vector<T>> { }
- private class AD<T> extends AA<Vector<? extends T>> { }
- private class AE<T> extends AA<Vector<? super T>> { }
- private class AF<T> extends AA<T[]> { }
- private class AG<T> extends AA<String> { }
-
- private void parameterTransfer() {
- Object o;
-
- o = (AB<String>) (AA<String>) null; // <<pass>>
- o = (AB<String>) (AA<Number>) null; // <<fail 1>>
- o = (AC<String>) (AA<Vector<String>>) null; // <<pass>>
- o = (AC<String>) (AA<Vector<Number>>) null; // <<fail 2>>
- o = (AC<String>) (AA<Stack<String>>) null; // <<fail 3>>
-
- o = (AD<Number>) (AA<Vector<? extends Number>>) null; // <<pass>>
- o = (AD<String>) (AA<Vector<? extends Number>>) null; // <<fail 4>>
- o = (AD<?>) (AA<Vector<? extends Object>>) null; // <<pass>>
- o = (AD<Object>) (AA<Vector<?>>) null; // <<pass>>
-
- o = (AE<String>) (AA<Vector<? super String>>) null; // <<pass>>
- o = (AE<Number>) (AA<Vector<? super String>>) null; // <<fail 5>>
-
- o = (AF<String>) (AA<String[]>) null; // <<pass>>
- o = (AF<String>) (AA<Number[]>) null; // <<fail 6>>
-
- o = (AG<?>) (AA<String>) null; // <<pass>>
- o = (AG<?>) (AA<Number>) null; // <<fail 7>>
- }
-
- // --- Inconsistent matches ---
-
- private class BA<T> { }
- private class BB<T, S> { }
-
- private class BC<T> extends BA<Integer> { }
- private class BD<T> extends BB<T, T> { }
-
- private void inconsistentMatches() {
- Object o;
-
- o = (BC<?>) (BA<Integer>) null; // <<pass>>
- o = (BC<?>) (BA<String>) null; // <<fail 8>>
- o = (BD<String>) (BB<String, String>) null; // <<pass>>
- o = (BD<String>) (BB<String, Number>) null; // <<fail 9>>
- o = (BD<String>) (BB<Number, String>) null; // <<fail 10>>
- }
-
- private void whyMustEverythingBeSo_______Complicated() {
- // This has to work...
- BD<Number> bd = new BD<Number>();
- BB<? extends Number, ? super Integer> bb = bd;
- // 4916620: wildcards: legal cast is rejected
- // bd = (BD<Number>) bb; // <<warn>> <<todo: cast-infer>>
- }
-
- // --- Transferring parameters via supertypes ---
-
- private interface CA<T> { }
- private interface CB<T> extends CA<T> { }
- private interface CC<T> extends CA<T> { }
-
- private class CD<T> implements CB<T> { }
- private interface CE<T> extends CC<T> { }
-
- private interface CF<S> { }
- private interface CG<T> { }
- private class CH<S, T> implements CF<S>, CG<T> { }
- private interface CI<S> extends CF<S> { }
- private interface CJ<T> extends CG<T> { }
- private interface CK<S, T> extends CI<S>, CJ<T> { }
-
- private void supertypeParameterTransfer() {
- Object o;
- CD<?> cd = (CE<?>) null; // <<fail 11>>
- CE<?> ce = (CD<?>) null; // <<fail 12>>
- o = (CE<String>) (CD<String>) null; // <<pass>>
- o = (CE<Number>) (CD<String>) null; // <<fail 13>>
-
- // 4916622: unnecessary warning with cast
- // o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
- }
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- // Classes
- o = (DA<Number>) (DA<Integer>) null; // <<fail 14>>
- o = (DA<? extends Number>) (DA<Integer>) null; // <<pass>>
- o = (DA<? extends Integer>) (DA<Number>) null; // <<fail 15>>
- o = (DA<? super Integer>) (DA<Number>) null; // <<pass>>
- o = (DA<? super Number>) (DA<Integer>) null; // <<fail 16>>
- o = (DA<?>) (DA<Integer>) null; // <<pass>>
-
- o = (DA<? extends Runnable>) (DA<? extends Number>) null; // <<warn 2>>
- o = (DA<? extends Runnable>) (DA<? extends String>) null; // <<fail 17>>
-
- o = (DA<? super Integer>) (DA<? extends Number>) null; // <<warn 3>>
- o = (DA<? super Number>) (DA<? extends Integer>) null; // <<fail 18>>
- o = (DA<?>) (DA<? extends Integer>) null; // <<pass>>
-
- o = (DA<? super String>) (DA<? super Number>) null; // <<warn 4>>
- o = (DA<?>) (DA<? super String>) null; // <<pass>>
-
- o = (DA<?>) (DA<?>) null; // <<pass>>
-
- // Typevars
- o = (DA<? extends Number>) (DA<I>) null; // <<pass>>
- o = (DA<? extends Integer>) (DA<N>) null; // <<warn 5>>
- o = (DA<? extends String>) (DA<I>) null; // <<fail 19>>
-
- o = (DA<I>) (DA<? extends Number>) null; // <<warn 6>>
- o = (DA<N>) (DA<? extends Integer>) null; // <<warn 7>>
- o = (DA<N>) (DA<? extends Runnable>) null; // <<warn 8>>
-
- o = (DA<N>) (DA<I>) null; // <<warn 9>>
- o = (DA<N>) (DA<R>) null; // <<warn 10>>
- o = (DA<S>) (DA<R>) null; // <<fail 20>>
-
- // Raw (asymmetrical!)
- o = (DA) (DB<Number>) null; // <<pass>>
- o = (DA<Number>) (DB) null; // <<warn 11>>
- o = (DA<?>) (DB) null; // <<pass>>
- o = (DA<? extends Object>) (DB) null; // <<pass>>
- o = (DA<? extends Number>) (DB) null; // <<warn 12>>
-
- o = (DB) (DA<Number>) null; // <<pass>>
- o = (DB<Number>) (DA) null; // <<warn 13>>
- o = (DB<?>) (DA) null; // <<pass>>
- o = (DB<? extends Object>) (DA) null; // <<pass>>
- o = (DB<? extends Number>) (DA) null; // <<warn 14>>
-
- o = (DC<?>) (DA<?>) null; // <<pass>>
- o = (DC<?>) (DA<? super String>) null; // <<fail 21>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn2.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn2.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? extends Runnable>) (DA<? extends Number>) null; // <<warn 2>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn3.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn3.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? super Integer>) (DA<? extends Number>) null; // <<warn 3>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn4.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn4.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? super String>) (DA<? super Number>) null; // <<warn 4>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn5.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn5.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<? extends Integer>) (DA<N>) null; // <<warn 5>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn6.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn6.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<I>) (DA<? extends Number>) null; // <<warn 6>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn7.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn7.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<N>) (DA<? extends Integer>) null; // <<warn 7>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn8.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn8.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<N>) (DA<? extends Runnable>) null; // <<warn 8>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/CastWarn9.java Fri May 22 09:14:18 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4916607
- * @summary Test casts (legal, warning, and errors)
- * @author gafter
- *
- * @compile/fail -Werror -Xlint:unchecked CastWarn9.java
- */
-
-import java.util.*;
-
-class CastTest {
-
- // --- Disjoint ---
-
- private interface DA<T> { }
- private interface DB<T> extends DA<T> { }
- private interface DC<T> extends DA<Integer> { }
-
- private <N extends Number, I extends Integer, R extends Runnable, S extends String> void disjointness() {
- Object o;
-
- o = (DA<N>) (DA<I>) null; // <<warn 9>>
- }
-
-}
--- a/langtools/test/tools/javac/generics/wildcards/neg/ParamCast.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/ParamCast.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4916567
- * @summary Description
+ * @summary integrate improved wildcard substitution from CPH
* @author gafter
*
- * @compile/fail ParamCast.java
+ * @compile/fail/ref=ParamCast.out -XDrawDiagnostics ParamCast.java
*/
class A<T> {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/ParamCast.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+ParamCast.java:15:36: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: A<java.lang.String>, B<?,java.lang.Integer>)
+1 error
--- a/langtools/test/tools/javac/generics/wildcards/neg/Readonly.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Readonly.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4916607 4931647
* @summary an extends-bound (covariant) wildcard is like readonly
* @author gafter
*
- * @compile/fail Readonly.java
+ * @compile/fail/ref=Readonly.out -XDrawDiagnostics Readonly.java
*/
class Err<T> {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Readonly.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Readonly.java:15:10: compiler.err.cant.apply.symbol: kindname.method, put, Err<compiler.misc.type.captureof: 1, ? extends java.lang.String>, Err<compiler.misc.type.captureof: 2, ? extends java.lang.String>, kindname.class, Err<T>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: Err<compiler.misc.type.captureof: 2, ? extends java.lang.String>, Err<compiler.misc.type.captureof: 1, ? extends java.lang.String>))
+1 error
--- a/langtools/test/tools/javac/generics/wildcards/neg/Unbounded.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Unbounded.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4916607
* @summary an unbounded (bivariant) wildcard doesn't allow reading
* @author gafter
*
- * @compile/fail Unbounded.java
+ * @compile/fail/ref=Unbounded.out -XDrawDiagnostics Unbounded.java
*/
import java.util.Stack;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/neg/Unbounded.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Unbounded.java:14:29: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.captureof: 1, ?, java.lang.String)
+1 error
--- a/langtools/test/tools/javac/importscope/ImportDependenciesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/importscope/ImportDependenciesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8065360
* @summary The test checks dependencies through type parameters and implements/extends statements.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox ImportDependenciesTest
* @run main ImportDependenciesTest
*/
--- a/langtools/test/tools/javac/importscope/ImportMembersTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/importscope/ImportMembersTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8065360
* @summary The test checks possibility of class members to be imported.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox ImportMembersTest
* @run main ImportMembersTest
*/
--- a/langtools/test/tools/javac/importscope/NegativeCyclicDependencyTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/importscope/NegativeCyclicDependencyTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8064794
* @summary The negative test against cyclic dependencies.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox NegativeCyclicDependencyTest
* @run main NegativeCyclicDependencyTest
*/
--- a/langtools/test/tools/javac/importscope/TestDuplicateImport.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/importscope/TestDuplicateImport.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011-2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7101822
* @summary static import fails to resolve interfaces on nested enums via import statements
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/importscope/TestLazyImportScope.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/importscope/TestLazyImportScope.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011-2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7101822
* @summary static import fails to resolve interfaces on nested enums via import statements
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/importscope/dependencies/DependenciesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/importscope/dependencies/DependenciesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 7101822
* @summary Verify that the processing of classes in TypeEnter runs in the correct order.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build annotations.TriggersComplete annotations.TriggersCompleteRepeat annotations.Phase
* @build DependenciesTest
* @run main DependenciesTest
--- a/langtools/test/tools/javac/innerClassFile/InnerClassFileTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/innerClassFile/InnerClassFileTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4491755 4785453
* @summary Prob w/static inner class with same name as a regular class
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main InnerClassFileTest
*/
--- a/langtools/test/tools/javac/javazip/JavaZipTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/javazip/JavaZipTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4098712 6304984 6388453
* @summary check that source files inside zip files on the class path are ignored
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main JavaZipTest
*/
--- a/langtools/test/tools/javac/jvm/ClassRefDupInConstantPoolTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/jvm/ClassRefDupInConstantPoolTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8015927
* @summary Class reference duplicates in constant pool
+ * @modules jdk.compiler/com.sun.tools.classfile
* @clean ClassRefDupInConstantPoolTest$Duplicates.class
* @run main ClassRefDupInConstantPoolTest
*/
--- a/langtools/test/tools/javac/lambda/8023389/T8023389.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/8023389/T8023389.java Fri May 29 12:49:31 2015 +0200
@@ -8,7 +8,7 @@
*
* 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
+ * 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).
*
--- a/langtools/test/tools/javac/lambda/BadLambdaExpr.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/BadLambdaExpr.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8003280
* @summary Add lambda tests
* compile crashes on partial lambda expressions
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/ByteCodeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/ByteCodeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8011738
* @author sogoel
* @summary Code translation test for Lambda expressions, method references
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main ByteCodeTest
*/
--- a/langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* temporarily workaround combo tests are causing time out in several platforms
* @author Maurizio Cimadamore
* @library ../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/timeout=600/othervm FunctionalInterfaceConversionTest
*/
--- a/langtools/test/tools/javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/langtools/test/tools/javac/lambda/LambdaInnerTypeVarReflect.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/LambdaInnerTypeVarReflect.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8005653
* @summary A lambda containing an inner class referencing an external type var
* @author Robert Field
+ * @modules jdk.compiler
* @run main LambdaInnerTypeVarReflect
*/
--- a/langtools/test/tools/javac/lambda/LambdaParserTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/LambdaParserTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Add parser support for lambda expressions
* temporarily workaround combo tests are causing time out in several platforms
* @library ../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm LambdaParserTest
*/
--- a/langtools/test/tools/javac/lambda/LambdaTestStrictFPFlag.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/LambdaTestStrictFPFlag.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8046060
* @summary Different results of floating point multiplication for lambda code block
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javac/lambda/LocalVariableTable.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/LocalVariableTable.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8025998 8026749 8054220 8058227
* @summary Missing LV table in lambda bodies
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g LocalVariableTable.java
* @run main LocalVariableTable
*/
--- a/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Add parser support for method references
* temporarily workaround combo tests are causing time out in several platforms
* @library ../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm MethodReferenceParserTest
*/
--- a/langtools/test/tools/javac/lambda/T8031967.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/T8031967.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8031967
* @summary Ensure javac can handle very deeply nested chain of method invocations occurring as
* a parameter to other method invocations.
+ * @modules jdk.compiler
* @run main T8031967
*/
--- a/langtools/test/tools/javac/lambda/TestInvokeDynamic.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/TestInvokeDynamic.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,12 @@
* Add back-end support for invokedynamic
* temporarily workaround combo tests are causing time out in several platforms
* @library ../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.jvm
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm TestInvokeDynamic
*/
--- a/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 8013576
* @summary Add stat support to LambdaToMethod
* @library ../lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm TestLambdaToMethodStats
*/
--- a/langtools/test/tools/javac/lambda/TestSelfRef.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/TestSelfRef.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Add lambda tests
* Check that self/forward references from lambda expressions behave
* consistently w.r.t. local inner classes
+ * @modules jdk.compiler
*/
import java.net.URI;
--- a/langtools/test/tools/javac/lambda/abort/Abort.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/abort/Abort.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 8003280
* @summary Add lambda tests
* check that all diagnostics are dumped to output when compiler exits abruptly
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/abort/CompletionFailure.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/abort/CompletionFailure.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8009227
* @summary Certain diagnostics should not be deferred
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/bridge/TestMetafactoryBridges.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/bridge/TestMetafactoryBridges.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8013789
* @summary Compiler should emit bridges in interfaces
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/bytecode/TestLambdaBytecode.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/bytecode/TestLambdaBytecode.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 8009649
* @summary Lambda back-end should generate invokespecial for method handles referring to private instance methods
* @library ../../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
* @build JavacTestingAbstractThreadedTest
* @run main/othervm TestLambdaBytecode
*/
--- a/langtools/test/tools/javac/lambda/funcInterfaces/LambdaTest2_SAM1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/funcInterfaces/LambdaTest2_SAM1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8003280
* @summary Add lambda tests
* This test is for identifying SAM types 2 and 3, see Helper.java for SAM types
+ * @modules java.sql
* @compile LambdaTest2_SAM1.java Helper.java
* @run main LambdaTest2_SAM1
*/
--- a/langtools/test/tools/javac/lambda/funcInterfaces/LambdaTest2_SAM2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/funcInterfaces/LambdaTest2_SAM2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8003280
* @summary Add lambda tests
* This test is for identifying SAM types #4, see Helper.java for SAM types
+ * @modules java.sql
* @compile LambdaTest2_SAM2.java Helper.java
* @run main LambdaTest2_SAM2
*/
--- a/langtools/test/tools/javac/lambda/funcInterfaces/LambdaTest2_SAM3.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/funcInterfaces/LambdaTest2_SAM3.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Add lambda tests
* This test is for identifying SAM types #5 and instantiating non-SAM types #7 through inner class,
see Helper.java for SAM types
+ * @modules java.sql
* @compile LambdaTest2_SAM3.java Helper.java
* @run main LambdaTest2_SAM3
*/
--- a/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8002099 8010822
* @summary Add support for intersection types in cast expression
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/lambdaExpression/SamConversionComboTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/lambdaExpression/SamConversionComboTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Test SAM conversion of lambda expressions in combinations of different contexts,
* lambda body types(statement/expression), explict/implicit target type etc, to verify
* SAM conversion being conducted successfully as expected.
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/lambdaNaming/TestNonSerializableLambdaNameStability.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8067422
* @summary Check that the lambda names are not unnecessarily unstable
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main TestNonSerializableLambdaNameStability
*/
--- a/langtools/test/tools/javac/lambda/lambdaNaming/TestSerializedLambdaNameStability.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/lambdaNaming/TestSerializedLambdaNameStability.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8023668
* @summary Desugar serializable lambda bodies using more robust naming scheme
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main TestSerializedLambdaNameStability
*/
--- a/langtools/test/tools/javac/lambda/methodReference/SamConversionComboTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/methodReference/SamConversionComboTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* Test SAM conversion of method references in combinations of different contexts,
* lambda body types(statement/expression), boxing/unboxing etc, to verify
* SAM conversion being conducted successfully as expected.
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* Automatic test for checking correctness of structural most specific test routine
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm/timeout=600 StructuralMostSpecificTest
*/
--- a/langtools/test/tools/javac/lambda/typeInference/combo/TypeInferenceComboTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lambda/typeInference/combo/TypeInferenceComboTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* in different contexts
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @compile TypeInferenceComboTest.java
* @run main/othervm/timeout=360 TypeInferenceComboTest
--- a/langtools/test/tools/javac/lib/DPrinter.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/lib/DPrinter.java Fri May 29 12:49:31 2015 +0200
@@ -24,6 +24,10 @@
/* @test
* @bug 8043484 8007307
* @summary Make sure DPrinter.java compiles
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @compile DPrinter.java
*/
--- a/langtools/test/tools/javac/limits/NestedClassConstructorArgs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/limits/NestedClassConstructorArgs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8014230
* @summary Compiler silently generates bytecode that exceeds VM limits
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile NumArgsTest.java
* @run main NestedClassConstructorArgs
*/
--- a/langtools/test/tools/javac/limits/NestedClassMethodArgs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/limits/NestedClassMethodArgs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8014230
* @summary Compiler silently generates bytecode that exceeds VM limits
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile NumArgsTest.java
* @run main NestedClassMethodArgs
*/
--- a/langtools/test/tools/javac/limits/StaticNestedClassConstructorArgs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/limits/StaticNestedClassConstructorArgs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8014230
* @summary Compiler silently generates bytecode that exceeds VM limits
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile NumArgsTest.java
* @run main StaticNestedClassConstructorArgs
*/
--- a/langtools/test/tools/javac/limits/TopLevelClassConstructorArgs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/limits/TopLevelClassConstructorArgs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 4309152
* @summary Compiler silently generates bytecode that exceeds VM limits
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile NumArgsTest.java
* @run main TopLevelClassConstructorArgs
*/
--- a/langtools/test/tools/javac/limits/TopLevelClassMethodArgs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/limits/TopLevelClassMethodArgs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 4309152
* @summary Compiler silently generates bytecode that exceeds VM limits
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile NumArgsTest.java
* @run main TopLevelClassMethodArgs
*/
--- a/langtools/test/tools/javac/limits/TopLevelClassStaticMethodArgs.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/limits/TopLevelClassStaticMethodArgs.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 4309152
* @summary Compiler silently generates bytecode that exceeds VM limits
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile NumArgsTest.java
* @run main TopLevelClassStaticMethodArgs
*/
--- a/langtools/test/tools/javac/linenumbers/ConditionalLineNumberTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/linenumbers/ConditionalLineNumberTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8034091
* @summary Add LineNumberTable attributes for conditional operator (?:) split across several lines.
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.ClassFile;
--- a/langtools/test/tools/javac/linenumbers/NestedLineNumberTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/linenumbers/NestedLineNumberTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8061778
* @summary Wrong LineNumberTable for default constructors
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import com.sun.tools.classfile.ClassFile;
@@ -49,8 +50,8 @@
}
int line = lines[0].line_number;
- if (line != 78) {
- error(String.format("LineNumberTable contains wrong line number - expected %d, found %d", 78, line));
+ if (line != 79) {
+ error(String.format("LineNumberTable contains wrong line number - expected %d, found %d", 79, line));
}
}
--- a/langtools/test/tools/javac/links/LinksTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/links/LinksTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4266026
* @summary javac no longer follows symlinks
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main LinksTest
*/
--- a/langtools/test/tools/javac/literals/BadUnderscoreLiterals.6.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/literals/BadUnderscoreLiterals.6.out Fri May 29 12:49:31 2015 +0200
@@ -1,21 +1,21 @@
-BadUnderscoreLiterals.java:14:17: compiler.err.unsupported.underscore.lit: 1.6
-BadUnderscoreLiterals.java:18:15: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:22:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:25:14: compiler.err.unsupported.binary.lit: 1.6
-BadUnderscoreLiterals.java:25:16: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:26:17: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:29:16: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:11:17: compiler.err.unsupported.underscore.lit: 1.6
+BadUnderscoreLiterals.java:15:15: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:19:19: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:22:14: compiler.err.unsupported.binary.lit: 1.6
+BadUnderscoreLiterals.java:22:16: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:23:17: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:26:16: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:27:17: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:30:17: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:33:17: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:31:18: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:32:19: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:33:19: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:34:18: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:35:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:36:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:37:18: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:38:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:41:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:42:20: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:43:21: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:44:22: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:45:21: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:46:22: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:39:20: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:40:21: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:41:22: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:42:21: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:43:22: compiler.err.illegal.underscore
20 errors
--- a/langtools/test/tools/javac/literals/BadUnderscoreLiterals.7.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/literals/BadUnderscoreLiterals.7.out Fri May 29 12:49:31 2015 +0200
@@ -1,19 +1,19 @@
-BadUnderscoreLiterals.java:18:15: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:22:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:25:16: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:26:17: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:29:16: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:15:15: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:19:19: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:22:16: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:23:17: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:26:16: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:27:17: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:30:17: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:33:17: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:31:18: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:32:19: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:33:19: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:34:18: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:35:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:36:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:37:18: compiler.err.illegal.underscore
BadUnderscoreLiterals.java:38:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:41:19: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:42:20: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:43:21: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:44:22: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:45:21: compiler.err.illegal.underscore
-BadUnderscoreLiterals.java:46:22: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:39:20: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:40:21: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:41:22: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:42:21: compiler.err.illegal.underscore
+BadUnderscoreLiterals.java:43:22: compiler.err.illegal.underscore
18 errors
--- a/langtools/test/tools/javac/literals/BadUnderscoreLiterals.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/literals/BadUnderscoreLiterals.java Fri May 29 12:49:31 2015 +0200
@@ -3,10 +3,7 @@
* @bug 6860973
* @summary Project Coin: underscores in literals
*
- * @compile/fail BadUnderscoreLiterals.java
* @compile/fail/ref=BadUnderscoreLiterals.7.out -XDrawDiagnostics BadUnderscoreLiterals.java
- *
- * @compile/fail -source 6 BadUnderscoreLiterals.java
* @compile/fail/ref=BadUnderscoreLiterals.6.out -XDrawDiagnostics -source 6 -Xlint:-options BadUnderscoreLiterals.java
*/
--- a/langtools/test/tools/javac/main/Option_J_At_Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/main/Option_J_At_Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006037
* @summary extra space in javac -help for -J and @ options
+ * @modules jdk.compiler
*/
import java.io.PrintWriter;
--- a/langtools/test/tools/javac/main/T8058445.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/main/T8058445.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8058445
* @summary javac throws exception when displaying info
+ * @modules jdk.compiler
*/
public class T8058445 {
--- a/langtools/test/tools/javac/meth/TestCP.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/meth/TestCP.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6991980
* @summary polymorphic signature calls don't share the same CP entries
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main TestCP
*/
--- a/langtools/test/tools/javac/miranda/4686148/ConcreteTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/miranda/4686148/ConcreteTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
+/* /nodynamiccopyright/ */
package two;
import one.*;
--- a/langtools/test/tools/javac/miranda/4686148/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/miranda/4686148/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
* @author gafter
*
* @compile Test.java AbstractTest.java
- * @compile/fail ConcreteTest.java
+ * @compile/fail/ref=Test.out -XDrawDiagnostics ConcreteTest.java
*/
package one;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/miranda/4686148/Test.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+ConcreteTest.java:8:18: compiler.err.override.weaker.access: (compiler.misc.cant.implement: perform(), two.ConcreteTest, perform(), one.Test), public
+1 error
--- a/langtools/test/tools/javac/miranda/4711056/T1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/miranda/4711056/T1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
* @compile T1.java
* @compile T2.java
* @compile T3.java
- * @compile/fail T4.java
+ * @compile/fail/ref=T1.out -XDrawDiagnostics T4.java
*/
interface iclss01004_1 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/miranda/4711056/T1.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+T4.java:3:10: compiler.err.types.incompatible.diff.ret: iclss01004_2, iclss01004_1, foo(int)
+1 error
--- a/langtools/test/tools/javac/miranda/4711056/T4.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/miranda/4711056/T4.java Fri May 29 12:49:31 2015 +0200
@@ -1,25 +1,4 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
+/* /nodynamiccopyright/ */
abstract class clss01004_a extends clss01004_b implements iclss01004_2 {
// conflict!
--- a/langtools/test/tools/javac/multicatch/7005371/T7005371.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/multicatch/7005371/T7005371.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7005371
* @summary Multicatch: assertion error while generating LocalVariableTypeTable attribute
+ * @modules jdk.compiler/com.sun.tools.classfile
* @compile -g SubTest.java
* @run main T7005371
*/
--- a/langtools/test/tools/javac/multicatch/7030606/DisjunctiveTypeWellFormednessTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/multicatch/7030606/DisjunctiveTypeWellFormednessTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Project-coin: multi-catch types should be pairwise disjoint
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm DisjunctiveTypeWellFormednessTest
*/
--- a/langtools/test/tools/javac/multicatch/Pos05.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/multicatch/Pos05.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6943289
* @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
+ * @modules jdk.compiler/com.sun.tools.classfile
* @run main Pos05
*/
--- a/langtools/test/tools/javac/multicatch/model/ModelChecker.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/multicatch/model/ModelChecker.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6993963 7025809
* @summary Project Coin: Use precise exception analysis for effectively final catch parameters
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor ModelChecker
* @compile -processor ModelChecker Model01.java
*/
--- a/langtools/test/tools/javac/nativeHeaders/NativeHeaderTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/nativeHeaders/NativeHeaderTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7150368 8003412 8000407
* @summary javac should include basic ability to generate native headers
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.File;
--- a/langtools/test/tools/javac/nativeHeaders/javahComparison/CompareTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/nativeHeaders/javahComparison/CompareTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7150368 8003412 8000407 8031545
* @summary javac should include basic ability to generate native headers
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/newlines/NewLineTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/newlines/NewLineTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4110560 4785453
* @summary portability : javac.properties
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main NewLineTest
*/
--- a/langtools/test/tools/javac/options/T6986895.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/T6986895.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6986895
* @summary compiler gives misleading message for no input files
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/options/T7022337.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/T7022337.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @bug 7022337
* @summary repeated warnings about bootclasspath not set
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor T7022337
* @run main T7022337
*/
--- a/langtools/test/tools/javac/options/modes/AtFilesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/AtFilesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for at-files
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main AtFilesTest
*/
--- a/langtools/test/tools/javac/options/modes/DocLintTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/DocLintTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for -Xdoclint
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main DocLintTest
*/
--- a/langtools/test/tools/javac/options/modes/FSInfoTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/FSInfoTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for the internal file system cache
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main FSInfoTest
*/
--- a/langtools/test/tools/javac/options/modes/InfoOptsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/InfoOptsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for info options -help -X -version -fullversion
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main InfoOptsTest
*/
--- a/langtools/test/tools/javac/options/modes/NoOperandsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/NoOperandsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support no operands being specified
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main NoOperandsTest
*/
--- a/langtools/test/tools/javac/options/modes/OutputDirTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/OutputDirTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for output directory options -d and -s
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main OutputDirTest
*/
--- a/langtools/test/tools/javac/options/modes/ProfileBootClassPathTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/ProfileBootClassPathTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for checking -profile and -bootclasspath
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main ProfileBootClassPathTest
*/
--- a/langtools/test/tools/javac/options/modes/ProfileTargetTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/ProfileTargetTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for checking -profile and -target
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main ProfileTargetTest
*/
--- a/langtools/test/tools/javac/options/modes/SourceTargetTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/SourceTargetTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for -source and -target checks
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main SourceTargetTest
*/
--- a/langtools/test/tools/javac/options/modes/StdOutTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/modes/StdOutTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8044859
* @summary test support for -Xstdout file and -XDstdout
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
* @build Tester
* @run main StdOutTest
*/
--- a/langtools/test/tools/javac/options/xprefer/XPreferTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/options/xprefer/XPreferTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @summary Tests which path is used to represent an implicit type given
* various xprefer arguments and multiple .class / .java files involved.
* @bug 8028196
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/parser/ExtraSemiTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/parser/ExtraSemiTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6921495
* @summary spurious semicolons in class def cause empty NOPOS blocks
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/parser/JavacParserTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/parser/JavacParserTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 7073631 7159445 7156633 8028235 8065753
* @summary tests error and diagnostics positions
* @author Jan Lahoda
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import com.sun.source.tree.BinaryTree;
--- a/langtools/test/tools/javac/parser/StringFoldingTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/parser/StringFoldingTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7068902
* @summary verify that string folding can be enabled or disabled
+ * @modules jdk.compiler
*/
import com.sun.source.tree.CompilationUnitTree;
--- a/langtools/test/tools/javac/parser/T4910483.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/parser/T4910483.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 4910483
* @summary Javadoc renders the string ".*\\.pdf" as ".\*\.pdf"
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @run main T4910483
*/
--- a/langtools/test/tools/javac/parser/extend/JavacExtensionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/parser/extend/JavacExtensionTest.java Fri May 29 12:49:31 2015 +0200
@@ -51,6 +51,11 @@
* @test
* @bug 8067384 8068488
* @summary Verify that JavacParser can be extended
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
*/
public class JavacExtensionTest {
--- a/langtools/test/tools/javac/plugin/showtype/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/plugin/showtype/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 8001098 8004961 8004082
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main Test
* @summary Provide a simple light-weight "plug-in" mechanism for javac
--- a/langtools/test/tools/javac/policy/test1/Test1b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/policy/test1/Test1b.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
/*
* @test 6420151
* @summary Compile a group of files and validate the set of class files produced
+ * @modules jdk.compiler
* @run main Test1b -XDcompilePolicy=byfile A.java B.java D.java
*/
--- a/langtools/test/tools/javac/policy/test3/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/policy/test3/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
/* @test
* @bug 6813059
* @summary
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/positions/T6402077.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/positions/T6402077.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6402077
* @summary Start position is wrong for package private constructors
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler
*/
import com.sun.source.tree.ClassTree;
--- a/langtools/test/tools/javac/positions/T6404194.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/positions/T6404194.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6404194
* @summary javac parser generates incorrect end position for annotations with parentheses.
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler
*/
import com.sun.source.tree.ClassTree;
--- a/langtools/test/tools/javac/positions/TreeEndPosTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/positions/TreeEndPosTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8017216 8019422 8019421 8054956
* @summary verify start and end positions
+ * @modules java.compiler
+ * jdk.compiler
* @run main TreeEndPosTest
*/
--- a/langtools/test/tools/javac/processing/6348193/T6348193.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6348193/T6348193.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6348193
* @summary AS8.1 UR2 BAT test failure with "javac"
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @compile -proc:none T6348193.java
* @run main/othervm T6348193
*/
--- a/langtools/test/tools/javac/processing/6348499/T6348499.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6348499/T6348499.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6441871
* @summary javac crashes at com.sun.tools.javac.jvm.ClassReader$BadClassFile
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @build JavacTestingAbstractProcessor A
* @run main T6348499
*/
--- a/langtools/test/tools/javac/processing/6350124/T6350124.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6350124/T6350124.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
/*
* @test
* @bug 6350124 6410012
+ * @modules java.compiler
+ * jdk.compiler
* @summary javac -s does not have the generated source files
*/
--- a/langtools/test/tools/javac/processing/6359313/T6359313.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6359313/T6359313.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary error compiling annotated package
* @author Peter von der Ah\u00e9
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile T6359313.java
* @compile -processor T6359313 package-info.java Foo.java
--- a/langtools/test/tools/javac/processing/6365040/T6365040.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6365040/T6365040.java Fri May 29 12:49:31 2015 +0200
@@ -4,6 +4,8 @@
* @summary Test -processor foo,bar,baz
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile ProcFoo.java
* @compile ProcBar.java
--- a/langtools/test/tools/javac/processing/6378728/T6378728.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6378728/T6378728.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @bug 6378728
* @summary Verify -proc:only doesn't produce class files
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
* @compile T6378728.java
* @run main T6378728
*/
--- a/langtools/test/tools/javac/processing/6413690/T6413690.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6413690/T6413690.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary JavacProcessingEnvironment does not enter trees from preceding rounds
* @author Peter von der Ah\u00e9
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile T6413690.java
* @compile -XDfatalEnterError -verbose -processor T6413690 src/Super.java TestMe.java
--- a/langtools/test/tools/javac/processing/6414633/T6414633.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6414633/T6414633.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6414633 6440109
* @summary Only the first processor message at a source location is reported
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @build JavacTestingAbstractProcessor A T6414633
* @run main T6414633
*/
--- a/langtools/test/tools/javac/processing/6430209/T6430209.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6430209/T6430209.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6441871
* @summary spurious compiler error elicited by packageElement.getEnclosedElements()
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
* @build JavacTestingAbstractProcessor b6341534
* @run main T6430209
*/
--- a/langtools/test/tools/javac/processing/6499119/ClassProcessor.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6499119/ClassProcessor.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
* @bug 6499119
* @summary Created package-info class file modeled improperly
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile ClassProcessor.java package-info.java
* @compile/process -cp . -processor ClassProcessor -Akind=java java.lang.Object
--- a/langtools/test/tools/javac/processing/6511613/clss41701.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6511613/clss41701.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,8 @@
* @bug 6511613
* @summary javac unexpectedly doesn't fail in some cases if an annotation processor specified
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor DummyProcessor
* @compile/fail/ref=clss41701.out -XDrawDiagnostics clss41701.java
* @compile/fail/ref=clss41701.out -XDrawDiagnostics -processor DummyProcessor clss41701.java
--- a/langtools/test/tools/javac/processing/6511613/clss41701.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6511613/clss41701.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-clss41701.java:19:30: compiler.err.type.var.may.not.be.followed.by.other.bounds
+clss41701.java:21:30: compiler.err.type.var.may.not.be.followed.by.other.bounds
1 error
--- a/langtools/test/tools/javac/processing/6512707/T6512707.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6512707/T6512707.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary "incompatible types" after (unrelated) annotation processing
* @author Peter Runge
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile T6512707.java
* @compile -processor T6512707 TestAnnotation.java
--- a/langtools/test/tools/javac/processing/6634138/T6634138.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6634138/T6634138.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @author Joseph D. Darcy
* @summary Verify source files output after processing is over are compiled
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile T6634138.java
* @compile -processor T6634138 Dummy.java
--- a/langtools/test/tools/javac/processing/6994946/SemanticErrorTest.1.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6994946/SemanticErrorTest.1.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-SemanticErrorTest.java:11:46: compiler.err.repeated.interface
+SemanticErrorTest.java:13:46: compiler.err.repeated.interface
1 error
--- a/langtools/test/tools/javac/processing/6994946/SemanticErrorTest.2.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6994946/SemanticErrorTest.2.out Fri May 29 12:49:31 2015 +0200
@@ -1,3 +1,3 @@
-SemanticErrorTest.java:11:46: compiler.err.repeated.interface
+SemanticErrorTest.java:13:46: compiler.err.repeated.interface
- compiler.err.proc.messager: Deliberate Error
-2 errors
\ No newline at end of file
+2 errors
--- a/langtools/test/tools/javac/processing/6994946/SemanticErrorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6994946/SemanticErrorTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,8 @@
* @bug 6994946
* @summary option to specify only syntax errors as unrecoverable
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestProcessor
* @compile/fail/ref=SemanticErrorTest.1.out -XDrawDiagnostics -processor TestProcessor SemanticErrorTest.java
* @compile/fail/ref=SemanticErrorTest.2.out -XDrawDiagnostics -XDonlySyntaxErrorsUnrecoverable -processor TestProcessor SemanticErrorTest.java
--- a/langtools/test/tools/javac/processing/6994946/SyntaxErrorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6994946/SyntaxErrorTest.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,8 @@
* @bug 6994946
* @summary option to specify only syntax errors as unrecoverable
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestProcessor
* @compile/fail/ref=SyntaxErrorTest.out -XDrawDiagnostics -processor TestProcessor SyntaxErrorTest.java
* @compile/fail/ref=SyntaxErrorTest.out -XDrawDiagnostics -XDonlySyntaxErrorsUnrecoverable -processor TestProcessor SyntaxErrorTest.java
--- a/langtools/test/tools/javac/processing/6994946/SyntaxErrorTest.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/6994946/SyntaxErrorTest.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-SyntaxErrorTest.java:12:10: compiler.err.expected: ';'
+SyntaxErrorTest.java:14:10: compiler.err.expected: ';'
1 error
--- a/langtools/test/tools/javac/processing/T6439826.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/T6439826.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6439826 6411930 6380018 6392177
* @summary Exception issuing Diagnostic while processing generated errant code
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/processing/T6920317.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/T6920317.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6920317
* @summary package-info.java file has to be specified on the javac cmdline, else it will not be avail
* @library /tools/javac/lib
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/processing/T7196462.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/T7196462.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 7196462
* @summary JavacProcessingEnvironment should tolerate BasicJavacTask
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor T7196462
* @compile/process -processor T7196462 T7196462.java
*/
--- a/langtools/test/tools/javac/processing/TestMultipleErrors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/TestMultipleErrors.java Fri May 29 12:49:31 2015 +0200
@@ -27,6 +27,7 @@
* @bug 8066843
* @summary Annotation processors should be able to print multiple errors at the same location.
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestMultipleErrors
* @compile/fail/ref=TestMultipleErrors.out -XDrawDiagnostics -processor TestMultipleErrors TestMultipleErrors.java
*/
--- a/langtools/test/tools/javac/processing/TestMultipleErrors.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/TestMultipleErrors.out Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
-TestMultipleErrors.java:41:8: compiler.err.proc.messager: error1
-TestMultipleErrors.java:41:8: compiler.err.proc.messager: error2
-TestMultipleErrors.java:41:8: compiler.err.proc.messager: error3
-TestMultipleErrors.java:41:8: compiler.err.proc.messager: error4
+TestMultipleErrors.java:42:8: compiler.err.proc.messager: error1
+TestMultipleErrors.java:42:8: compiler.err.proc.messager: error2
+TestMultipleErrors.java:42:8: compiler.err.proc.messager: error3
+TestMultipleErrors.java:42:8: compiler.err.proc.messager: error4
4 errors
--- a/langtools/test/tools/javac/processing/TestWarnErrorCount.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/TestWarnErrorCount.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @bug 7022337
* @summary repeated warnings about bootclasspath not set
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestWarnErrorCount
* @run main TestWarnErrorCount
*/
--- a/langtools/test/tools/javac/processing/completion/TestCompletions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/completion/TestCompletions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6341177
* @summary Some simple tests of the methods in Completions
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.annotation.processing.Completion;
import static javax.annotation.processing.Completions.*;
--- a/langtools/test/tools/javac/processing/environment/ProcessingEnvAnnoDiscovery.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/environment/ProcessingEnvAnnoDiscovery.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary make sure that all declaration annotations are discovered
* by the processing environment
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor ProcessingEnvAnnoDiscovery
* @compile/process -processor ProcessingEnvAnnoDiscovery ProcessingEnvAnnoDiscovery.java
*/
--- a/langtools/test/tools/javac/processing/environment/TestSourceVersion.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/environment/TestSourceVersion.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test that getSourceVersion works properly
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestSourceVersion.java
* @compile -processor TestSourceVersion -proc:only -source 1.6 -AExpectedVersion=RELEASE_6 HelloWorld.java
--- a/langtools/test/tools/javac/processing/environment/round/TestContext.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/environment/round/TestContext.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 6988836
* @summary A new JavacElements is created for each round of annotation processing
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.model
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor TestContext
* @compile/process -processor TestContext -XprintRounds TestContext
*/
--- a/langtools/test/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Tests that getElementsAnnotatedWith works properly.
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestElementsAnnotatedWith.java
* @compile InheritedAnnotation.java
--- a/langtools/test/tools/javac/processing/errors/CrashOnNonExistingAnnotation/Source.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/CrashOnNonExistingAnnotation/Source.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test /nodynamiccopyright/
* @bug 8027310
* @summary Ensure no exceptions on unresolvable annotations
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @build Processor
* @run main Processor Source.java
*/
--- a/langtools/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.java Fri May 29 12:49:31 2015 +0200
@@ -4,6 +4,7 @@
* @summary Ensure AnnotationTypeMismatchException is thrown when appropriate
* with reasonable foundType filled.
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor Processor
* @compile/fail/ref=Source.out -XDrawDiagnostics -processor Processor Source.java
*/
--- a/langtools/test/tools/javac/processing/errors/EnsureMirroredTypeException/Source.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/EnsureMirroredTypeException/Source.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,8 @@
* @bug 8019243
* @summary AnnotationTypeMismatchException instead of MirroredTypeException
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor Processor
* @compile/fail/ref=Source.out -XDrawDiagnostics -processor Processor Source.java
*/
--- a/langtools/test/tools/javac/processing/errors/EnsureMirroredTypeException/Source.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/EnsureMirroredTypeException/Source.out Fri May 29 12:49:31 2015 +0200
@@ -1,4 +1,4 @@
-Source.java:10:28: compiler.err.doesnt.exist: some.path.to
-Source.java:13:16: compiler.err.cant.resolve: kindname.class, SomeUnknownClass, ,
-Source.java:16:16: compiler.err.cant.resolve: kindname.variable, SomeUnknownClass, ,
+Source.java:12:28: compiler.err.doesnt.exist: some.path.to
+Source.java:15:16: compiler.err.cant.resolve: kindname.class, SomeUnknownClass, ,
+Source.java:18:16: compiler.err.cant.resolve: kindname.variable, SomeUnknownClass, ,
3 errors
--- a/langtools/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/GenerateFunctionalInterface.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/GenerateFunctionalInterface.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8014016
* @summary Ensure that an annotation processor can generate a super-interface
* which will make the current interface functional
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build GenerateSuperInterfaceProcessor
* @compile -processor GenerateSuperInterfaceProcessor GenerateFunctionalInterface.java
*/
--- a/langtools/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/Source.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/StopOnInapplicableAnnotations/Source.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 8014016
* @summary Verify that annotation processors do not get invalid annotations
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @build Processor
* @run main Processor Source.java
*/
--- a/langtools/test/tools/javac/processing/errors/TestBadProcessor.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestBadProcessor.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8022163
* @summary javac exits with 0 status and no messages on error to construct an ann-procesor
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/processing/errors/TestClassNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestClassNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 7071377
* @summary verify if erroneous class names are rejected
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.main
* @build TestClassNames JavacTestingAbstractProcessor CompileFail
* @run main CompileFail ERROR -processor TestClassNames TestClassNames.x.y
* @run main CompileFail ERROR -processor TestClassNames x.y.TestClassNames
--- a/langtools/test/tools/javac/processing/errors/TestErrorCount.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestErrorCount.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6988079
* @summary Errors reported via Messager.printMessage(ERROR,"error message") are not tallied correctly
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestErrorCount
* @compile/fail/ref=TestErrorCount.out -XDrawDiagnostics -processor TestErrorCount TestErrorCount.java
*/
--- a/langtools/test/tools/javac/processing/errors/TestFatalityOfParseErrors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestFatalityOfParseErrors.java Fri May 29 12:49:31 2015 +0200
@@ -4,6 +4,8 @@
* @summary Test that generating programs with syntax errors is a fatal condition
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestReturnCode.java
* @compile TestFatalityOfParseErrors.java
--- a/langtools/test/tools/javac/processing/errors/TestOptionSyntaxErrors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestOptionSyntaxErrors.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test that annotation processor options with illegal syntax are rejected
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.main
* @build JavacTestingAbstractProcessor CompileFail
* @compile TestOptionSyntaxErrors.java
* @run main CompileFail CMDERR -A TestOptionSyntaxErrors.java
--- a/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestParseErrors/TestParseErrors.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6988407
* @summary javac crashes running processor on errant code; it used to print error message
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestParseErrors
* @compile/fail/ref=TestParseErrors.out -XDrawDiagnostics -proc:only -processor TestParseErrors ParseErrors.java
*/
--- a/langtools/test/tools/javac/processing/errors/TestReturnCode.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestReturnCode.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test that an erroneous return code results from raising an error.
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.main
* @build JavacTestingAbstractProcessor CompileFail
* @compile TestReturnCode.java
*
--- a/langtools/test/tools/javac/processing/errors/TestSuppression.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/errors/TestSuppression.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 6403465
* @summary javac should defer diagnostics until it can be determined they are persistent
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.io.*;
--- a/langtools/test/tools/javac/processing/filer/TestFilerConstraints.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestFilerConstraints.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test that the constraints guaranteed by the Filer and maintained
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build TestFilerConstraints
* @compile -encoding iso-8859-1 -processor TestFilerConstraints -proc:only TestFilerConstraints.java
*/
--- a/langtools/test/tools/javac/processing/filer/TestGetResource.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestGetResource.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test Filer.getResource
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestGetResource
* @compile -processor TestGetResource -proc:only -Aphase=write TestGetResource.java
* @compile -processor TestGetResource -proc:only -Aphase=read TestGetResource.java
--- a/langtools/test/tools/javac/processing/filer/TestGetResource2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestGetResource2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @bug 6929404
* @summary Filer.getResource(SOURCE_PATH, ...) does not work when -sourcepath contains >1 entry
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/processing/filer/TestInvalidRelativeNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestInvalidRelativeNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6502392
* @summary Invalid relative names for Filer.createResource and Filer.getResource
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestInvalidRelativeNames.java
* @compile/process -processor TestInvalidRelativeNames java.lang.Object
--- a/langtools/test/tools/javac/processing/filer/TestLastRound.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestLastRound.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test 6966604
* @summary JavacFiler not correctly notified of lastRound
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestLastRound.java
* @compile/fail/ref=TestLastRound.out -XDrawDiagnostics -Werror -proc:only -processor TestLastRound TestLastRound.java
--- a/langtools/test/tools/javac/processing/filer/TestPackageInfo.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestPackageInfo.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test the ability to create and process package-info.java files
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestPackageInfo.java
* @compile -processor TestPackageInfo -proc:only foo/bar/package-info.java TestPackageInfo.java
--- a/langtools/test/tools/javac/processing/filer/TestValidRelativeNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/filer/TestValidRelativeNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6999891
* @summary Test valid relative names for Filer.createResource and Filer.getResource
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestValidRelativeNames.java
* @compile/process -processor TestValidRelativeNames -Amode=create java.lang.Object
--- a/langtools/test/tools/javac/processing/loader/testClose/TestClose.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/loader/testClose/TestClose.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7092965
* @summary javac should not close processorClassLoader before end of compilation
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/processing/loader/testClose/TestClose2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/loader/testClose/TestClose2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7092965
* @summary javac should not close processorClassLoader before end of compilation
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/processing/messager/6362067/T6362067.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/messager/6362067/T6362067.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,8 @@
* @bug 6362067
* @summary Messager methods do not print out source position information
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor T6362067
* @compile -processor T6362067 -proc:only T6362067.java
* @compile/ref=T6362067.out -XDrawDiagnostics -processor T6362067 -proc:only T6362067.java
--- a/langtools/test/tools/javac/processing/messager/6362067/T6362067.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/messager/6362067/T6362067.out Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
-T6362067.java:17:8: compiler.note.proc.messager: note:elem
-T6362067.java:15:1: compiler.note.proc.messager: note:anno
-T6362067.java:16:1: compiler.note.proc.messager: note:anno
-T6362067.java:16:1: compiler.note.proc.messager: note:value
+T6362067.java:19:8: compiler.note.proc.messager: note:elem
+T6362067.java:17:1: compiler.note.proc.messager: note:anno
+T6362067.java:18:1: compiler.note.proc.messager: note:anno
+T6362067.java:18:1: compiler.note.proc.messager: note:value
- compiler.note.proc.messager: note:nopos
--- a/langtools/test/tools/javac/processing/messager/MessagerBasics.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/messager/MessagerBasics.java Fri May 29 12:49:31 2015 +0200
@@ -4,6 +4,8 @@
* @summary Test presence of Messager methods
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile MessagerBasics.java
* @compile -processor MessagerBasics -proc:only MessagerBasics.java
--- a/langtools/test/tools/javac/processing/messager/MessagerDiags.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/messager/MessagerDiags.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 7166010
* @summary warnings printed by annotation processors uses incorrect source
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
import java.io.IOException;
--- a/langtools/test/tools/javac/processing/model/6194785/T6194785.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/6194785/T6194785.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary ParameterDeclaration.getSimpleName does not return actual name from class files
* @author Peter von der Ah\u00e9
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile -g T6194785.java T6194785a.java
* @compile -processor T6194785 foo.T6194785a T6194785.java
--- a/langtools/test/tools/javac/processing/model/6341534/T6341534.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/6341534/T6341534.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @author Steve Sides
* @author Peter von der Ahe
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile T6341534.java
* @compile -proc:only -processor T6341534 dir/package-info.java
--- a/langtools/test/tools/javac/processing/model/TestExceptions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/TestExceptions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6794071
* @summary Test that exceptions have a proper parent class
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.lang.model.UnknownEntityException;
--- a/langtools/test/tools/javac/processing/model/TestSourceVersion.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/TestSourceVersion.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 7025809 8028543
* @summary Test latest and latestSupported
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.lang.model.SourceVersion;
--- a/langtools/test/tools/javac/processing/model/TestSymtabItems.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/TestSymtabItems.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 7021183 7025809
* @summary 269: assertion failure getting enclosing element of an undefined name
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.model
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.lang.reflect.Field;
--- a/langtools/test/tools/javac/processing/model/element/8009367/TestQualifiedNameUsed.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/8009367/TestQualifiedNameUsed.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test that the correct kind of names (binary) are used when comparing
* Class and Symbol for repeatable Classes.
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor TestQualifiedNameUsed p.Q p.QQ p.R p.RR
* @run compile -processor TestQualifiedNameUsed -proc:only TestQualifiedNameUsed.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestAnonClassNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestAnonClassNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test that reported names of anonymous classes are non-null.
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestAnonSourceNames
* @compile -processor TestAnonSourceNames TestAnonClassNames.java
* @run main TestAnonClassNames
--- a/langtools/test/tools/javac/processing/model/element/TestElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test basic properties of javax.lang.element.Element
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestElement
* @compile -processor TestElement -proc:only TestElement.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestEmptyContainer.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestEmptyContainer.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test that an empty container does not stop us from looking at
* supertypes for inherited repeated annotations.
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor TestEmptyContainer
* @compile -processor TestEmptyContainer -proc:only TestEmptyContainer.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestExecutableElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestExecutableElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test basic properties of javax.lang.element.ExecutableElement
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestExecutableElement
* @compile -processor TestExecutableElement -proc:only -AexpectedMethodCount=7 TestExecutableElement.java
* @compile/process -processor TestExecutableElement -proc:only -AexpectedMethodCount=3 ProviderOfDefault
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @bug 6639645 7026414 7025809
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor TestMissingElement
* @compile/fail/ref=TestMissingElement.ref -proc:only -XprintRounds -XDrawDiagnostics -processor TestMissingElement InvalidSource.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6639645
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor Generator
* @compile -XprintRounds -processor Generator TestMissingClass.java
* @run main TestMissingClass
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericClass1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericClass1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6639645
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @clean MissingGenericClass1
* @build JavacTestingAbstractProcessor Generator
* @compile -XprintRounds -processor Generator TestMissingGenericClass1.java
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericClass2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericClass2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6639645
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @clean MissingGenericClass2
* @build JavacTestingAbstractProcessor Generator
* @compile -XprintRounds -processor Generator TestMissingGenericClass2.java
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericInterface1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericInterface1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6639645
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @clean MissingGenericInterface1
* @build JavacTestingAbstractProcessor Generator
* @compile -XprintRounds -processor Generator TestMissingGenericInterface1.java
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericInterface2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingGenericInterface2.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6639645
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @clean MissingGenericInterface2
* @build JavacTestingAbstractProcessor Generator
* @compile -XprintRounds -processor Generator TestMissingGenericInterface2.java
--- a/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingInterface.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestMissingElement2/TestMissingInterface.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6639645
* @summary Modeling type implementing missing interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor Generator
* @compile -XprintRounds -processor Generator TestMissingInterface.java
* @run main TestMissingInterface
--- a/langtools/test/tools/javac/processing/model/element/TestNames.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestNames.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test that the constraints guaranteed by the Filer and maintained
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestNames
* @compile -processor TestNames -proc:only TestNames.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestNonInherited.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestNonInherited.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Javac should only look on supertypes for repeatable annotations if
* both container and containee are inherited.
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor TestNonInherited
* @compile -processor TestNonInherited -proc:only TestNonInherited.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestPackageElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestPackageElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test basic workings of PackageElement
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestPackageElement
* @compile -processor TestPackageElement -proc:only TestPackageElement.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestResourceElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestResourceElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Element not returned from tree API for ARM resource variables.
* @author A. Sundararajan
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestResourceElement
* @compile -processor TestResourceElement -proc:only TestResourceElement.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestResourceVariable.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestResourceVariable.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test that the resource variable kind is appropriately set
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestResourceVariable
* @compile -processor TestResourceVariable -proc:only TestResourceVariable.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestTypeElement.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestTypeElement.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Verify that TypeElement for interfaces does not have
* Modifier.DEFAULT in getModifiers()
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestTypeElement
* @compile -processor TestTypeElement -proc:only TestTypeElement.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestTypeParameter.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestTypeParameter.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6505047
* @summary javax.lang.model.element.Element.getEnclosingElement() doesn't return null for type parameter
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestTypeParameter
* @compile -processor TestTypeParameter -proc:only TestTypeParameter.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TestTypeParameterAnnotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TestTypeParameterAnnotations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8011027 8046916
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestTypeParameterAnnotations
* @compile -processor TestTypeParameterAnnotations -proc:only TestTypeParameterAnnotations.java
*/
--- a/langtools/test/tools/javac/processing/model/element/TypeParamBounds.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/TypeParamBounds.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Tests TypeParameter.getBounds.
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TypeParamBounds
* @compile -processor TypeParamBounds -proc:only TypeParamBounds.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerBasicTest.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedA1Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedA1Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedA1Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedA2Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedA2Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedA2Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB1Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB1Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedB1Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB2Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixRepeatableAndOfficialContainerInheritedB2Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixRepeatableAndOfficialContainerInheritedB2Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only MixSingularAndUnofficialContainerBasicTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedA1Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedA1Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixSingularAndUnofficialContainerInheritedA1Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedA2Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedA2Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixSingularAndUnofficialContainerInheritedA2Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedB1Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedB1Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixSingularAndUnofficialContainerInheritedB1Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedB2Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/MixSingularAndUnofficialContainerInheritedB2Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* MixSingularAndUnofficialContainerInheritedB2Test.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/OfficialContainerBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/OfficialContainerBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only OfficialContainerBasicTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/OfficialContainerInheritedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/OfficialContainerInheritedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only OfficialContainerInheritedTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableBasicTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableInheritedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableInheritedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableInheritedTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOfficialContainerBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOfficialContainerBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOfficialContainerBasicTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOfficialContainerInheritedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOfficialContainerInheritedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* RepeatableOfficialContainerInheritedTest.java
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideATest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideATest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideATest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideBTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/RepeatableOverrideBTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only RepeatableOverrideBTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/SingularBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/SingularBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only SingularBasicTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/SingularInheritedATest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/SingularInheritedATest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only SingularInheritedATest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/SingularInheritedBTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/SingularInheritedBTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only SingularInheritedBTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/UnofficialContainerBasicTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/UnofficialContainerBasicTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only UnofficialContainerBasicTest.java
*/
--- a/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/UnofficialContainerInheritedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/element/repeatingAnnotations/UnofficialContainerInheritedTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
* @summary Language model api test basics for repeating annotations
* @library /tools/javac/lib
* @library supportingAnnotations
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor ElementRepAnnoTester
* @compile -processor ElementRepAnnoTester -proc:only
* UnofficialContainerInheritedTest.java
--- a/langtools/test/tools/javac/processing/model/inheritedByType/EnsureOrder.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/inheritedByType/EnsureOrder.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @summary test that order is respected when inheriting both legacy container and single anno
* @bug 8007961
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor EnsureOrder
* @compile -processor EnsureOrder -proc:only EnsureOrder.java
*/
--- a/langtools/test/tools/javac/processing/model/testgetallmembers/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/testgetallmembers/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6374357 6308351 6707027
* @summary PackageElement.getEnclosedElements() throws ClassReader$BadClassFileException
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler
* @run main/othervm -Xmx256m Main
*/
--- a/langtools/test/tools/javac/processing/model/trees/OnDemandAttribution.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/trees/OnDemandAttribution.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify that in-method ClassSymbols from one round do not affect ClassSymbols in
* following rounds.
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor OnDemandAttribution
* @compile/process -processor OnDemandAttribution OnDemandAttribution.java
*/
--- a/langtools/test/tools/javac/processing/model/type/BasicAnnoTests.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/BasicAnnoTests.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,11 @@
* @bug 8013852 8031744
* @summary Annotations on types
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor DPrinter BasicAnnoTests
* @compile/process -processor BasicAnnoTests -proc:only BasicAnnoTests.java
*/
--- a/langtools/test/tools/javac/processing/model/type/BoundsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/BoundsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6499673
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor BoundsTest
* @run main BoundsTest
* @summary Assertion check for TypeVariable.getUpperBound() fails
--- a/langtools/test/tools/javac/processing/model/type/InheritedAP.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/InheritedAP.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8024513
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor InheritedAP
* @compile -cp . -processor InheritedAP -proc:only InheritedAP.java
* @summary NPE in annotation processing
--- a/langtools/test/tools/javac/processing/model/type/IntersectionPropertiesTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/IntersectionPropertiesTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6499673 6557966
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor IntersectionPropertiesTest
* @run main IntersectionPropertiesTest
* @summary Assertion check for TypeVariable.getUpperBound() fails
--- a/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/NpeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/NpeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6593082
* @summary MirroredTypeException constructor should not accept null
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.lang.model.type.*;
--- a/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/OverEager.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/OverEager.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary MirroredType[s]Exception shouldn't be created too eagerly
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile -g OverEager.java
* @compile -processor OverEager -proc:only OverEager.java
--- a/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6519115
* @summary Verify MirroredTypeException vs MirroredTypesException is thrown
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile Plurality.java
* @compile -processor Plurality -proc:only Plurality.java
--- a/langtools/test/tools/javac/processing/model/type/NoTypes.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/NoTypes.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test the NoTypes: VOID, PACKAGE, NONE
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile -g NoTypes.java
* @compile -processor NoTypes -proc:only NoTypes.java
--- a/langtools/test/tools/javac/processing/model/type/TestTypeKind.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/TestTypeKind.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6347716
* @summary Test TypeKind.isPrimitive
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.lang.model.type.TypeKind;
--- a/langtools/test/tools/javac/processing/model/type/TestUnionType.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/type/TestUnionType.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 7029150 7025809
* @summary Test support for union types
* @library /tools/javac/lib
+ * @modules jdk.compiler
*/
import java.net.URI;
--- a/langtools/test/tools/javac/processing/model/util/BinaryName.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/BinaryName.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test Elements.getBinaryName
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor BinaryName
* @compile -processor BinaryName -proc:only BinaryName.java
*/
--- a/langtools/test/tools/javac/processing/model/util/DirectSuperOfInt.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/DirectSuperOfInt.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 8034933
* @summary Types.directSupertypes should return Object as the super type of interfaces
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor DirectSuperOfInt
* @compile -processor DirectSuperOfInt -proc:only DirectSuperOfInt.java
*/
--- a/langtools/test/tools/javac/processing/model/util/GetTypeElemBadArg.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/GetTypeElemBadArg.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary getTypeElement should tolerate a type that can't be found
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor GetTypeElemBadArg
* @compile -processor GetTypeElemBadArg -proc:only GetTypeElemBadArg.java
*/
--- a/langtools/test/tools/javac/processing/model/util/NoSupers.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/NoSupers.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary directSupertypes should return empty list if arg has no supertypes
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor NoSupers
* @compile -processor NoSupers -proc:only NoSupers.java
*/
--- a/langtools/test/tools/javac/processing/model/util/OverridesSpecEx.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/OverridesSpecEx.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Verify that example code in Elements.overrides works as spec'ed.
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile -g OverridesSpecEx.java
* @compile -processor OverridesSpecEx -proc:only OverridesSpecEx.java
--- a/langtools/test/tools/javac/processing/model/util/TestIntersectionTypeVisitors.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/TestIntersectionTypeVisitors.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8027730
* @summary Test visitor support for intersection types
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.lang.annotation.Annotation;
--- a/langtools/test/tools/javac/processing/model/util/TypesBadArg.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/TypesBadArg.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Validate argument kinds in Types utilities
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TypesBadArg
* @compile -processor TypesBadArg -proc:only TypesBadArg.java
*/
--- a/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Tests Elements.isDeprecated(Element)
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestDeprecation.java
* @compile -processor TestDeprecation -proc:only Dep1.java
--- a/langtools/test/tools/javac/processing/model/util/directSupersOfErr/DirectSupersOfErr.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/directSupersOfErr/DirectSupersOfErr.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary directSupertypes(t) should not return t
* @author Scott Seligman
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor DirectSupersOfErr
* @compile/fail/ref=DirectSupersOfErr.ref -processor DirectSupersOfErr -proc:only -XDrawDiagnostics C1.java
*/
--- a/langtools/test/tools/javac/processing/model/util/elements/TestGetConstantExpression.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/elements/TestGetConstantExpression.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test Elements.getConstantExpression
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestGetConstantExpression
* @compile -processor TestGetConstantExpression Foo.java
*/
--- a/langtools/test/tools/javac/processing/model/util/elements/TestGetPackageOf.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/elements/TestGetPackageOf.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test Elements.getPackageOf
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestGetPackageOf
* @compile -processor TestGetPackageOf -proc:only TestGetPackageOf.java
*/
--- a/langtools/test/tools/javac/processing/model/util/elements/TestIsFunctionalInterface.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/elements/TestIsFunctionalInterface.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test Elements.isFunctionalInterface
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestIsFunctionalInterface
* @compile -processor TestIsFunctionalInterface TestIsFunctionalInterface.java
*/
--- a/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestDocComments.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestDocComments.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6877202 6986246
* @summary Elements.getDocComment() is not getting JavaDocComments
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestDocComments
* @run main TestDocComments
*/
--- a/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestPackageInfoComments.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestPackageInfoComments.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8042345
* @summary getDocComment() fails for doc comments on PackageElement found in package-info.java
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TestPackageInfoComments
* @run main TestPackageInfoComments
*/
--- a/langtools/test/tools/javac/processing/model/util/filter/TestIterables.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/model/util/filter/TestIterables.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Test that ElementFilter iterable methods behave properly.
* @author Joseph D. Darcy
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile TestIterables.java
* @compile -processor TestIterables -proc:only Foo1.java
--- a/langtools/test/tools/javac/processing/options/TestImplicitNone.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/options/TestImplicitNone.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6935638
* @summary -implicit:none prevents compilation with annotation processing
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/processing/options/Xprint.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/options/Xprint.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6266828
* @summary JSR 269: Java Language Model API
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;
--- a/langtools/test/tools/javac/processing/options/testCommandLineClasses/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/options/testCommandLineClasses/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6930508
* @summary Passing nested class names on javac command line interfere with subsequent name -> class lookup
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor p.NestedExamples Test
* @run main Test
*/
--- a/langtools/test/tools/javac/processing/options/testPrintProcessorInfo/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/options/testPrintProcessorInfo/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6987384
* @summary -XprintProcessorRoundsInfo message printed with different timing than previous
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor Test
* @compile/fail/ref=Test.out -XDrawDiagnostics -XprintProcessorInfo -Werror -proc:only -processor Test Test.java
*/
--- a/langtools/test/tools/javac/processing/options/testPrintProcessorInfo/TestWithXstdout.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/options/testPrintProcessorInfo/TestWithXstdout.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6987384
* @summary -XprintProcessorRoundsInfo message printed with different timing than previous
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor Test TestWithXstdout
* @run main TestWithXstdout
*/
--- a/langtools/test/tools/javac/processing/rounds/BaseClassesNotReRead.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/rounds/BaseClassesNotReRead.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8038455
* @summary Check that classfiles are read only once in common cases despite several rounds of
* annotation processing.
+ * @modules jdk.compiler
* @clean *
* @run main BaseClassesNotReRead
*/
--- a/langtools/test/tools/javac/processing/rounds/ClassDependingOnGenerated.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/rounds/ClassDependingOnGenerated.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify situation when a classfile depends on another type, which is missing and
* generated by an annotation processor, is handled properly
* @library /tools/javac/lib/
+ * @modules jdk.compiler/com.sun.tools.javac.code
* @clean *
* @build ClassWithSuperType ClassDependingOnGenerated JavacTestingAbstractProcessor
* @clean SuperClass
--- a/langtools/test/tools/javac/processing/rounds/CompleteOnClosed.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/rounds/CompleteOnClosed.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @summary Ensure that formatting diagnostics with an already closed JavaCompiler won't crash
* the compiler.
* @library /tools/lib /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox JavacTestingAbstractProcessor
* @run main CompleteOnClosed
*/
--- a/langtools/test/tools/javac/processing/rounds/MethodsDroppedBetweenRounds.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/rounds/MethodsDroppedBetweenRounds.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Ensure that Symbols for members (methods and fields) are dropped across annotation
* processing rounds. ClassSymbols need to be kept.
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor MethodsDroppedBetweenRounds
* @compile/process -processor MethodsDroppedBetweenRounds MethodsDroppedBetweenRounds.java
*/
--- a/langtools/test/tools/javac/processing/rounds/OverwriteBetweenCompilations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/rounds/OverwriteBetweenCompilations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,11 @@
* @summary Verify that annotation processor can overwrite source and class files it generated
* during previous compilations, and that the Symbols are updated appropriatelly.
* @library /tools/lib /tools/javac/lib/
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @clean *
* @build OverwriteBetweenCompilations ToolBox JavacTestingAbstractProcessor
* @compile/ref=OverwriteBetweenCompilations_1.out -processor OverwriteBetweenCompilations -Apass=1 -parameters -XDrawDiagnostics OverwriteBetweenCompilationsSource.java
--- a/langtools/test/tools/javac/processing/rounds/TypesCachesCleared.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/rounds/TypesCachesCleared.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8038455
* @summary Verify that Types caches (in particular MembersClosureCache) get cleared between rounds.
* @library /tools/javac/lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractProcessor TypesCachesCleared
* @compile/process -processor TypesCachesCleared TypesCachesCleared.java
*/
--- a/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/warnings/TestSourceVersionWarnings.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6376083 6376084 6458819 7025784 7025786 7025789
* @summary Test that warnings about source versions are output as expected.
* @author Joseph D. Darcy
+ * @modules java.compiler
+ * jdk.compiler
* @compile TestSourceVersionWarnings.java
* @compile/ref=gold_0.out -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -source 1.6 -Xlint:-options HelloWorld.java
* @compile/ref=gold_sv_warn_5_6.out -XDrawDiagnostics -processor TestSourceVersionWarnings -proc:only -ASourceVersion=RELEASE_5 -source 1.6 -Xlint:-options HelloWorld.java
--- a/langtools/test/tools/javac/processing/warnings/UseImplicit/TestProcUseImplicitWarning.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/warnings/UseImplicit/TestProcUseImplicitWarning.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6986892
* @summary confusing warning given after errors in annotation processing
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor TestProcUseImplicitWarning
* @clean C1 p.C2
* @compile/fail/ref=err.out -XDrawDiagnostics -processor TestProcUseImplicitWarning -Aerror C1.java
--- a/langtools/test/tools/javac/processing/werror/WError1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/werror/WError1.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test 6403456
* @summary -Werror should work with annotation processing
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile WError1.java
* @compile -proc:only -processor WError1 WError1.java
--- a/langtools/test/tools/javac/processing/werror/WErrorGen.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/werror/WErrorGen.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test 6403456
* @summary -Werror should work with annotation processing
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile WErrorGen.java
* @compile -proc:only -processor WErrorGen WErrorGen.java
--- a/langtools/test/tools/javac/processing/werror/WErrorLast.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/processing/werror/WErrorLast.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test 6403456
* @summary -Werror should work with annotation processing
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor
* @compile WErrorLast.java
* @compile -proc:only -processor WErrorLast WErrorLast.java
--- a/langtools/test/tools/javac/profiles/ProfileOptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/profiles/ProfileOptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 8004182 8028545
* @summary Add support for profiles in javac
+ * @modules java.desktop
+ * java.sql.rowset
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.jvm
+ * jdk.security.auth
*/
import java.io.PrintWriter;
--- a/langtools/test/tools/javac/profiles/ProfileTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/profiles/ProfileTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8022287
* @summary javac.sym.Profiles uses a static Map when it should not
+ * @modules jdk.compiler/com.sun.tools.javac.sym
*/
import java.io.File;
--- a/langtools/test/tools/javac/proprietary/WarnClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/proprietary/WarnClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,13 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
* @bug 6380059
* @summary Emit warnings for proprietary packages in the boot class path
* @author Peter von der Ah\u00e9
+ * @modules java.base/sun.misc
* @compile WarnClass.java
- * @compile/fail -Werror WarnClass.java
- * @compile/fail -Werror -nowarn WarnClass.java
- * @compile/fail -Werror -Xlint:none WarnClass.java
+ * @compile/fail/ref=WarnClass.out -XDrawDiagnostics -Werror WarnClass.java
+ * @compile/fail/ref=WarnClass.out -XDrawDiagnostics -Werror -nowarn WarnClass.java
+ * @compile/fail/ref=WarnClass.out -XDrawDiagnostics -Werror -Xlint:none WarnClass.java
*/
public class WarnClass extends sun.misc.Lock {}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/proprietary/WarnClass.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+WarnClass.java:13:40: compiler.warn.sun.proprietary: sun.misc.Lock
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/proprietary/WarnImport.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/proprietary/WarnImport.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,12 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
* @bug 6380059
* @summary Emit warnings for proprietary packages in the boot class path
* @author Peter von der Ah\u00e9
* @compile WarnImport.java
- * @compile/fail -Werror WarnImport.java
- * @compile/fail -Werror -nowarn WarnImport.java
- * @compile/fail -Werror -Xlint:none WarnImport.java
+ * @compile/fail/ref=WarnImport.out -XDrawDiagnostics -Werror WarnImport.java
+ * @compile/fail/ref=WarnImport.out -XDrawDiagnostics -Werror -nowarn WarnImport.java
+ * @compile/fail/ref=WarnImport.out -XDrawDiagnostics -Werror -Xlint:none WarnImport.java
*/
import sun.misc.VM;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/proprietary/WarnImport.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+WarnImport.java:12:16: compiler.warn.sun.proprietary: sun.misc.VM
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/proprietary/WarnMethod.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/proprietary/WarnMethod.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,13 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
* @bug 6380059
* @summary Emit warnings for proprietary packages in the boot class path
* @author Peter von der Ah\u00e9
+ * @modules java.base/sun.misc
* @compile WarnMethod.java
- * @compile/fail -Werror WarnMethod.java
- * @compile/fail -Werror -nowarn WarnMethod.java
- * @compile/fail -Werror -Xlint:none WarnMethod.java
+ * @compile/fail/ref=WarnMethod.out -XDrawDiagnostics -Werror WarnMethod.java
+ * @compile/fail/ref=WarnMethod.out -XDrawDiagnostics -Werror -nowarn WarnMethod.java
+ * @compile/fail/ref=WarnMethod.out -XDrawDiagnostics -Werror -Xlint:none WarnMethod.java
*/
public class WarnMethod {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/proprietary/WarnMethod.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+WarnMethod.java:15:36: compiler.warn.sun.proprietary: sun.misc.VM
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/proprietary/WarnStaticImport.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/proprietary/WarnStaticImport.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,12 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
* @bug 6380059
* @summary Emit warnings for proprietary packages in the boot class path
* @author Peter von der Ah\u00e9
* @compile WarnStaticImport.java
- * @compile/fail -Werror WarnStaticImport.java
- * @compile/fail -Werror -nowarn WarnStaticImport.java
- * @compile/fail -Werror -Xlint:none WarnStaticImport.java
+ * @compile/fail/ref=WarnStaticImport.out -XDrawDiagnostics -Werror WarnStaticImport.java
+ * @compile/fail/ref=WarnStaticImport.out -XDrawDiagnostics -Werror -nowarn WarnStaticImport.java
+ * @compile/fail/ref=WarnStaticImport.out -XDrawDiagnostics -Werror -Xlint:none WarnStaticImport.java
*/
import static sun.misc.VM.getFinalRefCount;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/proprietary/WarnStaticImport.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+WarnStaticImport.java:12:23: compiler.warn.sun.proprietary: sun.misc.VM
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/proprietary/WarnVariable.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/proprietary/WarnVariable.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,13 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
* @bug 6380059
* @summary Emit warnings for proprietary packages in the boot class path
* @author Peter von der Ah\u00e9
+ * @modules java.base/sun.misc
* @compile WarnVariable.java
- * @compile/fail -Werror WarnVariable.java
- * @compile/fail -Werror -nowarn WarnVariable.java
- * @compile/fail -Werror -Xlint:none WarnVariable.java
+ * @compile/fail/ref=WarnVariable.out -XDrawDiagnostics -Werror WarnVariable.java
+ * @compile/fail/ref=WarnVariable.out -XDrawDiagnostics -Werror -nowarn WarnVariable.java
+ * @compile/fail/ref=WarnVariable.out -XDrawDiagnostics -Werror -Xlint:none WarnVariable.java
*/
public class WarnVariable {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/proprietary/WarnVariable.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+WarnVariable.java:15:36: compiler.warn.sun.proprietary: sun.misc.FloatConsts
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/proprietary/WarnWildcard.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/proprietary/WarnWildcard.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,13 @@
/*
- * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
* @bug 6380059
* @summary Emit warnings for proprietary packages in the boot class path
* @author Peter von der Ah\u00e9
+ * @modules java.base/sun.misc
* @compile WarnWildcard.java
- * @compile/fail -Werror WarnWildcard.java
- * @compile/fail -Werror -nowarn WarnWildcard.java
- * @compile/fail -Werror -Xlint:none WarnWildcard.java
+ * @compile/fail/ref=WarnWildcard.out -XDrawDiagnostics -Werror WarnWildcard.java
+ * @compile/fail/ref=WarnWildcard.out -XDrawDiagnostics -Werror -nowarn WarnWildcard.java
+ * @compile/fail/ref=WarnWildcard.out -XDrawDiagnostics -Werror -Xlint:none WarnWildcard.java
*/
public class WarnWildcard {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/proprietary/WarnWildcard.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+WarnWildcard.java:14:44: compiler.warn.sun.proprietary: sun.misc.FloatConsts
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/resolve/ResolveHarness.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/resolve/ResolveHarness.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 7098660 8014649 8034223
* @summary Test harness for overload resolution/inference tests
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor ResolveHarness
* @run main ResolveHarness
*/
--- a/langtools/test/tools/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/langtools/test/tools/javac/scope/7017664/CompoundScopeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/scope/7017664/CompoundScopeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7017664 7036906
* @summary Basher for CompoundScopes
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.util.Random;
--- a/langtools/test/tools/javac/scope/7017664/ImplementationCacheTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/scope/7017664/ImplementationCacheTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7017664
* @summary Basher for CompoundScopes
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/scope/7046348/EagerInterfaceCompletionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/scope/7046348/EagerInterfaceCompletionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7046348
* @summary Regression: javac complains of missing classfile for a seemingly unrelated interface
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/scope/DupUnsharedTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/scope/DupUnsharedTest.java Fri May 29 12:49:31 2015 +0200
@@ -24,6 +24,9 @@
/*
* @test
* @summary WriteableScope.dupUnshared not working properly for shared Scopes.
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.javac.util.*;
--- a/langtools/test/tools/javac/scope/HashCollisionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/scope/HashCollisionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 7004029
* @summary Ensure Scope impl can cope with hash collisions
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DPrinter HashCollisionTest
* @run main HashCollisionTest
*/
--- a/langtools/test/tools/javac/scope/StarImportTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/scope/StarImportTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7004029
* @summary Basher for star-import scopes
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.util.*;
--- a/langtools/test/tools/javac/sourcePath2/SourcePath2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/sourcePath2/SourcePath2.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4648973
* @summary compiler does not emit code for second class in source file
* @author gafter
*
- * @compile/fail SourcePath2.java
+ * @compile/fail/ref=SourcePath2.out -XDrawDiagnostics SourcePath2.java
*/
import p.SourcePath2A;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/sourcePath2/SourcePath2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+SourcePath2A.java:30:5: compiler.err.cant.resolve.location: kindname.class, this_should_not, , , (compiler.misc.location: kindname.class, p.Trash, null)
+1 error
--- a/langtools/test/tools/javac/stackmap/StackMapTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/stackmap/StackMapTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4955930
* @summary The "method0" StackMap attribute should have two entries instead of three
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run compile StackMapTest.java
* @run main StackMapTest
--- a/langtools/test/tools/javac/synthesize/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/synthesize/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6627364 6627366
* @summary Synthesize important classes if they are missing from the (boot)classpath
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javac/tree/8067914/NukeExtraCast.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/8067914/NukeExtraCast.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8067914
* @summary Redunant type cast nodes in AST (follow up from JDK-8043741)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run compile -XD-printsource T8067914.java
* @run main NukeExtraCast
--- a/langtools/test/tools/javac/tree/ArrayTypeToString.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/ArrayTypeToString.java Fri May 29 12:49:31 2015 +0200
@@ -25,6 +25,7 @@
* @test
* @bug 8068737
* @summary Tests ArrayType.toString with type annotations present
+ * @modules jdk.compiler/com.sun.tools.javac.code
* @build ArrayTypeToString
* @compile/ref=ArrayTypeToString.out -XDrawDiagnostics -processor ArrayTypeToString -proc:only ArrayTypeToString.java
*/
--- a/langtools/test/tools/javac/tree/ClassTreeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/ClassTreeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6570730
* @summary com.sun.source.tree.ModifiersTree.getFlags() should return class type
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.*;
--- a/langtools/test/tools/javac/tree/DocCommentToplevelTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/DocCommentToplevelTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 7096014
* @summary Javac tokens should retain state
+ * @modules jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import com.sun.source.tree.*;
--- a/langtools/test/tools/javac/tree/JavacTreeScannerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/JavacTreeScannerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,10 @@
* @test
* @bug 6923080
* @summary TreeScanner.visitNewClass should scan tree.typeargs
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build AbstractTreeScannerTest JavacTreeScannerTest
* @run main JavacTreeScannerTest -q -r .
*/
--- a/langtools/test/tools/javac/tree/MakeLiteralTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/MakeLiteralTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 6504896 8028415
* @summary TreeMaker.Literal(Object) does not support Booleans
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.javac.code.Type;
--- a/langtools/test/tools/javac/tree/MakeQualIdent.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/MakeQualIdent.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,10 @@
* @bug 8023835
* @summary Verify that TreeMaker.QualIdent(Symbol) field access cascade ends with
* the top-level package (when no toplevel is set in TreeMaker)
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @run main MakeQualIdent
*/
--- a/langtools/test/tools/javac/tree/MakeTypeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/MakeTypeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 8042239
* @summary Verify that TreeMaker.Type(Type) can handle all reasonable types
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor MakeTypeTest
* @compile/process/ref=MakeTypeTest.out -processor MakeTypeTest MakeTypeTest.java
*/
--- a/langtools/test/tools/javac/tree/MissingSemicolonTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/MissingSemicolonTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,11 @@
* @test
* @bug 8041648
* @summary Verify that end positions are sane if semicolons are missing.
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.parser
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @run main MissingSemicolonTest MissingSemicolonTest.java
*/
--- a/langtools/test/tools/javac/tree/NewArrayPretty.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/NewArrayPretty.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 8014826
* @summary test Pretty print of NewArray
* @author ksrini
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import com.sun.source.tree.ClassTree;
import com.sun.source.tree.CompilationUnitTree;
--- a/langtools/test/tools/javac/tree/NoPrivateTypesExported.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/NoPrivateTypesExported.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Ensuring javax.lang.model.**, javax.tools.**, javax.annotation.processing.**
* and com.sun.source.** don't export inappropriate types.
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor NoPrivateTypesExported
* @compile -processor NoPrivateTypesExported NoPrivateTypesExported.java
*/
--- a/langtools/test/tools/javac/tree/PrettySimpleStringTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/PrettySimpleStringTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 8006033
* @summary bug in Pretty.toSimpleString
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import java.io.File;
--- a/langtools/test/tools/javac/tree/ScopeTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/ScopeTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8023835
* @summary Verify that implicit type of lambda parameter is correctly attributed
* in Scope
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.model
+ * jdk.compiler/com.sun.tools.javac.util
* @run main ScopeTest
*/
--- a/langtools/test/tools/javac/tree/SourceTreeScannerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/SourceTreeScannerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,10 @@
* @test
* @bug 6923080
* @summary TreeScanner.visitNewClass should scan tree.typeargs
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build AbstractTreeScannerTest SourceTreeScannerTest
* @run main SourceTreeScannerTest -q -r .
*/
--- a/langtools/test/tools/javac/tree/T6963934.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/T6963934.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6963934
* @summary JCCompilationUnit.getImports does not report all imports
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javac/tree/T6993305.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/T6993305.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6993305
* @summary starting position of a method without modifiers and with type parameters is incorrect
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import java.io.File;
--- a/langtools/test/tools/javac/tree/T8024415.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/T8024415.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 8024415
* @summary Pretty printing of JCConditional does not follow the precedence and
* associativity rules of JCConditional
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @run testng T8024415
*/
--- a/langtools/test/tools/javac/tree/TestToString.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/TestToString.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 7080267
* @summary Call to toString() from an ExpressionStatementTree doesn't take in
* consideration the ";" at the end
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.source.tree.BlockTree;
--- a/langtools/test/tools/javac/tree/TreeKindTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/TreeKindTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6341023
* @summary Tree API: Tree.Kind should have mapping to interface
+ * @modules jdk.compiler
*/
import com.sun.source.tree.*;
--- a/langtools/test/tools/javac/tree/TreePosRoundsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/TreePosRoundsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6985205 6986246
* @summary access to tree positions and doc comments may be lost across annotation processing rounds
+ * @modules jdk.compiler
* @build TreePosRoundsTest
* @compile -proc:only -processor TreePosRoundsTest TreePosRoundsTest.java
* @run main TreePosRoundsTest
--- a/langtools/test/tools/javac/tree/TreePosTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/TreePosTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -102,6 +102,12 @@
* @bug 6919889
* @summary assorted position errors in compiler syntax trees
* OLD: -q -r -ef ./tools/javac/typeAnnotations -ef ./tools/javap/typeAnnotations -et ANNOTATED_TYPE .
+ * @modules java.desktop
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @run main TreePosTest -q -r .
*/
public class TreePosTest {
--- a/langtools/test/tools/javac/tree/TypeAnnotationsPretty.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/tree/TypeAnnotationsPretty.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 8023522
* @summary test Pretty print of type annotations
* @author wmdietl
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.tree
*/
import com.sun.source.tree.ClassTree;
--- a/langtools/test/tools/javac/treeannotests/AnnoTreeTests.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/treeannotests/AnnoTreeTests.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,9 @@
/*
* @test
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.tree
+ * jdk.compiler/com.sun.tools.javac.util
* @build DA TA Test TestProcessor
* @compile -proc:only -processor TestProcessor AnnoTreeTests.java
*/
--- a/langtools/test/tools/javac/types/BoxingConversionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/types/BoxingConversionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary Add test library to simplify the task of writing automated type-system tests
* @author mcimadamore
* @library .
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @run main BoxingConversionTest
*/
--- a/langtools/test/tools/javac/types/CastTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/types/CastTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary Add test library to simplify the task of writing automated type-system tests
* @author mcimadamore
* @library .
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @run main CastTest
*/
--- a/langtools/test/tools/javac/types/GenericTypeWellFormednessTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/types/GenericTypeWellFormednessTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary Test generic types well-formedness
* @author mcimadamore
* @library .
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @run main GenericTypeWellFormednessTest
*/
--- a/langtools/test/tools/javac/types/PrimitiveConversionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/types/PrimitiveConversionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,10 @@
* @summary Add test library to simplify the task of writing automated type-system tests
* @author mcimadamore
* @library .
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @run main PrimitiveConversionTest
*/
--- a/langtools/test/tools/javac/types/TestComparisons.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/types/TestComparisons.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8013357
* @summary javac should correctly enforce binary comparison rules.
+ * @modules jdk.compiler
*/
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Type.*;
--- a/langtools/test/tools/javac/unicode/SupplementaryJavaID6.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/unicode/SupplementaryJavaID6.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4914724 4973116 5014511
* @summary Ensure that a supplementary character can be used as part/whole of a
* class name on platforms that have Unicode aware filesystems.
+ * @modules jdk.compiler
* @build Wrapper
* @run main Wrapper SupplementaryJavaID6
*/
--- a/langtools/test/tools/javac/unicode/Unmappable.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/unicode/Unmappable.java Fri May 29 12:49:31 2015 +0200
@@ -1,33 +1,10 @@
/*
- * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 4767128 5048557 5048773
* @summary diagnose encoding errors in Java source files
* @author gafter
*
- * @compile/fail -encoding ascii Unmappable.java
+ * @compile/fail/ref=Unmappable.out -XDrawDiagnostics -encoding ascii Unmappable.java
*/
// example from 4766897
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/unicode/Unmappable.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Unmappable.java:12:18: compiler.err.illegal.char.for.encoding: ascii
+1 error
--- a/langtools/test/tools/javac/unit/T6198196.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/unit/T6198196.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,8 @@
* @bug 6198196 6278523
* @summary package-info.java: Weird compiler error
* @author Peter von der Ah\u00e9
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.IOException;
--- a/langtools/test/tools/javac/unit/util/convert/EnclosingCandidates.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/unit/util/convert/EnclosingCandidates.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6397652
* @summary javac compilation failure when imported class with $ sign in the name
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import static com.sun.tools.javac.util.Convert.enclosingCandidates;
--- a/langtools/test/tools/javac/unit/util/list/AbstractList.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/unit/util/list/AbstractList.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary com.sun.tools.javac.util.List.from(A[]) shouldn't be deprecated
* @author Peter von der Ah\u00e9
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @compile ../../util/list/AbstractList.java
* @run main util.list.AbstractList
*/
--- a/langtools/test/tools/javac/unit/util/list/FromArray.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/unit/util/list/FromArray.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary com.sun.tools.javac.util.List.from(A[]) shouldn't be deprecated
* @author Peter von der Ah\u00e9
* @library ../..
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @compile ../../util/list/FromArray.java
* @run main util.list.FromArray
*/
--- a/langtools/test/tools/javac/util/BitsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/BitsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8028267
* @summary Unit tests for the com.sun.tools.javac.util.Bits class.
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main BitsTest
*/
--- a/langtools/test/tools/javac/util/NewlineOnlyDiagnostic.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/NewlineOnlyDiagnostic.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,8 @@
* @summary Test that javac doesn't throw ArrayIndexOutOfBoundsException
* when logging the message "\n"
* @library /tools/javac/lib
+ * @modules java.compiler
+ * jdk.compiler
* @build JavacTestingAbstractProcessor NewlineOnlyDiagnostic
* @compile -processor NewlineOnlyDiagnostic NewlineOnlyDiagnostic.java
*/
--- a/langtools/test/tools/javac/util/StringUtilsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/StringUtilsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8029800 8043186
* @summary Unit test StringUtils
+ * @modules jdk.compiler/com.sun.tools.javac.util
* @run main StringUtilsTest
*/
--- a/langtools/test/tools/javac/util/T6597678.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/T6597678.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
* @bug 6597678 6449184
* @summary Ensure Messages propogated between rounds
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor T6597678
* @run main T6597678
*/
--- a/langtools/test/tools/javac/util/context/T7021650.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/context/T7021650.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,11 @@
* @bug 7021650
* @summary Fix Context issues
* @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.comp
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.processing
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractProcessor T7021650
* @run main T7021650
*/
--- a/langtools/test/tools/javac/util/filemanager/TestName.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/filemanager/TestName.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary JSR 199: enforce the use of valid package and class names
* in get{Java,}FileFor{Input,Output}
* @author Peter von der Ah\u00e9
+ * @modules jdk.compiler/com.sun.tools.javac.file
*/
import com.sun.tools.javac.file.JavacFileManager;
--- a/langtools/test/tools/javac/util/list/ListBufferTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/list/ListBufferTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004504
* @summary Ensure that ListBuffer is working properly
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.tools.javac.util.List;
--- a/langtools/test/tools/javac/util/list/TList.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/util/list/TList.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6267067 6351336 6389198
* @summary unit test for javac List
+ * @modules jdk.compiler/com.sun.tools.javac.util
*/
import java.util.*;
--- a/langtools/test/tools/javac/varargs/6199075/T6199075.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/6199075/T6199075.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @summary Unambiguous varargs method calls flagged as ambiguous
* @author mcimadamore
*
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/varargs/7042566/T7042566.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/7042566/T7042566.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @summary Unambiguous varargs method calls flagged as ambiguous
* temporarily workaround combo tests are causing time out in several platforms
* @library ../../lib
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.util
* @build JavacTestingAbstractThreadedTest
* @run main/othervm T7042566
*/
--- a/langtools/test/tools/javac/varargs/7043922/T7043922.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/7043922/T7043922.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 7043922
* @summary Regression: internal compiler error for nested anonymous inner class featuring varargs constructor
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javac/varargs/VarargsOverride.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/VarargsOverride.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,11 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright
* @bug 4984022
* @summary overriding with method of different arity is prohibited
* @author gafter
*
* @compile VarargsOverride.java
- * @compile/fail -Werror -Xlint VarargsOverride.java
+ * @compile/ref=VarargsOverride.out -XDrawDiagnostics -Xlint VarargsOverride.java
*/
package varargs.override;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/varargs/VarargsOverride.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+VarargsOverride.java:18:10: compiler.warn.override.varargs.missing: (compiler.misc.varargs.override: f(java.lang.Object...), varargs.override.B, f(java.lang.Object[]), varargs.override.A)
+1 warning
--- a/langtools/test/tools/javac/varargs/Warn1.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/Warn1.java Fri May 29 12:49:31 2015 +0200
@@ -1,35 +1,12 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024518
* @summary need warning if varargs argument isn't boxed
* @author gafter
*
- * @compile Warn1.java
- * @compile/fail -Werror Warn1.java
- * @compile -Werror -Xlint:none Warn1.java
+ * @compile Warn1.java
+ * @compile/ref=Warn1.out -XDrawDiagnostics Warn1.java
+ * @compile -Werror -Xlint:none Warn1.java
*/
package varargs.warn1;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/varargs/Warn1.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,2 @@
+Warn1.java:18:18: compiler.warn.inexact.non-varargs.call: java.lang.Object, java.lang.Object[]
+1 warning
--- a/langtools/test/tools/javac/varargs/Warn2.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/Warn2.java Fri May 29 12:49:31 2015 +0200
@@ -1,34 +1,11 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
* @bug 5024518
* @summary need warning if varargs argument isn't boxed
* @author gafter
*
* @compile Warn2.java
- * @compile/fail -Werror Warn2.java
+ * @compile/fail/ref=Warn2.out -XDrawDiagnostics -Werror Warn2.java
* @compile -Werror -Xlint:none Warn2.java
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/varargs/Warn2.out Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,4 @@
+Warn2.java:18:18: compiler.warn.inexact.non-varargs.call: java.lang.Object, java.lang.Object[]
+- compiler.err.warnings.and.werror
+1 error
+1 warning
--- a/langtools/test/tools/javac/varargs/warning/Warn4.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/warning/Warn4.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* temporarily workaround combo tests are causing time out in several platforms
* @author mcimadamore
* @library ../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm Warn4
*/
--- a/langtools/test/tools/javac/varargs/warning/Warn5.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/varargs/warning/Warn5.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* temporarily workaround combo tests are causing time out in several platforms
* @author mcimadamore
* @library ../../lib
+ * @modules jdk.compiler
* @build JavacTestingAbstractThreadedTest
* @run main/othervm Warn5
*/
--- a/langtools/test/tools/javac/versions/SourceTargetTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/versions/SourceTargetTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8050106
* @summary JavaCompiler relies on inappropriate result from comparison
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.jvm
*/
import java.io.*;
--- a/langtools/test/tools/javac/versions/Versions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/versions/Versions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610
* @summary Check interpretation of -target and -source options
+ * @modules java.compiler
+ * jdk.compiler
* @run main Versions
*/
--- a/langtools/test/tools/javac/warnings/6594914/T6594914b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/6594914/T6594914b.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,7 @@
* @test /nodynamiccopyright/
* @bug 6594914
* @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable
+ * @modules java.base/sun.misc
* @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java
*/
--- a/langtools/test/tools/javac/warnings/6594914/T6594914b.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/6594914/T6594914b.out Fri May 29 12:49:31 2015 +0200
@@ -1,7 +1,7 @@
-T6594914b.java:11:13: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:16:24: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:16:39: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:17:28: compiler.warn.sun.proprietary: sun.misc.CEFormatException
-T6594914b.java:16:56: compiler.warn.sun.proprietary: sun.misc.Lock
-T6594914b.java:24:17: compiler.warn.sun.proprietary: sun.misc.Lock
+T6594914b.java:12:13: compiler.warn.sun.proprietary: sun.misc.Lock
+T6594914b.java:17:24: compiler.warn.sun.proprietary: sun.misc.Lock
+T6594914b.java:17:39: compiler.warn.sun.proprietary: sun.misc.Lock
+T6594914b.java:18:28: compiler.warn.sun.proprietary: sun.misc.CEFormatException
+T6594914b.java:17:56: compiler.warn.sun.proprietary: sun.misc.Lock
+T6594914b.java:25:17: compiler.warn.sun.proprietary: sun.misc.Lock
6 warnings
--- a/langtools/test/tools/javac/warnings/VerifyLintDescriptions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/VerifyLintDescriptions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8033961
* @summary Verify that all LintCategories have their descriptions filled.
+ * @modules jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.util
*/
import java.util.ArrayList;
--- a/langtools/test/tools/javac/warnings/suppress/Overridden.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/Overridden.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,10 @@
* @test /nodynamiccopyright/
* @bug 8033421
* @summary Check that \\@SuppressWarnings works properly when overriding deprecated method.
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
* @build VerifySuppressWarnings
* @compile/ref=Overridden.out -XDrawDiagnostics -Xlint:deprecation Overridden.java
* @run main VerifySuppressWarnings Overridden.java
--- a/langtools/test/tools/javac/warnings/suppress/Overridden.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/Overridden.out Fri May 29 12:49:31 2015 +0200
@@ -1,2 +1,2 @@
-Overridden.java:11:17: compiler.warn.has.been.deprecated: test(), Interface
+Overridden.java:15:17: compiler.warn.has.been.deprecated: test(), Interface
1 warning
--- a/langtools/test/tools/javac/warnings/suppress/T6480588.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T6480588.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,10 @@
* @bug 6470588
* @summary Verify that \\@SuppressWarnings("deprecation") works OK for all parts
* of class/method/field "header", including (declaration) annotations
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
* @build VerifySuppressWarnings
* @compile/ref=T6480588.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast T6480588.java
* @run main VerifySuppressWarnings T6480588.java
--- a/langtools/test/tools/javac/warnings/suppress/T6480588.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T6480588.out Fri May 29 12:49:31 2015 +0200
@@ -1,18 +1,18 @@
-T6480588.java:12:24: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:12:51: compiler.warn.has.been.deprecated: DeprecatedInterface, compiler.misc.unnamed.package
-T6480588.java:11:2: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
-T6480588.java:14:12: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:14:65: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:13:6: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
-T6480588.java:14:35: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:15:9: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:15:34: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:17:9: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:17:35: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:26:5: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:25:6: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
-T6480588.java:26:33: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:29:25: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
-T6480588.java:29:52: compiler.warn.has.been.deprecated: DeprecatedInterface, compiler.misc.unnamed.package
-T6480588.java:28:6: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
+T6480588.java:16:24: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:16:51: compiler.warn.has.been.deprecated: DeprecatedInterface, compiler.misc.unnamed.package
+T6480588.java:15:2: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
+T6480588.java:18:12: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:18:65: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:17:6: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
+T6480588.java:18:35: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:19:9: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:19:34: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:21:9: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:21:35: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:30:5: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:29:6: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
+T6480588.java:30:33: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:33:25: compiler.warn.has.been.deprecated: DeprecatedClass, compiler.misc.unnamed.package
+T6480588.java:33:52: compiler.warn.has.been.deprecated: DeprecatedInterface, compiler.misc.unnamed.package
+T6480588.java:32:6: compiler.warn.has.been.deprecated: DeprecatedAnnotation, compiler.misc.unnamed.package
17 warnings
--- a/langtools/test/tools/javac/warnings/suppress/T6707032.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T6707032.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,10 @@
* @test /nodynamiccopyright/
* @bug 6707032
* @summary Verify that \\@SuppressWarnings("divzero") works for constant initializers
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
* @build VerifySuppressWarnings
* @compile/ref=T6707032.out -XDrawDiagnostics -Xlint:divzero T6707032.java
* @run main VerifySuppressWarnings T6707032.java
--- a/langtools/test/tools/javac/warnings/suppress/T6707032.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T6707032.out Fri May 29 12:49:31 2015 +0200
@@ -1,3 +1,3 @@
-T6707032.java:12:36: compiler.warn.div.zero
T6707032.java:16:36: compiler.warn.div.zero
+T6707032.java:20:36: compiler.warn.div.zero
2 warnings
--- a/langtools/test/tools/javac/warnings/suppress/T8021112b.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T8021112b.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,10 @@
* @test /nodynamiccopyright/
* @bug 8021112
* @summary Verify that \\@SuppressWarnings("unchecked") works correctly for lazy attrib values
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
* @build VerifySuppressWarnings
* @compile/ref=T8021112b.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast T8021112b.java
* @run main VerifySuppressWarnings T8021112b.java
--- a/langtools/test/tools/javac/warnings/suppress/T8021112b.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T8021112b.out Fri May 29 12:49:31 2015 +0200
@@ -1,3 +1,3 @@
-T8021112b.java:11:37: compiler.warn.has.been.deprecated: Dep, compiler.misc.unnamed.package
-T8021112b.java:15:13: compiler.warn.has.been.deprecated: Dep, compiler.misc.unnamed.package
-2 warnings
\ No newline at end of file
+T8021112b.java:15:37: compiler.warn.has.been.deprecated: Dep, compiler.misc.unnamed.package
+T8021112b.java:19:13: compiler.warn.has.been.deprecated: Dep, compiler.misc.unnamed.package
+2 warnings
--- a/langtools/test/tools/javac/warnings/suppress/T8069094.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T8069094.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,10 @@
* @test /nodynamiccopyright/
* @bug 8069094
* @summary Verify that \\@SuppressWarnings("unchecked") works correctly for annotation default values
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
* @build VerifySuppressWarnings
* @compile/ref=T8069094.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast T8069094.java
* @run main VerifySuppressWarnings T8069094.java
--- a/langtools/test/tools/javac/warnings/suppress/T8069094.out Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/T8069094.out Fri May 29 12:49:31 2015 +0200
@@ -1,3 +1,3 @@
-T8069094.java:11:5: compiler.warn.has.been.deprecated: T8069094A, compiler.misc.unnamed.package
-T8069094.java:11:29: compiler.warn.has.been.deprecated: T8069094A, compiler.misc.unnamed.package
+T8069094.java:15:5: compiler.warn.has.been.deprecated: T8069094A, compiler.misc.unnamed.package
+T8069094.java:15:29: compiler.warn.has.been.deprecated: T8069094A, compiler.misc.unnamed.package
2 warnings
--- a/langtools/test/tools/javac/warnings/suppress/TypeAnnotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javac/warnings/suppress/TypeAnnotations.java Fri May 29 12:49:31 2015 +0200
@@ -2,6 +2,10 @@
* @test /nodynamiccopyright/
* @bug 8021112
* @summary Verify that \\@SuppressWarnings("unchecked") works for type annotations
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.tree
* @ignore 8057683 improve ordering of errors with type annotations
* @build VerifySuppressWarnings
* @compile/ref=TypeAnnotations.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast TypeAnnotations.java
--- a/langtools/test/tools/javadoc/6176978/T6176978.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/6176978/T6176978.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6176978
* @summary current Javadoc's invocation and extension (Doclet) mechanisms are problematic
+ * @modules jdk.javadoc
* @build T6176978
* @run main T6176978
*/
--- a/langtools/test/tools/javadoc/6227454/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/6227454/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6227454
* @summary package.html and overview.html may not be read fully
+ * @modules jdk.javadoc
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/6942366/T6942366.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/6942366/T6942366.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6942366
* @summary javadoc no longer inherits doc from sourcepath
+ * @modules jdk.javadoc
* @build p.Base Test
* @run main T6942366
*/
--- a/langtools/test/tools/javadoc/6958836/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/6958836/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6958836 8002168
* @summary javadoc should support -Xmaxerrs and -Xmaxwarns
+ * @modules jdk.javadoc
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/6964914/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/6964914/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6964914
* @summary javadoc does not output number of warnings using user written doclet
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/6964914/TestUserDoclet.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/6964914/TestUserDoclet.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6964914
* @summary javadoc does not output number of warnings using user written doclet
+ * @modules jdk.javadoc
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/8025693/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/8025693/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8025693
* @summary javadoc should ignore <clinit> methods found in classes on classpath
+ * @modules jdk.javadoc
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/BooleanConst.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/BooleanConst.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4587494
* @summary Constant field values for boolean Data-Types don't use true and false
* @author gafter
+ * @modules jdk.javadoc
* @run main BooleanConst
*/
--- a/langtools/test/tools/javadoc/BreakIteratorWarning.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/BreakIteratorWarning.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify that (verbose) warnings are no longer generated when
* the default first-sentence algorithm doesn't match the
* BreakIterator algorithm.
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/CheckResourceKeys.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/CheckResourceKeys.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8000612
* @summary need test program to validate javadoc resource bundles
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/FlagsTooEarly.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/FlagsTooEarly.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4904495
* @summary Compilation may go awry if we ask a symbol for its flags during
* javac's Enter phase, before the flags are generally available.
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/InlineTagsWithBraces.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/InlineTagsWithBraces.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4965490
* @summary Verify that matching braces can appear within inline tags.
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/LangVers.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/LangVers.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4909767
* @summary Verify that omitting Doclet.languageVersion() hides 1.5 language
* features from the doclet.
+ * @modules jdk.javadoc
*/
import java.util.List;
--- a/langtools/test/tools/javadoc/MaxWarns.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/MaxWarns.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8005644
* @summary set default max errs and max warns
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
*/
import java.io.File;
--- a/langtools/test/tools/javadoc/MethodLinks.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/MethodLinks.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4628281
* @summary Int. links missing from return/param types when .java files passd in
* @author gafter
+ * @modules jdk.javadoc
* @run main MethodLinks
*/
--- a/langtools/test/tools/javadoc/NoStar.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/NoStar.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4587562
* @summary tool: Indentation messed up for javadoc comments omitting preceding *
* @author gafter
+ * @modules jdk.javadoc
* @run main NoStar
*/
--- a/langtools/test/tools/javadoc/T4696488.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/T4696488.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 4696488
* @summary javadoc doesn't handle UNC paths for destination directory
* @author Jesse Glick
+ * @modules jdk.javadoc/com.sun.tools.doclets.internal.toolkit
* @run main T4696488 T4696488.java
*/
public class T4696488 {
--- a/langtools/test/tools/javadoc/T4994049/T4994049.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/T4994049/T4994049.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4994049
* @summary Unit test for SourcePosition.column with respect to tab expansion
* @author Peter von der Ah\u00e9
+ * @modules jdk.javadoc
* @run main T4994049 FileWithTabs.java
*/
--- a/langtools/test/tools/javadoc/T6551367.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/T6551367.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6551367
* @summary javadoc throws ClassCastException when an link tag tries to reference constructor.
* @author A. Sundararajan
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
* @run main T6551367 T6551367.java
*/
--- a/langtools/test/tools/javadoc/T6968833.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/T6968833.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6968833
* @summary javadoc reports error but still returns 0
+ * @modules jdk.javadoc
*/
import java.io.*;
--- a/langtools/test/tools/javadoc/XWerror.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/XWerror.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4099527
* @summary javadoc tool: want flag to exit nonzero if there were warnings.
* @author gafter
+ * @modules jdk.javadoc
* @run main XWerror
*/
--- a/langtools/test/tools/javadoc/annotations/annotateMethodsFields/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/annotateMethodsFields/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* annotation type elements.
* Test an annotation type with a type nested within.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/annotations/annotatePackage/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/annotatePackage/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 5031168
* @summary Test package annotations and package-info.java package comments.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/annotations/annotateParams/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/annotateParams/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 5031171
* @summary Test parameter annotations.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/annotations/badVals/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/badVals/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 5029874
* @summary Verify that bad annotation values don't result in NPE
* @library ../../lib
+ * @modules jdk.javadoc
*/
import java.io.IOException;
--- a/langtools/test/tools/javadoc/annotations/defaults/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/defaults/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test an annotation type with default element values, and
* annotations that use them.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/annotations/elementTypes/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/elementTypes/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Test an annotation type and annotations with elements of various
* types.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/annotations/missing/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/missing/Main.java Fri May 29 12:49:31 2015 +0200
@@ -26,6 +26,7 @@
* @bug 6709246
* @summary Class-cast exception when annotation type is missing.
* @library ../../lib
+ * @modules jdk.javadoc
*/
import java.io.IOException;
--- a/langtools/test/tools/javadoc/annotations/shortcuts/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/annotations/shortcuts/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4904495
* @summary Verify that "shortcuts" are used when printing annotations.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/api/basic/DocletPathTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/DocletPathTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main DocletPathTest
*/
--- a/langtools/test/tools/javadoc/api/basic/DocumentationToolLocationTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/DocumentationToolLocationTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8025844
* @summary test DocumentationTool.Location methods
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main DocumentationToolLocationTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetSourceVersionsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetSourceVersionsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main GetSourceVersionsTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetTask_DiagListenerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_DiagListenerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main GetTask_DiagListenerTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_DocletClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules jdk.javadoc
* @build APITest
* @run main GetTask_DocletClassTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetTask_FileManagerTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_FileManagerTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690 8024434
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @build APITest
* @run main GetTask_FileManagerTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetTask_FileObjectsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_FileObjectsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main GetTask_FileObjectsTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetTask_OptionsTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_OptionsTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main GetTask_OptionsTest
*/
--- a/langtools/test/tools/javadoc/api/basic/GetTask_WriterTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/GetTask_WriterTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main GetTask_WriterTest
*/
--- a/langtools/test/tools/javadoc/api/basic/IsSupportedOptionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/IsSupportedOptionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main IsSupportedOptionTest
*/
--- a/langtools/test/tools/javadoc/api/basic/JavadocTaskImplTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/JavadocTaskImplTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
+ * jdk.javadoc/com.sun.tools.javadoc.api
* @build APITest
* @run main JavadocTaskImplTest
*/
--- a/langtools/test/tools/javadoc/api/basic/RunTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/RunTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690 8007490
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main RunTest
*/
--- a/langtools/test/tools/javadoc/api/basic/TagletPathTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/TagletPathTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main TagletPathTest
*/
--- a/langtools/test/tools/javadoc/api/basic/Task_reuseTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/api/basic/Task_reuseTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 6493690
* @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ * jdk.compiler
* @build APITest
* @run main Task_reuseTest
*/
--- a/langtools/test/tools/javadoc/badSuper/BadSuper.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/badSuper/BadSuper.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4983023
* @summary A bad superclass shouldn't throw the standard doclet into a loop
+ * @modules jdk.javadoc
*/
public class BadSuper {
--- a/langtools/test/tools/javadoc/completionFailure/CompletionFailure.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/completionFailure/CompletionFailure.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4670772 6328529
* @summary Completion failures should be ignored in javadoc.
* @author gafter
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/doclint/DocLintTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/doclint/DocLintTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004834 8007610
* @summary Add doclint support into javadoc
+ * @modules jdk.compiler/com.sun.tools.javac.main
*/
import java.io.File;
--- a/langtools/test/tools/javadoc/doclint/ImplicitHeadersTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/doclint/ImplicitHeadersTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8006346
* @summary doclint should make allowance for headers generated by standard doclet
+ * @modules jdk.javadoc
*/
import java.io.File;
--- a/langtools/test/tools/javadoc/dupOk/DupOk.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/dupOk/DupOk.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4673477
* @summary The first definition found for each class should be documented
* @author gafter
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/enum/docComments/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/enum/docComments/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the comments in an enum type.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/enum/enumType/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/enum/enumType/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the contents of an enum type.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/genericClass/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/genericClass/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the contents of the ClassDoc of a generic class.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/genericInnerAndOuter/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/genericInnerAndOuter/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify the contents of the ClassDoc of
* a generic class with a generic inner class.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/genericInterface/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/genericInterface/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the contents of the ClassDoc of a generic interface.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/genericMethod/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/genericMethod/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the reading of generic methods and constructors.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/genericSuper/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/genericSuper/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the contents of the ClassDoc of a generic class.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/supertypes/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/supertypes/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4922918
* @summary Check supertypes and superinterfaces of parameterized types.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/throwsGeneric/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/throwsGeneric/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the reading of generic methods and constructors.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/tparamCycle/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/tparamCycle/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Check a type parameter whose bound cycles back on itself.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/tparamTagOnMethod/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/tparamTagOnMethod/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the reading of type parameter tags on methods.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/tparamTagOnType/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/tparamTagOnType/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the reading of a type parameter tag on an interface.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/generics/wildcards/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/generics/wildcards/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4421066
* @summary Verify the contents of the ClassDoc of a generic class.
* @library ../../lib
+ * @modules jdk.javadoc
* @compile ../../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javadoc/imports/MissingImport.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/imports/MissingImport.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 5012972
* @summary ClassDoc.getImportedClasses should return a class even if
* it's not in the classpath.
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/nestedClass/NestedClass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/nestedClass/NestedClass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4694497
* @summary BDoclet API: Bad ClassDoc for nested classes when built from .class files
* @author gafter
+ * @modules jdk.javadoc
* @compile NestedClass.java NestedClassB.java
* @run main NestedClass
*/
--- a/langtools/test/tools/javadoc/nonConstExprs/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/nonConstExprs/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8010310
* @summary Error processing sources with -private
+ * @modules jdk.javadoc
*/
import java.io.File;
--- a/langtools/test/tools/javadoc/outputRedirect/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/outputRedirect/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @bug 4587487
* @summary com.sun.tools.javadoc.Main.execute ignores PrintWriters
* @author gafter
+ * @modules jdk.javadoc
* @compile p/OutputRedirect.java
* @run main p.OutputRedirect
*/
--- a/langtools/test/tools/javadoc/parser/7091528/T7091528.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/parser/7091528/T7091528.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7091528 8029145 8037484
* @summary ensures javadoc parses unique source files and ignores all class files
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
* @compile p/C1.java p/q/C2.java
* @run main T7091528
*/
--- a/langtools/test/tools/javadoc/sourceOnly/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/sourceOnly/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4548768
* @summary Javadoc in JDK 1.4 uses classpath and not just source dir
* @author gafter
+ * @modules jdk.javadoc
* @compile p/SourceOnly.java
* @run main p.SourceOnly
*/
--- a/langtools/test/tools/javadoc/sourceOption/SourceOption.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/sourceOption/SourceOption.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 6507179
* @summary Ensure that "-source" option isn't ignored.
* @author Scott Seligman
+ * @modules jdk.javadoc
* @run main/fail SourceOption 7
* @run main SourceOption 9
* @run main SourceOption
--- a/langtools/test/tools/javadoc/subpackageIgnore/SubpackageIgnore.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/subpackageIgnore/SubpackageIgnore.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 4773013
* @summary When hunting subpackages, silently ignore any directory name that
* can't be part of a subpackage.
+ * @modules jdk.javadoc
*/
import com.sun.javadoc.*;
--- a/langtools/test/tools/javadoc/varArgs/Main.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javadoc/varArgs/Main.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @summary Verify the contents of a ClassDoc containing a varArgs method.
* Verify that see/link tags can use "..." notation.
* @library ../lib
+ * @modules jdk.javadoc
* @compile ../lib/Tester.java Main.java
* @run main Main
*/
--- a/langtools/test/tools/javah/4942232/Test.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/4942232/Test.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4942232
* @summary missing param class processes without error
+ * @modules jdk.compiler
* @build ParamClassTest Test
* @run main Test
*/
--- a/langtools/test/tools/javah/6257087/T6257087.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/6257087/T6257087.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 6257087
* @summary javah doesn't produce proper signatures for inner class native methods
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main T6257087
*/
--- a/langtools/test/tools/javah/6572945/T6572945.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/6572945/T6572945.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6572945
* @summary rewrite javah as an annotation processor, instead of as a doclet
+ * @modules jdk.compiler
* @build TestClass1 TestClass2 TestClass3
* @run main T6572945
*/
--- a/langtools/test/tools/javah/T4942232/MissingParamClassTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/T4942232/MissingParamClassTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* native method in a supplied class contains a parameter type whose corresponding
* class is missing or not in the classpath
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run compile MissingParamClassTest.java
* @clean MissingParamClassException
--- a/langtools/test/tools/javah/T5070898.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/T5070898.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
/* @test
* @bug 5070898
* @summary javah command doesn't throw correct exit code in case of error
+ * @modules java.compiler
+ * jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javah/T6893943.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/T6893943.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6893943 6937318
* @summary exit code from javah with no args is 0
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javah/T6994608.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/T6994608.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6994608
* @summary javah no longer accepts parameter files as input
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javah/T7126832/T7126832.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/T7126832/T7126832.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
/*
* @test
* @bug 7126832
+ * @modules jdk.compiler
* @compile java.java
* @summary com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager cannot be cast
* @run main T7126832
--- a/langtools/test/tools/javah/T7185778.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/T7185778.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* The first two tests are on an inner class name whose name does not contain $.
* The second two tests are on an inner class name whose name does contain $.
* The last test is on an outer class whose name contains $.
+ * @modules jdk.compiler
* @run main T7185778 T7185778$inner
* @run main T7185778 T7185778.inner
* @run main T7185778 T7185778$inner$
--- a/langtools/test/tools/javah/TestHelpOpts.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/TestHelpOpts.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6893932 6990390
* @summary javah help screen lists -h and -? but does not accept them
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javah/VersionTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/VersionTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6890226
* @summary javah -version is broken
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javah/constMacroTest/ConstMacroTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javah/constMacroTest/ConstMacroTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* ensures that the appropriate macro definitions are placed in the generated
* header file.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main ConstMacroTest
*/
--- a/langtools/test/tools/javap/4111861/T4111861.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/4111861/T4111861.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 4111861
* @summary static final field contents are not displayed
+ * @modules jdk.compiler
*/
public class T4111861 {
public static void main(String... args) throws Exception {
--- a/langtools/test/tools/javap/4798312/JavapShouldLoadClassesFromRTJarTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/4798312/JavapShouldLoadClassesFromRTJarTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4798312
* @summary In Windows, javap doesn't load classes from rt.jar
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main JavapShouldLoadClassesFromRTJarTest
*/
--- a/langtools/test/tools/javap/4866831/PublicInterfaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/4866831/PublicInterfaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 4866831
* @summary Verify that javap marks public interfaces as public
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main PublicInterfaceTest
*/
--- a/langtools/test/tools/javap/4870651/T4870651.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/4870651/T4870651.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4870651 6715757
* @summary javap should recognize generics, varargs, enum;
* javap prints "extends java.lang.Object"
+ * @modules jdk.compiler
* @build T4870651 Test
* @run main T4870651
*/
--- a/langtools/test/tools/javap/6937244/T6937244.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/6937244/T6937244.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6937244
* @summary fields display with JVMS names, not Java names
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/6937244/T6937244A.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/6937244/T6937244A.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6937244
* @summary fields display with JVMS names, not Java names
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/8006334/JavapTaskCtorFailWithNPE.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/8006334/JavapTaskCtorFailWithNPE.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8006334
* @summary javap: JavapTask constructor breaks with null pointer exception if
* parameter options is null
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javap/8007907/JavapReturns0AfterClassNotFoundTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/8007907/JavapReturns0AfterClassNotFoundTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8007907
* @summary javap, method com.sun.tools.javap.Main.run returns 0 even in case
* of class not found error
+ * @modules jdk.compiler
*/
import java.io.IOException;
--- a/langtools/test/tools/javap/AccessModifiers.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/AccessModifiers.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8027530
* @summary test -public, -protected, -package, -private options
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/BadAttributeLength.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/BadAttributeLength.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8047072
* @summary javap OOM on fuzzed classfile
+ * @modules jdk.compiler
* @run main BadAttributeLength
*/
--- a/langtools/test/tools/javap/BoundsTypeVariableTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/BoundsTypeVariableTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8003537
* @summary javap should not use / in Bounds Type Variables
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javap/DescriptorTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/DescriptorTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8007052
* @summary javap should include the descriptor for a method in verbose mode
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javap/ExtPath.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/ExtPath.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @bug 6428896
* @summary javap cannot read multiple entries on the extension classpath
* @author Wei Tao
+ * @modules jdk.compiler
* @run main/othervm ExtPath com.sun.crypto.provider.SunJCE
*/
--- a/langtools/test/tools/javap/InvalidOptions.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/InvalidOptions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8027411 8032869
* @summary test an invalid option
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/MethodParameters.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/MethodParameters.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8004727 8005647
* @summary javac should generate method parameters correctly.
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/StackMapTableTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/StackMapTableTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8033930 8033913
* @summary bad formatting of StackMapTable entries
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T4075403.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4075403.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4075403
* @summary Use javap to inquire about a specific inner class
+ * @modules jdk.compiler
*/
--- a/langtools/test/tools/javap/T4459541.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4459541.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4459541
* @summary "javap -l" shows line numbers as signed short; they should be unsigned.
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T4501660.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4501660.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4501660
* @summary change diagnostic of -help as 'print this help message and exit'
* (actually, verify -help does not cause premature exit)
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T4501661.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4501661.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test
* @bug 4501661
* @summary disallow mixing -public, -private, and -protected
+ * @modules jdk.compiler
*/
public class T4501661 {
public static void main(String... args) throws Exception {
--- a/langtools/test/tools/javap/T4777949.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4777949.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* @test
* @bug 4777949
* @summary Warn javap usage on package with simple name
+ * @modules jdk.compiler
*/
public class T4777949 {
public static void main(String... args) throws Exception {
--- a/langtools/test/tools/javap/T4876942.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4876942.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4876942 6715251
* @summary javap invoked without args does not print help screen
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T4880663.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4880663.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 4880663 6715757 7031005
* @summary javap could output whitespace between class name and opening brace
* javap prints "extends java.lang.Object"
+ * @modules jdk.compiler
*/
--- a/langtools/test/tools/javap/T4880672.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4880672.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @test
* @bug 4880672 7031005
* @summary javap does not output inner interfaces of an interface
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T4884240.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4884240.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 4884240
* @summary additional option required for javap
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T4975569.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T4975569.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 4975569 6622215 8034861
* @summary javap doesn't print new flag bits
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6271787.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6271787.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6271787
* @summary javap dumps LocalVariableTypeTable attribute in hex, needs to print a table
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6474890.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6474890.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6474890
* @summary javap does not open .zip files in -classpath
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6587786.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6587786.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6587786
* @summary Javap throws error : "ERROR:Could not find <classname>" for JRE classes
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6622216.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6622216.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6622216
* @summary javap names some attributes incorrectly
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6622232.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6622232.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6622232
* @summary javap gets whitespace confused
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6622260.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6622260.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6622260
* @summary javap prints negative bytes incorrectly in hex
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6715251.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6715251.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test
* @bug 6715251
* @summary javap should be consistent with javac and return 2 if given no arguments
+ * @modules jdk.compiler
*/
public class T6715251 {
--- a/langtools/test/tools/javap/T6715753.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6715753.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 6715753
* @summary Use javap to inquire about a specific inner class
+ * @modules jdk.compiler
*/
public class T6715753 {
--- a/langtools/test/tools/javap/T6715767.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6715767.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6715767
* @summary javap on java.lang.ClassLoader crashes
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6716452.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6716452.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
/*
* @test 6716452
* @summary need a method to get an index of an attribute
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6729471.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6729471.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
* @bug 6729471
* @summary javap does not output inner interfaces of an interface
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main T6729471
*/
--- a/langtools/test/tools/javap/T6824493.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6824493.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test
* @bug 6824493
* @summary experimental support for additional info for instructions
+ * @modules jdk.compiler
* @compile -g T6824493.java
* @run main T6824493
*/
--- a/langtools/test/tools/javap/T6863746.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6863746.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 6863746
* @summary javap should not scan ct.sym by default
+ * @modules jdk.compiler
*/
public class T6863746 {
--- a/langtools/test/tools/javap/T6866657.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6866657.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @test
* @bug 6866657
* @summary add byteLength() method to primary classfile types
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6868539.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6868539.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,7 @@
* @bug 6868539 6868548 8035364
* @summary javap should use current names for constant pool entries,
* remove spurious ';' from constant pool entries
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6879371.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6879371.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6879371
* @summary javap does not close internal default file manager
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T6980017.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T6980017.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6980017
* @summary javap -XDdetail:source behaves badly if source not available.
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T7004698.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T7004698.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7004698
* @summary javap does not output CharacterRangeTable attributes correctly
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T7186925.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T7186925.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7186925
* @summary JavapTask passes null to java.io.Writer
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javap/T7190862.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T7190862.java Fri May 29 12:49:31 2015 +0200
@@ -3,6 +3,7 @@
* @test /nodynamiccopyright/
* @bug 7190862 7109747
* @summary javap shows an incorrect type for operands if the 'wide' prefix is used
+ * @modules jdk.compiler
*/
import com.sun.source.util.JavacTask;
--- a/langtools/test/tools/javap/T8032814.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T8032814.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
* @bug 8032814
* @summary LineNumberTable/LocalVariableTable tables duplication for the
* "-v -l" combination of options
+ * @modules jdk.compiler
* @compile -g T8032814.java
* @run main T8032814
*/
--- a/langtools/test/tools/javap/T8032819.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T8032819.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8032819
* @summary Extra empty line between field declarations for the "-v -c" and "-v -l" combination of options
+ * @modules jdk.compiler
* @compile -g T8032819.java
* @run main T8032819
*/
--- a/langtools/test/tools/javap/T8033180.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T8033180.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8033180
* @summary Bad newline characters
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T8033711.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T8033711.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8033711
* @summary An exception is thrown if using the "-classpath" option with no arguments
+ * @modules jdk.compiler
*/
--- a/langtools/test/tools/javap/T8035104.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T8035104.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8035104
* @summary reorder class file attributes in javap listing
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/T8038414.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/T8038414.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
* @test
* @bug 8038414
* @summary Constant pool's strings are not escaped properly
+ * @modules jdk.compiler
*/
public class T8038414 {
private static final String NEW_LINE = System.getProperty("line.separator");
--- a/langtools/test/tools/javap/TestSuperclass.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/TestSuperclass.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 7031005
* @summary javap prints "extends java.lang.Object"
+ * @modules jdk.compiler
*/
import java.io.File;
--- a/langtools/test/tools/javap/WhitespaceTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/WhitespaceTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 8033581 8033798 8033726
* @summary Check whitespace in generated output
+ * @modules jdk.compiler
*/
import java.io.*;
--- a/langtools/test/tools/javap/classfile/T6887895.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/classfile/T6887895.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
* @test
* @bug 6887895
* @summary CONSTANT_Class_info getBaseName does not handle arrays of primitives correctly
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
import java.io.*;
--- a/langtools/test/tools/javap/classfile/deps/T6907575.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/classfile/deps/T6907575.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* 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,6 +26,9 @@
/*
* @test
* @bug 6907575
+ * @modules jdk.compiler/com.sun.tools.classfile
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.util
* @build GetDeps p.C1
* @run main T6907575
*/
--- a/langtools/test/tools/javap/stackmap/StackmapTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/stackmap/StackmapTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@
* @bug 6271292
* @summary Verify that javap prints StackMapTable attribute contents
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build ToolBox
* @run main StackmapTest
*/
--- a/langtools/test/tools/javap/typeAnnotations/JSR175Annotations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/JSR175Annotations.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test JSR175Annotations
* @bug 6843077
* @summary test that only type annotations are recorded as such in classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class JSR175Annotations {
--- a/langtools/test/tools/javap/typeAnnotations/NewArray.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/NewArray.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test NewArray
* @bug 6843077
* @summary Test type annotations on local array are in method's code attribute.
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class NewArray {
--- a/langtools/test/tools/javap/typeAnnotations/Presence.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/Presence.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
* @test Presence
* @bug 6843077
* @summary test that all type annotations are present in the classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class Presence {
--- a/langtools/test/tools/javap/typeAnnotations/PresenceInner.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/PresenceInner.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test PresenceInner
* @bug 6843077
* @summary test that annotations in inner types count only once
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class PresenceInner {
--- a/langtools/test/tools/javap/typeAnnotations/T6855990.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/T6855990.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 6855990
* @summary InstructionDetailWriter should support new 308 annotations attribute
+ * @modules jdk.compiler
*/
public class T6855990 {
--- a/langtools/test/tools/javap/typeAnnotations/TypeCasts.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/TypeCasts.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @bug 6843077
* @summary test that typecasts annotation are emitted if only the cast
* expression is optimized away
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class TypeCasts {
--- a/langtools/test/tools/javap/typeAnnotations/Visibility.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/Visibility.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test Visibility
* @bug 6843077
* @summary test that type annotations are recorded in the classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class Visibility {
--- a/langtools/test/tools/javap/typeAnnotations/Wildcards.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/javap/typeAnnotations/Wildcards.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @test Wildcards
* @bug 6843077
* @summary test that annotations target wildcards get emitted to classfile
+ * @modules jdk.compiler/com.sun.tools.classfile
*/
public class Wildcards {
public static void main(String[] args) throws Exception {
--- a/langtools/test/tools/jdeps/APIDeps.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/jdeps/APIDeps.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,10 @@
* @test
* @bug 8015912 8029216 8048063 8050804
* @summary Test -apionly and -jdkinternals options
+ * @modules java.base/sun.misc
+ * java.management
+ * jdk.compiler/com.sun.tools.classfile
+ * jdk.dev/com.sun.tools.jdeps
* @build m.Bar m.Foo m.Gee b.B c.C c.I d.D e.E f.F g.G
* @run main APIDeps
*/
--- a/langtools/test/tools/jdeps/Basic.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/jdeps/Basic.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8003562 8005428 8015912 8027481 8048063 8068937
* @summary Basic tests for jdeps tool
+ * @modules java.management
+ * jdk.dev/com.sun.tools.jdeps
* @build Test p.Foo p.Bar p.C p.SubClass q.Gee javax.activity.NotCompactProfile
* @run main Basic
*/
--- a/langtools/test/tools/jdeps/DotFileTest.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/jdeps/DotFileTest.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
* @test
* @bug 8003562
* @summary Basic tests for jdeps -dotoutput option
+ * @modules java.management
+ * jdk.dev/com.sun.tools.jdeps
* @build Test p.Foo p.Bar javax.activity.NotCompactProfile
* @run main DotFileTest
*/
--- a/langtools/test/tools/sjavac/CompileCircularSources.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/CompileCircularSources.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper CompileCircularSources
*/
--- a/langtools/test/tools/sjavac/CompileExcludingDependency.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/CompileExcludingDependency.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper CompileExcludingDependency
*/
--- a/langtools/test/tools/sjavac/CompileWithAtFile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/CompileWithAtFile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper CompileWithAtFile
*/
--- a/langtools/test/tools/sjavac/CompileWithInvisibleSources.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/CompileWithInvisibleSources.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper CompileWithInvisibleSources
*/
--- a/langtools/test/tools/sjavac/CompileWithOverrideSources.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/CompileWithOverrideSources.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper CompileWithOverrideSources
*/
--- a/langtools/test/tools/sjavac/DependencyCollection.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/DependencyCollection.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,13 @@
* @bug 8056258 8048609
* @summary Ensures that the DependencyCollector covers various cases.
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.code
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.javac.util
+ * jdk.compiler/com.sun.tools.sjavac.comp
+ * jdk.compiler/com.sun.tools.sjavac.comp.dependencies
* @build Wrapper ToolBox
* @run main Wrapper DependencyCollection
*/
--- a/langtools/test/tools/sjavac/ExclPattern.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/ExclPattern.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
* @bug 8037085
* @summary Ensures that sjavac can handle various exclusion patterns.
*
+ * @modules jdk.compiler/com.sun.tools.sjavac
* @build Wrapper
* @run main Wrapper ExclPattern
*/
--- a/langtools/test/tools/sjavac/IdleShutdown.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IdleShutdown.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
* @test
* @bug 8044131
* @summary Tests the hooks used for detecting idleness of the sjavac server.
+ * @modules jdk.compiler/com.sun.tools.sjavac.server
* @build Wrapper
* @run main Wrapper IdleShutdown
*/
--- a/langtools/test/tools/sjavac/IgnoreSymbolFile.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IgnoreSymbolFile.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 8047183
* @summary JDK build fails with sjavac enabled
*
+ * @modules jdk.compiler
* @build Wrapper
* @run main Wrapper IgnoreSymbolFile
*/
--- a/langtools/test/tools/sjavac/IncCompInheritance.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompInheritance.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* @bug 8056258
* @summary Analysis of public API does not take super classes into account
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build Wrapper ToolBox
* @run main Wrapper IncCompInheritance
*/
--- a/langtools/test/tools/sjavac/IncCompileChangeNative.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompileChangeNative.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper IncCompileChangeNative
*/
--- a/langtools/test/tools/sjavac/IncCompileDropClasses.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompileDropClasses.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper IncCompileDropClasses
*/
--- a/langtools/test/tools/sjavac/IncCompileFullyQualifiedRef.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompileFullyQualifiedRef.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper IncCompileFullyQualifiedRef
*/
--- a/langtools/test/tools/sjavac/IncCompileNoChanges.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompileNoChanges.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper IncCompileNoChanges
*/
--- a/langtools/test/tools/sjavac/IncCompileUpdateNative.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompileUpdateNative.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper IncCompileUpdateNative
*/
--- a/langtools/test/tools/sjavac/IncCompileWithChanges.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/IncCompileWithChanges.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper IncCompileWithChanges
*/
--- a/langtools/test/tools/sjavac/JavacOptionPrep.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/JavacOptionPrep.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
* @bug 8035063
* @summary Tests the preparation of javac-arguments.
*
+ * @modules jdk.compiler/com.sun.tools.sjavac.options
* @build Wrapper
* @run main Wrapper JavacOptionPrep
*/
--- a/langtools/test/tools/sjavac/OptionDecoding.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/OptionDecoding.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* @bug 8035063 8054465
* @summary Tests decoding of String[] into Options.
*
+ * @modules jdk.compiler/com.sun.tools.sjavac
+ * jdk.compiler/com.sun.tools.sjavac.client
+ * jdk.compiler/com.sun.tools.sjavac.options
* @build Wrapper
* @run main Wrapper OptionDecoding
*/
--- a/langtools/test/tools/sjavac/PackagePathMismatch.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/PackagePathMismatch.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
* @bug 8059349
* @summary This test makes sure file paths matches package declarations
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
* @build Wrapper ToolBox
* @run main Wrapper PackagePathMismatch
*/
--- a/langtools/test/tools/sjavac/ParallelCompilations.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/ParallelCompilations.java Fri May 29 12:49:31 2015 +0200
@@ -29,6 +29,10 @@
* @bug 8071629
* @author sogoel
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper ParallelCompilations
*/
--- a/langtools/test/tools/sjavac/PermittedArtifact.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/PermittedArtifact.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper PermittedArtifact
*/
--- a/langtools/test/tools/sjavac/PooledExecution.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/PooledExecution.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
* @test
* @bug 8044131
* @summary Makes sure sjavac poolsize option is honored.
+ * @modules jdk.compiler/com.sun.tools.sjavac.comp
+ * jdk.compiler/com.sun.tools.sjavac.server
* @build Wrapper
* @run main Wrapper PooledExecution
*/
--- a/langtools/test/tools/sjavac/Serialization.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/Serialization.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
* and saved in the state file since the files need to be recompiled
* if new options are provided.
*
+ * @modules jdk.compiler/com.sun.tools.sjavac
+ * jdk.compiler/com.sun.tools.sjavac.options
* @build Wrapper
* @run main Wrapper Serialization
*/
--- a/langtools/test/tools/sjavac/StateDir.java Fri May 22 09:14:18 2015 +0200
+++ b/langtools/test/tools/sjavac/StateDir.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,10 @@
* @author Fredrik O
* @author sogoel (rewrite)
* @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.file
+ * jdk.compiler/com.sun.tools.javac.main
+ * jdk.compiler/com.sun.tools.sjavac
* @build Wrapper ToolBox
* @run main Wrapper StateDir
*/
--- a/make/Images.gmk Fri May 22 09:14:18 2015 +0200
+++ b/make/Images.gmk Fri May 29 12:49:31 2015 +0200
@@ -213,7 +213,6 @@
jcmd.1 \
jdb.1 \
jdeps.1 \
- jhat.1 \
jinfo.1 \
jmap.1 \
jps.1 \
--- a/make/JrtfsJar.gmk Fri May 22 09:14:18 2015 +0200
+++ b/make/JrtfsJar.gmk Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,20 @@
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
+include TextFileProcessing.gmk
+
+# This rule will be depended on due to the MANIFEST line
+$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
+ SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
+ OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf, \
+ REPLACEMENTS := \
+ @@RELEASE@@ => $(RELEASE) ; \
+ @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
+))
$(eval $(call SetupArchive,JRTFS_JAR, , \
SRCS := $(BUILDTOOLS_OUTPUTDIR)/interim_jimage_classes, \
JAR := $(SUPPORT_OUTPUTDIR)/jrt-fs.jar, \
- MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
+ MANIFEST := $(SUPPORT_OUTPUTDIR)/java-main-manifest.mf))
all: $(JRTFS_JAR)
--- a/make/common/JavaCompilation.gmk Fri May 22 09:14:18 2015 +0200
+++ b/make/common/JavaCompilation.gmk Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -265,7 +265,7 @@
endif
# Include all variables of significance in the vardeps file
- $1_VARDEPS := $(JAR) $$($1_JAR_CREATE_OPTIONS) $$($1_MANIFEST) $(RELEASE) $(COMPANY_NAME) \
+ $1_VARDEPS := $(JAR) $$($1_JAR_CREATE_OPTIONS) $$($1_MANIFEST) \
$$($1_JARMAIN) $$($1_EXTRA_MANIFEST_ATTR)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$(dir $$($1_JAR))_the.$$($1_JARNAME).vardeps)
@@ -280,8 +280,7 @@
# potential changes.
$$(if $$(filter $$($1_VARDEPS_FILE) $$($1_MANIFEST), $$?), \
$$(if $$($1_MANIFEST), \
- $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
- -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) $$(NEWLINE) \
+ $(CP) $$($1_MANIFEST) $$($1_MANIFEST_FILE) $$(NEWLINE) \
, \
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE) $$(NEWLINE)) \
$$(if $$($1_JARMAIN), \
--- a/make/jprt.properties Fri May 22 09:14:18 2015 +0200
+++ b/make/jprt.properties Fri May 29 12:49:31 2015 +0200
@@ -428,15 +428,6 @@
windows_i586_6.2-*-default-hotspot_basicvmtest, \
windows_x64_6.2-*-default-hotspot_basicvmtest
-my.make.rule.test.targets.hotspot.internalvmtests= \
- solaris_sparcv9_5.11-fastdebug-c2-hotspot_internalvmtests, \
- solaris_x64_5.11-fastdebug-c2-hotspot_internalvmtests, \
- linux_i586_2.6-fastdebug-c2-hotspot_internalvmtests, \
- linux_x64_2.6-fastdebug-c2-hotspot_internalvmtests, \
- macosx_x64_10.9-fastdebug-c2-hotspot_internalvmtests, \
- windows_i586_6.2-fastdebug-c2-hotspot_internalvmtests, \
- windows_x64_6.2-fastdebug-c2-hotspot_internalvmtests
-
my.make.rule.test.targets.hotspot.reg.group= \
solaris_sparcv9_5.11-fastdebug-c2-GROUP, \
solaris_x64_5.11-fastdebug-c2-GROUP, \
@@ -450,7 +441,6 @@
# Hotspot jtreg tests
my.make.rule.test.targets.hotspot.reg= \
- ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_wbapitest}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_1}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_2}, \
${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_3}, \
@@ -466,7 +456,6 @@
# Other Makefile based Hotspot tests
my.make.rule.test.targets.hotspot.other= \
${my.make.rule.test.targets.hotspot.basicvmtests}, \
- ${my.make.rule.test.targets.hotspot.internalvmtests}, \
${my.additional.make.rule.test.targets.hotspot.other}
# All the makefile based tests to run
--- a/modules.xml Fri May 22 09:14:18 2015 +0200
+++ b/modules.xml Fri May 29 12:49:31 2015 +0200
@@ -2,7 +2,7 @@
<!--
- Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
@@ -216,19 +216,19 @@
</export>
<export>
<name>jdk.internal.jimage</name>
- <to>jdk.dev</to>
+ <to>jdk.dev</to>
</export>
<export>
<name>jdk.internal.org.objectweb.asm</name>
+ <to>java.instrument</to>
<to>jdk.jfr</to>
<to>jdk.scripting.nashorn</to>
- <to>java.instrument</to>
</export>
<export>
<name>jdk.internal.org.objectweb.asm.commons</name>
+ <to>java.instrument</to>
<to>jdk.jfr</to>
<to>jdk.scripting.nashorn</to>
- <to>java.instrument</to>
</export>
<export>
<name>jdk.internal.org.objectweb.asm.signature</name>
@@ -236,19 +236,20 @@
</export>
<export>
<name>jdk.internal.org.objectweb.asm.tree</name>
+ <to>java.instrument</to>
<to>jdk.jfr</to>
- <to>java.instrument</to>
</export>
<export>
<name>jdk.internal.org.objectweb.asm.util</name>
+ <to>java.instrument</to>
<to>jdk.jfr</to>
<to>jdk.scripting.nashorn</to>
- <to>java.instrument</to>
</export>
<export>
<name>sun.misc</name>
<to>java.corba</to>
<to>java.desktop</to>
+ <to>java.instrument</to>
<to>java.logging</to>
<to>java.management</to>
<to>java.naming</to>
@@ -266,6 +267,7 @@
<to>jdk.jartool</to>
<to>jdk.jconsole</to>
<to>jdk.jvmstat</to>
+ <to>jdk.management.resource</to>
<to>jdk.pack200</to>
<to>jdk.security.auth</to>
<to>jdk.security.jgss</to>
@@ -301,6 +303,7 @@
<to>java.management</to>
<to>jdk.crypto.pkcs11</to>
<to>jdk.crypto.ucrypto</to>
+ <to>jdk.management.resource</to>
<to>jdk.sctp</to>
</export>
<export>
@@ -311,11 +314,11 @@
<export>
<name>sun.reflect</name>
<to>java.corba</to>
+ <to>java.instrument</to>
<to>java.logging</to>
<to>java.sql</to>
<to>java.sql.rowset</to>
<to>jdk.scripting.nashorn</to>
- <to>java.instrument</to>
</export>
<export>
<name>sun.reflect.annotation</name>
@@ -774,6 +777,7 @@
<export>
<name>jdk.internal.instrumentation</name>
<to>jdk.jfr</to>
+ <to>jdk.management.resource</to>
</export>
</module>
<module>
--- a/nashorn/.hgtags Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/.hgtags Fri May 29 12:49:31 2015 +0200
@@ -298,3 +298,4 @@
1b5604bc81a6161b1c3c9dd654cd1399474ae9ee jdk9-b62
bc8e67bec2f92772c4a67e20e66a4f216207f0af jdk9-b63
00df6e4fc75a83bdd958f9ef86d80e008c9ba967 jdk9-b64
+2054d01ae32649d3179e93d14108fdd6259c1c0d jdk9-b65
--- a/nashorn/make/build.xml Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/make/build.xml Fri May 29 12:49:31 2015 +0200
@@ -469,7 +469,7 @@
</testng>
</target>
- <target name="test" depends="test-pessimistic, test-optimistic"/>
+ <target name="test" depends="javadoc, test-pessimistic, test-optimistic"/>
<target name="test-optimistic" depends="jar, -test-classes-all,-test-classes-single, check-testng, check-external-tests, compile-test, generate-policy-file" if="testng.available">
<echo message="Running test suite in OPTIMISTIC mode..."/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/console.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * Simple Web Console-like support for Nashorn. In addition to
+ * Web console object methods, this console add methods of
+ * java.io.Console as well. Note:not all web console methods are
+ * implemented but useful subset is implemented.
+ *
+ * See also: https://developer.mozilla.org/en/docs/Web/API/console
+ */
+
+
+if (typeof console == 'undefined') {
+
+(function() {
+ var LocalDateTime = Java.type("java.time.LocalDateTime");
+ var System = Java.type("java.lang.System");
+ var jconsole = System.console();
+
+ // add a new global variable called "console"
+ this.console = {
+ };
+
+ function addConsoleMethods() {
+ // expose methods of java.io.Console as an extension
+ var placeholder = "-*-";
+ // put a placeholder for each name from java.lang.Object
+ var objMethods = Object.bindProperties({}, new java.lang.Object());
+ for (var m in objMethods) {
+ console[m] = placeholder;
+ }
+
+ // bind only the methods of java.io.Console
+ // This bind will skip java.lang.Object methods as console
+ // has properties of same name.
+ Object.bindProperties(console, jconsole);
+
+ // Now, delete java.lang.Object methods
+ for (var m in console) {
+ if (console[m] == placeholder) {
+ delete console[m];
+ }
+ }
+ }
+
+ addConsoleMethods();
+
+ function consoleLog(type, msg) {
+ // print type of message, then time.
+ jconsole.format("%s [%s] ", type, LocalDateTime.now().toString());
+ if (typeof msg == 'string') {
+ jconsole.format(msg + "\n", Array.prototype.slice.call(arguments, 2));
+ } else {
+ // simple space separated values and newline at the end
+ var arr = Array.prototype.slice.call(arguments, 1);
+ jconsole.format("%s\n", arr.join(" "));
+ }
+ }
+
+ console.toString = function() "[object Console]";
+
+ // web console functions
+
+ console.assert = function(expr) {
+ if (! expr) {
+ arguments[0] = "Assertion Failed:";
+ consoleLog.apply(console, arguments);
+ // now, stack trace at the end
+ jconsole.format("%s\n", new Error().stack);
+ }
+ };
+
+ // dummy clear to avoid error!
+ console.clear = function() {};
+
+ var counter = {
+ get: function(label) {
+ if (! this[label]) {
+ return this[label] = 1;
+ } else {
+ return ++this[label];
+ }
+ }
+ };
+
+ // counter
+ console.count = function(label) {
+ label = label? String(label) : "<no label>";
+ jconsole.format("%s: %d\n",label, counter.get(label).intValue());
+ }
+
+ // logging
+ console.error = consoleLog.bind(jconsole, "ERROR");
+ console.info = consoleLog.bind(jconsole, "INFO");
+ console.log = console.info;
+ console.debug = console.log;
+ console.warn = consoleLog.bind(jconsole, "WARNING");
+
+ // print stack trace
+ console.trace = function() {
+ jconsole.format("%s\n", new Error().stack);
+ };
+})();
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/consoleuse.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+load(__DIR__ + "console.js");
+
+console.log("consoleuse.js started!");
+
+function func() {
+ console.count("func");
+}
+
+
+func();
+func();
+func();
+func();
+
+// java.io.Console method
+console.readPassword("passworld please: ");
+console.error("Big error: %s!", "you revealed your password!");
+console.warn("You've done this %d times", 345);
+console.assert(arguments.length != 0, "no arguments!");
+
+// java.io.Console methods
+var str = console.readLine("enter something: ");
+console.printf("you entered: %s\n", str);
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/undefined_call.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Nashorn extension: __noSuchMethod__
+// See also: https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions#Nashornextensions-__noSuchMethod__
+
+Object.prototype.__noSuchMethod__ = function(name) {
+ print(name + " function is not defined in " + this);
+
+ // Nashorn extension: stack property
+ // gives stack trace as a string
+ print(new Error().stack);
+}
+
+function func(obj) {
+ obj.foo();
+}
+
+func({});
+func(this);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/unzip.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Simple unzip tool using #nashorn and #java
+ * zip fs file system interface.
+ */
+
+if (arguments.length == 0) {
+ print("Usage: jjs zipfs.js -- <.zip/.jar file> [out dir]");
+ exit(1);
+}
+
+var File = Java.type("java.io.File");
+// output directory where zip is extracted
+var outDir = arguments[1];
+if (!outDir) {
+ outDir = ".";
+} else {
+ if (! new File(outDir).isDirectory()) {
+ print(outDir + " directory does not exist!");
+ exit(1);
+ }
+}
+
+var Files = Java.type("java.nio.file.Files");
+var FileSystems = Java.type("java.nio.file.FileSystems");
+var Paths = Java.type("java.nio.file.Paths");
+
+var zipfile = Paths.get(arguments[0])
+var fs = FileSystems.newFileSystem(zipfile, null);
+var root = fs.rootDirectories[0];
+
+// walk root and handle each Path
+Files.walk(root).forEach(
+ function(p) {
+ var outPath = outDir +
+ p.toString().replace('/', File.separatorChar);
+ print(outPath);
+ if (Files.isDirectory(p)) {
+ // create directories as needed
+ new File(outPath).mkdirs();
+ } else {
+ // copy a 'file' resource
+ Files.copy(p, new File(outPath).toPath());
+ }
+ }
+);
+
+// done
+fs.close();
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java Fri May 29 12:49:31 2015 +0200
@@ -3798,7 +3798,6 @@
emitBranch(binaryNode, onTrue, true);
if (isCurrentDiscard) {
method.label(onTrue);
- method.pop();
} else {
method.load(false);
method._goto(skip);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/LexicalContext.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/LexicalContext.java Fri May 29 12:49:31 2015 +0200
@@ -204,7 +204,7 @@
/**
* Explicitly apply flags to the topmost element on the stack. This is only valid to use from a
* {@code NodeVisitor.leaveXxx()} method and only on the node being exited at the time. It is not mandatory to use,
- * as {@link #pop(LexicalContextNode)} will apply the flags automatically, but this method can be used to apply them
+ * as {@link #pop(Node)} will apply the flags automatically, but this method can be used to apply them
* during the {@code leaveXxx()} method in case its logic depends on the value of the flags.
* @param node the node to apply the flags to. Must be the topmost node on the stack.
* @return the passed in node, or a modified node (if any flags were modified)
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/TryNode.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/TryNode.java Fri May 29 12:49:31 2015 +0200
@@ -57,7 +57,7 @@
* block was not terminal; the original jump/return is simply ignored if the finally block itself
* terminates). The reason for this somewhat strange arrangement is that we didn't want to create a
* separate class for the (label, BlockStatement pair) but rather reused the already available LabelNode.
- * However, if we simply used List<LabelNode> without wrapping the label nodes in an additional Block,
+ * However, if we simply used List<LabelNode> without wrapping the label nodes in an additional Block,
* that would've thrown off visitors relying on BlockLexicalContext -- same reason why we never use
* Statement as the type of bodies of e.g. IfNode, WhileNode etc. but rather blockify them even when they're
* single statements.
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/Global.java Fri May 29 12:49:31 2015 +0200
@@ -220,7 +220,12 @@
@Property(name = "Number", attributes = Attribute.NOT_ENUMERABLE)
public volatile Object number;
- /** ECMA 15.1.4.7 Date constructor */
+ /**
+ * Getter for ECMA 15.1.4.7 Date property
+ *
+ * @param self self reference
+ * @return Date property value
+ */
@Getter(name = "Date", attributes = Attribute.NOT_ENUMERABLE)
public static Object getDate(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -230,6 +235,12 @@
return global.date;
}
+ /**
+ * Setter for ECMA 15.1.4.7 Date property
+ *
+ * @param self self reference
+ * @param value value for the Date property
+ */
@Setter(name = "Date", attributes = Attribute.NOT_ENUMERABLE)
public static void setDate(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -238,7 +249,12 @@
private volatile Object date = LAZY_SENTINEL;
- /** ECMA 15.1.4.8 RegExp constructor */
+ /**
+ * Getter for ECMA 15.1.4.8 RegExp property
+ *
+ * @param self self reference
+ * @return RegExp property value
+ */
@Getter(name = "RegExp", attributes = Attribute.NOT_ENUMERABLE)
public static Object getRegExp(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -248,6 +264,12 @@
return global.regexp;
}
+ /**
+ * Setter for ECMA 15.1.4.8 RegExp property
+ *
+ * @param self self reference
+ * @param value value for the RegExp property
+ */
@Setter(name = "RegExp", attributes = Attribute.NOT_ENUMERABLE)
public static void setRegExp(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -256,7 +278,11 @@
private volatile Object regexp = LAZY_SENTINEL;
- /** ECMA 15.12 - The JSON object */
+ /**
+ * Getter for ECMA 15.12 - The JSON property
+ * @param self self reference
+ * @return the value of JSON property
+ */
@Getter(name = "JSON", attributes = Attribute.NOT_ENUMERABLE)
public static Object getJSON(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -266,6 +292,11 @@
return global.json;
}
+ /**
+ * Setter for ECMA 15.12 - The JSON property
+ * @param self self reference
+ * @param value value for the JSON property
+ */
@Setter(name = "JSON", attributes = Attribute.NOT_ENUMERABLE)
public static void setJSON(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -274,7 +305,11 @@
private volatile Object json = LAZY_SENTINEL;
- /** Nashorn extension: global.JSAdapter */
+ /**
+ * Getter for Nashorn extension: global.JSAdapter
+ * @param self self reference
+ * @return value of the JSAdapter property
+ */
@Getter(name = "JSAdapter", attributes = Attribute.NOT_ENUMERABLE)
public static Object getJSAdapter(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -284,6 +319,11 @@
return global.jsadapter;
}
+ /**
+ * Setter for Nashorn extension: global.JSAdapter
+ * @param self self reference
+ * @param value value for the JSAdapter property
+ */
@Setter(name = "JSAdapter", attributes = Attribute.NOT_ENUMERABLE)
public static void setJSAdapter(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -300,7 +340,11 @@
@Property(name = "Error", attributes = Attribute.NOT_ENUMERABLE)
public volatile Object error;
- /** EvalError object */
+ /**
+ * Getter for the EvalError property
+ * @param self self reference
+ * @return the value of EvalError property
+ */
@Getter(name = "EvalError", attributes = Attribute.NOT_ENUMERABLE)
public static Object getEvalError(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -310,6 +354,11 @@
return global.evalError;
}
+ /**
+ * Setter for the EvalError property
+ * @param self self reference
+ * @param value value of the EvalError property
+ */
@Setter(name = "EvalError", attributes = Attribute.NOT_ENUMERABLE)
public static void setEvalError(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -318,7 +367,11 @@
private volatile Object evalError = LAZY_SENTINEL;
- /** RangeError object */
+ /**
+ * Getter for the RangeError property.
+ * @param self self reference
+ * @return the value of RangeError property
+ */
@Getter(name = "RangeError", attributes = Attribute.NOT_ENUMERABLE)
public static Object getRangeError(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -328,6 +381,12 @@
return global.rangeError;
}
+
+ /**
+ * Setter for the RangeError property.
+ * @param self self reference
+ * @param value value for the RangeError property
+ */
@Setter(name = "RangeError", attributes = Attribute.NOT_ENUMERABLE)
public static void setRangeError(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -348,7 +407,11 @@
@Property(name = "TypeError", attributes = Attribute.NOT_ENUMERABLE)
public volatile Object typeError;
- /** URIError object */
+ /**
+ * Getter for the URIError property.
+ * @param self self reference
+ * @return the value of URIError property
+ */
@Getter(name = "URIError", attributes = Attribute.NOT_ENUMERABLE)
public static Object getURIError(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -358,6 +421,11 @@
return global.uriError;
}
+ /**
+ * Setter for the URIError property.
+ * @param self self reference
+ * @param value value for the URIError property
+ */
@Setter(name = "URIError", attributes = Attribute.NOT_ENUMERABLE)
public static void setURIError(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -366,7 +434,11 @@
private volatile Object uriError = LAZY_SENTINEL;
- /** ArrayBuffer object */
+ /**
+ * Getter for the ArrayBuffer property.
+ * @param self self reference
+ * @return the value of the ArrayBuffer property
+ */
@Getter(name = "ArrayBuffer", attributes = Attribute.NOT_ENUMERABLE)
public static Object getArrayBuffer(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -376,6 +448,11 @@
return global.arrayBuffer;
}
+ /**
+ * Setter for the ArrayBuffer property.
+ * @param self self reference
+ * @param value value of the ArrayBuffer property
+ */
@Setter(name = "ArrayBuffer", attributes = Attribute.NOT_ENUMERABLE)
public static void setArrayBuffer(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -384,7 +461,11 @@
private volatile Object arrayBuffer;
- /** DataView object */
+ /**
+ * Getter for the DataView property.
+ * @param self self reference
+ * @return the value of the DataView property
+ */
@Getter(name = "DataView", attributes = Attribute.NOT_ENUMERABLE)
public static Object getDataView(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -394,6 +475,12 @@
return global.dataView;
}
+
+ /**
+ * Setter for the DataView property.
+ * @param self self reference
+ * @param value value of the DataView property
+ */
@Setter(name = "DataView", attributes = Attribute.NOT_ENUMERABLE)
public static void setDataView(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -402,7 +489,11 @@
private volatile Object dataView;
- /** TypedArray (int8) */
+ /**
+ * Getter for the Int8Array property.
+ * @param self self reference
+ * @return the value of the Int8Array property.
+ */
@Getter(name = "Int8Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getInt8Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -412,6 +503,11 @@
return global.int8Array;
}
+ /**
+ * Setter for the Int8Array property.
+ * @param self self reference
+ * @param value value of the Int8Array property
+ */
@Setter(name = "Int8Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setInt8Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -420,7 +516,11 @@
private volatile Object int8Array;
- /** TypedArray (uint8) */
+ /**
+ * Getter for the Uin8Array property.
+ * @param self self reference
+ * @return the value of the Uint8Array property
+ */
@Getter(name = "Uint8Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getUint8Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -430,6 +530,11 @@
return global.uint8Array;
}
+ /**
+ * Setter for the Uin8Array property.
+ * @param self self reference
+ * @param value value of the Uin8Array property
+ */
@Setter(name = "Uint8Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setUint8Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -438,7 +543,11 @@
private volatile Object uint8Array;
- /** TypedArray (uint8) - Clamped */
+ /**
+ * Getter for the Uint8ClampedArray property.
+ * @param self self reference
+ * @return the value of the Uint8ClampedArray property
+ */
@Getter(name = "Uint8ClampedArray", attributes = Attribute.NOT_ENUMERABLE)
public static Object getUint8ClampedArray(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -448,6 +557,11 @@
return global.uint8ClampedArray;
}
+ /**
+ * Setter for the Uint8ClampedArray property.
+ * @param self self reference
+ * @param value value of the Uint8ClampedArray property
+ */
@Setter(name = "Uint8ClampedArray", attributes = Attribute.NOT_ENUMERABLE)
public static void setUint8ClampedArray(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -456,7 +570,11 @@
private volatile Object uint8ClampedArray;
- /** TypedArray (int16) */
+ /**
+ * Getter for the Int16Array property.
+ * @param self self reference
+ * @return the value of the Int16Array property
+ */
@Getter(name = "Int16Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getInt16Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -466,6 +584,11 @@
return global.int16Array;
}
+ /**
+ * Setter for the Int16Array property.
+ * @param self self reference
+ * @param value value of the Int16Array property
+ */
@Setter(name = "Int16Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setInt16Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -474,7 +597,11 @@
private volatile Object int16Array;
- /** TypedArray (uint16) */
+ /**
+ * Getter for the Uint16Array property.
+ * @param self self reference
+ * @return the value of the Uint16Array property
+ */
@Getter(name = "Uint16Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getUint16Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -484,6 +611,11 @@
return global.uint16Array;
}
+ /**
+ * Setter for the Uint16Array property.
+ * @param self self reference
+ * @param value value of the Uint16Array property
+ */
@Setter(name = "Uint16Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setUint16Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -492,7 +624,12 @@
private volatile Object uint16Array;
- /** TypedArray (int32) */
+ /**
+ * Getter for the Int32Array property.
+ *
+ * @param self self reference
+ * @return the value of the Int32Array property
+ */
@Getter(name = "Int32Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getInt32Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -502,6 +639,13 @@
return global.int32Array;
}
+
+ /**
+ * Setter for the Int32Array property.
+ *
+ * @param self self reference
+ * @param value value of the Int32Array property
+ */
@Setter(name = "Int32Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setInt32Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -510,7 +654,12 @@
private volatile Object int32Array;
- /** TypedArray (uint32) */
+ /**
+ * Getter of the Uint32Array property.
+ *
+ * @param self self reference
+ * @return the value of the Uint32Array property
+ */
@Getter(name = "Uint32Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getUint32Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -520,6 +669,13 @@
return global.uint32Array;
}
+
+ /**
+ * Setter of the Uint32Array property.
+ *
+ * @param self self reference
+ * @param value value of the Uint32Array property
+ */
@Setter(name = "Uint32Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setUint32Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -528,7 +684,12 @@
private volatile Object uint32Array;
- /** TypedArray (float32) */
+ /**
+ * Getter for the Float32Array property.
+ *
+ * @param self self reference
+ * @return the value of the Float32Array property
+ */
@Getter(name = "Float32Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getFloat32Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -538,6 +699,12 @@
return global.float32Array;
}
+ /**
+ * Setter for the Float32Array property.
+ *
+ * @param self self reference
+ * @param value value of the Float32Array property
+ */
@Setter(name = "Float32Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setFloat32Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -546,7 +713,12 @@
private volatile Object float32Array;
- /** TypedArray (float64) */
+ /**
+ * Getter for the Float64Array property.
+ *
+ * @param self self reference
+ * @return the value of the Float64Array property
+ */
@Getter(name = "Float64Array", attributes = Attribute.NOT_ENUMERABLE)
public static Object getFloat64Array(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -556,6 +728,12 @@
return global.float64Array;
}
+ /**
+ * Setter for the Float64Array property.
+ *
+ * @param self self reference
+ * @param value value of the Float64Array property
+ */
@Setter(name = "Float64Array", attributes = Attribute.NOT_ENUMERABLE)
public static void setFloat64Array(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -592,7 +770,12 @@
@Property(attributes = Attribute.NOT_ENUMERABLE)
public volatile Object org;
- /** Nashorn extension: Java access - global.javaImporter */
+ /**
+ * Getter for the Nashorn extension: Java access - global.javaImporter.
+ *
+ * @param self self reference
+ * @return the value of the JavaImporter property
+ */
@Getter(name = "JavaImporter", attributes = Attribute.NOT_ENUMERABLE)
public static Object getJavaImporter(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -602,6 +785,12 @@
return global.javaImporter;
}
+ /**
+ * Setter for the Nashorn extension: Java access - global.javaImporter.
+ *
+ * @param self self reference
+ * @param value value of the JavaImporter property
+ */
@Setter(name = "JavaImporter", attributes = Attribute.NOT_ENUMERABLE)
public static void setJavaImporter(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -610,7 +799,12 @@
private volatile Object javaImporter;
- /** Nashorn extension: global.Java Object constructor. */
+ /**
+ * Getter for the Nashorn extension: global.Java property.
+ *
+ * @param self self reference
+ * @return the value of the Java property
+ */
@Getter(name = "Java", attributes = Attribute.NOT_ENUMERABLE)
public static Object getJavaApi(final Object self) {
final Global global = Global.instanceFrom(self);
@@ -620,6 +814,12 @@
return global.javaApi;
}
+ /**
+ * Setter for the Nashorn extension: global.Java property.
+ *
+ * @param self self reference
+ * @param value value of the Java property
+ */
@Setter(name = "Java", attributes = Attribute.NOT_ENUMERABLE)
public static void setJavaApi(final Object self, final Object value) {
final Global global = Global.instanceFrom(self);
@@ -2139,13 +2339,13 @@
@Override
public void addBoundProperties(final ScriptObject source, final jdk.nashorn.internal.runtime.Property[] properties) {
PropertyMap ownMap = getMap();
- LexicalScope lexicalScope = null;
+ LexicalScope lexScope = null;
PropertyMap lexicalMap = null;
boolean hasLexicalDefinitions = false;
if (context.getEnv()._es6) {
- lexicalScope = (LexicalScope) getLexicalScope();
- lexicalMap = lexicalScope.getMap();
+ lexScope = (LexicalScope) getLexicalScope();
+ lexicalMap = lexScope.getMap();
for (final jdk.nashorn.internal.runtime.Property property : properties) {
if (property.isLexicalBinding()) {
@@ -2165,8 +2365,8 @@
for (final jdk.nashorn.internal.runtime.Property property : properties) {
if (property.isLexicalBinding()) {
- assert lexicalScope != null;
- lexicalMap = lexicalScope.addBoundProperty(lexicalMap, source, property);
+ assert lexScope != null;
+ lexicalMap = lexScope.addBoundProperty(lexicalMap, source, property);
if (ownMap.findProperty(property.getKey()) != null) {
// If property exists in the global object invalidate any global constant call sites.
@@ -2180,7 +2380,8 @@
setMap(ownMap);
if (hasLexicalDefinitions) {
- lexicalScope.setMap(lexicalMap);
+ assert lexScope != null;
+ lexScope.setMap(lexicalMap);
invalidateLexicalSwitchPoint();
}
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeObject.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeObject.java Fri May 29 12:49:31 2015 +0200
@@ -765,7 +765,7 @@
continue;
}
properties.add(AccessorProperty.create(methodName, Property.NOT_WRITABLE, getBoundBeanMethodGetter(source,
- method), null));
+ method), Lookup.EMPTY_SETTER));
}
for(final String propertyName: propertyNames) {
MethodHandle getter;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptingFunctions.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptingFunctions.java Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,10 +34,13 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
+import java.io.StreamTokenizer;
+import java.io.StringReader;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
-import java.util.StringTokenizer;
/**
* Global functions supported only in scripting mode.
@@ -133,15 +136,8 @@
// Current global is need to fetch additional inputs and for additional results.
final ScriptObject global = Context.getGlobal();
- // Break exec string into tokens.
- final StringTokenizer tokenizer = new StringTokenizer(JSType.toString(string));
- final String[] cmdArray = new String[tokenizer.countTokens()];
- for (int i = 0; tokenizer.hasMoreTokens(); i++) {
- cmdArray[i] = tokenizer.nextToken();
- }
-
// Set up initial process.
- final ProcessBuilder processBuilder = new ProcessBuilder(cmdArray);
+ final ProcessBuilder processBuilder = new ProcessBuilder(tokenizeCommandLine(JSType.toString(string)));
// Current ENV property state.
final Object env = global.get(ENV_NAME);
@@ -239,4 +235,43 @@
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
return MH.findStatic(MethodHandles.lookup(), ScriptingFunctions.class, name, MH.type(rtype, types));
}
+
+ /**
+ * Break an exec string into tokens, honoring quoted arguments and escaped
+ * spaces.
+ *
+ * @param execString a {@link String} with the command line to execute.
+ * @return a {@link List} of {@link String}s representing the tokens that
+ * constitute the command line.
+ * @throws IOException in case {@link StreamTokenizer#nextToken()} raises it.
+ */
+ private static List<String> tokenizeCommandLine(final String execString) throws IOException {
+ final StreamTokenizer tokenizer = new StreamTokenizer(new StringReader(execString));
+ tokenizer.resetSyntax();
+ tokenizer.wordChars(0, 255);
+ tokenizer.whitespaceChars(0, ' ');
+ tokenizer.commentChar('#');
+ tokenizer.quoteChar('"');
+ tokenizer.quoteChar('\'');
+ final List<String> cmdList = new ArrayList<>();
+ final StringBuilder toAppend = new StringBuilder();
+ while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
+ final String s = tokenizer.sval;
+ // The tokenizer understands about honoring quoted strings and recognizes
+ // them as one token that possibly contains multiple space-separated words.
+ // It does not recognize quoted spaces, though, and will split after the
+ // escaping \ character. This is handled here.
+ if (s.endsWith("\\")) {
+ // omit trailing \, append space instead
+ toAppend.append(s.substring(0, s.length() - 1)).append(' ');
+ } else {
+ cmdList.add(toAppend.append(s).toString());
+ toAppend.setLength(0);
+ }
+ }
+ if (toAppend.length() != 0) {
+ cmdList.add(toAppend.toString());
+ }
+ return cmdList;
+ }
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/IntArrayData.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/IntArrayData.java Fri May 29 12:49:31 2015 +0200
@@ -182,14 +182,13 @@
@Override
public ArrayData convert(final Class<?> type) {
- if (type == Integer.class) {
+ if (type == Integer.class || type == Byte.class || type == Short.class) {
return this;
} else if (type == Long.class) {
return convertToLong();
- } else if (type == Double.class) {
+ } else if (type == Double.class || type == Float.class) {
return convertToDouble();
} else {
- assert type == null || (!Number.class.isAssignableFrom(type) && !type.isPrimitive());
return convertToObject();
}
}
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/LongArrayData.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/LongArrayData.java Fri May 29 12:49:31 2015 +0200
@@ -120,11 +120,11 @@
@Override
public ContinuousArrayData convert(final Class<?> type) {
- if (type == Integer.class || type == Long.class) {
+ if (type == Integer.class || type == Long.class || type == Byte.class || type == Short.class) {
return this;
}
final int len = (int)length();
- if (type == Double.class) {
+ if (type == Double.class || type == Float.class) {
return new NumberArrayData(toDoubleArray(), len);
}
return new ObjectArrayData(toObjectArray(false), len);
@@ -171,7 +171,8 @@
@Override
public ArrayData set(final int index, final Object value, final boolean strict) {
- if (value instanceof Long || value instanceof Integer) {
+ if (value instanceof Long || value instanceof Integer ||
+ value instanceof Byte || value instanceof Short) {
return set(index, ((Number)value).longValue(), strict);
} else if (value == ScriptRuntime.UNDEFINED) {
return new UndefinedArrayFilter(this).set(index, value, strict);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/NumberArrayData.java Fri May 29 12:49:31 2015 +0200
@@ -29,6 +29,7 @@
import static jdk.nashorn.internal.lookup.Lookup.MH;
import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
+import jdk.internal.dynalink.support.TypeUtilities;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
@@ -104,9 +105,14 @@
return super.asArrayOfType(componentType);
}
+ private static boolean canWiden(final Class<?> type) {
+ return TypeUtilities.isWrapperType(type) &&
+ type != Boolean.class && type != Character.class;
+ }
+
@Override
public ContinuousArrayData convert(final Class<?> type) {
- if (type != Double.class && type != Integer.class && type != Long.class) {
+ if (! canWiden(type)) {
final int len = (int)length();
return new ObjectArrayData(toObjectArray(false), len);
}
@@ -154,7 +160,7 @@
@Override
public ArrayData set(final int index, final Object value, final boolean strict) {
- if (value instanceof Double || value instanceof Integer || value instanceof Long) {
+ if (value instanceof Double || (value != null && canWiden(value.getClass()))) {
return set(index, ((Number)value).doubleValue(), strict);
} else if (value == UNDEFINED) {
return new UndefinedArrayFilter(this).set(index, value, strict);
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornLinker.java Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornLinker.java Fri May 29 12:49:31 2015 +0200
@@ -216,10 +216,11 @@
// Could've also used (targetType.isAssignableFrom(ScriptObjectMirror.class) && targetType != Object.class) but
// it's probably better to explicitly spell out the supported target types
if (targetType == Map.class || targetType == Bindings.class || targetType == JSObject.class || targetType == ScriptObjectMirror.class) {
- if(ScriptObject.class.isAssignableFrom(sourceType)) {
+ if (ScriptObject.class.isAssignableFrom(sourceType)) {
return new GuardedInvocation(CREATE_MIRROR);
+ } else if (sourceType.isAssignableFrom(ScriptObject.class) || sourceType.isInterface()) {
+ return new GuardedInvocation(CREATE_MIRROR, IS_SCRIPT_OBJECT);
}
- return new GuardedInvocation(CREATE_MIRROR, IS_SCRIPT_OBJECT);
}
return null;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8079145.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8079145: jdk.nashorn.internal.runtime.arrays.IntArrayData.convert assertion
+ *
+ * @test
+ * @fork
+ * @option -Dnashorn.debug=true
+ * @run
+ */
+
+var Byte = java.lang.Byte;
+var Short = java.lang.Short;
+var Integer = java.lang.Integer;
+var Long = java.lang.Long;
+var Float = java.lang.Float;
+var Double = java.lang.Double;
+var Character = java.lang.Character;
+
+function checkWiden(arr, value, name) {
+ switch (typeof value) {
+ case 'object':
+ case 'undefined':
+ print(name + ": check widen for " + value);
+ break;
+ default:
+ print(name + ": check widen for " + value +
+ " [" + Debug.getClass(value) + "]");
+ }
+
+ arr[0] = value;
+}
+
+function checkIntWiden(value) {
+ checkWiden([34], value, "int array");
+}
+
+function checkLongWiden(value) {
+ checkWiden([Integer.MAX_VALUE + 1], value, "long array");
+}
+
+function checkNumberWiden(value) {
+ checkWiden([Math.PI], value, "number array");
+}
+
+function checkObjectWiden(value) {
+ checkWiden([null], value, "object array");
+}
+
+var values = [{}, null, undefined, false, true, new Byte(34),
+ new Integer(344454), new Long(454545), new Long(Integer.MAX_VALUE + 1),
+ new Float(34.3), new Double(Math.PI), new Character('s')];
+
+for each (var v in values) {
+ checkIntWiden(v);
+}
+
+for each (var v in values) {
+ checkLongWiden(v);
+}
+
+for each (var v in values) {
+ checkNumberWiden(v);
+}
+
+for each (var v in values) {
+ checkObjectWiden(v);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8079145.js.EXPECTED Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,48 @@
+int array: check widen for [object Object]
+int array: check widen for null
+int array: check widen for undefined
+int array: check widen for false [class java.lang.Boolean]
+int array: check widen for true [class java.lang.Boolean]
+int array: check widen for 34 [class java.lang.Byte]
+int array: check widen for 344454 [class java.lang.Integer]
+int array: check widen for 454545 [class java.lang.Long]
+int array: check widen for 2147483648 [class java.lang.Long]
+int array: check widen for 34.29999923706055 [class java.lang.Float]
+int array: check widen for 3.141592653589793 [class java.lang.Double]
+int array: check widen for s
+long array: check widen for [object Object]
+long array: check widen for null
+long array: check widen for undefined
+long array: check widen for false [class java.lang.Boolean]
+long array: check widen for true [class java.lang.Boolean]
+long array: check widen for 34 [class java.lang.Byte]
+long array: check widen for 344454 [class java.lang.Integer]
+long array: check widen for 454545 [class java.lang.Long]
+long array: check widen for 2147483648 [class java.lang.Long]
+long array: check widen for 34.29999923706055 [class java.lang.Float]
+long array: check widen for 3.141592653589793 [class java.lang.Double]
+long array: check widen for s
+number array: check widen for [object Object]
+number array: check widen for null
+number array: check widen for undefined
+number array: check widen for false [class java.lang.Boolean]
+number array: check widen for true [class java.lang.Boolean]
+number array: check widen for 34 [class java.lang.Byte]
+number array: check widen for 344454 [class java.lang.Integer]
+number array: check widen for 454545 [class java.lang.Long]
+number array: check widen for 2147483648 [class java.lang.Long]
+number array: check widen for 34.29999923706055 [class java.lang.Float]
+number array: check widen for 3.141592653589793 [class java.lang.Double]
+number array: check widen for s
+object array: check widen for [object Object]
+object array: check widen for null
+object array: check widen for undefined
+object array: check widen for false [class java.lang.Boolean]
+object array: check widen for true [class java.lang.Boolean]
+object array: check widen for 34 [class java.lang.Byte]
+object array: check widen for 344454 [class java.lang.Integer]
+object array: check widen for 454545 [class java.lang.Long]
+object array: check widen for 2147483648 [class java.lang.Long]
+object array: check widen for 34.29999923706055 [class java.lang.Float]
+object array: check widen for 3.141592653589793 [class java.lang.Double]
+object array: check widen for s
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8079424.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8079424: code generator for discarded boolean logical operation has an extra pop
+ *
+ * @test
+ * @run
+ */
+
+// If the compiler manages to compile all of these, the test passes.
+void (true && true);
+void (true && false);
+void (false && true);
+void (false && false);
+
+void (true || true);
+void (true || false);
+void (false || true);
+void (false || false);
+
+void (1 && 1);
+void (1 && 0);
+void (0 && 1);
+void (0 && 0);
+
+void (1 || 1);
+void (1 || 0);
+void (0 || 1);
+void (0 || 0);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8080848.js Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8080848: delete of bound Java method property results in crash
+ *
+ * @test
+ * @run
+ */
+
+var obj = Object.bindProperties({}, new java.io.File("."));
+
+delete obj.wait;
+
+if (typeof obj.wait != 'undefined') {
+ throw new Error("obj.wait was not deleted");
+}
--- a/nashorn/test/script/nosecurity/JDK-8050964.js Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/test/script/nosecurity/JDK-8050964.js Fri May 29 12:49:31 2015 +0200
@@ -47,9 +47,9 @@
}
var javahome = System.getProperty("java.home");
-var jdepsPath = javahome + "/../bin/jdeps".replaceAll(/\//g, File.separater);
+var jdepsPath = javahome + "/../bin/jdeps".replace(/\//g, File.separator);
if (! new File(jdepsPath).isFile()) {
- jdepsPath = javahome + "/bin/jdeps".replaceAll(/\//g, File.separater);
+ jdepsPath = javahome + "/bin/jdeps".replace(/\//g, File.separator);
}
// run jdep on nashorn.jar - only summary but print profile info
--- a/nashorn/test/script/nosecurity/JDK-8055034.js Fri May 22 09:14:18 2015 +0200
+++ b/nashorn/test/script/nosecurity/JDK-8055034.js Fri May 29 12:49:31 2015 +0200
@@ -46,10 +46,10 @@
// we want to use nashorn.jar passed and not the one that comes with JRE
var jjsCmd = javahome + "/../bin/jjs";
-jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater);
+jjsCmd = jjsCmd.toString().replace(/\//g, File.separator);
if (! new File(jjsCmd).isFile()) {
jjsCmd = javahome + "/bin/jjs";
- jjsCmd = jjsCmd.toString().replaceAll(/\//g, File.separater);
+ jjsCmd = jjsCmd.toString().replace(/\//g, File.separator);
}
jjsCmd += " -J-Xbootclasspath/p:" + nashornJar;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/src/jdk/nashorn/internal/runtime/test/JDK_8078414_Test.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.nashorn.internal.runtime.test;
+
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Map;
+import javax.script.Bindings;
+import jdk.nashorn.api.scripting.JSObject;
+import jdk.nashorn.api.scripting.ScriptObjectMirror;
+import jdk.nashorn.internal.objects.NativeArray;
+import jdk.nashorn.internal.runtime.ScriptObject;
+import jdk.nashorn.internal.runtime.linker.Bootstrap;
+import org.testng.annotations.Test;
+
+/**
+ * @test
+ * @bug 8078414
+ * @summary Test that arbitrary classes can't be converted to mirror's superclasses/interfaces.
+ * @run testng jdk.nashorn.internal.runtime.test.JDK_8078414_Test
+ */
+public class JDK_8078414_Test {
+ @Test
+ public void testCanNotConvertArbitraryClassToMirror() {
+ assertCanNotConvert(Double.class, Map.class);
+ assertCanNotConvert(Double.class, Bindings.class);
+ assertCanNotConvert(Double.class, JSObject.class);
+ assertCanNotConvert(Double.class, ScriptObjectMirror.class);
+ }
+
+ @Test
+ public void testCanConvertObjectToMirror() {
+ assertCanConvertToMirror(Object.class);
+ }
+
+ @Test
+ public void testCanConvertScriptObjectToMirror() {
+ assertCanConvertToMirror(ScriptObject.class);
+ }
+
+ @Test
+ public void testCanConvertScriptObjectSubclassToMirror() {
+ assertCanConvertToMirror(NativeArray.class);
+ }
+
+ @Test
+ public void testCanConvertArbitraryInterfaceToMirror() {
+ // We allow arbitrary interface classes, depending on what implements them, to end up being
+ // convertible to ScriptObjectMirror, as an implementation can theoretically pass an
+ // "instanceof ScriptObject" guard.
+ assertCanConvertToMirror(TestInterface.class);
+ }
+
+ public static interface TestInterface {
+ }
+
+ private static boolean canConvert(final Class<?> from, final Class<?> to) {
+ return Bootstrap.getLinkerServices().canConvert(from, to);
+ }
+
+ private static void assertCanConvert(final Class<?> from, final Class<?> to) {
+ assertTrue(canConvert(from, to));
+ }
+
+ private static void assertCanNotConvert(final Class<?> from, final Class<?> to) {
+ assertFalse(canConvert(from, to));
+ }
+
+ private static void assertCanConvertToMirror(final Class<?> from) {
+ assertCanConvert(from, Map.class);
+ assertCanConvert(from, Bindings.class);
+ assertCanConvert(from, JSObject.class);
+ assertCanConvert(from, ScriptObjectMirror.class);
+ }
+}
--- a/test/lib/Makefile Fri May 22 09:14:18 2015 +0200
+++ b/test/lib/Makefile Fri May 29 12:49:31 2015 +0200
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -41,25 +41,38 @@
JAVAC = $(JDK_HOME)/bin/javac
JAR = $(JDK_HOME)/bin/jar
-SRC_FILES = $(shell find $(SRC_DIR) -name '*.java')
+WB_SRC_FILES = $(shell find $(SRC_DIR)/sun/hotspot -name '*.java')
+SHARE_SRC_FILES = $(shell find $(SRC_DIR)/share/classes -name '*.java')
-.PHONY: filelist clean cleantmp
+.PHONY: wb.filelist share.filelist clean cleantmp
-all: wb.jar cleantmp
+all: wb.jar test-lib.jar cleantmp
-wb.jar: filelist
+wb.jar: wb.filelist
@mkdir -p $(OUTPUT_DIR)
- $(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp $(OUTPUT_DIR) @filelist
+ $(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp $(OUTPUT_DIR) @wb.filelist
$(JAR) cf wb.jar -C $(OUTPUT_DIR) .
@rm -rf $(OUTPUT_DIR)
-filelist: $(SRC_FILES)
+wb.filelist: $(WB_SRC_FILES)
@rm -f $@
- @echo $(SRC_FILES) > $@
+ @echo $(WB_SRC_FILES) > $@
+
+test-lib.jar: share.filelist
+ @mkdir -p $(OUTPUT_DIR)
+ $(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp $(OUTPUT_DIR) @share.filelist
+ $(JAR) cf test-lib.jar -C $(OUTPUT_DIR) .
+ @rm -rf $(OUTPUT_DIR)
+
+share.filelist: $(SHARE_SRC_FILES)
+ @rm -f $@
+ @echo $(SHARE_SRC_FILES) > $@
clean: cleantmp
@rm -rf wb.jar
+ @rm -rf test-list.jar
cleantmp:
- @rm -rf filelist
+ @rm -rf wb.filelist
+ @rm -rf share.filelist
@rm -rf $(BUILD_DIR)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/HprofParser.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.hprof;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+
+import jdk.test.lib.hprof.model.Snapshot;
+import jdk.test.lib.hprof.parser.Reader;
+
+/**
+ * Helper class to parse a java heap dump file.
+ */
+public class HprofParser {
+
+ public static void main(String[] args) throws Exception {
+ if (args.length < 1) {
+ System.out.println("No arguments supplied");
+ }
+ File dump = new File(args[0]);
+ if (!dump.exists() || !dump.isFile()) {
+ throw new RuntimeException("The dump file does not exist or not a file");
+ }
+ parse(dump);
+ }
+
+ /**
+ * @see #parse(File, boolean, boolean, boolean)
+ */
+ public static File parse(File dump) throws Exception {
+ return parse(dump, false, true, true);
+ }
+
+ /**
+ * @see #parse(File, boolean, boolean, boolean)
+ */
+ public static File parseWithDebugInfo(File dump) throws Exception {
+ return parse(dump, true, true, true);
+ }
+
+ /**
+ * Parse a java heap dump file
+ *
+ * @param dump Heap dump file to parse
+ * @param debug Turn on/off debug file parsing
+ * @param callStack Turn on/off tracking of object allocation call stack
+ * @param calculateRefs Turn on/off tracking object allocation call stack
+ * @throws Exception
+ * @return File containing output from the parser
+ */
+ public static File parse(File dump, boolean debug, boolean callStack, boolean calculateRefs) throws Exception {
+ File out = new File("hprof." + System.currentTimeMillis() + ".out");
+ if (out.exists()) {
+ out.delete();
+ }
+
+ PrintStream psSystemOut = System.out;
+ try (PrintStream psHprof = new PrintStream(new BufferedOutputStream(new FileOutputStream(out.getAbsolutePath())))) {
+ System.setOut(psHprof);
+
+ int debugLevel = debug ? 2 : 0;
+ try (Snapshot snapshot = Reader.readFile(dump.getAbsolutePath(), callStack, debugLevel)) {
+ System.out.println("Snapshot read, resolving...");
+ snapshot.resolve(calculateRefs);
+ System.out.println("Snapshot resolved.");
+ }
+ } finally {
+ System.setOut(psSystemOut);
+ }
+
+ return out;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/README Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,13 @@
+The jhat tool has been removed. jhat hprof file parser/validator
+are needed for tests. The old packages for jhat were moved here:
+com.sun.tools.hat.internal.model -> jdk.test.lib.hprof.model
+com.sun.tools.hat.internal.parser -> jdk.test.lib.hprof.parser
+com.sun.tools.hat.internal.util -> jdk.test.lib.hprof.util
+
+jhat was added in JDK 6 and its original implementation was from
+java.net HAT project [1]. jhat is an experimental, unsupported tool.
+There hasn't been much update to jhat tool in the JDK. In addition,
+there are several better heap dump visualizer/analyzer emerged since
+JDK 5/6 serviceability support.
+
+[1] https://java.net/projects/hat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * A visitor for a JavaThing. @see JavaObject#visitReferencedObjects()
+ *
+ */
+
+
+abstract public class AbstractJavaHeapObjectVisitor
+ implements JavaHeapObjectVisitor {
+ abstract public void visit(JavaHeapObject other);
+
+ /**
+ * Should the given field be excluded from the set of things visited?
+ * @return true if it should.
+ */
+ public boolean exclude(JavaClass clazz, JavaField f) {
+ return false;
+ }
+
+ /**
+ * @return true iff exclude might ever return true
+ */
+ public boolean mightExclude() {
+ return false;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/ArrayTypeCodes.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Primitive array type codes as defined by VM specification.
+ *
+ */
+public interface ArrayTypeCodes {
+ // Typecodes for array elements.
+ // Refer to newarray instruction in VM Spec.
+ public static final int T_BOOLEAN = 4;
+ public static final int T_CHAR = 5;
+ public static final int T_FLOAT = 6;
+ public static final int T_DOUBLE = 7;
+ public static final int T_BYTE = 8;
+ public static final int T_SHORT = 9;
+ public static final int T_INT = 10;
+ public static final int T_LONG = 11;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/HackJavaValue.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * This is used to represent values that the program doesn't really understand.
+ * This includes the null vlaue, and unresolved references (which shouldn't
+ * happen in well-formed hprof files).
+ *
+ *
+ * @author Bill Foote
+ */
+
+
+
+
+public class HackJavaValue extends JavaValue {
+
+ private String value;
+ private int size;
+
+ public HackJavaValue(String value, int size) {
+ this.value = value;
+ this.size = size;
+ }
+
+ public String toString() {
+ return value;
+ }
+
+ public int getSize() {
+ return size;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaBoolean.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a boolean (i.e. a boolean field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaBoolean extends JavaValue {
+
+ boolean value;
+
+ public JavaBoolean(boolean value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "" + value;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaByte.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents an byte (i.e. a byte field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaByte extends JavaValue {
+
+ byte value;
+
+ public JavaByte(byte value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "0x" + Integer.toString(((int) value) & 0xff, 16);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaChar.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a char (i.e. a char field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaChar extends JavaValue {
+
+ char value;
+
+ public JavaChar(char value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "" + value;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaClass.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,503 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.util.Vector;
+import java.util.Enumeration;
+import jdk.test.lib.hprof.util.CompositeEnumeration;
+import jdk.test.lib.hprof.parser.ReadBuffer;
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaClass extends JavaHeapObject {
+ // my id
+ private long id;
+ // my name
+ private String name;
+
+ // These are JavaObjectRef before resolve
+ private JavaThing superclass;
+ private JavaThing loader;
+ private JavaThing signers;
+ private JavaThing protectionDomain;
+
+ // non-static fields
+ private JavaField[] fields;
+ // static fields
+ private JavaStatic[] statics;
+
+ private static final JavaClass[] EMPTY_CLASS_ARRAY = new JavaClass[0];
+ // my subclasses
+ private JavaClass[] subclasses = EMPTY_CLASS_ARRAY;
+
+ // my instances
+ private Vector<JavaHeapObject> instances = new Vector<JavaHeapObject>();
+
+ // Who I belong to. Set on resolve.
+ private Snapshot mySnapshot;
+
+ // Size of an instance, including VM overhead
+ private int instanceSize;
+ // Total number of fields including inherited ones
+ private int totalNumFields;
+
+
+ public JavaClass(long id, String name, long superclassId, long loaderId,
+ long signersId, long protDomainId,
+ JavaField[] fields, JavaStatic[] statics,
+ int instanceSize) {
+ this.id = id;
+ this.name = name;
+ this.superclass = new JavaObjectRef(superclassId);
+ this.loader = new JavaObjectRef(loaderId);
+ this.signers = new JavaObjectRef(signersId);
+ this.protectionDomain = new JavaObjectRef(protDomainId);
+ this.fields = fields;
+ this.statics = statics;
+ this.instanceSize = instanceSize;
+ }
+
+ public JavaClass(String name, long superclassId, long loaderId,
+ long signersId, long protDomainId,
+ JavaField[] fields, JavaStatic[] statics,
+ int instanceSize) {
+ this(-1L, name, superclassId, loaderId, signersId,
+ protDomainId, fields, statics, instanceSize);
+ }
+
+ public final JavaClass getClazz() {
+ return mySnapshot.getJavaLangClass();
+ }
+
+ public final int getIdentifierSize() {
+ return mySnapshot.getIdentifierSize();
+ }
+
+ public final int getMinimumObjectSize() {
+ return mySnapshot.getMinimumObjectSize();
+ }
+
+ public void resolve(Snapshot snapshot) {
+ if (mySnapshot != null) {
+ return;
+ }
+ mySnapshot = snapshot;
+ resolveSuperclass(snapshot);
+ if (superclass != null) {
+ ((JavaClass) superclass).addSubclass(this);
+ }
+
+ loader = loader.dereference(snapshot, null);
+ signers = signers.dereference(snapshot, null);
+ protectionDomain = protectionDomain.dereference(snapshot, null);
+
+ for (int i = 0; i < statics.length; i++) {
+ statics[i].resolve(this, snapshot);
+ }
+ snapshot.getJavaLangClass().addInstance(this);
+ super.resolve(snapshot);
+ return;
+ }
+
+ /**
+ * Resolve our superclass. This might be called well before
+ * all instances are available (like when reading deferred
+ * instances in a 1.2 dump file :-) Calling this is sufficient
+ * to be able to explore this class' fields.
+ */
+ public void resolveSuperclass(Snapshot snapshot) {
+ if (superclass == null) {
+ // We must be java.lang.Object, so we have no superclass.
+ } else {
+ totalNumFields = fields.length;
+ superclass = superclass.dereference(snapshot, null);
+ if (superclass == snapshot.getNullThing()) {
+ superclass = null;
+ } else {
+ try {
+ JavaClass sc = (JavaClass) superclass;
+ sc.resolveSuperclass(snapshot);
+ totalNumFields += sc.totalNumFields;
+ } catch (ClassCastException ex) {
+ System.out.println("Warning! Superclass of " + name + " is " + superclass);
+ superclass = null;
+ }
+ }
+ }
+ }
+
+ public boolean isString() {
+ return mySnapshot.getJavaLangString() == this;
+ }
+
+ public boolean isClassLoader() {
+ return mySnapshot.getJavaLangClassLoader().isAssignableFrom(this);
+ }
+
+ /**
+ * Get a numbered field from this class
+ */
+ public JavaField getField(int i) {
+ if (i < 0 || i >= fields.length) {
+ throw new Error("No field " + i + " for " + name);
+ }
+ return fields[i];
+ }
+
+ /**
+ * Get the total number of fields that are part of an instance of
+ * this class. That is, include superclasses.
+ */
+ public int getNumFieldsForInstance() {
+ return totalNumFields;
+ }
+
+ /**
+ * Get a numbered field from all the fields that are part of instance
+ * of this class. That is, include superclasses.
+ */
+ public JavaField getFieldForInstance(int i) {
+ if (superclass != null) {
+ JavaClass sc = (JavaClass) superclass;
+ if (i < sc.totalNumFields) {
+ return sc.getFieldForInstance(i);
+ }
+ i -= sc.totalNumFields;
+ }
+ return getField(i);
+ }
+
+ /**
+ * Get the class responsible for field i, where i is a field number that
+ * could be passed into getFieldForInstance.
+ *
+ * @see JavaClass.getFieldForInstance()
+ */
+ public JavaClass getClassForField(int i) {
+ if (superclass != null) {
+ JavaClass sc = (JavaClass) superclass;
+ if (i < sc.totalNumFields) {
+ return sc.getClassForField(i);
+ }
+ }
+ return this;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public boolean isArray() {
+ return name.indexOf('[') != -1;
+ }
+
+ public Enumeration<JavaHeapObject> getInstances(boolean includeSubclasses) {
+ if (includeSubclasses) {
+ Enumeration<JavaHeapObject> res = instances.elements();
+ for (int i = 0; i < subclasses.length; i++) {
+ res = new CompositeEnumeration(res,
+ subclasses[i].getInstances(true));
+ }
+ return res;
+ } else {
+ return instances.elements();
+ }
+ }
+
+ /**
+ * @return a count of the instances of this class
+ */
+ public int getInstancesCount(boolean includeSubclasses) {
+ int result = instances.size();
+ if (includeSubclasses) {
+ for (int i = 0; i < subclasses.length; i++) {
+ result += subclasses[i].getInstancesCount(includeSubclasses);
+ }
+ }
+ return result;
+ }
+
+ public JavaClass[] getSubclasses() {
+ return subclasses;
+ }
+
+ /**
+ * This can only safely be called after resolve()
+ */
+ public JavaClass getSuperclass() {
+ return (JavaClass) superclass;
+ }
+
+ /**
+ * This can only safely be called after resolve()
+ */
+ public JavaThing getLoader() {
+ return loader;
+ }
+
+ /**
+ * This can only safely be called after resolve()
+ */
+ public boolean isBootstrap() {
+ return loader == mySnapshot.getNullThing();
+ }
+
+ /**
+ * This can only safely be called after resolve()
+ */
+ public JavaThing getSigners() {
+ return signers;
+ }
+
+ /**
+ * This can only safely be called after resolve()
+ */
+ public JavaThing getProtectionDomain() {
+ return protectionDomain;
+ }
+
+ public JavaField[] getFields() {
+ return fields;
+ }
+
+ /**
+ * Includes superclass fields
+ */
+ public JavaField[] getFieldsForInstance() {
+ Vector<JavaField> v = new Vector<JavaField>();
+ addFields(v);
+ JavaField[] result = new JavaField[v.size()];
+ for (int i = 0; i < v.size(); i++) {
+ result[i] = v.elementAt(i);
+ }
+ return result;
+ }
+
+
+ public JavaStatic[] getStatics() {
+ return statics;
+ }
+
+ // returns value of static field of given name
+ public JavaThing getStaticField(String name) {
+ for (int i = 0; i < statics.length; i++) {
+ JavaStatic s = statics[i];
+ if (s.getField().getName().equals(name)) {
+ return s.getValue();
+ }
+ }
+ return null;
+ }
+
+ public String toString() {
+ return "class " + name;
+ }
+
+ public int compareTo(JavaThing other) {
+ if (other instanceof JavaClass) {
+ return name.compareTo(((JavaClass) other).name);
+ }
+ return super.compareTo(other);
+ }
+
+
+ /**
+ * @return true iff a variable of type this is assignable from an instance
+ * of other
+ */
+ public boolean isAssignableFrom(JavaClass other) {
+ if (this == other) {
+ return true;
+ } else if (other == null) {
+ return false;
+ } else {
+ return isAssignableFrom((JavaClass) other.superclass);
+ // Trivial tail recursion: I have faith in javac.
+ }
+ }
+
+ /**
+ * Describe the reference that this thing has to target. This will only
+ * be called if target is in the array returned by getChildrenForRootset.
+ */
+ public String describeReferenceTo(JavaThing target, Snapshot ss) {
+ for (int i = 0; i < statics.length; i++) {
+ JavaField f = statics[i].getField();
+ if (f.hasId()) {
+ JavaThing other = statics[i].getValue();
+ if (other == target) {
+ return "static field " + f.getName();
+ }
+ }
+ }
+ return super.describeReferenceTo(target, ss);
+ }
+
+ /**
+ * @return the size of an instance of this class. Gives 0 for an array
+ * type.
+ */
+ public int getInstanceSize() {
+ return instanceSize + mySnapshot.getMinimumObjectSize();
+ }
+
+
+ /**
+ * @return The size of all instances of this class. Correctly handles
+ * arrays.
+ */
+ public long getTotalInstanceSize() {
+ int count = instances.size();
+ if (count == 0 || !isArray()) {
+ return count * instanceSize;
+ }
+
+ // array class and non-zero count, we have to
+ // get the size of each instance and sum it
+ long result = 0;
+ for (int i = 0; i < count; i++) {
+ JavaThing t = (JavaThing) instances.elementAt(i);
+ result += t.getSize();
+ }
+ return result;
+ }
+
+ /**
+ * @return the size of this object
+ */
+ public int getSize() {
+ JavaClass cl = mySnapshot.getJavaLangClass();
+ if (cl == null) {
+ return 0;
+ } else {
+ return cl.getInstanceSize();
+ }
+ }
+
+ public void visitReferencedObjects(JavaHeapObjectVisitor v) {
+ super.visitReferencedObjects(v);
+ JavaHeapObject sc = getSuperclass();
+ if (sc != null) v.visit(getSuperclass());
+
+ JavaThing other;
+ other = getLoader();
+ if (other instanceof JavaHeapObject) {
+ v.visit((JavaHeapObject)other);
+ }
+ other = getSigners();
+ if (other instanceof JavaHeapObject) {
+ v.visit((JavaHeapObject)other);
+ }
+ other = getProtectionDomain();
+ if (other instanceof JavaHeapObject) {
+ v.visit((JavaHeapObject)other);
+ }
+
+ for (int i = 0; i < statics.length; i++) {
+ JavaField f = statics[i].getField();
+ if (!v.exclude(this, f) && f.hasId()) {
+ other = statics[i].getValue();
+ if (other instanceof JavaHeapObject) {
+ v.visit((JavaHeapObject) other);
+ }
+ }
+ }
+ }
+
+ // package-privates below this point
+ final ReadBuffer getReadBuffer() {
+ return mySnapshot.getReadBuffer();
+ }
+
+ final void setNew(JavaHeapObject obj, boolean flag) {
+ mySnapshot.setNew(obj, flag);
+ }
+
+ final boolean isNew(JavaHeapObject obj) {
+ return mySnapshot.isNew(obj);
+ }
+
+ final StackTrace getSiteTrace(JavaHeapObject obj) {
+ return mySnapshot.getSiteTrace(obj);
+ }
+
+ final void addReferenceFromRoot(Root root, JavaHeapObject obj) {
+ mySnapshot.addReferenceFromRoot(root, obj);
+ }
+
+ final Root getRoot(JavaHeapObject obj) {
+ return mySnapshot.getRoot(obj);
+ }
+
+ final Snapshot getSnapshot() {
+ return mySnapshot;
+ }
+
+ void addInstance(JavaHeapObject inst) {
+ instances.addElement(inst);
+ }
+
+ // Internals only below this point
+ private void addFields(Vector<JavaField> v) {
+ if (superclass != null) {
+ ((JavaClass) superclass).addFields(v);
+ }
+ for (int i = 0; i < fields.length; i++) {
+ v.addElement(fields[i]);
+ }
+ }
+
+ private void addSubclassInstances(Vector<JavaHeapObject> v) {
+ for (int i = 0; i < subclasses.length; i++) {
+ subclasses[i].addSubclassInstances(v);
+ }
+ for (int i = 0; i < instances.size(); i++) {
+ v.addElement(instances.elementAt(i));
+ }
+ }
+
+ private void addSubclass(JavaClass sub) {
+ JavaClass newValue[] = new JavaClass[subclasses.length + 1];
+ System.arraycopy(subclasses, 0, newValue, 0, subclasses.length);
+ newValue[subclasses.length] = sub;
+ subclasses = newValue;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaDouble.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a double (i.e. a double field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaDouble extends JavaValue {
+
+ double value;
+
+ public JavaDouble(double value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return Double.toString(value);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaField.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+public class JavaField {
+
+ private String name;
+ private String signature;
+
+ public JavaField(String name, String signature) {
+ this.name = name;
+ this.signature = signature;
+ }
+
+
+ /**
+ * @return true if the type of this field is something that has an ID.
+ * int fields, for exampe, don't.
+ */
+ public boolean hasId() {
+ char ch = signature.charAt(0);
+ return (ch == '[' || ch == 'L');
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getSignature() {
+ return signature;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaFloat.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a float (i.e. a float field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaFloat extends JavaValue {
+
+ float value;
+
+ public JavaFloat(float value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return Float.toString(value);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObject.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import jdk.test.lib.hprof.util.Misc;
+
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+/**
+ * Represents an object that's allocated out of the Java heap. It occupies
+ * memory in the VM, and is the sort of thing that in a JDK 1.1 VM had
+ * a handle. It can be a
+ * JavaClass, a JavaObjectArray, a JavaValueArray or a JavaObject.
+ */
+
+public abstract class JavaHeapObject extends JavaThing {
+
+ //
+ // Who we refer to. This is heavily optimized for space, because it's
+ // well worth trading a bit of speed for less swapping.
+ // referers and referersLen go through two phases: Building and
+ // resolved. When building, referers might have duplicates, but can
+ // be appended to. When resolved, referers has no duplicates or
+ // empty slots.
+ //
+ private JavaThing[] referers = null;
+ private int referersLen = 0; // -1 when resolved
+
+ public abstract JavaClass getClazz();
+ public abstract int getSize();
+ public abstract long getId();
+
+ /**
+ * Do any initialization this thing needs after its data is read in.
+ * Subclasses that override this should call super.resolve().
+ */
+ public void resolve(Snapshot snapshot) {
+ StackTrace trace = snapshot.getSiteTrace(this);
+ if (trace != null) {
+ trace.resolve(snapshot);
+ }
+ }
+
+ //
+ // Eliminate duplicates from referers, and size the array exactly.
+ // This sets us up to answer queries. See the comments around the
+ // referers data member for details.
+ //
+ void setupReferers() {
+ if (referersLen > 1) {
+ // Copy referers to map, screening out duplicates
+ Map<JavaThing, JavaThing> map = new HashMap<JavaThing, JavaThing>();
+ for (int i = 0; i < referersLen; i++) {
+ if (map.get(referers[i]) == null) {
+ map.put(referers[i], referers[i]);
+ }
+ }
+
+ // Now copy into the array
+ referers = new JavaThing[map.size()];
+ map.keySet().toArray(referers);
+ }
+ referersLen = -1;
+ }
+
+
+ /**
+ * @return the id of this thing as hex string
+ */
+ public String getIdString() {
+ return Misc.toHex(getId());
+ }
+
+ public String toString() {
+ return getClazz().getName() + "@" + getIdString();
+ }
+
+ /**
+ * @return the StackTrace of the point of allocation of this object,
+ * or null if unknown
+ */
+ public StackTrace getAllocatedFrom() {
+ return getClazz().getSiteTrace(this);
+ }
+
+ public boolean isNew() {
+ return getClazz().isNew(this);
+ }
+
+ void setNew(boolean flag) {
+ getClazz().setNew(this, flag);
+ }
+
+ /**
+ * Tell the visitor about all of the objects we refer to
+ */
+ public void visitReferencedObjects(JavaHeapObjectVisitor v) {
+ v.visit(getClazz());
+ }
+
+ void addReferenceFrom(JavaHeapObject other) {
+ if (referersLen == 0) {
+ referers = new JavaThing[1]; // It was null
+ } else if (referersLen == referers.length) {
+ JavaThing[] copy = new JavaThing[(3 * (referersLen + 1)) / 2];
+ System.arraycopy(referers, 0, copy, 0, referersLen);
+ referers = copy;
+ }
+ referers[referersLen++] = other;
+ // We just append to referers here. Measurements have shown that
+ // around 10% to 30% are duplicates, so it's better to just append
+ // blindly and screen out all the duplicates at once.
+ }
+
+ void addReferenceFromRoot(Root r) {
+ getClazz().addReferenceFromRoot(r, this);
+ }
+
+ /**
+ * If the rootset includes this object, return a Root describing one
+ * of the reasons why.
+ */
+ public Root getRoot() {
+ return getClazz().getRoot(this);
+ }
+
+ /**
+ * Tell who refers to us.
+ *
+ * @return an Enumeration of JavaHeapObject instances
+ */
+ public Enumeration<JavaThing> getReferers() {
+ if (referersLen != -1) {
+ throw new RuntimeException("not resolved: " + getIdString());
+ }
+ return new Enumeration<JavaThing>() {
+
+ private int num = 0;
+
+ public boolean hasMoreElements() {
+ return referers != null && num < referers.length;
+ }
+
+ public JavaThing nextElement() {
+ return referers[num++];
+ }
+ };
+ }
+
+ /**
+ * Given other, which the caller promises is in referers, determines if
+ * the reference is only a weak reference.
+ */
+ public boolean refersOnlyWeaklyTo(Snapshot ss, JavaThing other) {
+ return false;
+ }
+
+ /**
+ * Describe the reference that this thing has to target. This will only
+ * be called if target is in the array returned by getChildrenForRootset.
+ */
+ public String describeReferenceTo(JavaThing target, Snapshot ss) {
+ return "??";
+ }
+
+ public boolean isHeapAllocated() {
+ return true;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * A visitor for a JavaThing. @see JavaObject#visitReferencedObjects()
+ *
+ * @author Bill Foote
+ */
+
+
+public interface JavaHeapObjectVisitor {
+ public void visit(JavaHeapObject other);
+
+ /**
+ * Should the given field be excluded from the set of things visited?
+ * @return true if it should.
+ */
+ public boolean exclude(JavaClass clazz, JavaField f);
+
+ /**
+ * @return true iff exclude might ever return true
+ */
+ public boolean mightExclude();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents an integer (i.e. an int field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaInt extends JavaValue {
+
+ int value;
+
+ public JavaInt(int value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "" + value;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaLazyReadObject.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.io.IOException;
+import jdk.test.lib.hprof.parser.ReadBuffer;
+
+/*
+ * Base class for lazily read Java heap objects.
+ */
+public abstract class JavaLazyReadObject extends JavaHeapObject {
+
+ // file offset from which this object data starts
+ private final long offset;
+
+ protected JavaLazyReadObject(long offset) {
+ this.offset = offset;
+ }
+
+ public final int getSize() {
+ return getValueLength() + getClazz().getMinimumObjectSize();
+ }
+
+ protected final long getOffset() {
+ return offset;
+ }
+
+ // return the length of the data for this object
+ protected final int getValueLength() {
+ try {
+ return readValueLength();
+ } catch (IOException exp) {
+ System.err.println("lazy read failed at offset " + offset);
+ exp.printStackTrace();
+ return 0;
+ }
+ }
+
+ // get this object's content as byte array
+ protected final byte[] getValue() {
+ try {
+ return readValue();
+ } catch (IOException exp) {
+ System.err.println("lazy read failed at offset " + offset);
+ exp.printStackTrace();
+ return Snapshot.EMPTY_BYTE_ARRAY;
+ }
+ }
+
+ // get ID of this object
+ public final long getId() {
+ try {
+ ReadBuffer buf = getClazz().getReadBuffer();
+ int idSize = getClazz().getIdentifierSize();
+ if (idSize == 4) {
+ return ((long)buf.getInt(offset)) & Snapshot.SMALL_ID_MASK;
+ } else {
+ return buf.getLong(offset);
+ }
+ } catch (IOException exp) {
+ System.err.println("lazy read failed at offset " + offset);
+ exp.printStackTrace();
+ return -1;
+ }
+ }
+
+ protected abstract int readValueLength() throws IOException;
+ protected abstract byte[] readValue() throws IOException;
+
+ // make Integer or Long for given object ID
+ protected static Number makeId(long id) {
+ if ((id & ~Snapshot.SMALL_ID_MASK) == 0) {
+ return (int)id;
+ } else {
+ return id;
+ }
+ }
+
+ // get ID as long value from Number
+ protected static long getIdValue(Number num) {
+ long id = num.longValue();
+ if (num instanceof Integer) {
+ id &= Snapshot.SMALL_ID_MASK;
+ }
+ return id;
+ }
+
+ // read object ID from given index from given byte array
+ protected final long objectIdAt(int index, byte[] data) {
+ int idSize = getClazz().getIdentifierSize();
+ if (idSize == 4) {
+ return ((long)intAt(index, data)) & Snapshot.SMALL_ID_MASK;
+ } else {
+ return longAt(index, data);
+ }
+ }
+
+ // utility methods to read primitive types from byte array
+ protected static byte byteAt(int index, byte[] value) {
+ return value[index];
+ }
+
+ protected static boolean booleanAt(int index, byte[] value) {
+ return (value[index] & 0xff) == 0? false: true;
+ }
+
+ protected static char charAt(int index, byte[] value) {
+ int b1 = ((int) value[index++] & 0xff);
+ int b2 = ((int) value[index++] & 0xff);
+ return (char) ((b1 << 8) + b2);
+ }
+
+ protected static short shortAt(int index, byte[] value) {
+ int b1 = ((int) value[index++] & 0xff);
+ int b2 = ((int) value[index++] & 0xff);
+ return (short) ((b1 << 8) + b2);
+ }
+
+ protected static int intAt(int index, byte[] value) {
+ int b1 = ((int) value[index++] & 0xff);
+ int b2 = ((int) value[index++] & 0xff);
+ int b3 = ((int) value[index++] & 0xff);
+ int b4 = ((int) value[index++] & 0xff);
+ return ((b1 << 24) + (b2 << 16) + (b3 << 8) + b4);
+ }
+
+ protected static long longAt(int index, byte[] value) {
+ long val = 0;
+ for (int j = 0; j < 8; j++) {
+ val = val << 8;
+ int b = ((int)value[index++]) & 0xff;
+ val |= b;
+ }
+ return val;
+ }
+
+ protected static float floatAt(int index, byte[] value) {
+ int val = intAt(index, value);
+ return Float.intBitsToFloat(val);
+ }
+
+ protected static double doubleAt(int index, byte[] value) {
+ long val = longAt(index, value);
+ return Double.longBitsToDouble(val);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaLong.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a long (i.e. a long field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaLong extends JavaValue {
+
+ long value;
+
+ public JavaLong(long value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return Long.toString(value);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObject.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,334 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.io.IOException;
+import jdk.test.lib.hprof.parser.ReadBuffer;
+
+/**
+ * Represents Java instance
+ *
+ * @author Bill Foote
+ */
+public class JavaObject extends JavaLazyReadObject {
+
+ private Object clazz; // Number before resolve
+ // JavaClass after resolve
+ /**
+ * Construct a new JavaObject.
+ *
+ * @param classID id of the class object
+ * @param offset The offset of field data
+ */
+ public JavaObject(long classID, long offset) {
+ super(offset);
+ this.clazz = makeId(classID);
+ }
+
+ public void resolve(Snapshot snapshot) {
+ if (clazz instanceof JavaClass) {
+ return;
+ }
+ if (clazz instanceof Number) {
+ long classID = getIdValue((Number)clazz);
+ clazz = snapshot.findThing(classID);
+ if (! (clazz instanceof JavaClass)) {
+ warn("Class " + Long.toHexString(classID) + " not found, " +
+ "adding fake class!");
+ int length;
+ ReadBuffer buf = snapshot.getReadBuffer();
+ int idSize = snapshot.getIdentifierSize();
+ long lenOffset = getOffset() + 2*idSize + 4;
+ try {
+ length = buf.getInt(lenOffset);
+ } catch (IOException exp) {
+ throw new RuntimeException(exp);
+ }
+ clazz = snapshot.addFakeInstanceClass(classID, length);
+ }
+ } else {
+ throw new InternalError("should not reach here");
+ }
+
+ JavaClass cl = (JavaClass) clazz;
+ cl.resolve(snapshot);
+
+ // while resolving, parse fields in verbose mode.
+ // but, getFields calls parseFields in non-verbose mode
+ // to avoid printing warnings repeatedly.
+ parseFields(getValue(), true);
+
+ cl.addInstance(this);
+ super.resolve(snapshot);
+ }
+
+ /**
+ * Are we the same type as other? We are iff our clazz is the
+ * same type as other's.
+ */
+ public boolean isSameTypeAs(JavaThing other) {
+ if (!(other instanceof JavaObject)) {
+ return false;
+ }
+ JavaObject oo = (JavaObject) other;
+ return getClazz().equals(oo.getClazz());
+ }
+
+ /**
+ * Return our JavaClass object. This may only be called after resolve.
+ */
+ public JavaClass getClazz() {
+ return (JavaClass) clazz;
+ }
+
+ public JavaThing[] getFields() {
+ // pass false to verbose mode so that dereference
+ // warnings are not printed.
+ return parseFields(getValue(), false);
+ }
+
+ // returns the value of field of given name
+ public JavaThing getField(String name) {
+ JavaThing[] flds = getFields();
+ JavaField[] instFields = getClazz().getFieldsForInstance();
+ for (int i = 0; i < instFields.length; i++) {
+ if (instFields[i].getName().equals(name)) {
+ return flds[i];
+ }
+ }
+ return null;
+ }
+
+ public int compareTo(JavaThing other) {
+ if (other instanceof JavaObject) {
+ JavaObject oo = (JavaObject) other;
+ return getClazz().getName().compareTo(oo.getClazz().getName());
+ }
+ return super.compareTo(other);
+ }
+
+ public void visitReferencedObjects(JavaHeapObjectVisitor v) {
+ super.visitReferencedObjects(v);
+ JavaThing[] flds = getFields();
+ for (int i = 0; i < flds.length; i++) {
+ if (flds[i] != null) {
+ if (v.mightExclude()
+ && v.exclude(getClazz().getClassForField(i),
+ getClazz().getFieldForInstance(i)))
+ {
+ // skip it
+ } else if (flds[i] instanceof JavaHeapObject) {
+ v.visit((JavaHeapObject) flds[i]);
+ }
+ }
+ }
+ }
+
+ public boolean refersOnlyWeaklyTo(Snapshot ss, JavaThing other) {
+ if (ss.getWeakReferenceClass() != null) {
+ final int referentFieldIndex = ss.getReferentFieldIndex();
+ if (ss.getWeakReferenceClass().isAssignableFrom(getClazz())) {
+ //
+ // REMIND: This introduces a dependency on the JDK
+ // implementation that is undesirable.
+ JavaThing[] flds = getFields();
+ for (int i = 0; i < flds.length; i++) {
+ if (i != referentFieldIndex && flds[i] == other) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Describe the reference that this thing has to target. This will only
+ * be called if target is in the array returned by getChildrenForRootset.
+ */
+ public String describeReferenceTo(JavaThing target, Snapshot ss) {
+ JavaThing[] flds = getFields();
+ for (int i = 0; i < flds.length; i++) {
+ if (flds[i] == target) {
+ JavaField f = getClazz().getFieldForInstance(i);
+ return "field " + f.getName();
+ }
+ }
+ return super.describeReferenceTo(target, ss);
+ }
+
+ public String toString() {
+ if (getClazz().isString()) {
+ JavaThing value = getField("value");
+ if (value instanceof JavaValueArray) {
+ return ((JavaValueArray)value).valueString();
+ } else {
+ return "null";
+ }
+ } else {
+ return super.toString();
+ }
+ }
+
+ // Internals only below this point
+
+ /*
+ * Java instance record (HPROF_GC_INSTANCE_DUMP) looks as below:
+ *
+ * object ID
+ * stack trace serial number (int)
+ * class ID
+ * data length (int)
+ * byte[length]
+ */
+ protected final int readValueLength() throws IOException {
+ JavaClass cl = getClazz();
+ int idSize = cl.getIdentifierSize();
+ long lengthOffset = getOffset() + 2*idSize + 4;
+ return cl.getReadBuffer().getInt(lengthOffset);
+ }
+
+ protected final byte[] readValue() throws IOException {
+ JavaClass cl = getClazz();
+ int idSize = cl.getIdentifierSize();
+ ReadBuffer buf = cl.getReadBuffer();
+ long offset = getOffset() + 2*idSize + 4;
+ int length = buf.getInt(offset);
+ if (length == 0) {
+ return Snapshot.EMPTY_BYTE_ARRAY;
+ } else {
+ byte[] res = new byte[length];
+ buf.get(offset + 4, res);
+ return res;
+ }
+ }
+
+ private JavaThing[] parseFields(byte[] data, boolean verbose) {
+ JavaClass cl = getClazz();
+ int target = cl.getNumFieldsForInstance();
+ JavaField[] fields = cl.getFields();
+ JavaThing[] fieldValues = new JavaThing[target];
+ Snapshot snapshot = cl.getSnapshot();
+ int idSize = snapshot.getIdentifierSize();
+ int fieldNo = 0;
+ // In the dump file, the fields are stored in this order:
+ // fields of most derived class (immediate class) are stored
+ // first and then the super class and so on. In this object,
+ // fields are stored in the reverse ("natural") order. i.e.,
+ // fields of most super class are stored first.
+
+ // target variable is used to compensate for the fact that
+ // the dump file starts field values from the leaf working
+ // upwards in the inheritance hierarchy, whereas JavaObject
+ // starts with the top of the inheritance hierarchy and works down.
+ target -= fields.length;
+ JavaClass currClass = cl;
+ int index = 0;
+ for (int i = 0; i < fieldValues.length; i++, fieldNo++) {
+ while (fieldNo >= fields.length) {
+ currClass = currClass.getSuperclass();
+ fields = currClass.getFields();
+ fieldNo = 0;
+ target -= fields.length;
+ }
+ JavaField f = fields[fieldNo];
+ char sig = f.getSignature().charAt(0);
+ switch (sig) {
+ case 'L':
+ case '[': {
+ long id = objectIdAt(index, data);
+ index += idSize;
+ JavaObjectRef ref = new JavaObjectRef(id);
+ fieldValues[target+fieldNo] = ref.dereference(snapshot, f, verbose);
+ break;
+ }
+ case 'Z': {
+ byte value = byteAt(index, data);
+ index++;
+ fieldValues[target+fieldNo] = new JavaBoolean(value != 0);
+ break;
+ }
+ case 'B': {
+ byte value = byteAt(index, data);
+ index++;
+ fieldValues[target+fieldNo] = new JavaByte(value);
+ break;
+ }
+ case 'S': {
+ short value = shortAt(index, data);
+ index += 2;
+ fieldValues[target+fieldNo] = new JavaShort(value);
+ break;
+ }
+ case 'C': {
+ char value = charAt(index, data);
+ index += 2;
+ fieldValues[target+fieldNo] = new JavaChar(value);
+ break;
+ }
+ case 'I': {
+ int value = intAt(index, data);
+ index += 4;
+ fieldValues[target+fieldNo] = new JavaInt(value);
+ break;
+ }
+ case 'J': {
+ long value = longAt(index, data);
+ index += 8;
+ fieldValues[target+fieldNo] = new JavaLong(value);
+ break;
+ }
+ case 'F': {
+ float value = floatAt(index, data);
+ index += 4;
+ fieldValues[target+fieldNo] = new JavaFloat(value);
+ break;
+ }
+ case 'D': {
+ double value = doubleAt(index, data);
+ index += 8;
+ fieldValues[target+fieldNo] = new JavaDouble(value);
+ break;
+ }
+ default:
+ throw new RuntimeException("invalid signature: " + sig);
+ }
+ }
+ return fieldValues;
+ }
+
+ private void warn(String msg) {
+ System.out.println("WARNING: " + msg);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectArray.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.io.IOException;
+import jdk.test.lib.hprof.parser.ReadBuffer;
+
+/**
+ * @author Bill Foote
+ */
+public class JavaObjectArray extends JavaLazyReadObject {
+
+ private Object clazz; // Long before resolve, the class after resolve
+
+ public JavaObjectArray(long classID, long offset) {
+ super(offset);
+ this.clazz = makeId(classID);
+ }
+
+ public JavaClass getClazz() {
+ return (JavaClass) clazz;
+ }
+
+ public void resolve(Snapshot snapshot) {
+ if (clazz instanceof JavaClass) {
+ return;
+ }
+ long classID = getIdValue((Number)clazz);
+ if (snapshot.isNewStyleArrayClass()) {
+ // Modern heap dumps do this
+ JavaThing t = snapshot.findThing(classID);
+ if (t instanceof JavaClass) {
+ clazz = (JavaClass) t;
+ }
+ }
+ if (!(clazz instanceof JavaClass)) {
+ JavaThing t = snapshot.findThing(classID);
+ if (t != null && t instanceof JavaClass) {
+ JavaClass el = (JavaClass) t;
+ String nm = el.getName();
+ if (!nm.startsWith("[")) {
+ nm = "L" + el.getName() + ";";
+ }
+ clazz = snapshot.getArrayClass(nm);
+ }
+ }
+
+ if (!(clazz instanceof JavaClass)) {
+ clazz = snapshot.getOtherArrayType();
+ }
+ ((JavaClass)clazz).addInstance(this);
+ super.resolve(snapshot);
+ }
+
+ public JavaThing[] getValues() {
+ return getElements();
+ }
+
+ public JavaThing[] getElements() {
+ Snapshot snapshot = getClazz().getSnapshot();
+ byte[] data = getValue();
+ final int idSize = snapshot.getIdentifierSize();
+ final int numElements = data.length / idSize;
+ JavaThing[] elements = new JavaThing[numElements];
+ int index = 0;
+ for (int i = 0; i < elements.length; i++) {
+ long id = objectIdAt(index, data);
+ index += idSize;
+ elements[i] = snapshot.findThing(id);
+ }
+ return elements;
+ }
+
+ public int compareTo(JavaThing other) {
+ if (other instanceof JavaObjectArray) {
+ return 0;
+ }
+ return super.compareTo(other);
+ }
+
+ public int getLength() {
+ return getValueLength() / getClazz().getIdentifierSize();
+ }
+
+ public void visitReferencedObjects(JavaHeapObjectVisitor v) {
+ super.visitReferencedObjects(v);
+ JavaThing[] elements = getElements();
+ for (int i = 0; i < elements.length; i++) {
+ if (elements[i] != null && elements[i] instanceof JavaHeapObject) {
+ v.visit((JavaHeapObject) elements[i]);
+ }
+ }
+ }
+
+ /**
+ * Describe the reference that this thing has to target. This will only
+ * be called if target is in the array returned by getChildrenForRootset.
+ */
+ public String describeReferenceTo(JavaThing target, Snapshot ss) {
+ JavaThing[] elements = getElements();
+ for (int i = 0; i < elements.length; i++) {
+ if (elements[i] == target) {
+ return "Element " + i + " of " + this;
+ }
+ }
+ return super.describeReferenceTo(target, ss);
+ }
+
+ /*
+ * Java object array record (HPROF_GC_OBJ_ARRAY_DUMP)
+ * looks as below:
+ *
+ * object ID
+ * stack trace serial number (int)
+ * array length (int)
+ * array class ID
+ * array element IDs
+ */
+ protected final int readValueLength() throws IOException {
+ JavaClass cl = getClazz();
+ ReadBuffer buf = cl.getReadBuffer();
+ int idSize = cl.getIdentifierSize();
+ long offset = getOffset() + idSize + 4;
+ int len = buf.getInt(offset);
+ return len * cl.getIdentifierSize();
+ }
+
+ protected final byte[] readValue() throws IOException {
+ JavaClass cl = getClazz();
+ ReadBuffer buf = cl.getReadBuffer();
+ int idSize = cl.getIdentifierSize();
+ long offset = getOffset() + idSize + 4;
+ int len = buf.getInt(offset);
+ if (len == 0) {
+ return Snapshot.EMPTY_BYTE_ARRAY;
+ } else {
+ byte[] res = new byte[len * idSize];
+ buf.get(offset + 4 + idSize, res);
+ return res;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectRef.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import jdk.test.lib.hprof.util.Misc;
+
+/**
+ * A forward reference to an object. This is an intermediate representation
+ * for a JavaThing, when we have the thing's ID, but we might not have read
+ * the thing yet.
+ *
+ * @author Bill Foote
+ */
+public class JavaObjectRef extends JavaThing {
+ private long id;
+
+ public JavaObjectRef(long id) {
+ this.id = id;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public boolean isHeapAllocated() {
+ return true;
+ }
+
+ public JavaThing dereference(Snapshot snapshot, JavaField field) {
+ return dereference(snapshot, field, true);
+ }
+
+ public JavaThing dereference(Snapshot snapshot, JavaField field, boolean verbose) {
+ if (field != null && !field.hasId()) {
+ // If this happens, we must be a field that represents an int.
+ // (This only happens with .bod-style files)
+ return new JavaLong(id);
+ }
+ if (id == 0) {
+ return snapshot.getNullThing();
+ }
+ JavaThing result = snapshot.findThing(id);
+ if (result == null) {
+ if (!snapshot.getUnresolvedObjectsOK() && verbose) {
+ String msg = "WARNING: Failed to resolve object id "
+ + Misc.toHex(id);
+ if (field != null) {
+ msg += " for field " + field.getName()
+ + " (signature " + field.getSignature() + ")";
+ }
+ System.out.println(msg);
+ // Thread.dumpStack();
+ }
+ result = new HackJavaValue("Unresolved object "
+ + Misc.toHex(id), 0);
+ }
+ return result;
+ }
+
+ public int getSize() {
+ return 0;
+ }
+
+ public String toString() {
+ return "Unresolved object " + Misc.toHex(id);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaShort.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a short (i.e. a short field in an instance).
+ *
+ * @author Bill Foote
+ */
+
+
+public class JavaShort extends JavaValue {
+
+ short value;
+
+ public JavaShort(short value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "" + value;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaStatic.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+/**
+ * Represents the value of a static field of a JavaClass
+ */
+
+public class JavaStatic {
+
+ private JavaField field;
+ private JavaThing value;
+
+ public JavaStatic(JavaField field, JavaThing value) {
+ this.field = field;
+ this.value = value;
+ }
+
+ public void resolve(JavaClass clazz, Snapshot snapshot) {
+ long id = -1;
+ if (value instanceof JavaObjectRef) {
+ id = ((JavaObjectRef)value).getId();
+ }
+ value = value.dereference(snapshot, field);
+ if (value.isHeapAllocated() &&
+ clazz.getLoader() == snapshot.getNullThing()) {
+ // static fields are only roots if they are in classes
+ // loaded by the root classloader.
+ JavaHeapObject ho = (JavaHeapObject) value;
+ String s = "Static reference from " + clazz.getName()
+ + "." + field.getName();
+ snapshot.addRoot(new Root(id, clazz.getId(),
+ Root.JAVA_STATIC, s));
+ }
+ }
+
+ public JavaField getField() {
+ return field;
+ }
+
+ public JavaThing getValue() {
+ return value;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaThing.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+
+/**
+ * Represents a java "Thing". A thing is anything that can be the value of
+ * a field. This includes JavaHeapObject, JavaObjectRef, and JavaValue.
+ */
+
+public abstract class JavaThing {
+
+ protected JavaThing() {
+ }
+
+ /**
+ * If this is a forward reference, figure out what it really
+ * refers to.
+ *
+ * @param snapshot The snapshot this is for
+ * @param field The field this thing represents. If null, it is
+ * assumed this thing is an object (and never a value).
+ */
+ public JavaThing dereference(Snapshot shapshot, JavaField field) {
+ return this;
+ }
+
+
+ /**
+ * Are we the same type as other?
+ *
+ * @see JavaObject.isSameTypeAs()
+ */
+ public boolean isSameTypeAs(JavaThing other) {
+ return getClass() == other.getClass();
+ }
+ /**
+ * @return true iff this represents a heap-allocated object
+ */
+ abstract public boolean isHeapAllocated();
+
+ /**
+ * @return the size of this object, in bytes, including VM overhead
+ */
+ abstract public int getSize();
+
+ /**
+ * @return a human-readable string representation of this thing
+ */
+ abstract public String toString();
+
+ /**
+ * Compare our string representation to other's
+ * @see java.lang.String.compareTo()
+ */
+ public int compareTo(JavaThing other) {
+ return toString().compareTo(other.toString());
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaValue.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Abstract base class for all value types (ints, longs, floats, etc.)
+ *
+ * @author Bill Foote
+ */
+
+
+
+
+public abstract class JavaValue extends JavaThing {
+
+ protected JavaValue() {
+ }
+
+ public boolean isHeapAllocated() {
+ return false;
+ }
+
+ abstract public String toString();
+
+ public int getSize() {
+ // The size of a value is already accounted for in the class
+ // that has the data member.
+ return 0;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/JavaValueArray.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import jdk.test.lib.hprof.parser.ReadBuffer;
+import java.io.IOException;
+
+/**
+ * An array of values, that is, an array of ints, boolean, floats or the like.
+ *
+ * @author Bill Foote
+ */
+public class JavaValueArray extends JavaLazyReadObject
+ /*imports*/ implements ArrayTypeCodes {
+
+ private static String arrayTypeName(byte sig) {
+ switch (sig) {
+ case 'B':
+ return "byte[]";
+ case 'Z':
+ return "boolean[]";
+ case 'C':
+ return "char[]";
+ case 'S':
+ return "short[]";
+ case 'I':
+ return "int[]";
+ case 'F':
+ return "float[]";
+ case 'J':
+ return "long[]";
+ case 'D':
+ return "double[]";
+ default:
+ throw new RuntimeException("invalid array element sig: " + sig);
+ }
+ }
+
+ private static int elementSize(byte type) {
+ switch (type) {
+ case T_BYTE:
+ case T_BOOLEAN:
+ return 1;
+ case T_CHAR:
+ case T_SHORT:
+ return 2;
+ case T_INT:
+ case T_FLOAT:
+ return 4;
+ case T_LONG:
+ case T_DOUBLE:
+ return 8;
+ default:
+ throw new RuntimeException("invalid array element type: " + type);
+ }
+ }
+
+ /*
+ * Java primitive array record (HPROF_GC_PRIM_ARRAY_DUMP) looks
+ * as below:
+ *
+ * object ID
+ * stack trace serial number (int)
+ * length of the instance data (int)
+ * element type (byte)
+ * array data
+ */
+ protected final int readValueLength() throws IOException {
+ JavaClass cl = getClazz();
+ ReadBuffer buf = cl.getReadBuffer();
+ int idSize = cl.getIdentifierSize();
+ long offset = getOffset() + idSize + 4;
+ // length of the array
+ int len = buf.getInt(offset);
+ // typecode of array element type
+ byte type = buf.getByte(offset + 4);
+ return len * elementSize(type);
+ }
+
+ protected final byte[] readValue() throws IOException {
+ JavaClass cl = getClazz();
+ ReadBuffer buf = cl.getReadBuffer();
+ int idSize = cl.getIdentifierSize();
+ long offset = getOffset() + idSize + 4;
+ // length of the array
+ int length = buf.getInt(offset);
+ // typecode of array element type
+ byte type = buf.getByte(offset + 4);
+ if (length == 0) {
+ return Snapshot.EMPTY_BYTE_ARRAY;
+ } else {
+ length *= elementSize(type);
+ byte[] res = new byte[length];
+ buf.get(offset + 5, res);
+ return res;
+ }
+ }
+
+ // JavaClass set only after resolve.
+ private JavaClass clazz;
+
+ // This field contains elementSignature byte and
+ // divider to be used to calculate length. Note that
+ // length of content byte[] is not same as array length.
+ // Actual array length is (byte[].length / divider)
+ private int data;
+
+ // First 8 bits of data is used for element signature
+ private static final int SIGNATURE_MASK = 0x0FF;
+
+ // Next 8 bits of data is used for length divider
+ private static final int LENGTH_DIVIDER_MASK = 0x0FF00;
+
+ // Number of bits to shift to get length divider
+ private static final int LENGTH_DIVIDER_SHIFT = 8;
+
+ public JavaValueArray(byte elementSignature, long offset) {
+ super(offset);
+ this.data = (elementSignature & SIGNATURE_MASK);
+ }
+
+ public JavaClass getClazz() {
+ return clazz;
+ }
+
+ public void visitReferencedObjects(JavaHeapObjectVisitor v) {
+ super.visitReferencedObjects(v);
+ }
+
+ public void resolve(Snapshot snapshot) {
+ if (clazz instanceof JavaClass) {
+ return;
+ }
+ byte elementSig = getElementType();
+ clazz = snapshot.findClass(arrayTypeName(elementSig));
+ if (clazz == null) {
+ clazz = snapshot.getArrayClass("" + ((char) elementSig));
+ }
+ getClazz().addInstance(this);
+ super.resolve(snapshot);
+ }
+
+ public int getLength() {
+ int divider = (data & LENGTH_DIVIDER_MASK) >>> LENGTH_DIVIDER_SHIFT;
+ if (divider == 0) {
+ byte elementSignature = getElementType();
+ switch (elementSignature) {
+ case 'B':
+ case 'Z':
+ divider = 1;
+ break;
+ case 'C':
+ case 'S':
+ divider = 2;
+ break;
+ case 'I':
+ case 'F':
+ divider = 4;
+ break;
+ case 'J':
+ case 'D':
+ divider = 8;
+ break;
+ default:
+ throw new RuntimeException("unknown primitive type: " +
+ elementSignature);
+ }
+ data |= (divider << LENGTH_DIVIDER_SHIFT);
+ }
+ return (getValueLength() / divider);
+ }
+
+ public Object getElements() {
+ final int len = getLength();
+ final byte et = getElementType();
+ byte[] data = getValue();
+ int index = 0;
+ switch (et) {
+ case 'Z': {
+ boolean[] res = new boolean[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = booleanAt(index, data);
+ index++;
+ }
+ return res;
+ }
+ case 'B': {
+ byte[] res = new byte[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = byteAt(index, data);
+ index++;
+ }
+ return res;
+ }
+ case 'C': {
+ char[] res = new char[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = charAt(index, data);
+ index += 2;
+ }
+ return res;
+ }
+ case 'S': {
+ short[] res = new short[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = shortAt(index, data);
+ index += 2;
+ }
+ return res;
+ }
+ case 'I': {
+ int[] res = new int[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = intAt(index, data);
+ index += 4;
+ }
+ return res;
+ }
+ case 'J': {
+ long[] res = new long[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = longAt(index, data);
+ index += 8;
+ }
+ return res;
+ }
+ case 'F': {
+ float[] res = new float[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = floatAt(index, data);
+ index += 4;
+ }
+ return res;
+ }
+ case 'D': {
+ double[] res = new double[len];
+ for (int i = 0; i < len; i++) {
+ res[i] = doubleAt(index, data);
+ index += 8;
+ }
+ return res;
+ }
+ default: {
+ throw new RuntimeException("unknown primitive type?");
+ }
+ }
+ }
+
+ public byte getElementType() {
+ return (byte) (data & SIGNATURE_MASK);
+ }
+
+ private void checkIndex(int index) {
+ if (index < 0 || index >= getLength()) {
+ throw new ArrayIndexOutOfBoundsException(index);
+ }
+ }
+
+ private void requireType(char type) {
+ if (getElementType() != type) {
+ throw new RuntimeException("not of type : " + type);
+ }
+ }
+
+ public boolean getBooleanAt(int index) {
+ checkIndex(index);
+ requireType('Z');
+ return booleanAt(index, getValue());
+ }
+
+ public byte getByteAt(int index) {
+ checkIndex(index);
+ requireType('B');
+ return byteAt(index, getValue());
+ }
+
+ public char getCharAt(int index) {
+ checkIndex(index);
+ requireType('C');
+ return charAt(index << 1, getValue());
+ }
+
+ public short getShortAt(int index) {
+ checkIndex(index);
+ requireType('S');
+ return shortAt(index << 1, getValue());
+ }
+
+ public int getIntAt(int index) {
+ checkIndex(index);
+ requireType('I');
+ return intAt(index << 2, getValue());
+ }
+
+ public long getLongAt(int index) {
+ checkIndex(index);
+ requireType('J');
+ return longAt(index << 3, getValue());
+ }
+
+ public float getFloatAt(int index) {
+ checkIndex(index);
+ requireType('F');
+ return floatAt(index << 2, getValue());
+ }
+
+ public double getDoubleAt(int index) {
+ checkIndex(index);
+ requireType('D');
+ return doubleAt(index << 3, getValue());
+ }
+
+ public String valueString() {
+ return valueString(true);
+ }
+
+ public String valueString(boolean bigLimit) {
+ // Char arrays deserve special treatment
+ StringBuilder result;
+ byte[] value = getValue();
+ int max = value.length;
+ byte elementSignature = getElementType();
+ if (elementSignature == 'C') {
+ result = new StringBuilder();
+ for (int i = 0; i < value.length; ) {
+ char val = charAt(i, value);
+ result.append(val);
+ i += 2;
+ }
+ } else {
+ int limit = 8;
+ if (bigLimit) {
+ limit = 1000;
+ }
+ result = new StringBuilder("{");
+ int num = 0;
+ for (int i = 0; i < value.length; ) {
+ if (num > 0) {
+ result.append(", ");
+ }
+ if (num >= limit) {
+ result.append("... ");
+ break;
+ }
+ num++;
+ switch (elementSignature) {
+ case 'Z': {
+ boolean val = booleanAt(i, value);
+ if (val) {
+ result.append("true");
+ } else {
+ result.append("false");
+ }
+ i++;
+ break;
+ }
+ case 'B': {
+ int val = 0xFF & byteAt(i, value);
+ result.append("0x").append(Integer.toString(val, 16));
+ i++;
+ break;
+ }
+ case 'S': {
+ short val = shortAt(i, value);
+ i += 2;
+ result.append(val);
+ break;
+ }
+ case 'I': {
+ int val = intAt(i, value);
+ i += 4;
+ result.append(val);
+ break;
+ }
+ case 'J': { // long
+ long val = longAt(i, value);
+ result.append(val);
+ i += 8;
+ break;
+ }
+ case 'F': {
+ float val = floatAt(i, value);
+ result.append(val);
+ i += 4;
+ break;
+ }
+ case 'D': { // double
+ double val = doubleAt(i, value);
+ result.append(val);
+ i += 8;
+ break;
+ }
+ default: {
+ throw new RuntimeException("unknown primitive type?");
+ }
+ }
+ }
+ result.append('}');
+ }
+ return result.toString();
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludes.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+
+/**
+ * This represents a set of data members that should be excluded from the
+ * reachable objects query. This is useful to exclude observers from the
+ * transitive closure of objects reachable from a given object, allowing
+ * some kind of real determination of the "size" of that object.
+ *
+ */
+
+public interface ReachableExcludes {
+ /**
+ * @return true iff the given field is on the hitlist of excluded
+ * fields.
+ */
+ public boolean isExcluded(String fieldName);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludesImpl.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.BufferedReader;
+import java.io.IOException;
+
+import java.util.Hashtable;
+
+/**
+ * This represents a set of data members that should be excluded from the
+ * reachable objects query.
+ * This is useful to exclude observers from the
+ * transitive closure of objects reachable from a given object, allowing
+ * some kind of real determination of the "size" of that object.
+ *
+ * @author Bill Foote
+ */
+public class ReachableExcludesImpl implements ReachableExcludes {
+
+ private File excludesFile;
+ private long lastModified;
+ private Hashtable<String, String> methods; // Used as a bag
+
+ /**
+ * Create a new ReachableExcludesImpl over the given file. The file will be
+ * re-read whenever the timestamp changes.
+ */
+ public ReachableExcludesImpl(File excludesFile) {
+ this.excludesFile = excludesFile;
+ readFile();
+ }
+
+ private void readFileIfNeeded() {
+ if (excludesFile.lastModified() != lastModified) {
+ synchronized(this) {
+ if (excludesFile.lastModified() != lastModified) {
+ readFile();
+ }
+ }
+ }
+ }
+
+ private void readFile() {
+ long lm = excludesFile.lastModified();
+ Hashtable<String, String> m = new Hashtable<String, String>();
+
+ try (BufferedReader r = new BufferedReader(new InputStreamReader(
+ new FileInputStream(excludesFile)))) {
+ String method;
+ while ((method = r.readLine()) != null) {
+ m.put(method, method);
+ }
+ lastModified = lm;
+ methods = m; // We want this to be atomic
+ } catch (IOException ex) {
+ System.out.println("Error reading " + excludesFile + ": " + ex);
+ }
+ }
+
+ /**
+ * @return true iff the given field is on the histlist of excluded
+ * fields.
+ */
+ public boolean isExcluded(String fieldName) {
+ readFileIfNeeded();
+ return methods.get(fieldName) != null;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableObjects.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.util.Vector;
+import java.util.Hashtable;
+import java.util.Enumeration;
+
+import jdk.test.lib.hprof.util.ArraySorter;
+import jdk.test.lib.hprof.util.Comparer;
+
+/**
+ * @author A. Sundararajan
+ */
+
+public class ReachableObjects {
+ public ReachableObjects(JavaHeapObject root,
+ final ReachableExcludes excludes) {
+ this.root = root;
+
+ final Hashtable<JavaHeapObject, JavaHeapObject> bag = new Hashtable<JavaHeapObject, JavaHeapObject>();
+ final Hashtable<String, String> fieldsExcluded = new Hashtable<String, String>(); //Bag<String>
+ final Hashtable<String, String> fieldsUsed = new Hashtable<String, String>(); // Bag<String>
+ JavaHeapObjectVisitor visitor = new AbstractJavaHeapObjectVisitor() {
+ public void visit(JavaHeapObject t) {
+ // Size is zero for things like integer fields
+ if (t != null && t.getSize() > 0 && bag.get(t) == null) {
+ bag.put(t, t);
+ t.visitReferencedObjects(this);
+ }
+ }
+
+ public boolean mightExclude() {
+ return excludes != null;
+ }
+
+ public boolean exclude(JavaClass clazz, JavaField f) {
+ if (excludes == null) {
+ return false;
+ }
+ String nm = clazz.getName() + "." + f.getName();
+ if (excludes.isExcluded(nm)) {
+ fieldsExcluded.put(nm, nm);
+ return true;
+ } else {
+ fieldsUsed.put(nm, nm);
+ return false;
+ }
+ }
+ };
+ // Put the closure of root and all objects reachable from root into
+ // bag (depth first), but don't include root:
+ visitor.visit(root);
+ bag.remove(root);
+
+ // Now grab the elements into a vector, and sort it in decreasing size
+ JavaThing[] things = new JavaThing[bag.size()];
+ int i = 0;
+ for (Enumeration<JavaHeapObject> e = bag.elements(); e.hasMoreElements(); ) {
+ things[i++] = (JavaThing) e.nextElement();
+ }
+ ArraySorter.sort(things, new Comparer() {
+ public int compare(Object lhs, Object rhs) {
+ JavaThing left = (JavaThing) lhs;
+ JavaThing right = (JavaThing) rhs;
+ int diff = right.getSize() - left.getSize();
+ if (diff != 0) {
+ return diff;
+ }
+ return left.compareTo(right);
+ }
+ });
+ this.reachables = things;
+
+ this.totalSize = root.getSize();
+ for (i = 0; i < things.length; i++) {
+ this.totalSize += things[i].getSize();
+ }
+
+ excludedFields = getElements(fieldsExcluded);
+ usedFields = getElements(fieldsUsed);
+ }
+
+ public JavaHeapObject getRoot() {
+ return root;
+ }
+
+ public JavaThing[] getReachables() {
+ return reachables;
+ }
+
+ public long getTotalSize() {
+ return totalSize;
+ }
+
+ public String[] getExcludedFields() {
+ return excludedFields;
+ }
+
+ public String[] getUsedFields() {
+ return usedFields;
+ }
+
+ private String[] getElements(Hashtable<?, ?> ht) {
+ Object[] keys = ht.keySet().toArray();
+ int len = keys.length;
+ String[] res = new String[len];
+ System.arraycopy(keys, 0, res, 0, len);
+ ArraySorter.sortArrayOfStrings(res);
+ return res;
+ }
+
+ private JavaHeapObject root;
+ private JavaThing[] reachables;
+ private String[] excludedFields;
+ private String[] usedFields;
+ private long totalSize;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/ReferenceChain.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ * Represents a chain of references to some target object
+ *
+ * @author Bill Foote
+ */
+
+public class ReferenceChain {
+
+ JavaHeapObject obj; // Object referred to
+ ReferenceChain next; // Next in chain
+
+ public ReferenceChain(JavaHeapObject obj, ReferenceChain next) {
+ this.obj = obj;
+ this.next = next;
+ }
+
+ public JavaHeapObject getObj() {
+ return obj;
+ }
+
+ public ReferenceChain getNext() {
+ return next;
+ }
+
+ public int getDepth() {
+ int count = 1;
+ ReferenceChain tmp = next;
+ while (tmp != null) {
+ count++;
+ tmp = tmp.next;
+ }
+ return count;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/Root.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import jdk.test.lib.hprof.util.Misc;
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+
+/**
+ * Represents a member of the rootset, that is, one of the objects that
+ * the GC starts from when marking reachable objects.
+ */
+
+public class Root {
+
+ private long id; // ID of the JavaThing we refer to
+ private long refererId; // Thread or Class responsible for this, or 0
+ private int index = -1; // Index in Snapshot.roots
+ private int type;
+ private String description;
+ private JavaHeapObject referer = null;
+ private StackTrace stackTrace = null;
+
+ // Values for type. Higher values are more interesting -- see getType().
+ // See also getTypeName()
+ public final static int INVALID_TYPE = 0;
+ public final static int UNKNOWN = 1;
+ public final static int SYSTEM_CLASS = 2;
+
+ public final static int NATIVE_LOCAL = 3;
+ public final static int NATIVE_STATIC = 4;
+ public final static int THREAD_BLOCK = 5;
+ public final static int BUSY_MONITOR = 6;
+ public final static int JAVA_LOCAL = 7;
+ public final static int NATIVE_STACK = 8;
+ public final static int JAVA_STATIC = 9;
+
+
+ public Root(long id, long refererId, int type, String description) {
+ this(id, refererId, type, description, null);
+ }
+
+
+ public Root(long id, long refererId, int type, String description,
+ StackTrace stackTrace) {
+ this.id = id;
+ this.refererId = refererId;
+ this.type = type;
+ this.description = description;
+ this.stackTrace = stackTrace;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public String getIdString() {
+ return Misc.toHex(id);
+ }
+
+ public String getDescription() {
+ if ("".equals(description)) {
+ return getTypeName() + " Reference";
+ } else {
+ return description;
+ }
+ }
+
+ /**
+ * Return type. We guarantee that more interesting roots will have
+ * a type that is numerically higher.
+ */
+ public int getType() {
+ return type;
+ }
+
+ public String getTypeName() {
+ switch(type) {
+ case INVALID_TYPE: return "Invalid (?!?)";
+ case UNKNOWN: return "Unknown";
+ case SYSTEM_CLASS: return "System Class";
+ case NATIVE_LOCAL: return "JNI Local";
+ case NATIVE_STATIC: return "JNI Global";
+ case THREAD_BLOCK: return "Thread Block";
+ case BUSY_MONITOR: return "Busy Monitor";
+ case JAVA_LOCAL: return "Java Local";
+ case NATIVE_STACK: return "Native Stack (possibly Java local)";
+ case JAVA_STATIC: return "Java Static";
+ default: return "??";
+ }
+ }
+
+ /**
+ * Given two Root instances, return the one that is most interesting.
+ */
+ public Root mostInteresting(Root other) {
+ if (other.type > this.type) {
+ return other;
+ } else {
+ return this;
+ }
+ }
+
+ /**
+ * Get the object that's responsible for this root, if there is one.
+ * This will be null, a Thread object, or a Class object.
+ */
+ public JavaHeapObject getReferer() {
+ return referer;
+ }
+
+ /**
+ * @return the stack trace responsible for this root, or null if there
+ * is none.
+ */
+ public StackTrace getStackTrace() {
+ return stackTrace;
+ }
+
+ /**
+ * @return The index of this root in Snapshot.roots
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ void resolve(Snapshot ss) {
+ if (refererId != 0) {
+ referer = ss.findThing(refererId);
+ }
+ if (stackTrace != null) {
+ stackTrace.resolve(ss);
+ }
+ }
+
+ void setIndex(int i) {
+ index = i;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,637 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+import java.lang.ref.SoftReference;
+import java.util.*;
+
+import jdk.test.lib.hprof.parser.ReadBuffer;
+import jdk.test.lib.hprof.util.Misc;
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+/**
+ * Represents a snapshot of the Java objects in the VM at one instant.
+ * This is the top-level "model" object read out of a single .hprof or .bod
+ * file.
+ */
+
+public class Snapshot implements AutoCloseable {
+
+ public static final long SMALL_ID_MASK = 0x0FFFFFFFFL;
+ public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
+
+ private static final JavaField[] EMPTY_FIELD_ARRAY = new JavaField[0];
+ private static final JavaStatic[] EMPTY_STATIC_ARRAY = new JavaStatic[0];
+
+ // all heap objects
+ private Hashtable<Number, JavaHeapObject> heapObjects =
+ new Hashtable<Number, JavaHeapObject>();
+
+ private Hashtable<Number, JavaClass> fakeClasses =
+ new Hashtable<Number, JavaClass>();
+
+ // all Roots in this Snapshot
+ private Vector<Root> roots = new Vector<Root>();
+
+ // name-to-class map
+ private Map<String, JavaClass> classes =
+ new TreeMap<String, JavaClass>();
+
+ // new objects relative to a baseline - lazily initialized
+ private volatile Map<JavaHeapObject, Boolean> newObjects;
+
+ // allocation site traces for all objects - lazily initialized
+ private volatile Map<JavaHeapObject, StackTrace> siteTraces;
+
+ // object-to-Root map for all objects
+ private Map<JavaHeapObject, Root> rootsMap =
+ new HashMap<JavaHeapObject, Root>();
+
+ // soft cache of finalizeable objects - lazily initialized
+ private SoftReference<Vector<?>> finalizablesCache;
+
+ // represents null reference
+ private JavaThing nullThing;
+
+ // java.lang.ref.Reference class
+ private JavaClass weakReferenceClass;
+ // index of 'referent' field in java.lang.ref.Reference class
+ private int referentFieldIndex;
+
+ // java.lang.Class class
+ private JavaClass javaLangClass;
+ // java.lang.String class
+ private JavaClass javaLangString;
+ // java.lang.ClassLoader class
+ private JavaClass javaLangClassLoader;
+
+ // unknown "other" array class
+ private volatile JavaClass otherArrayType;
+ // Stuff to exclude from reachable query
+ private ReachableExcludes reachableExcludes;
+ // the underlying heap dump buffer
+ private ReadBuffer readBuf;
+
+ // True iff some heap objects have isNew set
+ private boolean hasNewSet;
+ private boolean unresolvedObjectsOK;
+
+ // whether object array instances have new style class or
+ // old style (element) class.
+ private boolean newStyleArrayClass;
+
+ // object id size in the heap dump
+ private int identifierSize = 4;
+
+ // minimum object size - accounts for object header in
+ // most Java virtual machines - we assume 2 identifierSize
+ // (which is true for Sun's hotspot JVM).
+ private int minimumObjectSize;
+
+ public Snapshot(ReadBuffer buf) {
+ nullThing = new HackJavaValue("<null>", 0);
+ readBuf = buf;
+ }
+
+ public void setSiteTrace(JavaHeapObject obj, StackTrace trace) {
+ if (trace != null && trace.getFrames().length != 0) {
+ initSiteTraces();
+ siteTraces.put(obj, trace);
+ }
+ }
+
+ public StackTrace getSiteTrace(JavaHeapObject obj) {
+ if (siteTraces != null) {
+ return siteTraces.get(obj);
+ } else {
+ return null;
+ }
+ }
+
+ public void setNewStyleArrayClass(boolean value) {
+ newStyleArrayClass = value;
+ }
+
+ public boolean isNewStyleArrayClass() {
+ return newStyleArrayClass;
+ }
+
+ public void setIdentifierSize(int size) {
+ identifierSize = size;
+ minimumObjectSize = 2 * size;
+ }
+
+ public int getIdentifierSize() {
+ return identifierSize;
+ }
+
+ public int getMinimumObjectSize() {
+ return minimumObjectSize;
+ }
+
+ public void addHeapObject(long id, JavaHeapObject ho) {
+ heapObjects.put(makeId(id), ho);
+ }
+
+ public void addRoot(Root r) {
+ r.setIndex(roots.size());
+ roots.addElement(r);
+ }
+
+ public void addClass(long id, JavaClass c) {
+ addHeapObject(id, c);
+ putInClassesMap(c);
+ }
+
+ JavaClass addFakeInstanceClass(long classID, int instSize) {
+ // Create a fake class name based on ID.
+ String name = "unknown-class<@" + Misc.toHex(classID) + ">";
+
+ // Create fake fields convering the given instance size.
+ // Create as many as int type fields and for the left over
+ // size create byte type fields.
+ int numInts = instSize / 4;
+ int numBytes = instSize % 4;
+ JavaField[] fields = new JavaField[numInts + numBytes];
+ int i;
+ for (i = 0; i < numInts; i++) {
+ fields[i] = new JavaField("unknown-field-" + i, "I");
+ }
+ for (i = 0; i < numBytes; i++) {
+ fields[i + numInts] = new JavaField("unknown-field-" +
+ i + numInts, "B");
+ }
+
+ // Create fake instance class
+ JavaClass c = new JavaClass(name, 0, 0, 0, 0, fields,
+ EMPTY_STATIC_ARRAY, instSize);
+ // Add the class
+ addFakeClass(makeId(classID), c);
+ return c;
+ }
+
+
+ /**
+ * @return true iff it's possible that some JavaThing instances might
+ * isNew set
+ *
+ * @see JavaThing.isNew()
+ */
+ public boolean getHasNewSet() {
+ return hasNewSet;
+ }
+
+ //
+ // Used in the body of resolve()
+ //
+ private static class MyVisitor extends AbstractJavaHeapObjectVisitor {
+ JavaHeapObject t;
+ public void visit(JavaHeapObject other) {
+ other.addReferenceFrom(t);
+ }
+ }
+
+ // To show heap parsing progress, we print a '.' after this limit
+ private static final int DOT_LIMIT = 5000;
+
+ /**
+ * Called after reading complete, to initialize the structure
+ */
+ public void resolve(boolean calculateRefs) {
+ System.out.println("Resolving " + heapObjects.size() + " objects...");
+
+ // First, resolve the classes. All classes must be resolved before
+ // we try any objects, because the objects use classes in their
+ // resolution.
+ javaLangClass = findClass("java.lang.Class");
+ if (javaLangClass == null) {
+ System.out.println("WARNING: hprof file does not include java.lang.Class!");
+ javaLangClass = new JavaClass("java.lang.Class", 0, 0, 0, 0,
+ EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
+ addFakeClass(javaLangClass);
+ }
+ javaLangString = findClass("java.lang.String");
+ if (javaLangString == null) {
+ System.out.println("WARNING: hprof file does not include java.lang.String!");
+ javaLangString = new JavaClass("java.lang.String", 0, 0, 0, 0,
+ EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
+ addFakeClass(javaLangString);
+ }
+ javaLangClassLoader = findClass("java.lang.ClassLoader");
+ if (javaLangClassLoader == null) {
+ System.out.println("WARNING: hprof file does not include java.lang.ClassLoader!");
+ javaLangClassLoader = new JavaClass("java.lang.ClassLoader", 0, 0, 0, 0,
+ EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
+ addFakeClass(javaLangClassLoader);
+ }
+
+ for (JavaHeapObject t : heapObjects.values()) {
+ if (t instanceof JavaClass) {
+ t.resolve(this);
+ }
+ }
+
+ // Now, resolve everything else.
+ for (JavaHeapObject t : heapObjects.values()) {
+ if (!(t instanceof JavaClass)) {
+ t.resolve(this);
+ }
+ }
+
+ heapObjects.putAll(fakeClasses);
+ fakeClasses.clear();
+
+ weakReferenceClass = findClass("java.lang.ref.Reference");
+ if (weakReferenceClass == null) { // JDK 1.1.x
+ weakReferenceClass = findClass("sun.misc.Ref");
+ referentFieldIndex = 0;
+ } else {
+ JavaField[] fields = weakReferenceClass.getFieldsForInstance();
+ for (int i = 0; i < fields.length; i++) {
+ if ("referent".equals(fields[i].getName())) {
+ referentFieldIndex = i;
+ break;
+ }
+ }
+ }
+
+ if (calculateRefs) {
+ calculateReferencesToObjects();
+ System.out.print("Eliminating duplicate references");
+ System.out.flush();
+ // This println refers to the *next* step
+ }
+ int count = 0;
+ for (JavaHeapObject t : heapObjects.values()) {
+ t.setupReferers();
+ ++count;
+ if (calculateRefs && count % DOT_LIMIT == 0) {
+ System.out.print(".");
+ System.out.flush();
+ }
+ }
+ if (calculateRefs) {
+ System.out.println("");
+ }
+
+ // to ensure that Iterator.remove() on getClasses()
+ // result will throw exception..
+ classes = Collections.unmodifiableMap(classes);
+ }
+
+ private void calculateReferencesToObjects() {
+ System.out.print("Chasing references, expect "
+ + (heapObjects.size() / DOT_LIMIT) + " dots");
+ System.out.flush();
+ int count = 0;
+ MyVisitor visitor = new MyVisitor();
+ for (JavaHeapObject t : heapObjects.values()) {
+ visitor.t = t;
+ // call addReferenceFrom(t) on all objects t references:
+ t.visitReferencedObjects(visitor);
+ ++count;
+ if (count % DOT_LIMIT == 0) {
+ System.out.print(".");
+ System.out.flush();
+ }
+ }
+ System.out.println();
+ for (Root r : roots) {
+ r.resolve(this);
+ JavaHeapObject t = findThing(r.getId());
+ if (t != null) {
+ t.addReferenceFromRoot(r);
+ }
+ }
+ }
+
+ public void markNewRelativeTo(Snapshot baseline) {
+ hasNewSet = true;
+ for (JavaHeapObject t : heapObjects.values()) {
+ boolean isNew;
+ long thingID = t.getId();
+ if (thingID == 0L || thingID == -1L) {
+ isNew = false;
+ } else {
+ JavaThing other = baseline.findThing(t.getId());
+ if (other == null) {
+ isNew = true;
+ } else {
+ isNew = !t.isSameTypeAs(other);
+ }
+ }
+ t.setNew(isNew);
+ }
+ }
+
+ public Enumeration<JavaHeapObject> getThings() {
+ return heapObjects.elements();
+ }
+
+
+ public JavaHeapObject findThing(long id) {
+ Number idObj = makeId(id);
+ JavaHeapObject jho = heapObjects.get(idObj);
+ return jho != null? jho : fakeClasses.get(idObj);
+ }
+
+ public JavaHeapObject findThing(String id) {
+ return findThing(Misc.parseHex(id));
+ }
+
+ public JavaClass findClass(String name) {
+ if (name.startsWith("0x")) {
+ return (JavaClass) findThing(name);
+ } else {
+ return classes.get(name);
+ }
+ }
+
+ /**
+ * Return an Iterator of all of the classes in this snapshot.
+ **/
+ public Iterator<JavaClass> getClasses() {
+ // note that because classes is a TreeMap
+ // classes are already sorted by name
+ return classes.values().iterator();
+ }
+
+ public JavaClass[] getClassesArray() {
+ JavaClass[] res = new JavaClass[classes.size()];
+ classes.values().toArray(res);
+ return res;
+ }
+
+ public synchronized Enumeration<?> getFinalizerObjects() {
+ Vector<?> obj;
+ if (finalizablesCache != null &&
+ (obj = finalizablesCache.get()) != null) {
+ return obj.elements();
+ }
+
+ JavaClass clazz = findClass("java.lang.ref.Finalizer");
+ JavaObject queue = (JavaObject) clazz.getStaticField("queue");
+ JavaThing tmp = queue.getField("head");
+ Vector<JavaHeapObject> finalizables = new Vector<JavaHeapObject>();
+ if (tmp != getNullThing()) {
+ JavaObject head = (JavaObject) tmp;
+ while (true) {
+ JavaHeapObject referent = (JavaHeapObject) head.getField("referent");
+ JavaThing next = head.getField("next");
+ if (next == getNullThing() || next.equals(head)) {
+ break;
+ }
+ head = (JavaObject) next;
+ finalizables.add(referent);
+ }
+ }
+ finalizablesCache = new SoftReference<Vector<?>>(finalizables);
+ return finalizables.elements();
+ }
+
+ public Enumeration<Root> getRoots() {
+ return roots.elements();
+ }
+
+ public Root[] getRootsArray() {
+ Root[] res = new Root[roots.size()];
+ roots.toArray(res);
+ return res;
+ }
+
+ public Root getRootAt(int i) {
+ return roots.elementAt(i);
+ }
+
+ public ReferenceChain[]
+ rootsetReferencesTo(JavaHeapObject target, boolean includeWeak) {
+ Vector<ReferenceChain> fifo = new Vector<ReferenceChain>(); // This is slow... A real fifo would help
+ // Must be a fifo to go breadth-first
+ Hashtable<JavaHeapObject, JavaHeapObject> visited = new Hashtable<JavaHeapObject, JavaHeapObject>();
+ // Objects are added here right after being added to fifo.
+ Vector<ReferenceChain> result = new Vector<ReferenceChain>();
+ visited.put(target, target);
+ fifo.addElement(new ReferenceChain(target, null));
+
+ while (fifo.size() > 0) {
+ ReferenceChain chain = fifo.elementAt(0);
+ fifo.removeElementAt(0);
+ JavaHeapObject curr = chain.getObj();
+ if (curr.getRoot() != null) {
+ result.addElement(chain);
+ // Even though curr is in the rootset, we want to explore its
+ // referers, because they might be more interesting.
+ }
+ Enumeration<JavaThing> referers = curr.getReferers();
+ while (referers.hasMoreElements()) {
+ JavaHeapObject t = (JavaHeapObject) referers.nextElement();
+ if (t != null && !visited.containsKey(t)) {
+ if (includeWeak || !t.refersOnlyWeaklyTo(this, curr)) {
+ visited.put(t, t);
+ fifo.addElement(new ReferenceChain(t, chain));
+ }
+ }
+ }
+ }
+
+ ReferenceChain[] realResult = new ReferenceChain[result.size()];
+ for (int i = 0; i < result.size(); i++) {
+ realResult[i] = result.elementAt(i);
+ }
+ return realResult;
+ }
+
+ public boolean getUnresolvedObjectsOK() {
+ return unresolvedObjectsOK;
+ }
+
+ public void setUnresolvedObjectsOK(boolean v) {
+ unresolvedObjectsOK = v;
+ }
+
+ public JavaClass getWeakReferenceClass() {
+ return weakReferenceClass;
+ }
+
+ public int getReferentFieldIndex() {
+ return referentFieldIndex;
+ }
+
+ public JavaThing getNullThing() {
+ return nullThing;
+ }
+
+ public void setReachableExcludes(ReachableExcludes e) {
+ reachableExcludes = e;
+ }
+
+ public ReachableExcludes getReachableExcludes() {
+ return reachableExcludes;
+ }
+
+ // package privates
+ void addReferenceFromRoot(Root r, JavaHeapObject obj) {
+ Root root = rootsMap.get(obj);
+ if (root == null) {
+ rootsMap.put(obj, r);
+ } else {
+ rootsMap.put(obj, root.mostInteresting(r));
+ }
+ }
+
+ Root getRoot(JavaHeapObject obj) {
+ return rootsMap.get(obj);
+ }
+
+ JavaClass getJavaLangClass() {
+ return javaLangClass;
+ }
+
+ JavaClass getJavaLangString() {
+ return javaLangString;
+ }
+
+ JavaClass getJavaLangClassLoader() {
+ return javaLangClassLoader;
+ }
+
+ JavaClass getOtherArrayType() {
+ if (otherArrayType == null) {
+ synchronized(this) {
+ if (otherArrayType == null) {
+ addFakeClass(new JavaClass("[<other>", 0, 0, 0, 0,
+ EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY,
+ 0));
+ otherArrayType = findClass("[<other>");
+ }
+ }
+ }
+ return otherArrayType;
+ }
+
+ JavaClass getArrayClass(String elementSignature) {
+ JavaClass clazz;
+ synchronized(classes) {
+ clazz = findClass("[" + elementSignature);
+ if (clazz == null) {
+ clazz = new JavaClass("[" + elementSignature, 0, 0, 0, 0,
+ EMPTY_FIELD_ARRAY, EMPTY_STATIC_ARRAY, 0);
+ addFakeClass(clazz);
+ // This is needed because the JDK only creates Class structures
+ // for array element types, not the arrays themselves. For
+ // analysis, though, we need to pretend that there's a
+ // JavaClass for the array type, too.
+ }
+ }
+ return clazz;
+ }
+
+ ReadBuffer getReadBuffer() {
+ return readBuf;
+ }
+
+ void setNew(JavaHeapObject obj, boolean isNew) {
+ initNewObjects();
+ if (isNew) {
+ newObjects.put(obj, Boolean.TRUE);
+ }
+ }
+
+ boolean isNew(JavaHeapObject obj) {
+ if (newObjects != null) {
+ return newObjects.get(obj) != null;
+ } else {
+ return false;
+ }
+ }
+
+ // Internals only below this point
+ private Number makeId(long id) {
+ if (identifierSize == 4) {
+ return (int)id;
+ } else {
+ return id;
+ }
+ }
+
+ private void putInClassesMap(JavaClass c) {
+ String name = c.getName();
+ if (classes.containsKey(name)) {
+ // more than one class can have the same name
+ // if so, create a unique name by appending
+ // - and id string to it.
+ name += "-" + c.getIdString();
+ }
+ classes.put(c.getName(), c);
+ }
+
+ private void addFakeClass(JavaClass c) {
+ putInClassesMap(c);
+ c.resolve(this);
+ }
+
+ private void addFakeClass(Number id, JavaClass c) {
+ fakeClasses.put(id, c);
+ addFakeClass(c);
+ }
+
+ private synchronized void initNewObjects() {
+ if (newObjects == null) {
+ synchronized (this) {
+ if (newObjects == null) {
+ newObjects = new HashMap<JavaHeapObject, Boolean>();
+ }
+ }
+ }
+ }
+
+ private synchronized void initSiteTraces() {
+ if (siteTraces == null) {
+ synchronized (this) {
+ if (siteTraces == null) {
+ siteTraces = new HashMap<JavaHeapObject, StackTrace>();
+ }
+ }
+ }
+ }
+
+ @Override
+ public void close() throws Exception {
+ readBuf.close();
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/StackFrame.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+
+/**
+ * Represents a stack frame.
+ */
+
+public class StackFrame {
+
+ //
+ // Values for the lineNumber data member. These are the same
+ // as the values used in the JDK 1.2 heap dump file.
+ //
+ public final static int LINE_NUMBER_UNKNOWN = -1;
+ public final static int LINE_NUMBER_COMPILED = -2;
+ public final static int LINE_NUMBER_NATIVE = -3;
+
+ private String methodName;
+ private String methodSignature;
+ private String className;
+ private String sourceFileName;
+ private int lineNumber;
+
+ public StackFrame(String methodName, String methodSignature,
+ String className, String sourceFileName, int lineNumber) {
+ this.methodName = methodName;
+ this.methodSignature = methodSignature;
+ this.className = className;
+ this.sourceFileName = sourceFileName;
+ this.lineNumber = lineNumber;
+ }
+
+ public void resolve(Snapshot snapshot) {
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public String getMethodSignature() {
+ return methodSignature;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public String getSourceFileName() {
+ return sourceFileName;
+ }
+
+ public String getLineNumber() {
+ switch(lineNumber) {
+ case LINE_NUMBER_UNKNOWN:
+ return "(unknown)";
+ case LINE_NUMBER_COMPILED:
+ return "(compiled method)";
+ case LINE_NUMBER_NATIVE:
+ return "(native method)";
+ default:
+ return Integer.toString(lineNumber, 10);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/model/StackTrace.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.model;
+
+/**
+ *
+ * @author Bill Foote
+ */
+
+
+/**
+ * Represents a stack trace, that is, an ordered collection of stack frames.
+ */
+
+public class StackTrace {
+
+ private StackFrame[] frames;
+
+ public StackTrace(StackFrame[] frames) {
+ this.frames = frames;
+ }
+
+ /**
+ * @param depth. The minimum reasonable depth is 1.
+ *
+ * @return a (possibly new) StackTrace that is limited to depth.
+ */
+ public StackTrace traceForDepth(int depth) {
+ if (depth >= frames.length) {
+ return this;
+ } else {
+ StackFrame[] f = new StackFrame[depth];
+ System.arraycopy(frames, 0, f, 0, depth);
+ return new StackTrace(f);
+ }
+ }
+
+ public void resolve(Snapshot snapshot) {
+ for (int i = 0; i < frames.length; i++) {
+ frames[i].resolve(snapshot);
+ }
+ }
+
+ public StackFrame[] getFrames() {
+ return frames;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/FileReadBuffer.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ * Implementation of ReadBuffer using a RandomAccessFile
+ *
+ * @author A. Sundararajan
+ */
+class FileReadBuffer implements ReadBuffer {
+ // underlying file to read
+ private RandomAccessFile file;
+
+ FileReadBuffer(RandomAccessFile file) {
+ this.file = file;
+ }
+
+ private void seek(long pos) throws IOException {
+ file.getChannel().position(pos);
+ }
+
+ public synchronized void get(long pos, byte[] buf) throws IOException {
+ seek(pos);
+ file.read(buf);
+ }
+
+ public synchronized char getChar(long pos) throws IOException {
+ seek(pos);
+ return file.readChar();
+ }
+
+ public synchronized byte getByte(long pos) throws IOException {
+ seek(pos);
+ return (byte) file.read();
+ }
+
+ public synchronized short getShort(long pos) throws IOException {
+ seek(pos);
+ return file.readShort();
+ }
+
+ public synchronized int getInt(long pos) throws IOException {
+ seek(pos);
+ return file.readInt();
+ }
+
+ public synchronized long getLong(long pos) throws IOException {
+ seek(pos);
+ return file.readLong();
+ }
+
+ @Override
+ public void close() throws Exception {
+ file.close();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/HprofReader.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,892 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.*;
+import java.util.Date;
+import java.util.Hashtable;
+import jdk.test.lib.hprof.model.ArrayTypeCodes;
+import jdk.test.lib.hprof.model.*;
+
+/**
+ * Object that's used to read a hprof file.
+ *
+ * @author Bill Foote
+ */
+
+public class HprofReader extends Reader /* imports */ implements ArrayTypeCodes {
+
+ final static int MAGIC_NUMBER = 0x4a415641;
+ // That's "JAVA", the first part of "JAVA PROFILE ..."
+ private final static String[] VERSIONS = {
+ " PROFILE 1.0\0",
+ " PROFILE 1.0.1\0",
+ " PROFILE 1.0.2\0",
+ };
+
+ private final static int VERSION_JDK12BETA3 = 0;
+ private final static int VERSION_JDK12BETA4 = 1;
+ private final static int VERSION_JDK6 = 2;
+ // These version numbers are indices into VERSIONS. The instance data
+ // member version is set to one of these, and it drives decisions when
+ // reading the file.
+ //
+ // Version 1.0.1 added HPROF_GC_PRIM_ARRAY_DUMP, which requires no
+ // version-sensitive parsing.
+ //
+ // Version 1.0.1 changed the type of a constant pool entry from a signature
+ // to a typecode.
+ //
+ // Version 1.0.2 added HPROF_HEAP_DUMP_SEGMENT and HPROF_HEAP_DUMP_END
+ // to allow a large heap to be dumped as a sequence of heap dump segments.
+ //
+ // The HPROF agent in J2SE 1.2 through to 5.0 generate a version 1.0.1
+ // file. In Java SE 6.0 the version is either 1.0.1 or 1.0.2 depending on
+ // the size of the heap (normally it will be 1.0.1 but for multi-GB
+ // heaps the heap dump will not fit in a HPROF_HEAP_DUMP record so the
+ // dump is generated as version 1.0.2).
+
+ //
+ // Record types:
+ //
+ static final int HPROF_UTF8 = 0x01;
+ static final int HPROF_LOAD_CLASS = 0x02;
+ static final int HPROF_UNLOAD_CLASS = 0x03;
+ static final int HPROF_FRAME = 0x04;
+ static final int HPROF_TRACE = 0x05;
+ static final int HPROF_ALLOC_SITES = 0x06;
+ static final int HPROF_HEAP_SUMMARY = 0x07;
+
+ static final int HPROF_START_THREAD = 0x0a;
+ static final int HPROF_END_THREAD = 0x0b;
+
+ static final int HPROF_HEAP_DUMP = 0x0c;
+
+ static final int HPROF_CPU_SAMPLES = 0x0d;
+ static final int HPROF_CONTROL_SETTINGS = 0x0e;
+ static final int HPROF_LOCKSTATS_WAIT_TIME = 0x10;
+ static final int HPROF_LOCKSTATS_HOLD_TIME = 0x11;
+
+ static final int HPROF_GC_ROOT_UNKNOWN = 0xff;
+ static final int HPROF_GC_ROOT_JNI_GLOBAL = 0x01;
+ static final int HPROF_GC_ROOT_JNI_LOCAL = 0x02;
+ static final int HPROF_GC_ROOT_JAVA_FRAME = 0x03;
+ static final int HPROF_GC_ROOT_NATIVE_STACK = 0x04;
+ static final int HPROF_GC_ROOT_STICKY_CLASS = 0x05;
+ static final int HPROF_GC_ROOT_THREAD_BLOCK = 0x06;
+ static final int HPROF_GC_ROOT_MONITOR_USED = 0x07;
+ static final int HPROF_GC_ROOT_THREAD_OBJ = 0x08;
+
+ static final int HPROF_GC_CLASS_DUMP = 0x20;
+ static final int HPROF_GC_INSTANCE_DUMP = 0x21;
+ static final int HPROF_GC_OBJ_ARRAY_DUMP = 0x22;
+ static final int HPROF_GC_PRIM_ARRAY_DUMP = 0x23;
+
+ static final int HPROF_HEAP_DUMP_SEGMENT = 0x1c;
+ static final int HPROF_HEAP_DUMP_END = 0x2c;
+
+ private final static int T_CLASS = 2;
+
+ private int version; // The version of .hprof being read
+
+ private int debugLevel;
+ private long currPos; // Current position in the file
+
+ private int dumpsToSkip;
+ private boolean callStack; // If true, read the call stack of objects
+
+ private int identifierSize; // Size, in bytes, of identifiers.
+ private Hashtable<Long, String> names;
+
+ // Hashtable<Integer, ThreadObject>, used to map the thread sequence number
+ // (aka "serial number") to the thread object ID for
+ // HPROF_GC_ROOT_THREAD_OBJ. ThreadObject is a trivial inner class,
+ // at the end of this file.
+ private Hashtable<Integer, ThreadObject> threadObjects;
+
+ // Hashtable<Long, String>, maps class object ID to class name
+ // (with / converted to .)
+ private Hashtable<Long, String> classNameFromObjectID;
+
+ // Hashtable<Integer, Integer>, maps class serial # to class object ID
+ private Hashtable<Integer, String> classNameFromSerialNo;
+
+ // Hashtable<Long, StackFrame> maps stack frame ID to StackFrame.
+ // Null if we're not tracking them.
+ private Hashtable<Long, StackFrame> stackFrames;
+
+ // Hashtable<Integer, StackTrace> maps stack frame ID to StackTrace
+ // Null if we're not tracking them.
+ private Hashtable<Integer, StackTrace> stackTraces;
+
+ private Snapshot snapshot;
+
+ public HprofReader(String fileName, PositionDataInputStream in,
+ int dumpNumber, boolean callStack, int debugLevel)
+ throws IOException {
+ super(in);
+ RandomAccessFile file = new RandomAccessFile(fileName, "r");
+ this.snapshot = new Snapshot(MappedReadBuffer.create(file));
+ this.dumpsToSkip = dumpNumber - 1;
+ this.callStack = callStack;
+ this.debugLevel = debugLevel;
+ names = new Hashtable<Long, String>();
+ threadObjects = new Hashtable<Integer, ThreadObject>(43);
+ classNameFromObjectID = new Hashtable<Long, String>();
+ if (callStack) {
+ stackFrames = new Hashtable<Long, StackFrame>(43);
+ stackTraces = new Hashtable<Integer, StackTrace>(43);
+ classNameFromSerialNo = new Hashtable<Integer, String>();
+ }
+ }
+
+ public Snapshot read() throws IOException {
+ currPos = 4; // 4 because of the magic number
+ version = readVersionHeader();
+ identifierSize = in.readInt();
+ snapshot.setIdentifierSize(identifierSize);
+ if (version >= VERSION_JDK12BETA4) {
+ snapshot.setNewStyleArrayClass(true);
+ } else {
+ snapshot.setNewStyleArrayClass(false);
+ }
+
+ currPos += 4;
+ if (identifierSize != 4 && identifierSize != 8) {
+ throw new IOException("I'm sorry, but I can't deal with an identifier size of " + identifierSize + ". I can only deal with 4 or 8.");
+ }
+ System.out.println("Dump file created " + (new Date(in.readLong())));
+ currPos += 8;
+
+ for (;;) {
+ int type;
+ try {
+ type = in.readUnsignedByte();
+ } catch (EOFException ignored) {
+ break;
+ }
+ in.readInt(); // Timestamp of this record
+ // Length of record: readInt() will return negative value for record
+ // length >2GB. so store 32bit value in long to keep it unsigned.
+ long length = in.readInt() & 0xffffffffL;
+ if (debugLevel > 0) {
+ System.out.println("Read record type " + type
+ + ", length " + length
+ + " at position " + toHex(currPos));
+ }
+ if (length < 0) {
+ throw new IOException("Bad record length of " + length
+ + " at byte " + toHex(currPos+5)
+ + " of file.");
+ }
+ currPos += 9 + length;
+ switch (type) {
+ case HPROF_UTF8: {
+ long id = readID();
+ byte[] chars = new byte[(int)length - identifierSize];
+ in.readFully(chars);
+ names.put(id, new String(chars));
+ break;
+ }
+ case HPROF_LOAD_CLASS: {
+ int serialNo = in.readInt(); // Not used
+ long classID = readID();
+ int stackTraceSerialNo = in.readInt();
+ long classNameID = readID();
+ Long classIdI = classID;
+ String nm = getNameFromID(classNameID).replace('/', '.');
+ classNameFromObjectID.put(classIdI, nm);
+ if (classNameFromSerialNo != null) {
+ classNameFromSerialNo.put(serialNo, nm);
+ }
+ break;
+ }
+
+ case HPROF_HEAP_DUMP: {
+ if (dumpsToSkip <= 0) {
+ try {
+ readHeapDump(length, currPos);
+ } catch (EOFException exp) {
+ handleEOF(exp, snapshot);
+ }
+ if (debugLevel > 0) {
+ System.out.println(" Finished processing instances in heap dump.");
+ }
+ return snapshot;
+ } else {
+ dumpsToSkip--;
+ skipBytes(length);
+ }
+ break;
+ }
+
+ case HPROF_HEAP_DUMP_END: {
+ if (version >= VERSION_JDK6) {
+ if (dumpsToSkip <= 0) {
+ skipBytes(length); // should be no-op
+ return snapshot;
+ } else {
+ // skip this dump (of the end record for a sequence of dump segments)
+ dumpsToSkip--;
+ }
+ } else {
+ // HPROF_HEAP_DUMP_END only recognized in >= 1.0.2
+ warn("Ignoring unrecognized record type " + type);
+ }
+ skipBytes(length); // should be no-op
+ break;
+ }
+
+ case HPROF_HEAP_DUMP_SEGMENT: {
+ if (version >= VERSION_JDK6) {
+ if (dumpsToSkip <= 0) {
+ try {
+ // read the dump segment
+ readHeapDump(length, currPos);
+ } catch (EOFException exp) {
+ handleEOF(exp, snapshot);
+ }
+ } else {
+ // all segments comprising the heap dump will be skipped
+ skipBytes(length);
+ }
+ } else {
+ // HPROF_HEAP_DUMP_SEGMENT only recognized in >= 1.0.2
+ warn("Ignoring unrecognized record type " + type);
+ skipBytes(length);
+ }
+ break;
+ }
+
+ case HPROF_FRAME: {
+ if (stackFrames == null) {
+ skipBytes(length);
+ } else {
+ long id = readID();
+ String methodName = getNameFromID(readID());
+ String methodSig = getNameFromID(readID());
+ String sourceFile = getNameFromID(readID());
+ int classSer = in.readInt();
+ String className = classNameFromSerialNo.get(classSer);
+ int lineNumber = in.readInt();
+ if (lineNumber < StackFrame.LINE_NUMBER_NATIVE) {
+ warn("Weird stack frame line number: " + lineNumber);
+ lineNumber = StackFrame.LINE_NUMBER_UNKNOWN;
+ }
+ stackFrames.put(id,
+ new StackFrame(methodName, methodSig,
+ className, sourceFile,
+ lineNumber));
+ }
+ break;
+ }
+ case HPROF_TRACE: {
+ if (stackTraces == null) {
+ skipBytes(length);
+ } else {
+ int serialNo = in.readInt();
+ int threadSeq = in.readInt(); // Not used
+ StackFrame[] frames = new StackFrame[in.readInt()];
+ for (int i = 0; i < frames.length; i++) {
+ long fid = readID();
+ frames[i] = stackFrames.get(fid);
+ if (frames[i] == null) {
+ throw new IOException("Stack frame " + toHex(fid) + " not found");
+ }
+ }
+ stackTraces.put(serialNo,
+ new StackTrace(frames));
+ }
+ break;
+ }
+ case HPROF_UNLOAD_CLASS:
+ case HPROF_ALLOC_SITES:
+ case HPROF_START_THREAD:
+ case HPROF_END_THREAD:
+ case HPROF_HEAP_SUMMARY:
+ case HPROF_CPU_SAMPLES:
+ case HPROF_CONTROL_SETTINGS:
+ case HPROF_LOCKSTATS_WAIT_TIME:
+ case HPROF_LOCKSTATS_HOLD_TIME:
+ {
+ // Ignore these record types
+ skipBytes(length);
+ break;
+ }
+ default: {
+ skipBytes(length);
+ warn("Ignoring unrecognized record type " + type);
+ }
+ }
+ }
+
+ return snapshot;
+ }
+
+ private void skipBytes(long length) throws IOException {
+ in.skipBytes((int)length);
+ }
+
+ private int readVersionHeader() throws IOException {
+ int candidatesLeft = VERSIONS.length;
+ boolean[] matched = new boolean[VERSIONS.length];
+ for (int i = 0; i < candidatesLeft; i++) {
+ matched[i] = true;
+ }
+
+ int pos = 0;
+ while (candidatesLeft > 0) {
+ char c = (char) in.readByte();
+ currPos++;
+ for (int i = 0; i < VERSIONS.length; i++) {
+ if (matched[i]) {
+ if (c != VERSIONS[i].charAt(pos)) { // Not matched
+ matched[i] = false;
+ --candidatesLeft;
+ } else if (pos == VERSIONS[i].length() - 1) { // Full match
+ return i;
+ }
+ }
+ }
+ ++pos;
+ }
+ throw new IOException("Version string not recognized at byte " + (pos+3));
+ }
+
+ private void readHeapDump(long bytesLeft, long posAtEnd) throws IOException {
+ while (bytesLeft > 0) {
+ int type = in.readUnsignedByte();
+ if (debugLevel > 0) {
+ System.out.println(" Read heap sub-record type " + type
+ + " at position "
+ + toHex(posAtEnd - bytesLeft));
+ }
+ bytesLeft--;
+ switch(type) {
+ case HPROF_GC_ROOT_UNKNOWN: {
+ long id = readID();
+ bytesLeft -= identifierSize;
+ snapshot.addRoot(new Root(id, 0, Root.UNKNOWN, ""));
+ break;
+ }
+ case HPROF_GC_ROOT_THREAD_OBJ: {
+ long id = readID();
+ int threadSeq = in.readInt();
+ int stackSeq = in.readInt();
+ bytesLeft -= identifierSize + 8;
+ threadObjects.put(threadSeq,
+ new ThreadObject(id, stackSeq));
+ break;
+ }
+ case HPROF_GC_ROOT_JNI_GLOBAL: {
+ long id = readID();
+ long globalRefId = readID(); // Ignored, for now
+ bytesLeft -= 2*identifierSize;
+ snapshot.addRoot(new Root(id, 0, Root.NATIVE_STATIC, ""));
+ break;
+ }
+ case HPROF_GC_ROOT_JNI_LOCAL: {
+ long id = readID();
+ int threadSeq = in.readInt();
+ int depth = in.readInt();
+ bytesLeft -= identifierSize + 8;
+ ThreadObject to = getThreadObjectFromSequence(threadSeq);
+ StackTrace st = getStackTraceFromSerial(to.stackSeq);
+ if (st != null) {
+ st = st.traceForDepth(depth+1);
+ }
+ snapshot.addRoot(new Root(id, to.threadId,
+ Root.NATIVE_LOCAL, "", st));
+ break;
+ }
+ case HPROF_GC_ROOT_JAVA_FRAME: {
+ long id = readID();
+ int threadSeq = in.readInt();
+ int depth = in.readInt();
+ bytesLeft -= identifierSize + 8;
+ ThreadObject to = getThreadObjectFromSequence(threadSeq);
+ StackTrace st = getStackTraceFromSerial(to.stackSeq);
+ if (st != null) {
+ st = st.traceForDepth(depth+1);
+ }
+ snapshot.addRoot(new Root(id, to.threadId,
+ Root.JAVA_LOCAL, "", st));
+ break;
+ }
+ case HPROF_GC_ROOT_NATIVE_STACK: {
+ long id = readID();
+ int threadSeq = in.readInt();
+ bytesLeft -= identifierSize + 4;
+ ThreadObject to = getThreadObjectFromSequence(threadSeq);
+ StackTrace st = getStackTraceFromSerial(to.stackSeq);
+ snapshot.addRoot(new Root(id, to.threadId,
+ Root.NATIVE_STACK, "", st));
+ break;
+ }
+ case HPROF_GC_ROOT_STICKY_CLASS: {
+ long id = readID();
+ bytesLeft -= identifierSize;
+ snapshot.addRoot(new Root(id, 0, Root.SYSTEM_CLASS, ""));
+ break;
+ }
+ case HPROF_GC_ROOT_THREAD_BLOCK: {
+ long id = readID();
+ int threadSeq = in.readInt();
+ bytesLeft -= identifierSize + 4;
+ ThreadObject to = getThreadObjectFromSequence(threadSeq);
+ StackTrace st = getStackTraceFromSerial(to.stackSeq);
+ snapshot.addRoot(new Root(id, to.threadId,
+ Root.THREAD_BLOCK, "", st));
+ break;
+ }
+ case HPROF_GC_ROOT_MONITOR_USED: {
+ long id = readID();
+ bytesLeft -= identifierSize;
+ snapshot.addRoot(new Root(id, 0, Root.BUSY_MONITOR, ""));
+ break;
+ }
+ case HPROF_GC_CLASS_DUMP: {
+ int bytesRead = readClass();
+ bytesLeft -= bytesRead;
+ break;
+ }
+ case HPROF_GC_INSTANCE_DUMP: {
+ int bytesRead = readInstance();
+ bytesLeft -= bytesRead;
+ break;
+ }
+ case HPROF_GC_OBJ_ARRAY_DUMP: {
+ int bytesRead = readArray(false);
+ bytesLeft -= bytesRead;
+ break;
+ }
+ case HPROF_GC_PRIM_ARRAY_DUMP: {
+ int bytesRead = readArray(true);
+ bytesLeft -= bytesRead;
+ break;
+ }
+ default: {
+ throw new IOException("Unrecognized heap dump sub-record type: " + type);
+ }
+ }
+ }
+ if (bytesLeft != 0) {
+ warn("Error reading heap dump or heap dump segment: Byte count is " + bytesLeft + " instead of 0");
+ skipBytes(bytesLeft);
+ }
+ if (debugLevel > 0) {
+ System.out.println(" Finished heap sub-records.");
+ }
+ }
+
+ private long readID() throws IOException {
+ return (identifierSize == 4)?
+ (Snapshot.SMALL_ID_MASK & (long)in.readInt()) : in.readLong();
+ }
+
+ //
+ // Read a java value. If result is non-null, it's expected to be an
+ // array of one element. We use it to fake multiple return values.
+ // @returns the number of bytes read
+ //
+ private int readValue(JavaThing[] resultArr) throws IOException {
+ byte type = in.readByte();
+ return 1 + readValueForType(type, resultArr);
+ }
+
+ private int readValueForType(byte type, JavaThing[] resultArr)
+ throws IOException {
+ if (version >= VERSION_JDK12BETA4) {
+ type = signatureFromTypeId(type);
+ }
+ return readValueForTypeSignature(type, resultArr);
+ }
+
+ private int readValueForTypeSignature(byte type, JavaThing[] resultArr)
+ throws IOException {
+ switch (type) {
+ case '[':
+ case 'L': {
+ long id = readID();
+ if (resultArr != null) {
+ resultArr[0] = new JavaObjectRef(id);
+ }
+ return identifierSize;
+ }
+ case 'Z': {
+ int b = in.readByte();
+ if (b != 0 && b != 1) {
+ warn("Illegal boolean value read");
+ }
+ if (resultArr != null) {
+ resultArr[0] = new JavaBoolean(b != 0);
+ }
+ return 1;
+ }
+ case 'B': {
+ byte b = in.readByte();
+ if (resultArr != null) {
+ resultArr[0] = new JavaByte(b);
+ }
+ return 1;
+ }
+ case 'S': {
+ short s = in.readShort();
+ if (resultArr != null) {
+ resultArr[0] = new JavaShort(s);
+ }
+ return 2;
+ }
+ case 'C': {
+ char ch = in.readChar();
+ if (resultArr != null) {
+ resultArr[0] = new JavaChar(ch);
+ }
+ return 2;
+ }
+ case 'I': {
+ int val = in.readInt();
+ if (resultArr != null) {
+ resultArr[0] = new JavaInt(val);
+ }
+ return 4;
+ }
+ case 'J': {
+ long val = in.readLong();
+ if (resultArr != null) {
+ resultArr[0] = new JavaLong(val);
+ }
+ return 8;
+ }
+ case 'F': {
+ float val = in.readFloat();
+ if (resultArr != null) {
+ resultArr[0] = new JavaFloat(val);
+ }
+ return 4;
+ }
+ case 'D': {
+ double val = in.readDouble();
+ if (resultArr != null) {
+ resultArr[0] = new JavaDouble(val);
+ }
+ return 8;
+ }
+ default: {
+ throw new IOException("Bad value signature: " + type);
+ }
+ }
+ }
+
+ private ThreadObject getThreadObjectFromSequence(int threadSeq)
+ throws IOException {
+ ThreadObject to = threadObjects.get(threadSeq);
+ if (to == null) {
+ throw new IOException("Thread " + threadSeq +
+ " not found for JNI local ref");
+ }
+ return to;
+ }
+
+ private String getNameFromID(long id) throws IOException {
+ return getNameFromID(Long.valueOf(id));
+ }
+
+ private String getNameFromID(Long id) throws IOException {
+ if (id.longValue() == 0L) {
+ return "";
+ }
+ String result = names.get(id);
+ if (result == null) {
+ warn("Name not found at " + toHex(id.longValue()));
+ return "unresolved name " + toHex(id.longValue());
+ }
+ return result;
+ }
+
+ private StackTrace getStackTraceFromSerial(int ser) throws IOException {
+ if (stackTraces == null) {
+ return null;
+ }
+ StackTrace result = stackTraces.get(ser);
+ if (result == null) {
+ warn("Stack trace not found for serial # " + ser);
+ }
+ return result;
+ }
+
+ //
+ // Handle a HPROF_GC_CLASS_DUMP
+ // Return number of bytes read
+ //
+ private int readClass() throws IOException {
+ long id = readID();
+ StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
+ long superId = readID();
+ long classLoaderId = readID();
+ long signersId = readID();
+ long protDomainId = readID();
+ long reserved1 = readID();
+ long reserved2 = readID();
+ int instanceSize = in.readInt();
+ int bytesRead = 7 * identifierSize + 8;
+
+ int numConstPoolEntries = in.readUnsignedShort();
+ bytesRead += 2;
+ for (int i = 0; i < numConstPoolEntries; i++) {
+ int index = in.readUnsignedShort(); // unused
+ bytesRead += 2;
+ bytesRead += readValue(null); // We ignore the values
+ }
+
+ int numStatics = in.readUnsignedShort();
+ bytesRead += 2;
+ JavaThing[] valueBin = new JavaThing[1];
+ JavaStatic[] statics = new JavaStatic[numStatics];
+ for (int i = 0; i < numStatics; i++) {
+ long nameId = readID();
+ bytesRead += identifierSize;
+ byte type = in.readByte();
+ bytesRead++;
+ bytesRead += readValueForType(type, valueBin);
+ String fieldName = getNameFromID(nameId);
+ if (version >= VERSION_JDK12BETA4) {
+ type = signatureFromTypeId(type);
+ }
+ String signature = "" + ((char) type);
+ JavaField f = new JavaField(fieldName, signature);
+ statics[i] = new JavaStatic(f, valueBin[0]);
+ }
+
+ int numFields = in.readUnsignedShort();
+ bytesRead += 2;
+ JavaField[] fields = new JavaField[numFields];
+ for (int i = 0; i < numFields; i++) {
+ long nameId = readID();
+ bytesRead += identifierSize;
+ byte type = in.readByte();
+ bytesRead++;
+ String fieldName = getNameFromID(nameId);
+ if (version >= VERSION_JDK12BETA4) {
+ type = signatureFromTypeId(type);
+ }
+ String signature = "" + ((char) type);
+ fields[i] = new JavaField(fieldName, signature);
+ }
+ String name = classNameFromObjectID.get(id);
+ if (name == null) {
+ warn("Class name not found for " + toHex(id));
+ name = "unknown-name@" + toHex(id);
+ }
+ JavaClass c = new JavaClass(id, name, superId, classLoaderId, signersId,
+ protDomainId, fields, statics,
+ instanceSize);
+ snapshot.addClass(id, c);
+ snapshot.setSiteTrace(c, stackTrace);
+
+ return bytesRead;
+ }
+
+ private String toHex(long addr) {
+ return jdk.test.lib.hprof.util.Misc.toHex(addr);
+ }
+
+ //
+ // Handle a HPROF_GC_INSTANCE_DUMP
+ // Return number of bytes read
+ //
+ private int readInstance() throws IOException {
+ long start = in.position();
+ long id = readID();
+ StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
+ long classID = readID();
+ int bytesFollowing = in.readInt();
+ int bytesRead = (2 * identifierSize) + 8 + bytesFollowing;
+ JavaObject jobj = new JavaObject(classID, start);
+ skipBytes(bytesFollowing);
+ snapshot.addHeapObject(id, jobj);
+ snapshot.setSiteTrace(jobj, stackTrace);
+ return bytesRead;
+ }
+
+ //
+ // Handle a HPROF_GC_OBJ_ARRAY_DUMP or HPROF_GC_PRIM_ARRAY_DUMP
+ // Return number of bytes read
+ //
+ private int readArray(boolean isPrimitive) throws IOException {
+ long start = in.position();
+ long id = readID();
+ StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
+ int num = in.readInt();
+ int bytesRead = identifierSize + 8;
+ long elementClassID;
+ if (isPrimitive) {
+ elementClassID = in.readByte();
+ bytesRead++;
+ } else {
+ elementClassID = readID();
+ bytesRead += identifierSize;
+ }
+
+ // Check for primitive arrays:
+ byte primitiveSignature = 0x00;
+ int elSize = 0;
+ if (isPrimitive || version < VERSION_JDK12BETA4) {
+ switch ((int)elementClassID) {
+ case T_BOOLEAN: {
+ primitiveSignature = (byte) 'Z';
+ elSize = 1;
+ break;
+ }
+ case T_CHAR: {
+ primitiveSignature = (byte) 'C';
+ elSize = 2;
+ break;
+ }
+ case T_FLOAT: {
+ primitiveSignature = (byte) 'F';
+ elSize = 4;
+ break;
+ }
+ case T_DOUBLE: {
+ primitiveSignature = (byte) 'D';
+ elSize = 8;
+ break;
+ }
+ case T_BYTE: {
+ primitiveSignature = (byte) 'B';
+ elSize = 1;
+ break;
+ }
+ case T_SHORT: {
+ primitiveSignature = (byte) 'S';
+ elSize = 2;
+ break;
+ }
+ case T_INT: {
+ primitiveSignature = (byte) 'I';
+ elSize = 4;
+ break;
+ }
+ case T_LONG: {
+ primitiveSignature = (byte) 'J';
+ elSize = 8;
+ break;
+ }
+ }
+ if (version >= VERSION_JDK12BETA4 && primitiveSignature == 0x00) {
+ throw new IOException("Unrecognized typecode: "
+ + elementClassID);
+ }
+ }
+ if (primitiveSignature != 0x00) {
+ int size = elSize * num;
+ bytesRead += size;
+ JavaValueArray va = new JavaValueArray(primitiveSignature, start);
+ skipBytes(size);
+ snapshot.addHeapObject(id, va);
+ snapshot.setSiteTrace(va, stackTrace);
+ } else {
+ int sz = num * identifierSize;
+ bytesRead += sz;
+ JavaObjectArray arr = new JavaObjectArray(elementClassID, start);
+ skipBytes(sz);
+ snapshot.addHeapObject(id, arr);
+ snapshot.setSiteTrace(arr, stackTrace);
+ }
+ return bytesRead;
+ }
+
+ private byte signatureFromTypeId(byte typeId) throws IOException {
+ switch (typeId) {
+ case T_CLASS: {
+ return (byte) 'L';
+ }
+ case T_BOOLEAN: {
+ return (byte) 'Z';
+ }
+ case T_CHAR: {
+ return (byte) 'C';
+ }
+ case T_FLOAT: {
+ return (byte) 'F';
+ }
+ case T_DOUBLE: {
+ return (byte) 'D';
+ }
+ case T_BYTE: {
+ return (byte) 'B';
+ }
+ case T_SHORT: {
+ return (byte) 'S';
+ }
+ case T_INT: {
+ return (byte) 'I';
+ }
+ case T_LONG: {
+ return (byte) 'J';
+ }
+ default: {
+ throw new IOException("Invalid type id of " + typeId);
+ }
+ }
+ }
+
+ private void handleEOF(EOFException exp, Snapshot snapshot) {
+ if (debugLevel > 0) {
+ exp.printStackTrace();
+ }
+ warn("Unexpected EOF. Will miss information...");
+ // we have EOF, we have to tolerate missing references
+ snapshot.setUnresolvedObjectsOK(true);
+ }
+
+ private void warn(String msg) {
+ System.out.println("WARNING: " + msg);
+ }
+
+ //
+ // A trivial data-holder class for HPROF_GC_ROOT_THREAD_OBJ.
+ //
+ private class ThreadObject {
+
+ long threadId;
+ int stackSeq;
+
+ ThreadObject(long threadId, int stackSeq) {
+ this.threadId = threadId;
+ this.stackSeq = stackSeq;
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/MappedReadBuffer.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.MappedByteBuffer;
+import java.nio.channels.FileChannel;
+
+/**
+ * Implementation of ReadBuffer using mapped file buffer
+ *
+ * @author A. Sundararajan
+ */
+class MappedReadBuffer implements ReadBuffer {
+ private MappedByteBuffer buf;
+ private RandomAccessFile file;
+
+ MappedReadBuffer(RandomAccessFile file, MappedByteBuffer buf) {
+ this.file = file;
+ this.buf = buf;
+ }
+
+ /**
+ * Factory method to create correct ReadBuffer for a given file.
+ *
+ * The initial purpose of this method was to choose how to read hprof file for parsing
+ * depending on the size of the file and the system property 'jhat.disableFileMap':
+ * "If file size is more than 2 GB and when file mapping is configured (default),
+ * use mapped file reader".
+ *
+ * However, it has been discovered a problem with this approach.
+ * Creating java.nio.MappedByteBuffer from inside the test leads to hprof file
+ * is locked on Windows until test process dies since there is no good way to
+ * release this resource.
+ *
+ * java.nio.MappedByteBuffer will be used only if 'jhat.enableFileMap' is set to true.
+ * Per default 'jhat.enableFileMap' is not set.
+ */
+ static ReadBuffer create(RandomAccessFile file) throws IOException {
+ if (canUseFileMap()) {
+ MappedByteBuffer buf;
+ try {
+ FileChannel ch = file.getChannel();
+ long size = ch.size();
+ buf = ch.map(FileChannel.MapMode.READ_ONLY, 0, size);
+ ch.close();
+ return new MappedReadBuffer(file, buf);
+ } catch (IOException exp) {
+ exp.printStackTrace();
+ System.err.println("File mapping failed, will use direct read");
+ // fall through
+ }
+ } // else fall through
+ return new FileReadBuffer(file);
+ }
+
+ /**
+ * Set system property 'jhat.enableFileMap' to 'true' to enable file mapping.
+ */
+ private static boolean canUseFileMap() {
+ String prop = System.getProperty("jhat.enableFileMap");
+ return prop != null && prop.equals("true");
+ }
+
+ private void seek(long pos) throws IOException {
+ assert pos <= Integer.MAX_VALUE : "position overflow";
+ buf.position((int)pos);
+ }
+
+ public synchronized void get(long pos, byte[] res) throws IOException {
+ seek(pos);
+ buf.get(res);
+ }
+
+ public synchronized char getChar(long pos) throws IOException {
+ seek(pos);
+ return buf.getChar();
+ }
+
+ public synchronized byte getByte(long pos) throws IOException {
+ seek(pos);
+ return buf.get();
+ }
+
+ public synchronized short getShort(long pos) throws IOException {
+ seek(pos);
+ return buf.getShort();
+ }
+
+ public synchronized int getInt(long pos) throws IOException {
+ seek(pos);
+ return buf.getInt();
+ }
+
+ public synchronized long getLong(long pos) throws IOException {
+ seek(pos);
+ return buf.getLong();
+ }
+
+ @Override
+ public void close() throws Exception {
+ file.close();
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/PositionDataInputStream.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.DataInputStream;
+import java.io.InputStream;
+
+/**
+ * A DataInputStream that keeps track of total bytes read
+ * (in effect 'position' in stream) so far.
+ *
+ */
+public class PositionDataInputStream extends DataInputStream {
+ public PositionDataInputStream(InputStream in) {
+ super(in instanceof PositionInputStream?
+ in : new PositionInputStream(in));
+ }
+
+ public boolean markSupported() {
+ return false;
+ }
+
+ public void mark(int readLimit) {
+ throw new UnsupportedOperationException("mark");
+ }
+
+ public void reset() {
+ throw new UnsupportedOperationException("reset");
+ }
+
+ public long position() {
+ return ((PositionInputStream)in).position();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/PositionInputStream.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * InputStream that keeps track of total bytes read (in effect
+ * 'position' in stream) from the input stream.
+ *
+ */
+public class PositionInputStream extends FilterInputStream {
+ private long position = 0L;
+
+ public PositionInputStream(InputStream in) {
+ super(in);
+ }
+
+ public int read() throws IOException {
+ int res = super.read();
+ if (res != -1) position++;
+ return res;
+ }
+
+ public int read(byte[] b, int off, int len) throws IOException {
+ int res = super.read(b, off, len);
+ if (res != -1) position += res;
+ return res;
+ }
+
+ public long skip(long n) throws IOException {
+ long res = super.skip(n);
+ position += res;
+ return res;
+ }
+
+ public boolean markSupported() {
+ return false;
+ }
+
+ public void mark(int readLimit) {
+ throw new UnsupportedOperationException("mark");
+ }
+
+ public void reset() {
+ throw new UnsupportedOperationException("reset");
+ }
+
+ public long position() {
+ return position;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/ReadBuffer.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.IOException;
+
+/**
+ * Positionable read only buffer
+ *
+ * @author A. Sundararajan
+ */
+public interface ReadBuffer extends AutoCloseable {
+ // read methods - only byte array and int primitive types.
+ // read position has to be specified always.
+ public void get(long pos, byte[] buf) throws IOException;
+ public char getChar(long pos) throws IOException;
+ public byte getByte(long pos) throws IOException;
+ public short getShort(long pos) throws IOException;
+ public int getInt(long pos) throws IOException;
+ public long getLong(long pos) throws IOException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/parser/Reader.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.parser;
+
+import java.io.*;
+import jdk.test.lib.hprof.model.*;
+
+/**
+ * Abstract base class for reading object dump files. A reader need not be
+ * thread-safe.
+ *
+ * @author Bill Foote
+ */
+
+
+public abstract class Reader {
+ protected PositionDataInputStream in;
+
+ protected Reader(PositionDataInputStream in) {
+ this.in = in;
+ }
+
+ /**
+ * Read a snapshot from a data input stream. It is assumed that the magic
+ * number has already been read.
+ */
+ abstract public Snapshot read() throws IOException;
+
+ /**
+ * Read a snapshot from a file.
+ *
+ * @param heapFile The name of a file containing a heap dump
+ * @param callStack If true, read the call stack of allocaation sites
+ */
+ public static Snapshot readFile(String heapFile, boolean callStack,
+ int debugLevel)
+ throws IOException {
+ int dumpNumber = 1;
+ int pos = heapFile.lastIndexOf('#');
+ if (pos > -1) {
+ String num = heapFile.substring(pos+1, heapFile.length());
+ try {
+ dumpNumber = Integer.parseInt(num, 10);
+ } catch (java.lang.NumberFormatException ex) {
+ String msg = "In file name \"" + heapFile
+ + "\", a dump number was "
+ + "expected after the :, but \""
+ + num + "\" was found instead.";
+ System.err.println(msg);
+ throw new IOException(msg);
+ }
+ heapFile = heapFile.substring(0, pos);
+ }
+ try (PositionDataInputStream in = new PositionDataInputStream(
+ new BufferedInputStream(new FileInputStream(heapFile)))) {
+ int i = in.readInt();
+ if (i == HprofReader.MAGIC_NUMBER) {
+ Reader r
+ = new HprofReader(heapFile, in, dumpNumber,
+ callStack, debugLevel);
+ return r.read();
+ } else {
+ throw new IOException("Unrecognized magic number: " + i);
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/util/ArraySorter.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.util;
+import java.util.*;
+
+/**
+ * A singleton utility class that sorts an array of objects.
+ * <p>
+ * Use:
+ * <pre>
+ *
+ * Stuff[] arr = ...;
+ * ArraySorter.sort(arr, new Comparer() {
+ * public int compare(Object lhs, Object rhs) {
+ * return ((String) lhs).compareTo((String) rhs);
+ * }
+ * });
+ * </pre>
+ *
+ * @author Bill Foote
+ */
+
+public class ArraySorter {
+
+ /**
+ * Sort the given array, using c for comparison
+ **/
+ static public void sort(Object[] arr, Comparer c) {
+ quickSort(arr, c, 0, arr.length-1);
+ }
+
+
+ /**
+ * Sort an array of strings, using String.compareTo()
+ **/
+ static public void sortArrayOfStrings(Object[] arr) {
+ sort(arr, new Comparer() {
+ public int compare(Object lhs, Object rhs) {
+ return ((String) lhs).compareTo((String) rhs);
+ }
+ });
+ }
+
+
+ static private void swap(Object[] arr, int a, int b) {
+ Object tmp = arr[a];
+ arr[a] = arr[b];
+ arr[b] = tmp;
+ }
+
+ //
+ // Sorts arr between from and to, inclusive. This is a quick, off-the-top-
+ // of-my-head quicksort: I haven't put any thought into optimizing it.
+ // I _did_ put thought into making sure it's safe (it will always
+ // terminate). Worst-case it's O(n^2), but it will usually run in
+ // in O(n log n). It's well-behaved if the list is already sorted,
+ // or nearly so.
+ //
+ static private void quickSort(Object[] arr, Comparer c, int from, int to) {
+ if (to <= from)
+ return;
+ int mid = (from + to) / 2;
+ if (mid != from)
+ swap(arr, mid, from);
+ Object pivot = arr[from]; // Simple-minded, but reasonable
+ int highestBelowPivot = from - 1;
+ int low = from+1;
+ int high = to;
+ // We now move low and high toward each other, maintaining the
+ // invariants:
+ // arr[i] <= pivot for all i < low
+ // arr[i] > pivot for all i > high
+ // As long as these invariants hold, and every iteration makes
+ // progress, we are safe.
+ while (low <= high) {
+ int cmp = c.compare(arr[low], pivot);
+ if (cmp <= 0) { // arr[low] <= pivot
+ if (cmp < 0) {
+ highestBelowPivot = low;
+ }
+ low++;
+ } else {
+ int c2;
+ for (;;) {
+ // arr[high] > pivot:
+ c2 = c.compare(arr[high], pivot);
+ if (c2 > 0) {
+ high--;
+ if (low > high) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ // At this point, low is never == high, BTW
+ if (low <= high) {
+ swap(arr, low, high);
+ if (c2 < 0) {
+ highestBelowPivot = low;
+ }
+ low++;
+ high--;
+ }
+ }
+ }
+ // At this point, low == high+1
+ // Now we just need to sort from from..highestBelowPivot
+ // and from high+1..to
+ if (highestBelowPivot > from) {
+ // pivot == pivot, so ensure algorithm terminates
+ swap(arr, from, highestBelowPivot);
+ quickSort(arr, c, from, highestBelowPivot-1);
+ }
+ quickSort(arr, c, high+1, to);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/util/Comparer.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.util;
+
+/**
+ * Base class for comparison of two objects.
+ * @see VectorSorter
+ *
+ * @author Bill Foote
+ */
+
+abstract public class Comparer {
+
+ /**
+ * @return a number <, == or > 0 depending on lhs compared to rhs
+ * @see java.lang.String.compareTo
+ **/
+ abstract public int compare(Object lhs, Object rhs);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/util/CompositeEnumeration.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.util;
+
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+import jdk.test.lib.hprof.model.JavaHeapObject;
+
+public class CompositeEnumeration implements Enumeration<JavaHeapObject> {
+ Enumeration<JavaHeapObject> e1;
+ Enumeration<JavaHeapObject> e2;
+
+ public CompositeEnumeration(Enumeration<JavaHeapObject> e1, Enumeration<JavaHeapObject> e2) {
+ this.e1 = e1;
+ this.e2 = e2;
+ }
+
+ public boolean hasMoreElements() {
+ return e1.hasMoreElements() || e2.hasMoreElements();
+ }
+
+ public JavaHeapObject nextElement() {
+ if (e1.hasMoreElements()) {
+ return e1.nextElement();
+ }
+
+ if (e2.hasMoreElements()) {
+ return e2.nextElement();
+ }
+
+ throw new NoSuchElementException();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/util/Misc.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.util;
+import java.util.*;
+
+/**
+ * Miscellaneous functions I couldn't think of a good place to put.
+ *
+ * @author Bill Foote
+ */
+
+
+public class Misc {
+
+ private static char[] digits = { '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
+ public final static String toHex(int addr) {
+ char[] buf = new char[8];
+ int i = 0;
+ for (int s = 28; s >= 0; s -= 4) {
+ buf[i++] = digits[(addr >> s) & 0xf];
+ }
+ return "0x" + new String(buf);
+ }
+
+ public final static String toHex(long addr) {
+ return "0x" + Long.toHexString(addr);
+ }
+
+ public final static long parseHex(String value) {
+ long result = 0;
+ if (value.length() < 2 || value.charAt(0) != '0' ||
+ value.charAt(1) != 'x') {
+ return -1L;
+ }
+ for(int i = 2; i < value.length(); i++) {
+ result *= 16;
+ char ch = value.charAt(i);
+ if (ch >= '0' && ch <= '9') {
+ result += (ch - '0');
+ } else if (ch >= 'a' && ch <= 'f') {
+ result += (ch - 'a') + 10;
+ } else if (ch >= 'A' && ch <= 'F') {
+ result += (ch - 'A') + 10;
+ } else {
+ throw new NumberFormatException("" + ch
+ + " is not a valid hex digit");
+ }
+ }
+ return result;
+ }
+
+ public static String encodeHtml(String str) {
+ final int len = str.length();
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < len; i++) {
+ char ch = str.charAt(i);
+ if (ch == '<') {
+ sb.append("<");
+ } else if (ch == '>') {
+ sb.append(">");
+ } else if (ch == '"') {
+ sb.append(""");
+ } else if (ch == '\'') {
+ sb.append("'");
+ } else if (ch == '&') {
+ sb.append("&");
+ } else if (ch < ' ') {
+ sb.append("&#").append((int)ch).append(';');
+ } else {
+ int c = (ch & 0xFFFF);
+ if (c > 127) {
+ sb.append("&#").append(c).append(';');
+ } else {
+ sb.append(ch);
+ }
+ }
+ }
+ return sb.toString();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/share/classes/jdk/test/lib/hprof/util/VectorSorter.java Fri May 29 12:49:31 2015 +0200
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.
+ */
+
+
+/*
+ * The Original Code is HAT. The Initial Developer of the
+ * Original Code is Bill Foote, with contributions from others
+ * at JavaSoft/Sun.
+ */
+
+package jdk.test.lib.hprof.util;
+import java.util.*;
+
+/**
+ * A singleton utility class that sorts a vector.
+ * <p>
+ * Use:
+ * <pre>
+ *
+ * Vector v = <a vector of, say, String objects>;
+ * VectorSorter.sort(v, new Comparer() {
+ * public int compare(Object lhs, Object rhs) {
+ * return ((String) lhs).compareTo((String) rhs);
+ * }
+ * });
+ * </pre>
+ *
+ * @author Bill Foote
+ */
+
+
+public class VectorSorter {
+
+ /**
+ * Sort the given vector, using c for comparison
+ **/
+ static public void sort(Vector<Object> v, Comparer c) {
+ quickSort(v, c, 0, v.size()-1);
+ }
+
+
+ /**
+ * Sort a vector of strings, using String.compareTo()
+ **/
+ static public void sortVectorOfStrings(Vector<Object> v) {
+ sort(v, new Comparer() {
+ public int compare(Object lhs, Object rhs) {
+ return ((String) lhs).compareTo((String) rhs);
+ }
+ });
+ }
+
+
+ static private void swap(Vector<Object> v, int a, int b) {
+ Object tmp = v.elementAt(a);
+ v.setElementAt(v.elementAt(b), a);
+ v.setElementAt(tmp, b);
+ }
+
+ //
+ // Sorts v between from and to, inclusive. This is a quick, off-the-top-
+ // of-my-head quicksort: I haven't put any thought into optimizing it.
+ // I _did_ put thought into making sure it's safe (it will always
+ // terminate). Worst-case it's O(n^2), but it will usually run in
+ // in O(n log n). It's well-behaved if the list is already sorted,
+ // or nearly so.
+ //
+ static private void quickSort(Vector<Object> v, Comparer c, int from, int to) {
+ if (to <= from)
+ return;
+ int mid = (from + to) / 2;
+ if (mid != from)
+ swap(v, mid, from);
+ Object pivot = v.elementAt(from);
+ // Simple-minded, but reasonable
+ int highestBelowPivot = from - 1;
+ int low = from+1;
+ int high = to;
+ // We now move low and high toward eachother, maintaining the
+ // invariants:
+ // v[i] <= pivot for all i < low
+ // v[i] > pivot for all i > high
+ // As long as these invariants hold, and every iteration makes
+ // progress, we are safe.
+ while (low <= high) {
+ int cmp = c.compare(v.elementAt(low), pivot);
+ if (cmp <= 0) { // v[low] <= pivot
+ if (cmp < 0) {
+ highestBelowPivot = low;
+ }
+ low++;
+ } else {
+ int c2;
+ for (;;) {
+ c2 = c.compare(v.elementAt(high), pivot);
+ // v[high] > pivot:
+ if (c2 > 0) {
+ high--;
+ if (low > high) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ // At this point, low is never == high
+ if (low <= high) {
+ swap(v, low, high);
+ if (c2 < 0) {
+ highestBelowPivot = low;
+ }
+ low++;
+ high--;
+ }
+ }
+ }
+ // Now we just need to sort from from..highestBelowPivot
+ // and from high+1..to
+ if (highestBelowPivot > from) {
+ // pivot == pivot, so ensure algorithm terminates
+ swap(v, from, highestBelowPivot);
+ quickSort(v, c, from, highestBelowPivot-1);
+ }
+ quickSort(v, c, high+1, to);
+ }
+}