From 08f5aeffc1d77d5fcb5b495a58e565de6006635d Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Fri, 10 Jul 2009 11:10:00 -0700 Subject: [PATCH 01/56] 6857194: Add hotspot perf counters to aid class loading performance measurement Add new jvmstat counters to measure detailed class loading time Reviewed-by: acorn, kamg --- .../share/vm/classfile/classFileParser.cpp | 16 +- .../share/vm/classfile/classFileParser.hpp | 1 - .../src/share/vm/classfile/classLoader.cpp | 47 ++++- .../src/share/vm/classfile/classLoader.hpp | 161 +++++++++++++++++- .../share/vm/classfile/systemDictionary.cpp | 17 +- hotspot/src/share/vm/includeDB_core | 3 + hotspot/src/share/vm/oops/instanceKlass.cpp | 31 ++-- hotspot/src/share/vm/prims/jvm.cpp | 14 ++ hotspot/src/share/vm/runtime/perfData.hpp | 4 + .../src/share/vm/services/threadService.cpp | 3 +- .../src/share/vm/services/threadService.hpp | 10 +- 11 files changed, 274 insertions(+), 33 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 36194f79b32..241e8ba824a 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -547,7 +547,6 @@ objArrayHandle ClassFileParser::parse_interfaces(constantPoolHandle cp, int length, Handle class_loader, Handle protection_domain, - PerfTraceTime* vmtimer, symbolHandle class_name, TRAPS) { ClassFileStream* cfs = stream(); @@ -575,13 +574,11 @@ objArrayHandle ClassFileParser::parse_interfaces(constantPoolHandle cp, guarantee_property(unresolved_klass->byte_at(0) != JVM_SIGNATURE_ARRAY, "Bad interface name in class file %s", CHECK_(nullHandle)); - vmtimer->suspend(); // do not count recursive loading twice // Call resolve_super so classcircularity is checked klassOop k = SystemDictionary::resolve_super_or_fail(class_name, unresolved_klass, class_loader, protection_domain, false, CHECK_(nullHandle)); interf = KlassHandle(THREAD, k); - vmtimer->resume(); if (LinkWellKnownClasses) // my super type is well known to me cp->klass_at_put(interface_index, interf()); // eagerly resolve @@ -2558,7 +2555,15 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name, ClassFileStream* cfs = stream(); // Timing - PerfTraceTime vmtimer(ClassLoader::perf_accumulated_time()); + assert(THREAD->is_Java_thread(), "must be a JavaThread"); + JavaThread* jt = (JavaThread*) THREAD; + + PerfClassTraceTime ctimer(ClassLoader::perf_class_parse_time(), + ClassLoader::perf_class_parse_selftime(), + NULL, + jt->get_thread_stat()->perf_recursion_counts_addr(), + jt->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::PARSE_CLASS); _has_finalizer = _has_empty_finalizer = _has_vanilla_constructor = false; @@ -2738,7 +2743,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name, if (itfs_len == 0) { local_interfaces = objArrayHandle(THREAD, Universe::the_empty_system_obj_array()); } else { - local_interfaces = parse_interfaces(cp, itfs_len, class_loader, protection_domain, &vmtimer, _class_name, CHECK_(nullHandle)); + local_interfaces = parse_interfaces(cp, itfs_len, class_loader, protection_domain, _class_name, CHECK_(nullHandle)); } // Fields (offsets are filled in later) @@ -2782,6 +2787,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(symbolHandle name, protection_domain, true, CHECK_(nullHandle)); + KlassHandle kh (THREAD, k); super_klass = instanceKlassHandle(THREAD, kh()); if (LinkWellKnownClasses) // my super class is well known to me diff --git a/hotspot/src/share/vm/classfile/classFileParser.hpp b/hotspot/src/share/vm/classfile/classFileParser.hpp index fd8a36950c0..db1d291c0c4 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.hpp +++ b/hotspot/src/share/vm/classfile/classFileParser.hpp @@ -61,7 +61,6 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC { int length, Handle class_loader, Handle protection_domain, - PerfTraceTime* vmtimer, symbolHandle class_name, TRAPS); diff --git a/hotspot/src/share/vm/classfile/classLoader.cpp b/hotspot/src/share/vm/classfile/classLoader.cpp index 9e48c90a7e4..74f9ba307d0 100644 --- a/hotspot/src/share/vm/classfile/classLoader.cpp +++ b/hotspot/src/share/vm/classfile/classLoader.cpp @@ -48,9 +48,26 @@ static canonicalize_fn_t CanonicalizeEntry = NULL; PerfCounter* ClassLoader::_perf_accumulated_time = NULL; PerfCounter* ClassLoader::_perf_classes_inited = NULL; PerfCounter* ClassLoader::_perf_class_init_time = NULL; +PerfCounter* ClassLoader::_perf_class_init_selftime = NULL; +PerfCounter* ClassLoader::_perf_classes_verified = NULL; PerfCounter* ClassLoader::_perf_class_verify_time = NULL; +PerfCounter* ClassLoader::_perf_class_verify_selftime = NULL; PerfCounter* ClassLoader::_perf_classes_linked = NULL; PerfCounter* ClassLoader::_perf_class_link_time = NULL; +PerfCounter* ClassLoader::_perf_class_link_selftime = NULL; +PerfCounter* ClassLoader::_perf_class_parse_time = NULL; +PerfCounter* ClassLoader::_perf_class_parse_selftime = NULL; +PerfCounter* ClassLoader::_perf_sys_class_lookup_time = NULL; +PerfCounter* ClassLoader::_perf_shared_classload_time = NULL; +PerfCounter* ClassLoader::_perf_sys_classload_time = NULL; +PerfCounter* ClassLoader::_perf_app_classload_time = NULL; +PerfCounter* ClassLoader::_perf_app_classload_selftime = NULL; +PerfCounter* ClassLoader::_perf_app_classload_count = NULL; +PerfCounter* ClassLoader::_perf_define_appclasses = NULL; +PerfCounter* ClassLoader::_perf_define_appclass_time = NULL; +PerfCounter* ClassLoader::_perf_define_appclass_selftime = NULL; +PerfCounter* ClassLoader::_perf_app_classfile_bytes_read = NULL; +PerfCounter* ClassLoader::_perf_sys_classfile_bytes_read = NULL; PerfCounter* ClassLoader::_sync_systemLoaderLockContentionRate = NULL; PerfCounter* ClassLoader::_sync_nonSystemLoaderLockContentionRate = NULL; PerfCounter* ClassLoader::_sync_JVMFindLoadedClassLockFreeCounter = NULL; @@ -152,6 +169,9 @@ ClassFileStream* ClassPathDirEntry::open_stream(const char* name) { hpi::close(file_handle); // construct ClassFileStream if (num_read == (size_t)st.st_size) { + if (UsePerfData) { + ClassLoader::perf_sys_classfile_bytes_read()->inc(num_read); + } return new ClassFileStream(buffer, st.st_size, _dir); // Resource allocated } } @@ -198,6 +218,9 @@ ClassFileStream* ClassPathZipEntry::open_stream(const char* name) { buffer = NEW_RESOURCE_ARRAY(u1, filesize); if (!(*ReadEntry)(_zip, entry, buffer, filename)) return NULL; } + if (UsePerfData) { + ClassLoader::perf_sys_classfile_bytes_read()->inc(filesize); + } // return result return new ClassFileStream(buffer, filesize, _zip_name); // Resource allocated } @@ -825,7 +848,9 @@ instanceKlassHandle ClassLoader::load_classfile(symbolHandle h_name, TRAPS) { ClassFileStream* stream = NULL; int classpath_index = 0; { - PerfTraceTime vmtimer(perf_accumulated_time()); + PerfClassTraceTime vmtimer(perf_sys_class_lookup_time(), + ((JavaThread*) THREAD)->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::CLASS_LOAD); ClassPathEntry* e = _first_entry; while (e != NULL) { stream = e->open_stream(name); @@ -890,11 +915,29 @@ void ClassLoader::initialize() { // jvmstat performance counters NEWPERFTICKCOUNTER(_perf_accumulated_time, SUN_CLS, "time"); NEWPERFTICKCOUNTER(_perf_class_init_time, SUN_CLS, "classInitTime"); + NEWPERFTICKCOUNTER(_perf_class_init_selftime, SUN_CLS, "classInitTime.self"); NEWPERFTICKCOUNTER(_perf_class_verify_time, SUN_CLS, "classVerifyTime"); + NEWPERFTICKCOUNTER(_perf_class_verify_selftime, SUN_CLS, "classVerifyTime.self"); NEWPERFTICKCOUNTER(_perf_class_link_time, SUN_CLS, "classLinkedTime"); - + NEWPERFTICKCOUNTER(_perf_class_link_selftime, SUN_CLS, "classLinkedTime.self"); NEWPERFEVENTCOUNTER(_perf_classes_inited, SUN_CLS, "initializedClasses"); NEWPERFEVENTCOUNTER(_perf_classes_linked, SUN_CLS, "linkedClasses"); + NEWPERFEVENTCOUNTER(_perf_classes_verified, SUN_CLS, "verifiedClasses"); + + NEWPERFTICKCOUNTER(_perf_class_parse_time, SUN_CLS, "parseClassTime"); + NEWPERFTICKCOUNTER(_perf_class_parse_selftime, SUN_CLS, "parseClassTime.self"); + NEWPERFTICKCOUNTER(_perf_sys_class_lookup_time, SUN_CLS, "lookupSysClassTime"); + NEWPERFTICKCOUNTER(_perf_shared_classload_time, SUN_CLS, "sharedClassLoadTime"); + NEWPERFTICKCOUNTER(_perf_sys_classload_time, SUN_CLS, "sysClassLoadTime"); + NEWPERFTICKCOUNTER(_perf_app_classload_time, SUN_CLS, "appClassLoadTime"); + NEWPERFTICKCOUNTER(_perf_app_classload_selftime, SUN_CLS, "appClassLoadTime.self"); + NEWPERFEVENTCOUNTER(_perf_app_classload_count, SUN_CLS, "appClassLoadCount"); + NEWPERFTICKCOUNTER(_perf_define_appclasses, SUN_CLS, "defineAppClasses"); + NEWPERFTICKCOUNTER(_perf_define_appclass_time, SUN_CLS, "defineAppClassTime"); + NEWPERFTICKCOUNTER(_perf_define_appclass_selftime, SUN_CLS, "defineAppClassTime.self"); + NEWPERFBYTECOUNTER(_perf_app_classfile_bytes_read, SUN_CLS, "appClassBytes"); + NEWPERFBYTECOUNTER(_perf_sys_classfile_bytes_read, SUN_CLS, "sysClassBytes"); + // The following performance counters are added for measuring the impact // of the bug fix of 6365597. They are mainly focused on finding out diff --git a/hotspot/src/share/vm/classfile/classLoader.hpp b/hotspot/src/share/vm/classfile/classLoader.hpp index 9a04c2e43fc..3c6187c5af4 100644 --- a/hotspot/src/share/vm/classfile/classLoader.hpp +++ b/hotspot/src/share/vm/classfile/classLoader.hpp @@ -149,9 +149,26 @@ class ClassLoader: AllStatic { static PerfCounter* _perf_accumulated_time; static PerfCounter* _perf_classes_inited; static PerfCounter* _perf_class_init_time; + static PerfCounter* _perf_class_init_selftime; + static PerfCounter* _perf_classes_verified; static PerfCounter* _perf_class_verify_time; + static PerfCounter* _perf_class_verify_selftime; static PerfCounter* _perf_classes_linked; static PerfCounter* _perf_class_link_time; + static PerfCounter* _perf_class_link_selftime; + static PerfCounter* _perf_class_parse_time; + static PerfCounter* _perf_class_parse_selftime; + static PerfCounter* _perf_sys_class_lookup_time; + static PerfCounter* _perf_shared_classload_time; + static PerfCounter* _perf_sys_classload_time; + static PerfCounter* _perf_app_classload_time; + static PerfCounter* _perf_app_classload_selftime; + static PerfCounter* _perf_app_classload_count; + static PerfCounter* _perf_define_appclasses; + static PerfCounter* _perf_define_appclass_time; + static PerfCounter* _perf_define_appclass_selftime; + static PerfCounter* _perf_app_classfile_bytes_read; + static PerfCounter* _perf_sys_classfile_bytes_read; static PerfCounter* _sync_systemLoaderLockContentionRate; static PerfCounter* _sync_nonSystemLoaderLockContentionRate; @@ -196,12 +213,29 @@ class ClassLoader: AllStatic { static void print_bootclasspath(); // Timing - static PerfCounter* perf_accumulated_time() { return _perf_accumulated_time; } - static PerfCounter* perf_classes_inited() { return _perf_classes_inited; } - static PerfCounter* perf_class_init_time() { return _perf_class_init_time; } - static PerfCounter* perf_class_verify_time() { return _perf_class_verify_time; } - static PerfCounter* perf_classes_linked() { return _perf_classes_linked; } - static PerfCounter* perf_class_link_time() { return _perf_class_link_time; } + static PerfCounter* perf_accumulated_time() { return _perf_accumulated_time; } + static PerfCounter* perf_classes_inited() { return _perf_classes_inited; } + static PerfCounter* perf_class_init_time() { return _perf_class_init_time; } + static PerfCounter* perf_class_init_selftime() { return _perf_class_init_selftime; } + static PerfCounter* perf_classes_verified() { return _perf_classes_verified; } + static PerfCounter* perf_class_verify_time() { return _perf_class_verify_time; } + static PerfCounter* perf_class_verify_selftime() { return _perf_class_verify_selftime; } + static PerfCounter* perf_classes_linked() { return _perf_classes_linked; } + static PerfCounter* perf_class_link_time() { return _perf_class_link_time; } + static PerfCounter* perf_class_link_selftime() { return _perf_class_link_selftime; } + static PerfCounter* perf_class_parse_time() { return _perf_class_parse_time; } + static PerfCounter* perf_class_parse_selftime() { return _perf_class_parse_selftime; } + static PerfCounter* perf_sys_class_lookup_time() { return _perf_sys_class_lookup_time; } + static PerfCounter* perf_shared_classload_time() { return _perf_shared_classload_time; } + static PerfCounter* perf_sys_classload_time() { return _perf_sys_classload_time; } + static PerfCounter* perf_app_classload_time() { return _perf_app_classload_time; } + static PerfCounter* perf_app_classload_selftime() { return _perf_app_classload_selftime; } + static PerfCounter* perf_app_classload_count() { return _perf_app_classload_count; } + static PerfCounter* perf_define_appclasses() { return _perf_define_appclasses; } + static PerfCounter* perf_define_appclass_time() { return _perf_define_appclass_time; } + static PerfCounter* perf_define_appclass_selftime() { return _perf_define_appclass_selftime; } + static PerfCounter* perf_app_classfile_bytes_read() { return _perf_app_classfile_bytes_read; } + static PerfCounter* perf_sys_classfile_bytes_read() { return _perf_sys_classfile_bytes_read; } // Record how often system loader lock object is contended static PerfCounter* sync_systemLoaderLockContentionRate() { @@ -307,3 +341,118 @@ class ClassLoader: AllStatic { static int compile_the_world_counter() { return _compile_the_world_counter; } #endif //PRODUCT }; + +// PerfClassTraceTime is used to measure time for class loading related events. +// This class tracks cumulative time and exclusive time for specific event types. +// During the execution of one event, other event types (e.g. class loading and +// resolution) as well as recursive calls of the same event type could happen. +// Only one elapsed timer (cumulative) and one thread-local self timer (exclusive) +// (i.e. only one event type) are active at a time even multiple PerfClassTraceTime +// instances have been created as multiple events are happening. +class PerfClassTraceTime { + public: + enum { + CLASS_LOAD = 0, + PARSE_CLASS = 1, + CLASS_LINK = 2, + CLASS_VERIFY = 3, + CLASS_CLINIT = 4, + DEFINE_CLASS = 5, + EVENT_TYPE_COUNT = 6 + }; + protected: + // _t tracks time from initialization to destruction of this timer instance + // including time for all other event types, and recursive calls of this type. + // When a timer is called recursively, the elapsedTimer _t would not be used. + elapsedTimer _t; + PerfLongCounter* _timep; + PerfLongCounter* _selftimep; + PerfLongCounter* _eventp; + // pointer to thread-local recursion counter and timer array + // The thread_local timers track cumulative time for specific event types + // exclusive of time for other event types, but including recursive calls + // of the same type. + int* _recursion_counters; + elapsedTimer* _timers; + int _event_type; + int _prev_active_event; + + public: + + inline PerfClassTraceTime(PerfLongCounter* timep, /* counter incremented with inclusive time */ + PerfLongCounter* selftimep, /* counter incremented with exclusive time */ + PerfLongCounter* eventp, /* event counter */ + int* recursion_counters, /* thread-local recursion counter array */ + elapsedTimer* timers, /* thread-local timer array */ + int type /* event type */ ) : + _timep(timep), _selftimep(selftimep), _eventp(eventp), _recursion_counters(recursion_counters), _timers(timers), _event_type(type) { + initialize(); + } + + inline PerfClassTraceTime(PerfLongCounter* timep, /* counter incremented with inclusive time */ + elapsedTimer* timers, /* thread-local timer array */ + int type /* event type */ ) : + _timep(timep), _selftimep(NULL), _eventp(NULL), _recursion_counters(NULL), _timers(timers), _event_type(type) { + initialize(); + } + + void initialize() { + if (!UsePerfData) return; + + if (_eventp != NULL) { + // increment the event counter + _eventp->inc(); + } + + // stop the current active thread-local timer to measure inclusive time + _prev_active_event = -1; + for (int i=0; i < EVENT_TYPE_COUNT; i++) { + if (_timers[i].is_active()) { + assert(_prev_active_event == -1, "should have only one active timer"); + _prev_active_event = i; + _timers[i].stop(); + } + } + + if (_recursion_counters == NULL || (_recursion_counters[_event_type])++ == 0) { + // start the inclusive timer if not recursively called + _t.start(); + } + + // start thread-local timer of the given event type + if (!_timers[_event_type].is_active()) { + _timers[_event_type].start(); + } + } + + inline void suspend() { _t.stop(); _timers[_event_type].stop(); } + inline void resume() { _t.start(); _timers[_event_type].start(); } + + ~PerfClassTraceTime() { + if (!UsePerfData) return; + + // stop the thread-local timer as the event completes + // and resume the thread-local timer of the event next on the stack + _timers[_event_type].stop(); + jlong selftime = _timers[_event_type].ticks(); + + if (_prev_active_event >= 0) { + _timers[_prev_active_event].start(); + } + + if (_recursion_counters != NULL && --(_recursion_counters[_event_type]) > 0) return; + + // increment the counters only on the leaf call + _t.stop(); + _timep->inc(_t.ticks()); + if (_selftimep != NULL) { + _selftimep->inc(selftime); + } + // add all class loading related event selftime to the accumulated time counter + ClassLoader::perf_accumulated_time()->inc(selftime); + + // reset the timer + _timers[_event_type].reset(); + } +}; + diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp index baec74fc2d9..a1efcc595f8 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp @@ -1306,13 +1306,18 @@ static instanceKlassHandle download_and_retry_class_load( instanceKlassHandle SystemDictionary::load_instance_class(symbolHandle class_name, Handle class_loader, TRAPS) { instanceKlassHandle nh = instanceKlassHandle(); // null Handle if (class_loader.is_null()) { + // Search the shared system dictionary for classes preloaded into the // shared spaces. instanceKlassHandle k; - k = load_shared_class(class_name, class_loader, THREAD); + { + PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time()); + k = load_shared_class(class_name, class_loader, THREAD); + } if (k.is_null()) { // Use VM class loader + PerfTraceTime vmtimer(ClassLoader::perf_sys_classload_time()); k = ClassLoader::load_classfile(class_name, CHECK_(nh)); } @@ -1334,6 +1339,16 @@ instanceKlassHandle SystemDictionary::load_instance_class(symbolHandle class_nam // Use user specified class loader to load class. Call loadClass operation on class_loader. ResourceMark rm(THREAD); + assert(THREAD->is_Java_thread(), "must be a JavaThread"); + JavaThread* jt = (JavaThread*) THREAD; + + PerfClassTraceTime vmtimer(ClassLoader::perf_app_classload_time(), + ClassLoader::perf_app_classload_selftime(), + ClassLoader::perf_app_classload_count(), + jt->get_thread_stat()->perf_recursion_counts_addr(), + jt->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::CLASS_LOAD); + Handle s = java_lang_String::create_from_symbol(class_name, CHECK_(nh)); // Translate to external class name format, i.e., convert '/' chars to '.' Handle string = java_lang_String::externalize_classname(s, CHECK_(nh)); diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index f595248f92c..8b7898d30f9 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -874,6 +874,7 @@ classFileParser.cpp signature.hpp classFileParser.cpp symbolOop.hpp classFileParser.cpp symbolTable.hpp classFileParser.cpp systemDictionary.hpp +classFileParser.cpp threadService.hpp classFileParser.cpp timer.hpp classFileParser.cpp universe.inline.hpp classFileParser.cpp verificationType.hpp @@ -926,6 +927,7 @@ classLoader.cpp os_.inline.hpp classLoader.cpp symbolOop.hpp classLoader.cpp systemDictionary.hpp classLoader.cpp threadCritical.hpp +classLoader.cpp threadService.hpp classLoader.cpp timer.hpp classLoader.cpp universe.inline.hpp classLoader.cpp vmSymbols.hpp @@ -4026,6 +4028,7 @@ systemDictionary.cpp placeholders.hpp systemDictionary.cpp resolutionErrors.hpp systemDictionary.cpp signature.hpp systemDictionary.cpp systemDictionary.hpp +systemDictionary.cpp threadService.hpp systemDictionary.cpp typeArrayKlass.hpp systemDictionary.cpp vmSymbols.hpp diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp index b15926b810c..ddf9a6f4acd 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp @@ -158,9 +158,6 @@ bool instanceKlass::link_class_impl( // timer handles recursion assert(THREAD->is_Java_thread(), "non-JavaThread in link_class_impl"); JavaThread* jt = (JavaThread*)THREAD; - PerfTraceTimedEvent vmtimer(ClassLoader::perf_class_link_time(), - ClassLoader::perf_classes_linked(), - jt->get_thread_stat()->class_link_recursion_count_addr()); // link super class before linking this class instanceKlassHandle super(THREAD, this_oop->super()); @@ -194,6 +191,15 @@ bool instanceKlass::link_class_impl( return true; } + // trace only the link time for this klass that includes + // the verification time + PerfClassTraceTime vmtimer(ClassLoader::perf_class_link_time(), + ClassLoader::perf_class_link_selftime(), + ClassLoader::perf_classes_linked(), + jt->get_thread_stat()->perf_recursion_counts_addr(), + jt->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::CLASS_LINK); + // verification & rewriting { ObjectLocker ol(this_oop, THREAD); @@ -203,12 +209,14 @@ bool instanceKlass::link_class_impl( if (!this_oop->is_linked()) { if (!this_oop->is_rewritten()) { { - assert(THREAD->is_Java_thread(), "non-JavaThread in link_class_impl"); - JavaThread* jt = (JavaThread*)THREAD; // Timer includes any side effects of class verification (resolution, // etc), but not recursive entry into verify_code(). - PerfTraceTime timer(ClassLoader::perf_class_verify_time(), - jt->get_thread_stat()->class_verify_recursion_count_addr()); + PerfClassTraceTime timer(ClassLoader::perf_class_verify_time(), + ClassLoader::perf_class_verify_selftime(), + ClassLoader::perf_classes_verified(), + jt->get_thread_stat()->perf_recursion_counts_addr(), + jt->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::CLASS_VERIFY); bool verify_ok = verify_code(this_oop, throw_verifyerror, THREAD); if (!verify_ok) { return false; @@ -350,9 +358,12 @@ void instanceKlass::initialize_impl(instanceKlassHandle this_oop, TRAPS) { JavaThread* jt = (JavaThread*)THREAD; // Timer includes any side effects of class initialization (resolution, // etc), but not recursive entry into call_class_initializer(). - PerfTraceTimedEvent timer(ClassLoader::perf_class_init_time(), - ClassLoader::perf_classes_inited(), - jt->get_thread_stat()->class_init_recursion_count_addr()); + PerfClassTraceTime timer(ClassLoader::perf_class_init_time(), + ClassLoader::perf_class_init_selftime(), + ClassLoader::perf_classes_inited(), + jt->get_thread_stat()->perf_recursion_counts_addr(), + jt->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::CLASS_CLINIT); this_oop->call_class_initializer(THREAD); } diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp index 8333be3d70a..627ed7f6e5b 100644 --- a/hotspot/src/share/vm/prims/jvm.cpp +++ b/hotspot/src/share/vm/prims/jvm.cpp @@ -756,6 +756,20 @@ static void is_lock_held_by_thread(Handle loader, PerfCounter* counter, TRAPS) { static jclass jvm_define_class_common(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source, TRAPS) { if (source == NULL) source = "__JVM_DefineClass__"; + assert(THREAD->is_Java_thread(), "must be a JavaThread"); + JavaThread* jt = (JavaThread*) THREAD; + + PerfClassTraceTime vmtimer(ClassLoader::perf_define_appclass_time(), + ClassLoader::perf_define_appclass_selftime(), + ClassLoader::perf_define_appclasses(), + jt->get_thread_stat()->perf_recursion_counts_addr(), + jt->get_thread_stat()->perf_timers_addr(), + PerfClassTraceTime::DEFINE_CLASS); + + if (UsePerfData) { + ClassLoader::perf_app_classfile_bytes_read()->inc(len); + } + // Since exceptions can be thrown, class initialization can take place // if name is NULL no check for class name in .class stream has to be made. symbolHandle class_name; diff --git a/hotspot/src/share/vm/runtime/perfData.hpp b/hotspot/src/share/vm/runtime/perfData.hpp index 16c0c742b47..f98a5f3cb44 100644 --- a/hotspot/src/share/vm/runtime/perfData.hpp +++ b/hotspot/src/share/vm/runtime/perfData.hpp @@ -868,6 +868,10 @@ class PerfDataManager : AllStatic { {counter = PerfDataManager::create_counter(counter_ns, counter_name, \ PerfData::U_Events,CHECK);} +#define NEWPERFBYTECOUNTER(counter, counter_ns, counter_name) \ + {counter = PerfDataManager::create_counter(counter_ns, counter_name, \ + PerfData::U_Bytes,CHECK);} + // Utility Classes /* diff --git a/hotspot/src/share/vm/services/threadService.cpp b/hotspot/src/share/vm/services/threadService.cpp index ee56b62f70a..a09ce5a59a3 100644 --- a/hotspot/src/share/vm/services/threadService.cpp +++ b/hotspot/src/share/vm/services/threadService.cpp @@ -688,10 +688,9 @@ ThreadStatistics::ThreadStatistics() { _contended_enter_count = 0; _monitor_wait_count = 0; _sleep_count = 0; - _class_init_recursion_count = 0; - _class_verify_recursion_count = 0; _count_pending_reset = false; _timer_pending_reset = false; + memset((void*) _perf_recursion_counts, 0, sizeof(_perf_recursion_counts)); } ThreadSnapshot::ThreadSnapshot(JavaThread* thread) { diff --git a/hotspot/src/share/vm/services/threadService.hpp b/hotspot/src/share/vm/services/threadService.hpp index b9cd3bbe612..eec88a0f88b 100644 --- a/hotspot/src/share/vm/services/threadService.hpp +++ b/hotspot/src/share/vm/services/threadService.hpp @@ -120,9 +120,8 @@ private: bool _timer_pending_reset; // Keep accurate times for potentially recursive class operations - int _class_init_recursion_count; - int _class_verify_recursion_count; - int _class_link_recursion_count; + int _perf_recursion_counts[6]; + elapsedTimer _perf_timers[6]; // utility functions void check_and_reset_count() { @@ -165,9 +164,8 @@ public: void reset_count_stat() { _count_pending_reset = true; } void reset_time_stat() { _timer_pending_reset = true; } - int* class_init_recursion_count_addr() { return &_class_init_recursion_count; } - int* class_verify_recursion_count_addr() { return &_class_verify_recursion_count; } - int* class_link_recursion_count_addr() { return &_class_link_recursion_count; } + int* perf_recursion_counts_addr() { return _perf_recursion_counts; } + elapsedTimer* perf_timers_addr() { return _perf_timers; } }; // Thread snapshot to represent the thread state and statistics From 28d4ad46aa6687f8295c0a724e4d0597ca80c6cd Mon Sep 17 00:00:00 2001 From: Jeremy Manson Date: Mon, 29 Jun 2009 14:42:12 -0700 Subject: [PATCH 02/56] 6850957: Honor -XX:OnOutOfMemoryError when array size exceeds VM limit Call report_java_out_of_memory("Requested array size exceeds VM limit") Reviewed-by: tbell, dholmes, alanb, ysr --- hotspot/src/share/vm/oops/arrayKlass.cpp | 1 + hotspot/src/share/vm/oops/instanceKlass.cpp | 1 + hotspot/src/share/vm/oops/objArrayKlass.cpp | 1 + hotspot/src/share/vm/oops/typeArrayKlass.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/hotspot/src/share/vm/oops/arrayKlass.cpp b/hotspot/src/share/vm/oops/arrayKlass.cpp index 8dde4799a89..0584e8e7ec5 100644 --- a/hotspot/src/share/vm/oops/arrayKlass.cpp +++ b/hotspot/src/share/vm/oops/arrayKlass.cpp @@ -140,6 +140,7 @@ objArrayOop arrayKlass::allocate_arrayArray(int n, int length, TRAPS) { THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); } if (length > arrayOopDesc::max_array_length(T_ARRAY)) { + report_java_out_of_memory("Requested array size exceeds VM limit"); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } int size = objArrayOopDesc::object_size(length); diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp index ddf9a6f4acd..c2b554829e7 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp @@ -508,6 +508,7 @@ bool instanceKlass::implements_interface(klassOop k) const { objArrayOop instanceKlass::allocate_objArray(int n, int length, TRAPS) { if (length < 0) THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); if (length > arrayOopDesc::max_array_length(T_OBJECT)) { + report_java_out_of_memory("Requested array size exceeds VM limit"); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } int size = objArrayOopDesc::object_size(length); diff --git a/hotspot/src/share/vm/oops/objArrayKlass.cpp b/hotspot/src/share/vm/oops/objArrayKlass.cpp index 3f56d9c1ff6..b7d06742661 100644 --- a/hotspot/src/share/vm/oops/objArrayKlass.cpp +++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp @@ -39,6 +39,7 @@ objArrayOop objArrayKlass::allocate(int length, TRAPS) { assert(a->is_parsable(), "Can't publish unless parsable"); return a; } else { + report_java_out_of_memory("Requested array size exceeds VM limit"); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } } else { diff --git a/hotspot/src/share/vm/oops/typeArrayKlass.cpp b/hotspot/src/share/vm/oops/typeArrayKlass.cpp index f5d53faa853..68d67f1ccf6 100644 --- a/hotspot/src/share/vm/oops/typeArrayKlass.cpp +++ b/hotspot/src/share/vm/oops/typeArrayKlass.cpp @@ -80,6 +80,7 @@ typeArrayOop typeArrayKlass::allocate(int length, TRAPS) { assert(t->is_parsable(), "Don't publish unless parsable"); return t; } else { + report_java_out_of_memory("Requested array size exceeds VM limit"); THROW_OOP_0(Universe::out_of_memory_error_array_size()); } } else { From f7b598496d40200f6bab01a8fdac27060a6111c3 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Tue, 30 Jun 2009 11:11:10 +0100 Subject: [PATCH 03/56] 6843003: Windows Server 2008 R2 system recognition Reviewed-by: ohair, sherman --- .../windows/native/java/lang/java_props_md.c | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/jdk/src/windows/native/java/lang/java_props_md.c b/jdk/src/windows/native/java/lang/java_props_md.c index b15a9bafac0..4ab139ad307 100644 --- a/jdk/src/windows/native/java/lang/java_props_md.c +++ b/jdk/src/windows/native/java/lang/java_props_md.c @@ -714,10 +714,10 @@ GetJavaProperties(JNIEnv* env) * Windows XP 64 bit 5 2 * where ((&ver.wServicePackMinor) + 2) = 1 * and si.wProcessorArchitecture = 9 - * Windows Vista family 6 0 - * Windows 2008 6 0 - * where ((&ver.wServicePackMinor) + 2) = 1 - * Windows 7 6 1 + * Windows Vista family 6 0 (VER_NT_WORKSTATION) + * Windows Server 2008 6 0 (!VER_NT_WORKSTATION) + * Windows 7 6 1 (VER_NT_WORKSTATION) + * Windows Server 2008 R2 6 1 (!VER_NT_WORKSTATION) * * This mapping will presumably be augmented as new Windows * versions are released. @@ -768,14 +768,7 @@ GetJavaProperties(JNIEnv* env) } } else if (ver.dwMajorVersion == 6) { /* - * From MSDN OSVERSIONINFOEX documentation: - * - * "Because the version numbers for Windows Server 2008 - * and Windows Vista are identical, you must also test - * whether the wProductType member is VER_NT_WORKSTATION. - * If wProductType is VER_NT_WORKSTATION, the operating - * system is Windows Vista or 7; otherwise, it is Windows - * Server 2008." + * See table in MSDN OSVERSIONINFOEX documentation. */ if (ver.wProductType == VER_NT_WORKSTATION) { switch (ver.dwMinorVersion) { @@ -784,7 +777,11 @@ GetJavaProperties(JNIEnv* env) default: sprops.os_name = "Windows NT (unknown)"; } } else { - sprops.os_name = "Windows Server 2008"; + switch (ver.dwMinorVersion) { + case 0: sprops.os_name = "Windows Server 2008"; break; + case 1: sprops.os_name = "Windows Server 2008 R2"; break; + default: sprops.os_name = "Windows NT (unknown)"; + } } } else { sprops.os_name = "Windows NT (unknown)"; From 2914141733e7a560d030168c5a4ec82dbe444aa0 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 2 Jul 2009 19:48:11 +0400 Subject: [PATCH 04/56] 6380849: RFE: Automatic discovery of PersistanceDelegates Reviewed-by: rupashka, alexp --- .../com/sun/beans/finder/BeanInfoFinder.java | 102 +++++++++++++ .../com/sun/beans/finder/InstanceFinder.java | 111 ++++++++++++++ .../finder/PersistenceDelegateFinder.java | 63 ++++++++ .../beans/finder/PropertyEditorFinder.java | 81 ++++++++++ jdk/src/share/classes/java/beans/Encoder.java | 23 +-- .../classes/java/beans/Introspector.java | 101 ++++--------- .../java/beans/PropertyEditorManager.java | 96 ++++-------- .../Introspector/6380849/TestBeanInfo.java | 102 +++++++++++++ .../Introspector/6380849/beans/FirstBean.java | 4 + .../6380849/beans/FirstBeanBeanInfo.java | 11 ++ .../6380849/beans/SecondBean.java | 4 + .../Introspector/6380849/beans/ThirdBean.java | 4 + .../6380849/infos/SecondBeanBeanInfo.java | 13 ++ .../6380849/infos/ThirdBeanBeanInfo.java | 11 ++ .../PropertyEditor/6380849/FirstBean.java | 2 + .../6380849/FirstBeanEditor.java | 4 + .../PropertyEditor/6380849/SecondBean.java | 2 + .../6380849/TestPropertyEditor.java | 141 ++++++++++++++++++ .../PropertyEditor/6380849/ThirdBean.java | 2 + .../6380849/editors/SecondBeanEditor.java | 6 + .../6380849/editors/ThirdBeanEditor.java | 6 + .../java/beans/XMLEncoder/6380849/Bean.java | 2 + .../6380849/BeanPersistenceDelegate.java | 5 + .../6380849/TestPersistenceDelegate.java | 60 ++++++++ 24 files changed, 811 insertions(+), 145 deletions(-) create mode 100644 jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java create mode 100644 jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java create mode 100644 jdk/test/java/beans/Introspector/6380849/beans/FirstBean.java create mode 100644 jdk/test/java/beans/Introspector/6380849/beans/FirstBeanBeanInfo.java create mode 100644 jdk/test/java/beans/Introspector/6380849/beans/SecondBean.java create mode 100644 jdk/test/java/beans/Introspector/6380849/beans/ThirdBean.java create mode 100644 jdk/test/java/beans/Introspector/6380849/infos/SecondBeanBeanInfo.java create mode 100644 jdk/test/java/beans/Introspector/6380849/infos/ThirdBeanBeanInfo.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/FirstBean.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/FirstBeanEditor.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/SecondBean.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/ThirdBean.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/editors/SecondBeanEditor.java create mode 100644 jdk/test/java/beans/PropertyEditor/6380849/editors/ThirdBeanEditor.java create mode 100644 jdk/test/java/beans/XMLEncoder/6380849/Bean.java create mode 100644 jdk/test/java/beans/XMLEncoder/6380849/BeanPersistenceDelegate.java create mode 100644 jdk/test/java/beans/XMLEncoder/6380849/TestPersistenceDelegate.java diff --git a/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java new file mode 100644 index 00000000000..3e1c37c2d57 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import java.beans.BeanDescriptor; +import java.beans.BeanInfo; +import java.beans.MethodDescriptor; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Method; + +/** + * This is utility class that provides functionality + * to find a {@link BeanInfo} for a JavaBean specified by its type. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class BeanInfoFinder + extends InstanceFinder { + + private static final String DEFAULT = "sun.beans.infos"; + + public BeanInfoFinder() { + super(BeanInfo.class, true, "BeanInfo", DEFAULT); + } + + private static boolean isValid(Class type, Method method) { + return (method != null) && type.equals(method.getDeclaringClass()); + } + + @Override + protected BeanInfo instantiate(Class type, String name) { + BeanInfo info = super.instantiate(type, name); + if (info != null) { + // make sure that the returned BeanInfo matches the class + BeanDescriptor bd = info.getBeanDescriptor(); + if (bd != null) { + if (type.equals(bd.getBeanClass())) { + return info; + } + } + else { + PropertyDescriptor[] pds = info.getPropertyDescriptors(); + if (pds != null) { + for (PropertyDescriptor pd : pds) { + Method method = pd.getReadMethod(); + if (method == null) { + method = pd.getWriteMethod(); + } + if (isValid(type, method)) { + return info; + } + } + } + else { + MethodDescriptor[] mds = info.getMethodDescriptors(); + if (mds != null) { + for (MethodDescriptor md : mds) { + if (isValid(type, md.getMethod())) { + return info; + } + } + } + } + } + } + return null; + } + + @Override + protected BeanInfo instantiate(Class type, String prefix, String name) { + // this optimization will only use the BeanInfo search path + // if is has changed from the original + // or trying to get the ComponentBeanInfo + return !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name) + ? super.instantiate(type, prefix, name) + : null; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java b/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java new file mode 100644 index 00000000000..ddf4b80264b --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/InstanceFinder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +/** + * This is utility class that provides basic functionality + * to find an auxiliary class for a JavaBean specified by its type. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +class InstanceFinder { + + private static final String[] EMPTY = { }; + + private final Class type; + private final boolean allow; + private final String suffix; + private String[] packages; + + InstanceFinder(Class type, boolean allow, String suffix, String... packages) { + this.type = type; + this.allow = allow; + this.suffix = suffix; + this.packages = packages.clone(); + } + + public String[] getPackages() { + return (this.packages.length > 0) + ? this.packages.clone() + : this.packages; + } + + public void setPackages(String... packages) { + this.packages = (packages != null) && (packages.length > 0) + ? packages.clone() + : EMPTY; + } + + public T find(Class type) { + if (type == null) { + return null; + } + String name = type.getName() + this.suffix; + T object = instantiate(type, name); + if (object != null) { + return object; + } + if (this.allow) { + object = instantiate(type, null); + if (object != null) { + return object; + } + } + int index = name.lastIndexOf('.') + 1; + if (index > 0) { + name = name.substring(index); + } + for (String prefix : this.packages) { + object = instantiate(type, prefix, name); + if (object != null) { + return object; + } + } + return null; + } + + protected T instantiate(Class type, String name) { + if (type != null) { + try { + if (name != null) { + type = ClassFinder.findClass(name, type.getClassLoader()); + } + if (this.type.isAssignableFrom(type)) { + return (T) type.newInstance(); + } + } + catch (Exception exception) { + // ignore any exceptions + } + } + return null; + } + + protected T instantiate(Class type, String prefix, String name) { + return instantiate(type, prefix + '.' + name); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java b/jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java new file mode 100644 index 00000000000..f7638b65ca7 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/PersistenceDelegateFinder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import java.beans.PersistenceDelegate; +import java.util.HashMap; +import java.util.Map; + +/** + * This is utility class that provides functionality + * to find a {@link PersistenceDelegate} for a JavaBean specified by its type. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class PersistenceDelegateFinder + extends InstanceFinder { + + private final Map, PersistenceDelegate> registry; + + public PersistenceDelegateFinder() { + super(PersistenceDelegate.class, true, "PersistenceDelegate"); + this.registry = new HashMap, PersistenceDelegate>(); + } + + public void register(Class type, PersistenceDelegate delegate) { + if (delegate != null) { + this.registry.put(type, delegate); + } + else { + this.registry.remove(type); + } + } + + @Override + public PersistenceDelegate find(Class type) { + PersistenceDelegate delegate = this.registry.get(type); + return (delegate != null) ? delegate : super.find(type); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java b/jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java new file mode 100644 index 00000000000..604952a1a23 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import com.sun.beans.WeakCache; + +import java.beans.PropertyEditor; + +import sun.beans.editors.BooleanEditor; +import sun.beans.editors.ByteEditor; +import sun.beans.editors.DoubleEditor; +import sun.beans.editors.EnumEditor; +import sun.beans.editors.FloatEditor; +import sun.beans.editors.IntegerEditor; +import sun.beans.editors.LongEditor; +import sun.beans.editors.ShortEditor; + +/** + * This is utility class that provides functionality + * to find a {@link PropertyEditor} for a JavaBean specified by its type. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class PropertyEditorFinder + extends InstanceFinder { + + private final WeakCache, Class> registry; + + public PropertyEditorFinder() { + super(PropertyEditor.class, false, "Editor", "sun.beans.editors"); + + this.registry = new WeakCache, Class>(); + this.registry.put(Byte.TYPE, ByteEditor.class); + this.registry.put(Short.TYPE, ShortEditor.class); + this.registry.put(Integer.TYPE, IntegerEditor.class); + this.registry.put(Long.TYPE, LongEditor.class); + this.registry.put(Boolean.TYPE, BooleanEditor.class); + this.registry.put(Float.TYPE, FloatEditor.class); + this.registry.put(Double.TYPE, DoubleEditor.class); + } + + public void register(Class type, Class editor) { + this.registry.put(type, editor); + } + + @Override + public PropertyEditor find(Class type) { + PropertyEditor editor = instantiate(this.registry.get(type), null); + if (editor == null) { + editor = super.find(type); + if ((editor == null) && (null != type.getEnumConstants())) { + editor = new EnumEditor(type); + } + } + return editor; + } +} diff --git a/jdk/src/share/classes/java/beans/Encoder.java b/jdk/src/share/classes/java/beans/Encoder.java index 2fcd5b5c727..92e3d695bcb 100644 --- a/jdk/src/share/classes/java/beans/Encoder.java +++ b/jdk/src/share/classes/java/beans/Encoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * 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,7 +24,8 @@ */ package java.beans; -import java.util.Collections; +import com.sun.beans.finder.PersistenceDelegateFinder; + import java.util.HashMap; import java.util.IdentityHashMap; import java.util.Map; @@ -45,8 +46,7 @@ import java.util.Map; */ public class Encoder { - private final Map, PersistenceDelegate> delegates - = Collections.synchronizedMap(new HashMap, PersistenceDelegate>()); + private final PersistenceDelegateFinder finder = new PersistenceDelegateFinder(); private Map bindings = new IdentityHashMap(); private ExceptionListener exceptionListener; boolean executeStatements = true; @@ -166,8 +166,13 @@ public class Encoder { * @see java.beans.BeanInfo#getBeanDescriptor */ public PersistenceDelegate getPersistenceDelegate(Class type) { - PersistenceDelegate pd = this.delegates.get(type); - return (pd != null) ? pd : MetaData.getPersistenceDelegate(type); + synchronized (this.finder) { + PersistenceDelegate pd = this.finder.find(type); + if (pd != null) { + return pd; + } + } + return MetaData.getPersistenceDelegate(type); } /** @@ -184,10 +189,8 @@ public class Encoder { public void setPersistenceDelegate(Class type, PersistenceDelegate persistenceDelegate) { - if (persistenceDelegate != null) { - this.delegates.put(type, persistenceDelegate); - } else { - this.delegates.remove(type); + synchronized (this.finder) { + this.finder.register(type, persistenceDelegate); } } diff --git a/jdk/src/share/classes/java/beans/Introspector.java b/jdk/src/share/classes/java/beans/Introspector.java index 6a50cbe7f7d..b43911cf123 100644 --- a/jdk/src/share/classes/java/beans/Introspector.java +++ b/jdk/src/share/classes/java/beans/Introspector.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER 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 @@ package java.beans; +import com.sun.beans.finder.BeanInfoFinder; import com.sun.beans.finder.ClassFinder; import java.lang.ref.Reference; @@ -45,6 +46,8 @@ import java.util.EventListener; import java.util.List; import java.util.WeakHashMap; import java.util.TreeMap; + +import sun.awt.AppContext; import sun.reflect.misc.ReflectUtil; /** @@ -137,10 +140,6 @@ public class Introspector { // events maps from String names to EventSetDescriptors private Map events; - private final static String DEFAULT_INFO_PATH = "sun.beans.infos"; - - private static String[] searchPath = { DEFAULT_INFO_PATH }; - private final static EventSetDescriptor[] EMPTY_EVENTSETDESCRIPTORS = new EventSetDescriptor[0]; static final String ADD_PREFIX = "add"; @@ -149,7 +148,7 @@ public class Introspector { static final String SET_PREFIX = "set"; static final String IS_PREFIX = "is"; - private static final String BEANINFO_SUFFIX = "BeanInfo"; + private static final Object FINDER_KEY = new Object(); //====================================================================== // Public methods @@ -309,13 +308,11 @@ public class Introspector { * Sun implementation initially sets to {"sun.beans.infos"}. */ - public static synchronized String[] getBeanInfoSearchPath() { - // Return a copy of the searchPath. - String result[] = new String[searchPath.length]; - for (int i = 0; i < searchPath.length; i++) { - result[i] = searchPath[i]; + public static String[] getBeanInfoSearchPath() { + BeanInfoFinder finder = getFinder(); + synchronized (finder) { + return finder.getPackages(); } - return result; } /** @@ -334,12 +331,15 @@ public class Introspector { * @see SecurityManager#checkPropertiesAccess */ - public static synchronized void setBeanInfoSearchPath(String path[]) { + public static void setBeanInfoSearchPath(String[] path) { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPropertiesAccess(); } - searchPath = path; + BeanInfoFinder finder = getFinder(); + synchronized (finder) { + finder.setPackages(path); + } } @@ -447,67 +447,14 @@ public class Introspector { * then it checks to see if the class is its own BeanInfo. Finally, * the BeanInfo search path is prepended to the class and searched. * + * @param beanClass the class type of the bean * @return Instance of an explicit BeanInfo class or null if one isn't found. */ - private static synchronized BeanInfo findExplicitBeanInfo(Class beanClass) { - String name = beanClass.getName() + BEANINFO_SUFFIX; - try { - return (java.beans.BeanInfo)instantiate(beanClass, name); - } catch (Exception ex) { - // Just drop through - + private static BeanInfo findExplicitBeanInfo(Class beanClass) { + BeanInfoFinder finder = getFinder(); + synchronized (finder) { + return finder.find(beanClass); } - // Now try checking if the bean is its own BeanInfo. - try { - if (isSubclass(beanClass, java.beans.BeanInfo.class)) { - return (java.beans.BeanInfo)beanClass.newInstance(); - } - } catch (Exception ex) { - // Just drop through - } - // Now try looking for .fooBeanInfo - name = name.substring(name.lastIndexOf('.')+1); - - for (int i = 0; i < searchPath.length; i++) { - // This optimization will only use the BeanInfo search path if is has changed - // from the original or trying to get the ComponentBeanInfo. - if (!DEFAULT_INFO_PATH.equals(searchPath[i]) || - DEFAULT_INFO_PATH.equals(searchPath[i]) && "ComponentBeanInfo".equals(name)) { - try { - String fullName = searchPath[i] + "." + name; - java.beans.BeanInfo bi = (java.beans.BeanInfo)instantiate(beanClass, fullName); - - // Make sure that the returned BeanInfo matches the class. - if (bi.getBeanDescriptor() != null) { - if (bi.getBeanDescriptor().getBeanClass() == beanClass) { - return bi; - } - } else if (bi.getPropertyDescriptors() != null) { - PropertyDescriptor[] pds = bi.getPropertyDescriptors(); - for (int j = 0; j < pds.length; j++) { - Method method = pds[j].getReadMethod(); - if (method == null) { - method = pds[j].getWriteMethod(); - } - if (method != null && method.getDeclaringClass() == beanClass) { - return bi; - } - } - } else if (bi.getMethodDescriptors() != null) { - MethodDescriptor[] mds = bi.getMethodDescriptors(); - for (int j = 0; j < mds.length; j++) { - Method method = mds[j].getMethod(); - if (method != null && method.getDeclaringClass() == beanClass) { - return bi; - } - } - } - } catch (Exception ex) { - // Silently ignore any errors. - } - } - } - return null; } /** @@ -1483,6 +1430,16 @@ public class Introspector { return false; } + private static BeanInfoFinder getFinder() { + AppContext context = AppContext.getAppContext(); + Object object = context.get(FINDER_KEY); + if (object instanceof BeanInfoFinder) { + return (BeanInfoFinder) object; + } + BeanInfoFinder finder = new BeanInfoFinder(); + context.put(FINDER_KEY, finder); + return finder; + } /** * Try to create an instance of a named class. diff --git a/jdk/src/share/classes/java/beans/PropertyEditorManager.java b/jdk/src/share/classes/java/beans/PropertyEditorManager.java index a456c2bff54..d884e9f0c0c 100644 --- a/jdk/src/share/classes/java/beans/PropertyEditorManager.java +++ b/jdk/src/share/classes/java/beans/PropertyEditorManager.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package java.beans; -import com.sun.beans.WeakCache; -import sun.beans.editors.*; +import com.sun.beans.finder.PropertyEditorFinder; +import sun.awt.AppContext; /** * The PropertyEditorManager can be used to locate a property editor for @@ -55,6 +55,8 @@ import sun.beans.editors.*; public class PropertyEditorManager { + private static final Object FINDER_KEY = new Object(); + /** * Registers an editor class to edit values of the given target class. * If the editor class is {@code null}, @@ -74,12 +76,15 @@ public class PropertyEditorManager { * * @see SecurityManager#checkPropertiesAccess */ - public static synchronized void registerEditor(Class targetType, Class editorClass) { + public static void registerEditor(Class targetType, Class editorClass) { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPropertiesAccess(); } - registry.put(targetType, editorClass); + PropertyEditorFinder finder = getFinder(); + synchronized (finder) { + finder.register(targetType, editorClass); + } } /** @@ -89,46 +94,11 @@ public class PropertyEditorManager { * @return An editor object for the given target class. * The result is null if no suitable editor can be found. */ - public static synchronized PropertyEditor findEditor(Class targetType) { - Class editorClass = registry.get(targetType); - if (editorClass != null) { - try { - Object o = editorClass.newInstance(); - return (PropertyEditor)o; - } catch (Exception ex) { - System.err.println("Couldn't instantiate type editor \"" + - editorClass.getName() + "\" : " + ex); - } + public static PropertyEditor findEditor(Class targetType) { + PropertyEditorFinder finder = getFinder(); + synchronized (finder) { + return finder.find(targetType); } - - // Now try adding "Editor" to the class name. - - String editorName = targetType.getName() + "Editor"; - try { - return (PropertyEditor) Introspector.instantiate(targetType, editorName); - } catch (Exception ex) { - // Silently ignore any errors. - } - - // Now try looking for .fooEditor - int index = editorName.lastIndexOf('.') + 1; - if (index > 0) { - editorName = editorName.substring(index); - } - for (String path : searchPath) { - String name = path + '.' + editorName; - try { - return (PropertyEditor) Introspector.instantiate(targetType, name); - } catch (Exception ex) { - // Silently ignore any errors. - } - } - - if (null != targetType.getEnumConstants()) { - return new EnumEditor(targetType); - } - // We couldn't find a suitable Editor. - return null; } /** @@ -139,8 +109,11 @@ public class PropertyEditorManager { *

The default value for this array is implementation-dependent, * e.g. Sun implementation initially sets to {"sun.beans.editors"}. */ - public static synchronized String[] getEditorSearchPath() { - return searchPath.clone(); + public static String[] getEditorSearchPath() { + PropertyEditorFinder finder = getFinder(); + synchronized (finder) { + return finder.getPackages(); + } } /** @@ -156,28 +129,25 @@ public class PropertyEditorManager { * of system properties. * @see SecurityManager#checkPropertiesAccess */ - public static synchronized void setEditorSearchPath(String[] path) { + public static void setEditorSearchPath(String[] path) { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPropertiesAccess(); } - searchPath = (path != null) - ? path.clone() - : EMPTY; + PropertyEditorFinder finder = getFinder(); + synchronized (finder) { + finder.setPackages(path); + } } - private static String[] searchPath = { "sun.beans.editors" }; - private static final String[] EMPTY = {}; - private static final WeakCache, Class> registry; - - static { - registry = new WeakCache, Class>(); - registry.put(Byte.TYPE, ByteEditor.class); - registry.put(Short.TYPE, ShortEditor.class); - registry.put(Integer.TYPE, IntegerEditor.class); - registry.put(Long.TYPE, LongEditor.class); - registry.put(Boolean.TYPE, BooleanEditor.class); - registry.put(Float.TYPE, FloatEditor.class); - registry.put(Double.TYPE, DoubleEditor.class); + private static PropertyEditorFinder getFinder() { + AppContext context = AppContext.getAppContext(); + Object object = context.get(FINDER_KEY); + if (object instanceof PropertyEditorFinder) { + return (PropertyEditorFinder) object; + } + PropertyEditorFinder finder = new PropertyEditorFinder(); + context.put(FINDER_KEY, finder); + return finder; } } diff --git a/jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java b/jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java new file mode 100644 index 00000000000..b149bffb820 --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/TestBeanInfo.java @@ -0,0 +1,102 @@ +/** + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6380849 + * @summary Tests BeanInfo finder + * @author Sergey Malenkov + */ + +import beans.FirstBean; +import beans.FirstBeanBeanInfo; +import beans.SecondBean; +import beans.ThirdBean; + +import infos.SecondBeanBeanInfo; +import infos.ThirdBeanBeanInfo; + +import java.beans.BeanInfo; +import java.beans.Introspector; +import java.lang.reflect.Field; + +import sun.awt.SunToolkit; + +public class TestBeanInfo implements Runnable { + + private static final String[] SEARCH_PATH = { "infos" }; // NON-NLS: package name + + public static void main(String[] args) throws InterruptedException { + TestBeanInfo test = new TestBeanInfo(); + test.run(); + // the following tests fails on previous build + ThreadGroup group = new ThreadGroup("$$$"); // NON-NLS: unique thread name + Thread thread = new Thread(group, test); + thread.start(); + thread.join(); + } + + private static void test(Class type, Class expected) { + BeanInfo actual; + try { + actual = Introspector.getBeanInfo(type); + type = actual.getClass(); + Field field = type.getDeclaredField("targetBeanInfo"); // NON-NLS: field name + field.setAccessible(true); + actual = (BeanInfo) field.get(actual); + } + catch (Exception exception) { + throw new Error("unexpected error", exception); + } + if ((actual == null) && (expected != null)) { + throw new Error("expected info is not found"); + } + if ((actual != null) && !actual.getClass().equals(expected)) { + throw new Error("found unexpected info"); + } + } + + private boolean passed; + + public void run() { + if (this.passed) { + SunToolkit.createNewAppContext(); + } + Introspector.flushCaches(); + + test(FirstBean.class, FirstBeanBeanInfo.class); + test(SecondBean.class, null); + test(ThirdBean.class, null); + test(ThirdBeanBeanInfo.class, ThirdBeanBeanInfo.class); + + Introspector.setBeanInfoSearchPath(SEARCH_PATH); + Introspector.flushCaches(); + + test(FirstBean.class, FirstBeanBeanInfo.class); + test(SecondBean.class, SecondBeanBeanInfo.class); + test(ThirdBean.class, null); + test(ThirdBeanBeanInfo.class, ThirdBeanBeanInfo.class); + + this.passed = true; + } +} diff --git a/jdk/test/java/beans/Introspector/6380849/beans/FirstBean.java b/jdk/test/java/beans/Introspector/6380849/beans/FirstBean.java new file mode 100644 index 00000000000..cafb44e0bab --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/beans/FirstBean.java @@ -0,0 +1,4 @@ +package beans; + +public class FirstBean { +} diff --git a/jdk/test/java/beans/Introspector/6380849/beans/FirstBeanBeanInfo.java b/jdk/test/java/beans/Introspector/6380849/beans/FirstBeanBeanInfo.java new file mode 100644 index 00000000000..f4d1355703e --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/beans/FirstBeanBeanInfo.java @@ -0,0 +1,11 @@ +package beans; + +import java.beans.BeanDescriptor; +import java.beans.SimpleBeanInfo; + +public class FirstBeanBeanInfo extends SimpleBeanInfo { + @Override + public BeanDescriptor getBeanDescriptor() { + return new BeanDescriptor(FirstBean.class); + } +} diff --git a/jdk/test/java/beans/Introspector/6380849/beans/SecondBean.java b/jdk/test/java/beans/Introspector/6380849/beans/SecondBean.java new file mode 100644 index 00000000000..fbde3902724 --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/beans/SecondBean.java @@ -0,0 +1,4 @@ +package beans; + +public class SecondBean { +} diff --git a/jdk/test/java/beans/Introspector/6380849/beans/ThirdBean.java b/jdk/test/java/beans/Introspector/6380849/beans/ThirdBean.java new file mode 100644 index 00000000000..8fb8b9a92b8 --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/beans/ThirdBean.java @@ -0,0 +1,4 @@ +package beans; + +public class ThirdBean { +} diff --git a/jdk/test/java/beans/Introspector/6380849/infos/SecondBeanBeanInfo.java b/jdk/test/java/beans/Introspector/6380849/infos/SecondBeanBeanInfo.java new file mode 100644 index 00000000000..999a6df9040 --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/infos/SecondBeanBeanInfo.java @@ -0,0 +1,13 @@ +package infos; + +import beans.SecondBean; + +import java.beans.BeanDescriptor; +import java.beans.SimpleBeanInfo; + +public class SecondBeanBeanInfo extends SimpleBeanInfo { + @Override + public BeanDescriptor getBeanDescriptor() { + return new BeanDescriptor(SecondBean.class); + } +} diff --git a/jdk/test/java/beans/Introspector/6380849/infos/ThirdBeanBeanInfo.java b/jdk/test/java/beans/Introspector/6380849/infos/ThirdBeanBeanInfo.java new file mode 100644 index 00000000000..7d295bd07b3 --- /dev/null +++ b/jdk/test/java/beans/Introspector/6380849/infos/ThirdBeanBeanInfo.java @@ -0,0 +1,11 @@ +package infos; + +import java.beans.BeanDescriptor; +import java.beans.SimpleBeanInfo; + +public class ThirdBeanBeanInfo extends SimpleBeanInfo { + @Override + public BeanDescriptor getBeanDescriptor() { + return new BeanDescriptor(ThirdBeanBeanInfo.class); + } +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/FirstBean.java b/jdk/test/java/beans/PropertyEditor/6380849/FirstBean.java new file mode 100644 index 00000000000..e112dbfaa7e --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/FirstBean.java @@ -0,0 +1,2 @@ +public class FirstBean { +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/FirstBeanEditor.java b/jdk/test/java/beans/PropertyEditor/6380849/FirstBeanEditor.java new file mode 100644 index 00000000000..8a227be21fe --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/FirstBeanEditor.java @@ -0,0 +1,4 @@ +import java.beans.PropertyEditorSupport; + +public class FirstBeanEditor extends PropertyEditorSupport { +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/SecondBean.java b/jdk/test/java/beans/PropertyEditor/6380849/SecondBean.java new file mode 100644 index 00000000000..51eea295806 --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/SecondBean.java @@ -0,0 +1,2 @@ +public class SecondBean { +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java b/jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java new file mode 100644 index 00000000000..f7f4d1b1ad1 --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java @@ -0,0 +1,141 @@ +/** + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6380849 + * @summary Tests PropertyEditor finder + * @author Sergey Malenkov + */ + +import editors.SecondBeanEditor; +import editors.ThirdBeanEditor; + +import java.awt.Color; +import java.awt.Font; +import java.beans.PropertyEditor; +import java.beans.PropertyEditorManager; + +import sun.awt.SunToolkit; +import sun.beans.editors.BooleanEditor; +import sun.beans.editors.ByteEditor; +import sun.beans.editors.ColorEditor; +import sun.beans.editors.DoubleEditor; +import sun.beans.editors.EnumEditor; +import sun.beans.editors.FloatEditor; +import sun.beans.editors.FontEditor; +import sun.beans.editors.IntegerEditor; +import sun.beans.editors.LongEditor; +import sun.beans.editors.ShortEditor; +import sun.beans.editors.StringEditor; + +public class TestPropertyEditor implements Runnable { + + private enum Enumeration { + FIRST, SECOND, THIRD + } + + private static final String[] SEARCH_PATH = { "editors" }; // NON-NLS: package name + + public static void main(String[] args) throws InterruptedException { + TestPropertyEditor test = new TestPropertyEditor(); + test.run(); + // the following tests fails on previous build + ThreadGroup group = new ThreadGroup("$$$"); // NON-NLS: unique thread name + Thread thread = new Thread(group, test); + thread.start(); + thread.join(); + } + + private static void test(Class type, Class expected) { + PropertyEditor actual = PropertyEditorManager.findEditor(type); + if ((actual == null) && (expected != null)) { + throw new Error("expected editor is not found"); + } + if ((actual != null) && !actual.getClass().equals(expected)) { + throw new Error("found unexpected editor"); + } + } + + private boolean passed; + + public void run() { + if (this.passed) { + SunToolkit.createNewAppContext(); + } + PropertyEditorManager.registerEditor(ThirdBean.class, ThirdBeanEditor.class); + + test(FirstBean.class, FirstBeanEditor.class); + test(SecondBean.class, null); + test(ThirdBean.class, ThirdBeanEditor.class); + // test editors for default primitive types + test(Byte.TYPE, ByteEditor.class); + test(Short.TYPE, ShortEditor.class); + test(Integer.TYPE, IntegerEditor.class); + test(Long.TYPE, LongEditor.class); + test(Boolean.TYPE, BooleanEditor.class); + test(Float.TYPE, FloatEditor.class); + test(Double.TYPE, DoubleEditor.class); + // test editors for default object types + test(Byte.class, ByteEditor.class); + test(Short.class, ShortEditor.class); + test(Integer.class, IntegerEditor.class); + test(Long.class, LongEditor.class); + test(Boolean.class, BooleanEditor.class); + test(Float.class, FloatEditor.class); + test(Double.class, DoubleEditor.class); + test(String.class, StringEditor.class); + test(Color.class, ColorEditor.class); + test(Font.class, FontEditor.class); + test(Enumeration.class, EnumEditor.class); + + PropertyEditorManager.registerEditor(ThirdBean.class, null); + PropertyEditorManager.setEditorSearchPath(SEARCH_PATH); + + test(FirstBean.class, FirstBeanEditor.class); + test(SecondBean.class, SecondBeanEditor.class); + test(ThirdBean.class, ThirdBeanEditor.class); + // test editors for default primitive types + test(Byte.TYPE, ByteEditor.class); + test(Short.TYPE, ShortEditor.class); + test(Integer.TYPE, IntegerEditor.class); + test(Long.TYPE, LongEditor.class); + test(Boolean.TYPE, BooleanEditor.class); + test(Float.TYPE, FloatEditor.class); + test(Double.TYPE, DoubleEditor.class); + // test editors for default object types + test(Byte.class, null); + test(Short.class, null); + test(Integer.class, null); + test(Long.class, null); + test(Boolean.class, null); + test(Float.class, null); + test(Double.class, null); + test(String.class, null); + test(Color.class, null); + test(Font.class, null); + test(Enumeration.class, EnumEditor.class); + + this.passed = true; + } +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/ThirdBean.java b/jdk/test/java/beans/PropertyEditor/6380849/ThirdBean.java new file mode 100644 index 00000000000..094ab830efb --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/ThirdBean.java @@ -0,0 +1,2 @@ +public class ThirdBean { +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/editors/SecondBeanEditor.java b/jdk/test/java/beans/PropertyEditor/6380849/editors/SecondBeanEditor.java new file mode 100644 index 00000000000..e8b48e0f2ea --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/editors/SecondBeanEditor.java @@ -0,0 +1,6 @@ +package editors; + +import java.beans.PropertyEditorSupport; + +public class SecondBeanEditor extends PropertyEditorSupport { +} diff --git a/jdk/test/java/beans/PropertyEditor/6380849/editors/ThirdBeanEditor.java b/jdk/test/java/beans/PropertyEditor/6380849/editors/ThirdBeanEditor.java new file mode 100644 index 00000000000..14bf7b8d168 --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/6380849/editors/ThirdBeanEditor.java @@ -0,0 +1,6 @@ +package editors; + +import java.beans.PropertyEditorSupport; + +public class ThirdBeanEditor extends PropertyEditorSupport { +} diff --git a/jdk/test/java/beans/XMLEncoder/6380849/Bean.java b/jdk/test/java/beans/XMLEncoder/6380849/Bean.java new file mode 100644 index 00000000000..54145979197 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/6380849/Bean.java @@ -0,0 +1,2 @@ +public class Bean { +} diff --git a/jdk/test/java/beans/XMLEncoder/6380849/BeanPersistenceDelegate.java b/jdk/test/java/beans/XMLEncoder/6380849/BeanPersistenceDelegate.java new file mode 100644 index 00000000000..34278b419e6 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/6380849/BeanPersistenceDelegate.java @@ -0,0 +1,5 @@ +import java.beans.DefaultPersistenceDelegate; + +public class BeanPersistenceDelegate + extends DefaultPersistenceDelegate { +} diff --git a/jdk/test/java/beans/XMLEncoder/6380849/TestPersistenceDelegate.java b/jdk/test/java/beans/XMLEncoder/6380849/TestPersistenceDelegate.java new file mode 100644 index 00000000000..35dde1ab794 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/6380849/TestPersistenceDelegate.java @@ -0,0 +1,60 @@ +/** + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6380849 + * @summary Tests PersistenceDelegate finder + * @author Sergey Malenkov + */ + +import java.beans.PersistenceDelegate; +import java.beans.XMLEncoder; +import java.beans.DefaultPersistenceDelegate; + +public class TestPersistenceDelegate { + + private static final XMLEncoder ENCODER = new XMLEncoder(System.out); + + public static void main(String[] args) throws InterruptedException { + Class type = TestPersistenceDelegate.class; + test(type, DefaultPersistenceDelegate.class); + ENCODER.setPersistenceDelegate(type, new BeanPersistenceDelegate()); + test(type, BeanPersistenceDelegate.class); + ENCODER.setPersistenceDelegate(type, null); + test(type, DefaultPersistenceDelegate.class); + // the following tests fails on previous build + test(Bean.class, BeanPersistenceDelegate.class); + test(BeanPersistenceDelegate.class, BeanPersistenceDelegate.class); + } + + private static void test(Class type, Class expected) { + PersistenceDelegate actual = ENCODER.getPersistenceDelegate(type); + if ((actual == null) && (expected != null)) { + throw new Error("expected delegate is not found"); + } + if ((actual != null) && !actual.getClass().equals(expected)) { + throw new Error("found unexpected delegate"); + } + } +} From 5363b41a3e61cd88a565c1568508c9598b239131 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Fri, 3 Jul 2009 11:13:42 +0800 Subject: [PATCH 05/56] 6853793: OutOfMemoryError in sun.security.provider.certpath.OCSPChecker.check Allocate memory dynamically, keep reading until EOF. Reviewed-by: weijun --- .../provider/certpath/OCSPChecker.java | 23 ++++++++---- .../security/timestamp/HttpTimestamper.java | 35 ++++++++++++------- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java b/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java index 35ed85def19..04e0649d8ff 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -351,18 +351,27 @@ class OCSPChecker extends PKIXCertPathChecker { } in = con.getInputStream(); + byte[] response = null; + int total = 0; int contentLength = con.getContentLength(); - if (contentLength == -1) { + if (contentLength != -1) { + response = new byte[contentLength]; + } else { + response = new byte[2048]; contentLength = Integer.MAX_VALUE; } - byte[] response = new byte[contentLength]; - int total = 0; - int count = 0; - while (count != -1 && total < contentLength) { - count = in.read(response, total, response.length - total); + while (total < contentLength) { + int count = in.read(response, total, response.length - total); + if (count < 0) + break; + total += count; + if (total >= response.length && total < contentLength) { + response = Arrays.copyOf(response, total * 2); + } } + response = Arrays.copyOf(response, total); OCSPResponse ocspResponse = new OCSPResponse(response, pkixParams, responderCert); diff --git a/jdk/src/share/classes/sun/security/timestamp/HttpTimestamper.java b/jdk/src/share/classes/sun/security/timestamp/HttpTimestamper.java index 690f13a2a0f..bb735141159 100644 --- a/jdk/src/share/classes/sun/security/timestamp/HttpTimestamper.java +++ b/jdk/src/share/classes/sun/security/timestamp/HttpTimestamper.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * 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 @@ import java.net.URL; import java.net.HttpURLConnection; import java.util.Iterator; import java.util.Set; +import java.util.Arrays; import sun.security.pkcs.*; @@ -137,23 +138,33 @@ public class HttpTimestamper implements Timestamper { } System.out.println(); } - int contentLength = connection.getContentLength(); - if (contentLength == -1) { - contentLength = Integer.MAX_VALUE; - } verifyMimeType(connection.getContentType()); - replyBuffer = new byte[contentLength]; int total = 0; - int count = 0; - while (count != -1 && total < contentLength) { - count = input.read(replyBuffer, total, - replyBuffer.length - total); - total += count; + int contentLength = connection.getContentLength(); + if (contentLength != -1) { + replyBuffer = new byte[contentLength]; + } else { + replyBuffer = new byte[2048]; + contentLength = Integer.MAX_VALUE; } + + while (total < contentLength) { + int count = input.read(replyBuffer, total, + replyBuffer.length - total); + if (count < 0) + break; + + total += count; + if (total >= replyBuffer.length && total < contentLength) { + replyBuffer = Arrays.copyOf(replyBuffer, total * 2); + } + } + replyBuffer = Arrays.copyOf(replyBuffer, total); + if (DEBUG) { System.out.println("received timestamp response (length=" + - replyBuffer.length + ")"); + total + ")"); } } finally { if (input != null) { From 521bc9973e449dd60debaf5ce3a73352e6cfa19f Mon Sep 17 00:00:00 2001 From: Yong Jeffrey Huang Date: Thu, 2 Jul 2009 20:17:59 -0700 Subject: [PATCH 06/56] 6606396: Notepad and Stylepad demos don't run in Japanese locale Reviewed-by: peytoia, ogino --- .../Notepad/resources/Notepad_ja.properties | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties b/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties index 2999cd757cc..0ec7ce0fcf5 100644 --- a/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties +++ b/jdk/src/share/demo/jfc/Notepad/resources/Notepad_ja.properties @@ -9,7 +9,7 @@ ViewportBackingStore=false # # Each of the strings that follow form a key to be # used to the actual menu definition. -menubar=\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\u30c7\u30d0\u30c3\u30b0 +menubar=file edit debug # file Menu definition # @@ -20,15 +20,15 @@ menubar=\u30d5\u30a1\u30a4\u30eb\u7de8\u96c6\u30c7\u30d0\u30c3\u30b0 # new -> Notepad.newAction # save -> Notepad.saveAction # exit -> Notepad.exitAction -file=\u65b0\u898f \u958b\u304f \u4fdd\u5b58 - \u7d42\u4e86 -fileLabel=\u30d5\u30a1\u30a4\u30eb (F) +file=new open save - exit +fileLabel=\u30d5\u30a1\u30a4\u30eb openLabel=\u958b\u304f openImage=resources/open.gif newLabel=\u65b0\u898f newImage=resources/new.gif saveLabel=\u4fdd\u5b58 saveImage=resources/save.gif -exitLabel=\u7d42\u4e86 (X) +exitLabel=\u7d42\u4e86 # # edit Menu definition @@ -36,26 +36,26 @@ exitLabel=\u7d42\u4e86 (X) # cut -> JTextComponent.cutAction # copy -> JTextComponent.copyAction # paste -> JTextComponent.pasteAction -edit=\u30ab\u30c3\u30c8 \u30b3\u30d4\u30fc \u30da\u30fc\u30b9\u30c8 - \u5143\u306b\u623b\u3059 \u518d\u5b9f\u884c +edit=cut copy paste - undo redo editLabel=\u7de8\u96c6 -cutLabel=Cut +cutLabel=\u30ab\u30c3\u30c8 cutAction=cut-to-clipboard cutImage=resources/cut.gif -copyLabel=Copy -copyAction=cut-to-clipboard +copyLabel=\u30b3\u30d4\u30fc +copyAction=copy-to-clipboard copyImage=resources/copy.gif -pasteLabel=Paste +pasteLabel=\u30da\u30fc\u30b9\u30c8 pasteAction=paste-from-clipboard pasteImage=resources/paste.gif undoLabel=\u5143\u306b\u623b\u3059 -undoAction=\u5143\u306b\u623b\u3059 +undoAction=Undo redoLabel=\u518d\u5b9f\u884c -redoAction=\u518d\u5b9f\u884c +redoAction=Redo # # debug Menu definition # -debug=showElementTree \u306e\u30c0\u30f3\u30d7 +debug=dump showElementTree debugLabel=\u30c7\u30d0\u30c3\u30b0 dumpLabel=\u30e2\u30c7\u30eb\u3092 System.err \u306b\u30c0\u30f3\u30d7 dumpAction=dump-model @@ -67,7 +67,7 @@ showElementTreeLabel=\u8981\u7d20\u3092\u8868\u793a # used as the basis of the tool definition. Actions # are of course sharable, and in this case are shared # with the menu items. -toolbar=\u65b0\u898f \u958b\u304f \u4fdd\u5b58 - \u30ab\u30c3\u30c8 \u30b3\u30d4\u30fc \u30da\u30fc\u30b9\u30c8 +toolbar=new open save - cut copy paste newTooltip=\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u898f\u4f5c\u6210\u3059\u308b openTooltip=\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f saveTooltip=\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58 From 64bc185e5502ed93d84f3106038b55cb5b7e6dd9 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 3 Jul 2009 16:56:29 +0400 Subject: [PATCH 07/56] 6329581: RFE: LTP: java.beans.XMLEncoder does not manage ClassLoader Reviewed-by: rupashka, alexp --- jdk/src/share/classes/java/beans/Encoder.java | 11 ++- .../share/classes/java/beans/MetaData.java | 6 +- .../share/classes/java/beans/Statement.java | 3 +- .../beans/XMLEncoder/6329581/Test6329581.java | 75 +++++++++++++++++++ 4 files changed, 86 insertions(+), 9 deletions(-) create mode 100644 jdk/test/java/beans/XMLEncoder/6329581/Test6329581.java diff --git a/jdk/src/share/classes/java/beans/Encoder.java b/jdk/src/share/classes/java/beans/Encoder.java index 92e3d695bcb..e7f63397340 100644 --- a/jdk/src/share/classes/java/beans/Encoder.java +++ b/jdk/src/share/classes/java/beans/Encoder.java @@ -246,12 +246,11 @@ public class Encoder { for (int i = 0; i < oldArgs.length; i++) { newArgs[i] = writeObject1(oldArgs[i]); } - if (oldExp.getClass() == Statement.class) { - return new Statement(newTarget, oldExp.getMethodName(), newArgs); - } - else { - return new Expression(newTarget, oldExp.getMethodName(), newArgs); - } + Statement newExp = Statement.class.equals(oldExp.getClass()) + ? new Statement(newTarget, oldExp.getMethodName(), newArgs) + : new Expression(newTarget, oldExp.getMethodName(), newArgs); + newExp.loader = oldExp.loader; + return newExp; } /** diff --git a/jdk/src/share/classes/java/beans/MetaData.java b/jdk/src/share/classes/java/beans/MetaData.java index f4d307090a5..96607db806f 100644 --- a/jdk/src/share/classes/java/beans/MetaData.java +++ b/jdk/src/share/classes/java/beans/MetaData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -219,7 +219,9 @@ class java_lang_Class_PersistenceDelegate extends PersistenceDelegate { return new Expression(oldInstance, String.class, "getClass", new Object[]{}); } else { - return new Expression(oldInstance, Class.class, "forName", new Object[]{c.getName()}); + Expression newInstance = new Expression(oldInstance, Class.class, "forName", new Object[] { c.getName() }); + newInstance.loader = c.getClassLoader(); + return newInstance; } } } diff --git a/jdk/src/share/classes/java/beans/Statement.java b/jdk/src/share/classes/java/beans/Statement.java index 7bf2fccda56..6169f92742f 100644 --- a/jdk/src/share/classes/java/beans/Statement.java +++ b/jdk/src/share/classes/java/beans/Statement.java @@ -66,6 +66,7 @@ public class Statement { Object target; String methodName; Object[] arguments; + ClassLoader loader; /** * Creates a new Statement object with a target, @@ -157,7 +158,7 @@ public class Statement { // of core from a class inside core. Special // case this method. if (target == Class.class && methodName.equals("forName")) { - return ClassFinder.resolveClass((String)arguments[0]); + return ClassFinder.resolveClass((String)arguments[0], this.loader); } Class[] argClasses = new Class[arguments.length]; for(int i = 0; i < arguments.length; i++) { diff --git a/jdk/test/java/beans/XMLEncoder/6329581/Test6329581.java b/jdk/test/java/beans/XMLEncoder/6329581/Test6329581.java new file mode 100644 index 00000000000..c307dab1267 --- /dev/null +++ b/jdk/test/java/beans/XMLEncoder/6329581/Test6329581.java @@ -0,0 +1,75 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6329581 + * @summary Tests encoding of a class with custom ClassLoader + * @author Sergey Malenkov + */ + +import java.beans.ExceptionListener; +import java.beans.XMLDecoder; +import java.beans.XMLEncoder; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.net.URL; +import java.net.URLClassLoader; + +public class Test6329581 implements ExceptionListener { + + public static void main(String[] args) throws Exception { + ExceptionListener listener = new Test6329581(); + // write bean to byte array + ByteArrayOutputStream out = new ByteArrayOutputStream(); + XMLEncoder encoder = new XMLEncoder(out); + encoder.setExceptionListener(listener); + encoder.writeObject(getClassLoader("beans.jar").loadClass("test.Bean").newInstance()); + encoder.close(); + // read bean from byte array + ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); + XMLDecoder decoder = new XMLDecoder(in, null, listener, getClassLoader("beans.jar")); + Object object = decoder.readObject(); + decoder.close(); + + if (!object.getClass().getClassLoader().getClass().equals(URLClassLoader.class)) { + throw new Error("bean is loaded with unexpected class loader"); + } + } + + private static ClassLoader getClassLoader(String name) throws Exception { + StringBuilder sb = new StringBuilder(256); + sb.append("file:"); + sb.append(System.getProperty("test.src", ".")); + sb.append(File.separatorChar); + sb.append(name); + + URL[] url = { new URL(sb.toString()) }; + return new URLClassLoader(url); + } + + public void exceptionThrown(Exception exception) { + throw new Error("unexpected exception", exception); + } +} From 839196d14e119c182b745f417b48d4816d3d4d48 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Fri, 3 Jul 2009 07:24:43 -0700 Subject: [PATCH 08/56] 6857287: (file) Clarifications for symbolic link related javadoc Fix up jsr203 file javadoc related to symbolic links Reviewed-by: alanb --- .../classes/java/nio/file/LinkPermission.java | 2 +- .../java/nio/file/NotLinkException.java | 2 +- jdk/src/share/classes/java/nio/file/Path.java | 79 ++++++++++--------- .../java/nio/file/SecureDirectoryStream.java | 11 +-- .../java/nio/file/attribute/Attributes.java | 10 +-- .../file/attribute/BasicFileAttributes.java | 4 +- 6 files changed, 55 insertions(+), 53 deletions(-) diff --git a/jdk/src/share/classes/java/nio/file/LinkPermission.java b/jdk/src/share/classes/java/nio/file/LinkPermission.java index 01949114761..a318903365a 100644 --- a/jdk/src/share/classes/java/nio/file/LinkPermission.java +++ b/jdk/src/share/classes/java/nio/file/LinkPermission.java @@ -46,7 +46,7 @@ import java.security.BasicPermission; * known as creating a link, or hard link. * Extreme care should be taken when granting this permission. It allows * linking to any file or directory in the file system thus allowing the - * attacker to access to all files. + * attacker access to all files. * * * symbolic diff --git a/jdk/src/share/classes/java/nio/file/NotLinkException.java b/jdk/src/share/classes/java/nio/file/NotLinkException.java index bdc1fc354ad..fafdeee6cc6 100644 --- a/jdk/src/share/classes/java/nio/file/NotLinkException.java +++ b/jdk/src/share/classes/java/nio/file/NotLinkException.java @@ -27,7 +27,7 @@ package java.nio.file; /** * Checked exception thrown when a file system operation fails because a file - * is not a link. + * is not a symbolic link. * * @since 1.7 */ diff --git a/jdk/src/share/classes/java/nio/file/Path.java b/jdk/src/share/classes/java/nio/file/Path.java index e00c96144d9..113a7c58067 100644 --- a/jdk/src/share/classes/java/nio/file/Path.java +++ b/jdk/src/share/classes/java/nio/file/Path.java @@ -91,8 +91,8 @@ import java.util.Set; * iterate over the entries in the directory.

*
  • Files can be {@link #copyTo(Path,CopyOption[]) copied} or * {@link #moveTo(Path,CopyOption[]) moved}.

  • - *
  • Symbolic-links may be {@link #createSymbolicLink created}, or the - * target of a link may be {@link #readSymbolicLink read}.

  • + *
  • Symbolic links may be {@link #createSymbolicLink created}, or the + * target of a symbolic link may be {@link #readSymbolicLink read}.

  • *
  • The {@link #toRealPath real} path of an existing file may be * obtained.

  • * @@ -403,12 +403,12 @@ public abstract class Path * p.relativize(p.resolve(q)).equals(q) * * - *

    When symbolic-links are supported, then whether the resulting path, + *

    When symbolic links are supported, then whether the resulting path, * when resolved against this path, yields a path that can be used to locate * the {@link #isSameFile same} file as {@code other} is implementation * dependent. For example, if this path is {@code "/a/b"} and the given * path is {@code "/a/x"} then the resulting relative path may be {@code - * "../x"}. If {@code "b"} is a symbolic-link then is implementation + * "../x"}. If {@code "b"} is a symbolic link then is implementation * dependent if {@code "a/b/../x"} would locate the same file as {@code "/a/x"}. * * @param other @@ -430,8 +430,8 @@ public abstract class Path * *

    An implementation may require to examine the file to determine if the * file is a directory. Consequently this method may not be atomic with respect - * to other file system operations. If the file is a symbolic-link then the - * link is deleted and not the final target of the link. + * to other file system operations. If the file is a symbolic link then the + * symbolic link itself, not the final target of the link, is deleted. * *

    If the file is a directory then the directory must be empty. In some * implementations a directory has entries for special files or links that @@ -459,11 +459,11 @@ public abstract class Path /** * Deletes the file located by this path, if it exists. * - *

    As with the {@link #delete delete()} method, an implementation - * may require to examine the file to determine if the file is a directory. + *

    As with the {@link #delete delete()} method, an implementation may + * need to examine the file to determine if the file is a directory. * Consequently this method may not be atomic with respect to other file - * system operations. If the file is a symbolic-link then the link is - * deleted and not the final target of the link. + * system operations. If the file is a symbolic link, then the symbolic + * link itself, not the final target of the link, is deleted. * *

    If the file is a directory then the directory must be empty. In some * implementations a directory has entries for special files or links that @@ -507,7 +507,7 @@ public abstract class Path * create symbolic links, in which case this method may throw {@code IOException}. * * @param target - * the target of the link + * the target of the symbolic link * @param attrs * the array of attributes to set atomically when creating the * symbolic link @@ -573,9 +573,9 @@ public abstract class Path * Reads the target of a symbolic link (optional operation). * *

    If the file system supports symbolic - * links then this method is used read the target of the link, failing - * if the file is not a link. The target of the link need not exist. The - * returned {@code Path} object will be associated with the same file + * links then this method is used to read the target of the link, failing + * if the file is not a symbolic link. The target of the link need not exist. + * The returned {@code Path} object will be associated with the same file * system as this {@code Path}. * * @return a {@code Path} object representing the target of the link @@ -584,7 +584,7 @@ public abstract class Path * if the implementation does not support symbolic links * @throws NotLinkException * if the target could otherwise not be read because the file - * is not a link (optional specific exception) + * is not a symbolic link (optional specific exception) * @throws IOException * if an I/O error occurs * @throws SecurityException @@ -724,8 +724,8 @@ public abstract class Path * exists, except if the source and target are the {@link #isSameFile same} * file, in which case this method has no effect. File attributes are not * required to be copied to the target file. If symbolic links are supported, - * and the file is a link, then the final target of the link is copied. If - * the file is a directory then it creates an empty directory in the target + * and the file is a symbolic link, then the final target of the link is copied. + * If the file is a directory then it creates an empty directory in the target * location (entries in the directory are not copied). This method can be * used with the {@link Files#walkFileTree Files.walkFileTree} utility * method to copy a directory and all entries in the directory, or an entire @@ -740,8 +740,8 @@ public abstract class Path * {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} * If the target file exists, then the target file is replaced if it * is not a non-empty directory. If the target file exists and is a - * symbolic-link then the symbolic-link is replaced (not the target of - * the link. + * symbolic link, then the symbolic link itself, not the target of + * the link, is replaced. * * * {@link StandardCopyOption#COPY_ATTRIBUTES COPY_ATTRIBUTES} @@ -755,11 +755,11 @@ public abstract class Path * * * {@link LinkOption#NOFOLLOW_LINKS NOFOLLOW_LINKS} - * Symbolic-links are not followed. If the file, located by this path, - * is a symbolic-link then the link is copied rather than the target of - * the link. It is implementation specific if file attributes can be - * copied to the new link. In other words, the {@code COPY_ATTRIBUTES} - * option may be ignored when copying a link. + * Symbolic links are not followed. If the file, located by this path, + * is a symbolic link, then the symbolic link itself, not the target of + * the link, is copied. It is implementation specific if file attributes + * can be copied to the new link. In other words, the {@code + * COPY_ATTRIBUTES} option may be ignored when copying a symbolic link. * * * @@ -807,18 +807,19 @@ public abstract class Path *

    By default, this method attempts to move the file to the target * location, failing if the target file exists except if the source and * target are the {@link #isSameFile same} file, in which case this method - * has no effect. If the file is a symbolic link then the link is moved and - * not the target of the link. This method may be invoked to move an empty - * directory. In some implementations a directory has entries for special - * files or links that are created when the directory is created. In such - * implementations a directory is considered empty when only the special - * entries exist. When invoked to move a directory that is not empty then the - * directory is moved if it does not require moving the entries in the directory. - * For example, renaming a directory on the same {@link FileStore} will usually - * not require moving the entries in the directory. When moving a directory - * requires that its entries be moved then this method fails (by throwing - * an {@code IOException}). To move a file tree may involve copying - * rather than moving directories and this can be done using the {@link + * has no effect. If the file is a symbolic link then the symbolic link + * itself, not the target of the link, is moved. This method may be + * invoked to move an empty directory. In some implementations a directory + * has entries for special files or links that are created when the + * directory is created. In such implementations a directory is considered + * empty when only the special entries exist. When invoked to move a + * directory that is not empty then the directory is moved if it does not + * require moving the entries in the directory. For example, renaming a + * directory on the same {@link FileStore} will usually not require moving + * the entries in the directory. When moving a directory requires that its + * entries be moved then this method fails (by throwing an {@code + * IOException}). To move a file tree may involve copying rather + * than moving directories and this can be done using the {@link * #copyTo copyTo} method in conjunction with the {@link * Files#walkFileTree Files.walkFileTree} utility method. * @@ -831,8 +832,8 @@ public abstract class Path * {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} * If the target file exists, then the target file is replaced if it * is not a non-empty directory. If the target file exists and is a - * symbolic-link then the symbolic-link is replaced and not the target of - * the link. + * symbolic link, then the symbolic link itself, not the target of + * the link, is replaced. * * * {@link StandardCopyOption#ATOMIC_MOVE ATOMIC_MOVE} @@ -1495,7 +1496,7 @@ public abstract class Path * *

    Where a file is registered with a watch service by means of a symbolic * link then it is implementation specific if the watch continues to depend - * on the existence of the link after it is registered. + * on the existence of the symbolic link after it is registered. * * @param watcher * the watch service to which this object is to be registered diff --git a/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java b/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java index 9655695d301..9667a3cf5ce 100644 --- a/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java +++ b/jdk/src/share/classes/java/nio/file/SecureDirectoryStream.java @@ -166,12 +166,13 @@ public abstract class SecureDirectoryStream /** * Deletes a file. * - *

    Unlike the {@link Path#delete delete()} method, this method - * does not first examine the file to determine if the file is a directory. + *

    Unlike the {@link Path#delete delete()} method, this method does + * not first examine the file to determine if the file is a directory. * Whether a directory is deleted by this method is system dependent and - * therefore not specified. If the file is a symbolic-link then the link is - * deleted (not the final target of the link). When the parameter is a - * relative path then the file to delete is relative to this open directory. + * therefore not specified. If the file is a symbolic link, then the link + * itself, not the final target of the link, is deleted. When the + * parameter is a relative path then the file to delete is relative to + * this open directory. * * @param path * the path of the file to delete diff --git a/jdk/src/share/classes/java/nio/file/attribute/Attributes.java b/jdk/src/share/classes/java/nio/file/attribute/Attributes.java index 3ffa6389b43..cfcbf44a708 100644 --- a/jdk/src/share/classes/java/nio/file/attribute/Attributes.java +++ b/jdk/src/share/classes/java/nio/file/attribute/Attributes.java @@ -48,9 +48,9 @@ public final class Attributes { * symbolic links are followed and the file attributes of the final target * of the link are read. If the option {@link LinkOption#NOFOLLOW_LINKS * NOFOLLOW_LINKS} is present then symbolic links are not followed and so - * the method returns the file attributes of the symbolic link. This option - * should be used where there is a need to determine if a file is a - * symbolic link: + * the method returns the file attributes of the symbolic link itself. + * This option should be used where there is a need to determine if a + * file is a symbolic link: *

          *    boolean isSymbolicLink = Attributes.readBasicFileAttributes(file, NOFOLLOW_LINKS).isSymbolicLink();
          * 
    @@ -98,7 +98,7 @@ public final class Attributes { * symbolic links are followed and the file attributes of the final target * of the link are read. If the option {@link LinkOption#NOFOLLOW_LINKS * NOFOLLOW_LINKS} is present then symbolic links are not followed and so - * the method returns the file attributes of the symbolic link. + * the method returns the file attributes of the symbolic link itself. * * @param file * A file reference that locates the file @@ -145,7 +145,7 @@ public final class Attributes { * symbolic links are followed and the file attributes of the final target * of the link are read. If the option {@link LinkOption#NOFOLLOW_LINKS * NOFOLLOW_LINKS} is present then symbolic links are not followed and so - * the method returns the file attributes of the symbolic link. + * the method returns the file attributes of the symbolic link itself. * * @param file * A file reference that locates the file diff --git a/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java b/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java index 6fb3bbf7ee9..4e45711292a 100644 --- a/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java +++ b/jdk/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java @@ -81,13 +81,13 @@ public interface BasicFileAttributes { boolean isDirectory(); /** - * Tells whether the file is a symbolic-link. + * Tells whether the file is a symbolic link. */ boolean isSymbolicLink(); /** * Tells whether the file is something other than a regular file, directory, - * or link. + * or symbolic link. */ boolean isOther(); From 8a5359c35b6c2af54520afd00bc6b86c3b43eb86 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Mon, 6 Jul 2009 14:32:04 +0400 Subject: [PATCH 09/56] 6723447: Introspector doesn't check return type for indexed property setters Reviewed-by: rupashka --- .../java/beans/IndexedPropertyDescriptor.java | 7 +- .../classes/java/beans/Introspector.java | 6 +- .../java/beans/PropertyDescriptor.java | 7 +- .../java/beans/Introspector/Test6723447.java | 88 +++++++++++++++++++ 4 files changed, 103 insertions(+), 5 deletions(-) create mode 100644 jdk/test/java/beans/Introspector/Test6723447.java diff --git a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java index fa5b404c239..e0d2bb4bb4f 100644 --- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java +++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -274,6 +274,11 @@ perty. } indexedWriteMethod = Introspector.findMethod(cls, indexedWriteMethodName, 2, (type == null) ? null : new Class[] { int.class, type }); + if (indexedWriteMethod != null) { + if (!indexedWriteMethod.getReturnType().equals(void.class)) { + indexedWriteMethod = null; + } + } setIndexedWriteMethod0(indexedWriteMethod); } return indexedWriteMethod; diff --git a/jdk/src/share/classes/java/beans/Introspector.java b/jdk/src/share/classes/java/beans/Introspector.java index b43911cf123..1c90f205a88 100644 --- a/jdk/src/share/classes/java/beans/Introspector.java +++ b/jdk/src/share/classes/java/beans/Introspector.java @@ -524,9 +524,9 @@ public class Introspector { pd = new PropertyDescriptor(this.beanClass, name.substring(2), method, null); } } else if (argCount == 1) { - if (argTypes[0] == int.class && name.startsWith(GET_PREFIX)) { + if (int.class.equals(argTypes[0]) && name.startsWith(GET_PREFIX)) { pd = new IndexedPropertyDescriptor(this.beanClass, name.substring(3), null, null, method, null); - } else if (resultType == void.class && name.startsWith(SET_PREFIX)) { + } else if (void.class.equals(resultType) && name.startsWith(SET_PREFIX)) { // Simple setter pd = new PropertyDescriptor(this.beanClass, name.substring(3), null, method); if (throwsException(method, PropertyVetoException.class)) { @@ -534,7 +534,7 @@ public class Introspector { } } } else if (argCount == 2) { - if (argTypes[0] == int.class && name.startsWith(SET_PREFIX)) { + if (void.class.equals(resultType) && int.class.equals(argTypes[0]) && name.startsWith(SET_PREFIX)) { pd = new IndexedPropertyDescriptor(this.beanClass, name.substring(3), null, null, null, method); if (throwsException(method, PropertyVetoException.class)) { pd.setConstrained(true); diff --git a/jdk/src/share/classes/java/beans/PropertyDescriptor.java b/jdk/src/share/classes/java/beans/PropertyDescriptor.java index 08ae9a45f42..70a539c81fd 100644 --- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java +++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -294,6 +294,11 @@ public class PropertyDescriptor extends FeatureDescriptor { writeMethod = Introspector.findMethod(cls, writeMethodName, 1, (type == null) ? null : new Class[] { type }); + if (writeMethod != null) { + if (!writeMethod.getReturnType().equals(void.class)) { + writeMethod = null; + } + } try { setWriteMethod(writeMethod); } catch (IntrospectionException ex) { diff --git a/jdk/test/java/beans/Introspector/Test6723447.java b/jdk/test/java/beans/Introspector/Test6723447.java new file mode 100644 index 00000000000..04a3ca632d0 --- /dev/null +++ b/jdk/test/java/beans/Introspector/Test6723447.java @@ -0,0 +1,88 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6723447 + * @summary Tests return type for property setters + * @author Sergey Malenkov + */ + +import java.beans.IndexedPropertyDescriptor; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.reflect.Method; +import java.math.BigDecimal; + +public class Test6723447 { + + public static void main(String[] args) { + test(Test6723447.class); + test(BigDecimal.class); + } + + private static void test(Class type) { + for (PropertyDescriptor pd : getPropertyDescriptors(type)) { + test(pd.getWriteMethod()); + if (pd instanceof IndexedPropertyDescriptor) { + IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; + test(ipd.getIndexedWriteMethod()); + } + } + } + + private static void test(Method method) { + if (method != null) { + Class type = method.getReturnType(); + if (!type.equals(void.class)) { + throw new Error("unexpected return type: " + type); + } + } + } + + private static PropertyDescriptor[] getPropertyDescriptors(Class type) { + try { + return Introspector.getBeanInfo(type).getPropertyDescriptors(); + } + catch (IntrospectionException exception) { + throw new Error("unexpected exception", exception); + } + } + + public Object getValue() { + return null; + } + + public Object setValue(Object value) { + return value; + } + + public Object getValues(int index) { + return null; + } + + public Object setValues(int index, Object value) { + return value; + } +} From d8a3c0970652cd914ae4d1ce945f5ff86f15435a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Collet Date: Mon, 6 Jul 2009 15:13:48 +0200 Subject: [PATCH 10/56] 6856856: NPE in HTTP protocol handler logging Fixed the NPE and Moved the java.util.logging dependency to a single class and used reflection to make it a soft one. Reviewed-by: chegar --- .../classes/sun/net/www/http/HttpCapture.java | 72 +++++++++++++++++++ .../classes/sun/net/www/http/HttpClient.java | 10 +-- .../www/protocol/http/HttpLogFormatter.java | 3 +- .../www/protocol/http/HttpURLConnection.java | 65 ++++++++--------- 4 files changed, 105 insertions(+), 45 deletions(-) diff --git a/jdk/src/share/classes/sun/net/www/http/HttpCapture.java b/jdk/src/share/classes/sun/net/www/http/HttpCapture.java index 873c0dcc398..78debed415f 100644 --- a/jdk/src/share/classes/sun/net/www/http/HttpCapture.java +++ b/jdk/src/share/classes/sun/net/www/http/HttpCapture.java @@ -25,6 +25,8 @@ package sun.net.www.http; import java.io.*; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; @@ -60,6 +62,76 @@ public class HttpCapture { private static boolean initialized = false; private static volatile ArrayList patterns = null; private static volatile ArrayList capFiles = null; + /* Logging is done in an ugly way so that it does not require the presence + * the java.util.logging package. If the Logger class is not available, then + * logging is turned off. This is for helping the modularization effort. + */ + private static Object logger = null; + private static boolean logging = false; + + static { + Class cl; + try { + cl = Class.forName("java.util.logging.Logger"); + } catch (ClassNotFoundException ex) { + cl = null; + } + if (cl != null) { + try { + Method m = cl.getMethod("getLogger", String.class); + logger = m.invoke(null, "sun.net.www.protocol.http.HttpURLConnection"); + logging = true; + } catch (NoSuchMethodException noSuchMethodException) { + } catch (SecurityException securityException) { + } catch (IllegalAccessException illegalAccessException) { + } catch (IllegalArgumentException illegalArgumentException) { + } catch (InvocationTargetException invocationTargetException) { + } + } + } + + public static void fine(String s) { + if (logging) { + ((Logger)logger).fine(s); + } + } + + public static void finer(String s) { + if (logging) { + ((Logger)logger).finer(s); + } + } + + public static void finest(String s) { + if (logging) { + ((Logger)logger).finest(s); + } + } + + public static void severe(String s) { + if (logging) { + ((Logger)logger).finest(s); + } + } + + public static void info(String s) { + if (logging) { + ((Logger)logger).info(s); + } + } + + public static void warning(String s) { + if (logging) { + ((Logger)logger).warning(s); + } + } + + public static boolean isLoggable(String level) { + if (!logging) { + return false; + } + return ((Logger)logger).isLoggable(Level.parse(level)); + } private static synchronized void init() { initialized = true; diff --git a/jdk/src/share/classes/sun/net/www/http/HttpClient.java b/jdk/src/share/classes/sun/net/www/http/HttpClient.java index f170ff1cca0..c4ff7552c18 100644 --- a/jdk/src/share/classes/sun/net/www/http/HttpClient.java +++ b/jdk/src/share/classes/sun/net/www/http/HttpClient.java @@ -28,8 +28,6 @@ package sun.net.www.http; import java.io.*; import java.net.*; import java.util.Locale; -import java.util.logging.Level; -import java.util.logging.Logger; import sun.net.NetworkClient; import sun.net.ProgressSource; import sun.net.www.MessageHeader; @@ -66,10 +64,6 @@ public class HttpClient extends NetworkClient { /** Default port number for http daemons. REMIND: make these private */ static final int httpPortNumber = 80; - // Use same logger as HttpURLConnection since we want to combine both event - // streams into one single HTTP log - private static Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection"); - /** return default port number (subclasses may override) */ protected int getDefaultPort () { return httpPortNumber; } @@ -810,8 +804,8 @@ public class HttpClient extends NetworkClient { if (isKeepingAlive()) { // Wrap KeepAliveStream if keep alive is enabled. - if (logger.isLoggable(Level.FINEST)) { - logger.finest("KeepAlive stream used: " + url); + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("KeepAlive stream used: " + url); } serverInput = new KeepAliveStream(serverInput, pi, cl, this); failedOnce = false; diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/HttpLogFormatter.java b/jdk/src/share/classes/sun/net/www/protocol/http/HttpLogFormatter.java index 0163d42eda0..97b9be64ed1 100644 --- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpLogFormatter.java +++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpLogFormatter.java @@ -49,8 +49,7 @@ public class HttpLogFormatter extends java.util.logging.SimpleFormatter { @Override public String format(LogRecord record) { - if (!"sun.net.www.protocol.http.HttpURLConnection".equalsIgnoreCase(record.getSourceClassName()) - && !"sun.net.www.http.HttpClient".equalsIgnoreCase(record.getSourceClassName())) { + if (!"sun.net.www.http.HttpCapture".equalsIgnoreCase(record.getSourceClassName())) { // Don't change format for stuff that doesn't concern us return super.format(record); } diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java index afd35f0d72e..accd8295503 100644 --- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java +++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java @@ -51,14 +51,13 @@ import java.util.List; import java.util.Locale; import java.util.StringTokenizer; import java.util.Iterator; -import java.util.logging.Level; -import java.util.logging.Logger; import sun.net.*; import sun.net.www.*; import sun.net.www.http.HttpClient; import sun.net.www.http.PosterOutputStream; import sun.net.www.http.ChunkedInputStream; import sun.net.www.http.ChunkedOutputStream; +import sun.net.www.http.HttpCapture; import java.text.SimpleDateFormat; import java.util.TimeZone; import java.net.MalformedURLException; @@ -71,8 +70,6 @@ import java.nio.ByteBuffer; public class HttpURLConnection extends java.net.HttpURLConnection { - private static Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection"); - static String HTTP_CONNECT = "CONNECT"; static final String version; @@ -304,14 +301,14 @@ public class HttpURLConnection extends java.net.HttpURLConnection { return java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { public PasswordAuthentication run() { - if (logger.isLoggable(Level.FINEST)) { - logger.finest("Requesting Authentication: host =" + host + " url = " + url); + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("Requesting Authentication: host =" + host + " url = " + url); } PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( host, addr, port, protocol, prompt, scheme, url, authType); - if (pass != null && logger.isLoggable(Level.FINEST)) { - logger.finest("Authentication returned: " + pass.toString()); + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); } return pass; } @@ -466,8 +463,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { setRequests=true; } - if (logger.isLoggable(Level.FINE)) { - logger.fine(requests.toString()); + if (HttpCapture.isLoggable("FINE")) { + HttpCapture.fine(requests.toString()); } http.writeRequests(requests, poster); if (ps.checkError()) { @@ -723,11 +720,9 @@ public class HttpURLConnection extends java.net.HttpURLConnection { && !(cachedResponse instanceof SecureCacheResponse)) { cachedResponse = null; } - if (logger.isLoggable(Level.FINEST)) { - logger.finest("Cache Request for " + uri + " / " + getRequestMethod()); - if (cachedResponse != null) { - logger.finest("From cache: "+cachedResponse.toString()); - } + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("Cache Request for " + uri + " / " + getRequestMethod()); + HttpCapture.finest("From cache: " + (cachedResponse != null ? cachedResponse.toString() : "null")); } if (cachedResponse != null) { cachedHeaders = mapToMessageHeader(cachedResponse.getHeaders()); @@ -766,8 +761,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { }); if (sel != null) { URI uri = sun.net.www.ParseUtil.toURI(url); - if (logger.isLoggable(Level.FINEST)) { - logger.finest("ProxySelector Request for " + uri); + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("ProxySelector Request for " + uri); } Iterator it = sel.select(uri).iterator(); Proxy p; @@ -783,9 +778,9 @@ public class HttpURLConnection extends java.net.HttpURLConnection { http = getNewHttpClient(url, p, connectTimeout, false); http.setReadTimeout(readTimeout); } - if (logger.isLoggable(Level.FINEST)) { + if (HttpCapture.isLoggable("FINEST")) { if (p != null) { - logger.finest("Proxy used: " + p.toString()); + HttpCapture.finest("Proxy used: " + p.toString()); } } break; @@ -1015,15 +1010,15 @@ public class HttpURLConnection extends java.net.HttpURLConnection { URI uri = ParseUtil.toURI(url); if (uri != null) { - if (logger.isLoggable(Level.FINEST)) { - logger.finest("CookieHandler request for " + uri); + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("CookieHandler request for " + uri); } Map> cookies = cookieHandler.get( uri, requests.getHeaders(EXCLUDE_HEADERS)); if (!cookies.isEmpty()) { - if (logger.isLoggable(Level.FINEST)) { - logger.finest("Cookies retrieved: " + cookies.toString()); + if (HttpCapture.isLoggable("FINEST")) { + HttpCapture.finest("Cookies retrieved: " + cookies.toString()); } for (Map.Entry> entry : cookies.entrySet()) { @@ -1154,8 +1149,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { writeRequests(); } http.parseHTTP(responses, pi, this); - if (logger.isLoggable(Level.FINE)) { - logger.fine(responses.toString()); + if (HttpCapture.isLoggable("FINE")) { + HttpCapture.fine(responses.toString()); } inputStream = http.getInputStream(); @@ -1599,8 +1594,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { http.parseHTTP(responses, null, this); /* Log the response to the CONNECT */ - if (logger.isLoggable(Level.FINE)) { - logger.fine(responses.toString()); + if (HttpCapture.isLoggable("FINE")) { + HttpCapture.fine(responses.toString()); } statusLine = responses.getValue(0); @@ -1727,8 +1722,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { setPreemptiveProxyAuthentication(requests); /* Log the CONNECT request */ - if (logger.isLoggable(Level.FINE)) { - logger.fine(requests.toString()); + if (HttpCapture.isLoggable("FINE")) { + HttpCapture.fine(requests.toString()); } http.writeRequests(requests, null); @@ -1872,8 +1867,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { } } } - if (logger.isLoggable(Level.FINER)) { - logger.finer("Proxy Authentication for " + authhdr.toString() +" returned " + ret.toString()); + if (HttpCapture.isLoggable("FINER")) { + HttpCapture.finer("Proxy Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null")); } return ret; } @@ -2002,8 +1997,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { } } } - if (logger.isLoggable(Level.FINER)) { - logger.finer("Server Authentication for " + authhdr.toString() +" returned " + ret.toString()); + if (HttpCapture.isLoggable("FINER")) { + HttpCapture.finer("Server Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null")); } return ret; } @@ -2078,8 +2073,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection { if (streaming()) { throw new HttpRetryException (RETRY_MSG3, stat, loc); } - if (logger.isLoggable(Level.FINE)) { - logger.fine("Redirected from " + url + " to " + locUrl); + if (HttpCapture.isLoggable("FINE")) { + HttpCapture.fine("Redirected from " + url + " to " + locUrl); } // clear out old response headers!!!! From cab876d8d1dea4bb41278315342d50db85f65da9 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Mon, 6 Jul 2009 11:30:40 -0700 Subject: [PATCH 11/56] 6854795: Miscellaneous improvements to "jar" Cleanup of jar/Main.java (Initial patch by tobyr@google.com, additional review by jeremymanson@google.com, ulf.zibis@gmx.de) Reviewed-by: sherman, alanb --- jdk/src/share/classes/sun/tools/jar/Main.java | 349 +++++++++++------- jdk/test/tools/jar/index/MetaInf.java | 75 +++- 2 files changed, 263 insertions(+), 161 deletions(-) diff --git a/jdk/src/share/classes/sun/tools/jar/Main.java b/jdk/src/share/classes/sun/tools/jar/Main.java index ecd76d6e800..99f60f94c7a 100644 --- a/jdk/src/share/classes/sun/tools/jar/Main.java +++ b/jdk/src/share/classes/sun/tools/jar/Main.java @@ -26,12 +26,16 @@ package sun.tools.jar; import java.io.*; +import java.nio.file.Path; import java.util.*; import java.util.zip.*; import java.util.jar.*; import java.util.jar.Manifest; import java.text.MessageFormat; import sun.misc.JarIndex; +import static sun.misc.JarIndex.INDEX_NAME; +import static java.util.jar.JarFile.MANIFEST_NAME; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; /** * This class implements a simple utility for creating files in the JAR @@ -58,7 +62,6 @@ class Main { // Directories specified by "-C" operation. Set paths = new HashSet(); - CRC32 crc32 = new CRC32(); /* * cflag: create * uflag: update @@ -71,10 +74,8 @@ class Main { */ boolean cflag, uflag, xflag, tflag, vflag, flag0, Mflag, iflag; - static final String MANIFEST = JarFile.MANIFEST_NAME; static final String MANIFEST_DIR = "META-INF/"; static final String VERSION = "1.0"; - static final String INDEX = JarIndex.INDEX_NAME; private static ResourceBundle rsrc; @@ -126,9 +127,21 @@ class Main { this.program = program; } + /** + * Creates a new empty temporary file in the same directory as the + * specified file. A variant of File.createTempFile. + */ + private static File createTempFileInSameDirectoryAs(File file) + throws IOException { + File dir = file.getParentFile(); + if (dir == null) + dir = new File("."); + return File.createTempFile("jartmp", null, dir); + } + private boolean ok; - /* + /** * Starts main program with the specified arguments. */ public synchronized boolean run(String args[]) { @@ -161,7 +174,7 @@ class Main { } addVersion(manifest); addCreatedBy(manifest); - if (isAmbigousMainClass(manifest)) { + if (isAmbiguousMainClass(manifest)) { if (in != null) { in.close(); } @@ -195,9 +208,7 @@ class Main { FileOutputStream out; if (fname != null) { inputFile = new File(fname); - String path = inputFile.getParent(); - tmpFile = File.createTempFile("tmp", null, - new File((path == null) ? "." : path)); + tmpFile = createTempFileInSameDirectoryAs(inputFile); in = new FileInputStream(inputFile); out = new FileOutputStream(tmpFile); } else { @@ -208,7 +219,8 @@ class Main { InputStream manifest = (!Mflag && (mname != null)) ? (new FileInputStream(mname)) : null; expand(null, files, true); - boolean updateOk = update(in, new BufferedOutputStream(out), manifest, null); + boolean updateOk = update(in, new BufferedOutputStream(out), + manifest, null); if (ok) { ok = updateOk; } @@ -270,8 +282,8 @@ class Main { return ok; } - /* - * Parse command line arguments. + /** + * Parses command line arguments. */ boolean parseArgs(String args[]) { /* Preprocess and expand @file arguments */ @@ -405,7 +417,7 @@ class Main { return true; } - /* + /** * Expands list of files to process into full list of all files that * can be found by recursively descending directories. */ @@ -442,7 +454,7 @@ class Main { } } - /* + /** * Creates a new JAR file. */ void create(OutputStream out, Manifest manifest) @@ -461,7 +473,7 @@ class Main { e.setSize(0); e.setCrc(0); zos.putNextEntry(e); - e = new ZipEntry(MANIFEST); + e = new ZipEntry(MANIFEST_NAME); e.setTime(System.currentTimeMillis()); if (flag0) { crc32Manifest(e, manifest); @@ -476,8 +488,32 @@ class Main { zos.close(); } - /* - * update an existing jar file. + private char toUpperCaseASCII(char c) { + return (c < 'a' || c > 'z') ? c : (char) (c + 'A' - 'a'); + } + + /** + * Compares two strings for equality, ignoring case. The second + * argument must contain only upper-case ASCII characters. + * We don't want case comparison to be locale-dependent (else we + * have the notorious "turkish i bug"). + */ + private boolean equalsIgnoreCase(String s, String upper) { + assert upper.toUpperCase(java.util.Locale.ENGLISH).equals(upper); + int len; + if ((len = s.length()) != upper.length()) + return false; + for (int i = 0; i < len; i++) { + char c1 = s.charAt(i); + char c2 = upper.charAt(i); + if (c1 != c2 && toUpperCaseASCII(c1) != c2) + return false; + } + return true; + } + + /** + * Updates an existing jar file. */ boolean update(InputStream in, OutputStream out, InputStream newManifest, @@ -487,8 +523,6 @@ class Main { ZipOutputStream zos = new JarOutputStream(out); ZipEntry e = null; boolean foundManifest = false; - byte[] buf = new byte[1024]; - int n = 0; boolean updateOk = true; if (jarIndex != null) { @@ -499,10 +533,9 @@ class Main { while ((e = zis.getNextEntry()) != null) { String name = e.getName(); - boolean isManifestEntry = name.toUpperCase( - java.util.Locale.ENGLISH). - equals(MANIFEST); - if ((name.toUpperCase().equals(INDEX) && jarIndex != null) + boolean isManifestEntry = equalsIgnoreCase(name, MANIFEST_NAME); + + if ((jarIndex != null && equalsIgnoreCase(name, INDEX_NAME)) || (Mflag && isManifestEntry)) { continue; } else if (isManifestEntry && ((newManifest != null) || @@ -513,9 +546,9 @@ class Main { // might need it below, and we can't re-read the same data // twice. FileInputStream fis = new FileInputStream(mname); - boolean ambigous = isAmbigousMainClass(new Manifest(fis)); + boolean ambiguous = isAmbiguousMainClass(new Manifest(fis)); fis.close(); - if (ambigous) { + if (ambiguous) { return false; } } @@ -539,9 +572,7 @@ class Main { e2.setCrc(e.getCrc()); } zos.putNextEntry(e2); - while ((n = zis.read(buf, 0, buf.length)) != -1) { - zos.write(buf, 0, n); - } + copy(zis, zos); } else { // replace with the new files File f = entryMap.get(name); addFile(zos, f); @@ -558,7 +589,7 @@ class Main { if (!foundManifest) { if (newManifest != null) { Manifest m = new Manifest(newManifest); - updateOk = !isAmbigousMainClass(m); + updateOk = !isAmbiguousMainClass(m); if (updateOk) { updateManifest(m, zos); } @@ -575,23 +606,16 @@ class Main { private void addIndex(JarIndex index, ZipOutputStream zos) throws IOException { - ZipEntry e = new ZipEntry(INDEX); + ZipEntry e = new ZipEntry(INDEX_NAME); e.setTime(System.currentTimeMillis()); if (flag0) { - e.setMethod(ZipEntry.STORED); - File ifile = File.createTempFile("index", null, new File(".")); - BufferedOutputStream bos = new BufferedOutputStream - (new FileOutputStream(ifile)); - index.write(bos); - crc32File(e, ifile); - bos.close(); - ifile.delete(); + CRC32OutputStream os = new CRC32OutputStream(); + index.write(os); + os.updateEntry(e); } zos.putNextEntry(e); index.write(zos); - if (vflag) { - // output(getMsg("out.update.manifest")); - } + zos.closeEntry(); } private void updateManifest(Manifest m, ZipOutputStream zos) @@ -602,10 +626,9 @@ class Main { if (ename != null) { addMainClass(m, ename); } - ZipEntry e = new ZipEntry(MANIFEST); + ZipEntry e = new ZipEntry(MANIFEST_NAME); e.setTime(System.currentTimeMillis()); if (flag0) { - e.setMethod(ZipEntry.STORED); crc32Manifest(e, m); } zos.putNextEntry(e); @@ -620,7 +643,8 @@ class Main { name = name.replace(File.separatorChar, '/'); String matchPath = ""; for (String path : paths) { - if (name.startsWith(path) && (path.length() > matchPath.length())) { + if (name.startsWith(path) + && (path.length() > matchPath.length())) { matchPath = path; } } @@ -658,7 +682,7 @@ class Main { global.put(Attributes.Name.MAIN_CLASS, mainApp); } - private boolean isAmbigousMainClass(Manifest m) { + private boolean isAmbiguousMainClass(Manifest m) { if (ename != null) { Attributes global = m.getMainAttributes(); if ((global.get(Attributes.Name.MAIN_CLASS) != null)) { @@ -670,7 +694,7 @@ class Main { return false; } - /* + /** * Adds a new file entry to the ZIP output stream. */ void addFile(ZipOutputStream zos, File file) throws IOException { @@ -684,7 +708,7 @@ class Main { if (name.equals("") || name.equals(".") || name.equals(zname)) { return; - } else if ((name.equals(MANIFEST_DIR) || name.equals(MANIFEST)) + } else if ((name.equals(MANIFEST_DIR) || name.equals(MANIFEST_NAME)) && !Mflag) { if (vflag) { output(formatMsg("out.ignore.entry", name)); @@ -704,19 +728,11 @@ class Main { e.setSize(0); e.setCrc(0); } else if (flag0) { - e.setSize(size); - e.setMethod(ZipEntry.STORED); crc32File(e, file); } zos.putNextEntry(e); if (!isDir) { - byte[] buf = new byte[8192]; - int len; - InputStream is = new BufferedInputStream(new FileInputStream(file)); - while ((len = is.read(buf, 0, buf.length)) != -1) { - zos.write(buf, 0, len); - } - is.close(); + copy(file, zos); } zos.closeEntry(); /* report how much compression occurred. */ @@ -737,39 +753,83 @@ class Main { } } - /* - * compute the crc32 of a file. This is necessary when the ZipOutputStream - * is in STORED mode. + /** + * A buffer for use only by copy(InputStream, OutputStream). + * Not as clean as allocating a new buffer as needed by copy, + * but significantly more efficient. */ - private void crc32Manifest(ZipEntry e, Manifest m) throws IOException { - crc32.reset(); - CRC32OutputStream os = new CRC32OutputStream(crc32); - m.write(os); - e.setSize((long) os.n); - e.setCrc(crc32.getValue()); + private byte[] copyBuf = new byte[8192]; + + /** + * Copies all bytes from the input stream to the output stream. + * Does not close or flush either stream. + * + * @param from the input stream to read from + * @param to the output stream to write to + * @throws IOException if an I/O error occurs + */ + private void copy(InputStream from, OutputStream to) throws IOException { + int n; + while ((n = from.read(copyBuf)) != -1) + to.write(copyBuf, 0, n); } - /* - * compute the crc32 of a file. This is necessary when the ZipOutputStream - * is in STORED mode. + /** + * Copies all bytes from the input file to the output stream. + * Does not close or flush the output stream. + * + * @param from the input file to read from + * @param to the output stream to write to + * @throws IOException if an I/O error occurs + */ + private void copy(File from, OutputStream to) throws IOException { + InputStream in = new FileInputStream(from); + try { + copy(in, to); + } finally { + in.close(); + } + } + + /** + * Copies all bytes from the input stream to the output file. + * Does not close the input stream. + * + * @param from the input stream to read from + * @param to the output file to write to + * @throws IOException if an I/O error occurs + */ + private void copy(InputStream from, File to) throws IOException { + OutputStream out = new FileOutputStream(to); + try { + copy(from, out); + } finally { + out.close(); + } + } + + /** + * Computes the crc32 of a Manifest. This is necessary when the + * ZipOutputStream is in STORED mode. + */ + private void crc32Manifest(ZipEntry e, Manifest m) throws IOException { + CRC32OutputStream os = new CRC32OutputStream(); + m.write(os); + os.updateEntry(e); + } + + /** + * Computes the crc32 of a File. This is necessary when the + * ZipOutputStream is in STORED mode. */ private void crc32File(ZipEntry e, File f) throws IOException { - InputStream is = new BufferedInputStream(new FileInputStream(f)); - byte[] buf = new byte[8192]; - crc32.reset(); - int r = 0; - int nread = 0; - long len = f.length(); - while ((r = is.read(buf)) != -1) { - nread += r; - crc32.update(buf, 0, r); - } - is.close(); - if (nread != (int) len) { + CRC32OutputStream os = new CRC32OutputStream(); + copy(f, os); + if (os.n != f.length()) { throw new JarException(formatMsg( "error.incorrect.length", f.getPath())); } - e.setCrc(crc32.getValue()); + os.updateEntry(e); } void replaceFSC(String files[]) { @@ -780,6 +840,7 @@ class Main { } } + @SuppressWarnings("serial") Set newDirSet() { return new HashSet() { public boolean add(ZipEntry e) { @@ -797,7 +858,7 @@ class Main { } } - /* + /** * Extracts specified entries from JAR file. */ void extract(InputStream in, String files[]) throws IOException { @@ -827,7 +888,7 @@ class Main { updateLastModifiedTime(dirs); } - /* + /** * Extracts specified entries from JAR file, via ZipFile. */ void extract(String fname, String files[]) throws IOException { @@ -853,7 +914,7 @@ class Main { updateLastModifiedTime(dirs); } - /* + /** * Extracts next entry from JAR file, creating directories as needed. If * the entry is for a directory which doesn't exist prior to this * invocation, returns that entry, otherwise returns null. @@ -888,19 +949,13 @@ class Main { "error.create.dir", d.getPath())); } } - OutputStream os = new FileOutputStream(f); - byte[] b = new byte[8192]; - int len; try { - while ((len = is.read(b, 0, b.length)) != -1) { - os.write(b, 0, len); - } + copy(is, f); } finally { if (is instanceof ZipInputStream) ((ZipInputStream)is).closeEntry(); else is.close(); - os.close(); } if (vflag) { if (e.getMethod() == ZipEntry.DEFLATED) { @@ -919,7 +974,7 @@ class Main { return rc; } - /* + /** * Lists contents of JAR file. */ void list(InputStream in, String files[]) throws IOException { @@ -937,7 +992,7 @@ class Main { } } - /* + /** * Lists contents of JAR file, via ZipFile. */ void list(String fname, String files[]) throws IOException { @@ -950,32 +1005,38 @@ class Main { } /** - * Output the class index table to the INDEX.LIST file of the + * Outputs the class index table to the INDEX.LIST file of the * root jar file. */ void dumpIndex(String rootjar, JarIndex index) throws IOException { - File scratchFile = File.createTempFile("scratch", null, new File(".")); File jarFile = new File(rootjar); - boolean updateOk = update(new FileInputStream(jarFile), - new FileOutputStream(scratchFile), - null, index); - jarFile.delete(); - if (!scratchFile.renameTo(jarFile)) { - scratchFile.delete(); - throw new IOException(getMsg("error.write.file")); + Path jarPath = jarFile.toPath(); + Path tmpPath = createTempFileInSameDirectoryAs(jarFile).toPath(); + try { + if (update(jarPath.newInputStream(), + tmpPath.newOutputStream(), + null, index)) { + try { + tmpPath.moveTo(jarPath, REPLACE_EXISTING); + } catch (IOException e) { + throw new IOException(getMsg("error.write.file"), e); + } + } + } finally { + tmpPath.deleteIfExists(); } - scratchFile.delete(); } - private Hashtable jarTable = new Hashtable(); - /* - * Generate the transitive closure of the Class-Path attribute for + private HashSet jarPaths = new HashSet(); + + /** + * Generates the transitive closure of the Class-Path attribute for * the specified jar file. */ - Vector getJarPath(String jar) throws IOException { - Vector files = new Vector(); + List getJarPath(String jar) throws IOException { + List files = new ArrayList(); files.add(jar); - jarTable.put(jar, jar); + jarPaths.add(jar); // take out the current path String path = jar.substring(0, Math.max(0, jar.lastIndexOf('/') + 1)); @@ -998,7 +1059,7 @@ class Main { if (!ajar.endsWith("/")) { // it is a jar file ajar = path.concat(ajar); /* check on cyclic dependency */ - if (jarTable.get(ajar) == null) { + if (! jarPaths.contains(ajar)) { files.addAll(getJarPath(ajar)); } } @@ -1012,10 +1073,10 @@ class Main { } /** - * Generate class index file for the specified root jar file. + * Generates class index file for the specified root jar file. */ void genIndex(String rootjar, String[] files) throws IOException { - Vector jars = getJarPath(rootjar); + List jars = getJarPath(rootjar); int njars = jars.size(); String[] jarfiles; @@ -1027,12 +1088,12 @@ class Main { } njars = jars.size(); } - jarfiles = (String[])jars.toArray(new String[njars]); + jarfiles = jars.toArray(new String[njars]); JarIndex index = new JarIndex(jarfiles); dumpIndex(rootjar, index); } - /* + /** * Prints entry information, if requested. */ void printEntry(ZipEntry e, String[] files) throws IOException { @@ -1049,7 +1110,7 @@ class Main { } } - /* + /** * Prints entry information. */ void printEntry(ZipEntry e) throws IOException { @@ -1067,21 +1128,21 @@ class Main { } } - /* - * Print usage message and die. + /** + * Prints usage message. */ void usageError() { error(getMsg("usage")); } - /* + /** * A fatal exception has been caught. No recovery possible */ void fatalError(Exception e) { e.printStackTrace(); } - /* + /** * A fatal condition has been detected; message is "s". * No recovery possible */ @@ -1103,39 +1164,43 @@ class Main { err.println(s); } - /* + /** * Main routine to start program. */ public static void main(String args[]) { Main jartool = new Main(System.out, System.err, "jar"); System.exit(jartool.run(args) ? 0 : 1); } -} -/* - * an OutputStream that doesn't send its output anywhere, (but could). - * It's here to find the CRC32 of a manifest, necessary for STORED only - * mode in ZIP. - */ -final class CRC32OutputStream extends java.io.OutputStream { - CRC32 crc; - int n = 0; - CRC32OutputStream(CRC32 crc) { - this.crc = crc; - } + /** + * An OutputStream that doesn't send its output anywhere, (but could). + * It's here to find the CRC32 of an input file, necessary for STORED + * mode in ZIP. + */ + private static class CRC32OutputStream extends java.io.OutputStream { + final CRC32 crc = new CRC32(); + long n = 0; - public void write(int r) throws IOException { - crc.update(r); - n++; - } + CRC32OutputStream() {} - public void write(byte[] b) throws IOException { - crc.update(b, 0, b.length); - n += b.length; - } + public void write(int r) throws IOException { + crc.update(r); + n++; + } - public void write(byte[] b, int off, int len) throws IOException { - crc.update(b, off, len); - n += len - off; + public void write(byte[] b, int off, int len) throws IOException { + crc.update(b, off, len); + n += len; + } + + /** + * Updates a ZipEntry which describes the data read by this + * output stream, in STORED mode. + */ + public void updateEntry(ZipEntry e) { + e.setMethod(ZipEntry.STORED); + e.setSize(n); + e.setCrc(crc.getValue()); + } } } diff --git a/jdk/test/tools/jar/index/MetaInf.java b/jdk/test/tools/jar/index/MetaInf.java index dae74836938..9e05a8d4fb4 100644 --- a/jdk/test/tools/jar/index/MetaInf.java +++ b/jdk/test/tools/jar/index/MetaInf.java @@ -23,13 +23,15 @@ /* * @test - * @bug 4408526 + * @bug 4408526 6854795 * @summary Index the non-meta files in META-INF, such as META-INF/services. */ import java.io.*; +import java.util.Arrays; import java.util.jar.*; import sun.tools.jar.Main; +import java.util.zip.ZipFile; public class MetaInf { @@ -39,29 +41,51 @@ public class MetaInf { static String contents = System.getProperty("test.src") + File.separatorChar + "jarcontents"; - // Options passed to "jar" command. - static String[] jarArgs1 = new String[] { - "cf", jarName, "-C", contents, SERVICES - }; - static String[] jarArgs2 = new String[] { - "i", jarName - }; + static void run(String ... args) { + if (! new Main(System.out, System.err, "jar").run(args)) + throw new Error("jar failed: args=" + Arrays.toString(args)); + } - public static void main(String[] args) throws IOException { + static void copy(File from, File to) throws IOException { + FileInputStream in = new FileInputStream(from); + FileOutputStream out = new FileOutputStream(to); + try { + byte[] buf = new byte[8192]; + int n; + while ((n = in.read(buf)) != -1) + out.write(buf, 0, n); + } finally { + in.close(); + out.close(); + } + } + + static boolean contains(File jarFile, String entryName) + throws IOException { + return new ZipFile(jarFile).getEntry(entryName) != null; + } + + static void checkContains(File jarFile, String entryName) + throws IOException { + if (! contains(jarFile, entryName)) + throw new Error(String.format("expected jar %s to contain %s", + jarFile, entryName)); + } + + static void testIndex(String jarName) throws IOException { + System.err.printf("jarName=%s%n", jarName); + + File jar = new File(jarName); // Create a jar to be indexed. - Main jarTool = new Main(System.out, System.err, "jar"); - if (!jarTool.run(jarArgs1)) { - throw new Error("Could not create jar file."); + run("cf", jarName, "-C", contents, SERVICES); + + for (int i = 0; i < 2; i++) { + run("i", jarName); + checkContains(jar, INDEX); + checkContains(jar, SERVICES); } - // Index the jar. - jarTool = new Main(System.out, System.err, "jar"); - if (!jarTool.run(jarArgs2)) { - throw new Error("Could not index jar file."); - } - - // Read the index. Verify that META-INF/services is indexed. JarFile f = new JarFile(jarName); BufferedReader index = new BufferedReader( @@ -75,4 +99,17 @@ public class MetaInf { } throw new Error(SERVICES + " not indexed."); } + + public static void main(String[] args) throws IOException { + testIndex("a.jar"); // a path with parent == null + testIndex("./a.zip"); // a path with parent != null + + // Try indexing a jar in the default temp directory. + File tmpFile = File.createTempFile("MetaInf", null, null); + try { + testIndex(tmpFile.getPath()); + } finally { + tmpFile.delete(); + } + } } From f3358ba3db77de135e196b2b2dc57617420c5b06 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Tue, 7 Jul 2009 14:11:06 +0400 Subject: [PATCH 12/56] 6489447: Apply the more robust fix for 6449933 to dolphin and 6ux Reviewed-by: malenkov --- jdk/src/windows/native/sun/windows/ShellFolder2.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp index 6799b098218..64eea69bced 100644 --- a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp +++ b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -981,6 +981,15 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getFileChooserB hBitmap = (HBITMAP)LoadImage(libShell32, IS_WINVISTA ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); + + if (hBitmap == NULL) { + // version of shell32.dll doesn't match OS version. + // So we either are in a Vista Compatibility Mode + // or shell32.dll was copied from OS of another version + hBitmap = (HBITMAP)LoadImage(libShell32, + IS_WINVISTA ? MAKEINTRESOURCE(216) : TEXT("IDB_TB_SH_DEF_16"), + IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); + } } if (hBitmap == NULL) { libComCtl32 = LoadLibrary(TEXT("comctl32.dll")); From b3f3644fea86f475e02ba7b139f30e7a0e191695 Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Tue, 7 Jul 2009 17:05:50 +0400 Subject: [PATCH 13/56] 6853916: java.awt.Window.setBackground(null) throws NullPointerException Window.setBackground() should check for null. Reviewed-by: art, dcherepanov --- jdk/src/share/classes/java/awt/Window.java | 2 +- .../SetBackgroundNPE/SetBackgroundNPE.java | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/awt/Window/SetBackgroundNPE/SetBackgroundNPE.java diff --git a/jdk/src/share/classes/java/awt/Window.java b/jdk/src/share/classes/java/awt/Window.java index aac5d3789da..31c94ca77e5 100644 --- a/jdk/src/share/classes/java/awt/Window.java +++ b/jdk/src/share/classes/java/awt/Window.java @@ -3597,7 +3597,7 @@ public class Window extends Container implements Accessible { return; } int oldAlpha = oldBg != null ? oldBg.getAlpha() : 255; - int alpha = bgColor.getAlpha(); + int alpha = bgColor != null ? bgColor.getAlpha() : 255; if ((oldAlpha == 255) && (alpha < 255)) { // non-opaque window GraphicsConfiguration gc = getGraphicsConfiguration(); GraphicsDevice gd = gc.getDevice(); diff --git a/jdk/test/java/awt/Window/SetBackgroundNPE/SetBackgroundNPE.java b/jdk/test/java/awt/Window/SetBackgroundNPE/SetBackgroundNPE.java new file mode 100644 index 00000000000..10c9ac72e0f --- /dev/null +++ b/jdk/test/java/awt/Window/SetBackgroundNPE/SetBackgroundNPE.java @@ -0,0 +1,38 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + @test + @bug 6853916 + @summary Window.setBackground() should not throw NPE + @author anthony.petrov@sun.com: area=awt.toplevel + @run main SetBackgroundNPE +*/ + +import java.awt.Window; + +public class SetBackgroundNPE { + public static void main(String args[]) { + new Window(null).setBackground(null); + } +} From 21aa3652d44605eb6a91fcfddc1d206398295503 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 7 Jul 2009 16:12:34 -0700 Subject: [PATCH 14/56] 6857803: Missing links to exceptions in javadoc for Class.getGeneric{Superclass, Interfaces} Reviewed-by: chegar --- jdk/src/share/classes/java/lang/Class.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jdk/src/share/classes/java/lang/Class.java b/jdk/src/share/classes/java/lang/Class.java index 4ba497c64cf..ddf57631790 100644 --- a/jdk/src/share/classes/java/lang/Class.java +++ b/jdk/src/share/classes/java/lang/Class.java @@ -627,7 +627,7 @@ public final * * @return an array of {@code TypeVariable} objects that represent * the type variables declared by this generic declaration - * @throws GenericSignatureFormatError if the generic + * @throws java.lang.reflect.GenericSignatureFormatError if the generic * signature of this generic declaration does not conform to * the format specified in the Java Virtual Machine Specification, * 3rd edition @@ -673,12 +673,12 @@ public final * {@code Class} object representing the {@code Object} class is * returned. * - * @throws GenericSignatureFormatError if the generic + * @throws java.lang.reflect.GenericSignatureFormatError if the generic * class signature does not conform to the format specified in the * Java Virtual Machine Specification, 3rd edition * @throws TypeNotPresentException if the generic superclass * refers to a non-existent type declaration - * @throws MalformedParameterizedTypeException if the + * @throws java.lang.reflect.MalformedParameterizedTypeException if the * generic superclass refers to a parameterized type that cannot be * instantiated for any reason * @return the superclass of the class represented by this object @@ -795,14 +795,14 @@ public final *

    If this object represents a primitive type or void, the * method returns an array of length 0. * - * @throws GenericSignatureFormatError + * @throws java.lang.reflect.GenericSignatureFormatError * if the generic class signature does not conform to the format * specified in the Java Virtual Machine Specification, 3rd edition * @throws TypeNotPresentException if any of the generic * superinterfaces refers to a non-existent type declaration - * @throws MalformedParameterizedTypeException if any of the - * generic superinterfaces refer to a parameterized type that cannot - * be instantiated for any reason + * @throws java.lang.reflect.MalformedParameterizedTypeException + * if any of the generic superinterfaces refer to a parameterized + * type that cannot be instantiated for any reason * @return an array of interfaces implemented by this class * @since 1.5 */ From 96a8d1a9f8805de2786eee08b3352b49a6dacb16 Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 8 Jul 2009 12:07:16 +0800 Subject: [PATCH 15/56] 6857802: GSS getRemainingInitLifetime method returns milliseconds not seconds Reviewed-by: xuelei --- .../jgss/krb5/Krb5InitCredential.java | 2 +- .../security/krb5/auto/LifeTimeInSeconds.java | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 jdk/test/sun/security/krb5/auto/LifeTimeInSeconds.java diff --git a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java index 1aac87223e1..4718f57e7d3 100644 --- a/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java +++ b/jdk/src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java @@ -238,7 +238,7 @@ public class Krb5InitCredential retVal = (int)(getEndTime().getTime() - (new Date().getTime())); - return retVal; + return retVal/1000; } /** diff --git a/jdk/test/sun/security/krb5/auto/LifeTimeInSeconds.java b/jdk/test/sun/security/krb5/auto/LifeTimeInSeconds.java new file mode 100644 index 00000000000..2d20fc415bb --- /dev/null +++ b/jdk/test/sun/security/krb5/auto/LifeTimeInSeconds.java @@ -0,0 +1,50 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6857802 + * @summary GSS getRemainingInitLifetime method returns milliseconds not seconds + */ +import org.ietf.jgss.GSSCredential; +import org.ietf.jgss.GSSManager; + +public class LifeTimeInSeconds { + public static void main(String[] args) throws Exception { + new OneKDC(null).writeJAASConf(); + System.setProperty("javax.security.auth.useSubjectCredsOnly", "false"); + + GSSManager gm = GSSManager.getInstance(); + GSSCredential cred = gm.createCredential(GSSCredential.INITIATE_AND_ACCEPT); + int time = cred.getRemainingLifetime(); + int time2 = cred.getRemainingInitLifetime(null); + // The test KDC issues a TGT with a default lifetime of 11 hours + int elevenhrs = 11*3600; + if (time > elevenhrs+60 || time < elevenhrs-60) { + throw new Exception("getRemainingLifetime returns wrong value."); + } + if (time2 > elevenhrs+60 || time2 < elevenhrs-60) { + throw new Exception("getRemainingInitLifetime returns wrong value."); + } + } +} From 9148ed61cfd3c9f22826249ea3639e90e23c73ab Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Wed, 8 Jul 2009 12:07:43 +0800 Subject: [PATCH 16/56] 6857795: krb5.conf ignored if system properties on realm and kdc are provided Reviewed-by: xuelei --- .../classes/sun/security/krb5/Config.java | 35 ++++--- jdk/test/sun/security/krb5/ConfPlusProp.java | 94 +++++++++++++++++++ jdk/test/sun/security/krb5/confplusprop.conf | 11 +++ jdk/test/sun/security/krb5/confplusprop2.conf | 7 ++ 4 files changed, 133 insertions(+), 14 deletions(-) create mode 100644 jdk/test/sun/security/krb5/ConfPlusProp.java create mode 100644 jdk/test/sun/security/krb5/confplusprop.conf create mode 100644 jdk/test/sun/security/krb5/confplusprop2.conf diff --git a/jdk/src/share/classes/sun/security/krb5/Config.java b/jdk/src/share/classes/sun/security/krb5/Config.java index e036776f53e..8adcba81f53 100644 --- a/jdk/src/share/classes/sun/security/krb5/Config.java +++ b/jdk/src/share/classes/sun/security/krb5/Config.java @@ -123,7 +123,7 @@ public class Config { java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction ("java.security.krb5.kdc")); - defaultRealm = + defaultRealm = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction ("java.security.krb5.realm")); @@ -134,6 +134,16 @@ public class Config { "java.security.krb5.realm both must be set or " + "neither must be set."); } + + // Read the Kerberos configuration file + try { + Vector configFile; + configFile = loadConfigFile(); + stanzaTable = parseStanzaTable(configFile); + } catch (IOException ioe) { + // No krb5.conf, no problem. We'll use DNS etc. + } + if (kdchost != null) { /* * If configuration information is only specified by @@ -141,22 +151,19 @@ public class Config { * java.security.krb5.realm, we put both in the hashtable * under [libdefaults]. */ - Hashtable kdcs = new Hashtable (); + if (stanzaTable == null) { + stanzaTable = new Hashtable (); + } + Hashtable kdcs = + (Hashtable)stanzaTable.get("libdefaults"); + if (kdcs == null) { + kdcs = new Hashtable (); + stanzaTable.put("libdefaults", kdcs); + } kdcs.put("default_realm", defaultRealm); // The user can specify a list of kdc hosts separated by ":" kdchost = kdchost.replace(':', ' '); kdcs.put("kdc", kdchost); - stanzaTable = new Hashtable (); - stanzaTable.put("libdefaults", kdcs); - } else { - // Read the Kerberos configuration file - try { - Vector configFile; - configFile = loadConfigFile(); - stanzaTable = parseStanzaTable(configFile); - } catch (IOException ioe) { - // No krb5.conf, no problem. We'll use DNS etc. - } } } @@ -294,7 +301,7 @@ public class Config { * hashtable. */ if (name.equalsIgnoreCase("kdc") && - (!section.equalsIgnoreCase("libdefaults")) && + (section.equalsIgnoreCase(getDefault("default_realm", "libdefaults"))) && (java.security.AccessController.doPrivileged( new sun.security.action. GetPropertyAction("java.security.krb5.kdc")) != null)) { diff --git a/jdk/test/sun/security/krb5/ConfPlusProp.java b/jdk/test/sun/security/krb5/ConfPlusProp.java new file mode 100644 index 00000000000..b1ea2ca5e75 --- /dev/null +++ b/jdk/test/sun/security/krb5/ConfPlusProp.java @@ -0,0 +1,94 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +/* + * @test + * @bug 6857795 + * @summary krb5.conf ignored if system properties on realm and kdc are provided + */ + +import sun.security.krb5.Config; +import sun.security.krb5.KrbException; + +public class ConfPlusProp { + public static void main(String[] args) throws Exception { + System.setProperty("java.security.krb5.realm", "R2"); + System.setProperty("java.security.krb5.kdc", "k2"); + + // Point to a file with existing default_realm + System.setProperty("java.security.krb5.conf", + System.getProperty("test.src", ".") +"/confplusprop.conf"); + Config config = Config.getInstance(); + + if (!config.getDefaultRealm().equals("R2")) { + throw new Exception("Default realm error"); + } + if (!config.getKDCList("R1").equals("k1")) { + throw new Exception("R1 kdc error"); + } + if (!config.getKDCList("R2").equals("k2")) { + throw new Exception("R2 kdc error"); + } + if (!config.getDefault("forwardable", "libdefaults").equals("well")) { + throw new Exception("Extra config error"); + } + + // Point to a file with no libdefaults + System.setProperty("java.security.krb5.conf", + System.getProperty("test.src", ".") +"/confplusprop2.conf"); + Config.refresh(); + + config = Config.getInstance(); + + if (!config.getDefaultRealm().equals("R2")) { + throw new Exception("Default realm error again"); + } + if (!config.getKDCList("R1").equals("k12")) { + throw new Exception("R1 kdc error"); + } + if (!config.getKDCList("R2").equals("k2")) { + throw new Exception("R2 kdc error"); + } + + // Point to a non-existing file + System.setProperty("java.security.krb5.conf", "i-am-not-a file"); + Config.refresh(); + + config = Config.getInstance(); + + if (!config.getDefaultRealm().equals("R2")) { + throw new Exception("Default realm error"); + } + try { + config.getKDCList("R1"); + throw new Exception("R1 is nowhere"); + } catch (KrbException ke) { + // OK + } + if (!config.getKDCList("R2").equals("k2")) { + throw new Exception("R2 kdc error"); + } + if (config.getDefault("forwardable", "libdefaults") != null) { + throw new Exception("Extra config error"); + } + } +} diff --git a/jdk/test/sun/security/krb5/confplusprop.conf b/jdk/test/sun/security/krb5/confplusprop.conf new file mode 100644 index 00000000000..80c925b14cd --- /dev/null +++ b/jdk/test/sun/security/krb5/confplusprop.conf @@ -0,0 +1,11 @@ +[libdefaults] +default_realm = R1 +forwardable = well + +[realms] +R1 = { + kdc = k1 +} +R2 = { + kdc = old +} diff --git a/jdk/test/sun/security/krb5/confplusprop2.conf b/jdk/test/sun/security/krb5/confplusprop2.conf new file mode 100644 index 00000000000..df00eccbccf --- /dev/null +++ b/jdk/test/sun/security/krb5/confplusprop2.conf @@ -0,0 +1,7 @@ +[realms] +R1 = { + kdc = k12 +} +R2 = { + kdc = old +} From 529e9065c2026ba0d359af78d1b8f0c6d0596371 Mon Sep 17 00:00:00 2001 From: Kelly O'Hair Date: Wed, 8 Jul 2009 09:11:24 -0700 Subject: [PATCH 17/56] 6858127: Missing -DNDEBUG on Linux and Windows native code compiles Reviewed-by: tbell, dcubed --- jdk/make/common/Defs-linux.gmk | 2 +- jdk/make/common/Defs-windows.gmk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/make/common/Defs-linux.gmk b/jdk/make/common/Defs-linux.gmk index 672affde32b..424eaf0a7db 100644 --- a/jdk/make/common/Defs-linux.gmk +++ b/jdk/make/common/Defs-linux.gmk @@ -193,7 +193,7 @@ ifeq ($(ARCH_DATA_MODEL), 64) CPPFLAGS_COMMON += -D_LP64=1 endif -CPPFLAGS_OPT = +CPPFLAGS_OPT = -DNDEBUG CPPFLAGS_DBG = -DDEBUG ifneq ($(PRODUCT), java) CPPFLAGS_DBG += -DLOGGING diff --git a/jdk/make/common/Defs-windows.gmk b/jdk/make/common/Defs-windows.gmk index 00b8ea71e2a..0c220107df2 100644 --- a/jdk/make/common/Defs-windows.gmk +++ b/jdk/make/common/Defs-windows.gmk @@ -363,7 +363,7 @@ ifeq ($(COMPILER_WARNINGS_FATAL),true) CFLAGS_COMMON += -WX endif -CPPFLAGS_OPT = +CPPFLAGS_OPT = -DNDEBUG CPPFLAGS_DBG = -DDEBUG -DLOGGING CXXFLAGS_COMMON = $(CFLAGS_COMMON) From 64697c3e7ac7741b9b62373bcca0fcb5a08e730d Mon Sep 17 00:00:00 2001 From: Kelly O'Hair Date: Wed, 8 Jul 2009 09:12:17 -0700 Subject: [PATCH 18/56] 6855551: java -Xrunhprof crashes when running with classes compiled with targed=7 Reviewed-by: tbell, dcubed --- jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c | 4 ++-- jdk/test/demo/jvmti/hprof/HelloWorld.java | 2 +- jdk/test/demo/jvmti/hprof/StackMapTableTest.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c b/jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c index 6d43d9baa90..d241e80dafa 100644 --- a/jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c +++ b/jdk/src/share/demo/jvmti/java_crw_demo/java_crw_demo.c @@ -263,8 +263,8 @@ assert_error(CrwClassImage *ci, const char *condition, (void)sprintf(buf, "CRW ASSERTION FAILURE: %s (%s:%s:%d)", condition, - ci->name==0?"?":ci->name, - mi->name==0?"?":mi->name, + ci->name==NULL?"?":ci->name, + (mi==NULL||mi->name==NULL)?"?":mi->name, byte_code_offset); fatal_error(ci, buf, file, line); } diff --git a/jdk/test/demo/jvmti/hprof/HelloWorld.java b/jdk/test/demo/jvmti/hprof/HelloWorld.java index e349bbd08e9..ae8ec5c1482 100644 --- a/jdk/test/demo/jvmti/hprof/HelloWorld.java +++ b/jdk/test/demo/jvmti/hprof/HelloWorld.java @@ -24,7 +24,7 @@ /* HelloWorld: * - * Sample target appluication for HPROF tests + * Sample target application for HPROF tests * */ diff --git a/jdk/test/demo/jvmti/hprof/StackMapTableTest.java b/jdk/test/demo/jvmti/hprof/StackMapTableTest.java index a34614dfccb..0acc6fe61dc 100644 --- a/jdk/test/demo/jvmti/hprof/StackMapTableTest.java +++ b/jdk/test/demo/jvmti/hprof/StackMapTableTest.java @@ -23,11 +23,11 @@ /* @test - * @bug 6266289 6299047 + * @bug 6266289 6299047 6855180 6855551 * @summary Test jvmti hprof and java_crw_demo with StackMapTable attributes * * @compile ../DemoRun.java - * @compile -source 1.6 -g:lines HelloWorld.java + * @compile -source 7 -g:lines HelloWorld.java * @build StackMapTableTest * @run main StackMapTableTest HelloWorld */ From 74d89957476c683d095d1d99325184e82b4cd1fc Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Thu, 9 Jul 2009 15:15:28 -0400 Subject: [PATCH 19/56] 6855323: Robot(GraphicsDevice) constructor initializes LEGAL_BUTTON_MASK variable improperly Reviewed-by: art --- jdk/src/share/classes/java/awt/Robot.java | 41 ++++++----- .../java/awt/Robot/CtorTest/CtorTest.java | 71 +++++++++++++++++++ 2 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 jdk/test/java/awt/Robot/CtorTest/CtorTest.java diff --git a/jdk/src/share/classes/java/awt/Robot.java b/jdk/src/share/classes/java/awt/Robot.java index f7a40c740bc..1233c291a3e 100644 --- a/jdk/src/share/classes/java/awt/Robot.java +++ b/jdk/src/share/classes/java/awt/Robot.java @@ -70,7 +70,7 @@ public class Robot { private RobotPeer peer; private boolean isAutoWaitForIdle = false; private int autoDelay = 0; - private static int LEGAL_BUTTON_MASK; + private static int LEGAL_BUTTON_MASK = 0; // location of robot's GC, used in mouseMove(), getPixelColor() and captureScreenImage() private Point gdLoc; @@ -95,23 +95,6 @@ public class Robot { } init(GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice()); - int tmpMask = 0; - - if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){ - if (Toolkit.getDefaultToolkit() instanceof SunToolkit) { - final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons(); - for (int i = 0; i < buttonsNumber; i++){ - tmpMask |= InputEvent.getMaskForButton(i+1); - } - } - } - tmpMask |= InputEvent.BUTTON1_MASK| - InputEvent.BUTTON2_MASK| - InputEvent.BUTTON3_MASK| - InputEvent.BUTTON1_DOWN_MASK| - InputEvent.BUTTON2_DOWN_MASK| - InputEvent.BUTTON3_DOWN_MASK; - LEGAL_BUTTON_MASK = tmpMask; } /** @@ -156,6 +139,28 @@ public class Robot { disposer = new RobotDisposer(peer); sun.java2d.Disposer.addRecord(anchor, disposer); } + initLegalButtonMask(); + } + + private static synchronized void initLegalButtonMask() { + if (LEGAL_BUTTON_MASK != 0) return; + + int tmpMask = 0; + if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){ + if (Toolkit.getDefaultToolkit() instanceof SunToolkit) { + final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons(); + for (int i = 0; i < buttonsNumber; i++){ + tmpMask |= InputEvent.getMaskForButton(i+1); + } + } + } + tmpMask |= InputEvent.BUTTON1_MASK| + InputEvent.BUTTON2_MASK| + InputEvent.BUTTON3_MASK| + InputEvent.BUTTON1_DOWN_MASK| + InputEvent.BUTTON2_DOWN_MASK| + InputEvent.BUTTON3_DOWN_MASK; + LEGAL_BUTTON_MASK = tmpMask; } /* determine if the security policy allows Robot's to be created */ diff --git a/jdk/test/java/awt/Robot/CtorTest/CtorTest.java b/jdk/test/java/awt/Robot/CtorTest/CtorTest.java new file mode 100644 index 00000000000..ea9c56fa2d5 --- /dev/null +++ b/jdk/test/java/awt/Robot/CtorTest/CtorTest.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + @test + @bug 6855323 + @summary Robot(GraphicsDevice) constructor initializes LEGAL_BUTTON_MASK variable improperly + @author Dmitry Cherepanov area=awt.robot + @run main CtorTest +*/ + +/** + * CtorRobot.java + * + * summary: creates Robot using one parameter constructor + */ + +import java.awt.*; +import java.awt.event.*; + +import sun.awt.SunToolkit; + +public class CtorTest +{ + public static void main(String []s) throws Exception + { + // one parameter constructor + GraphicsDevice graphicsDevice = GraphicsEnvironment. + getLocalGraphicsEnvironment().getDefaultScreenDevice(); + Robot robot = new Robot(graphicsDevice); + clickOnFrame(robot); + } + + // generate mouse events + private static void clickOnFrame(Robot robot) { + Frame frame = new Frame(); + frame.setBounds(100, 100, 100, 100); + frame.setVisible(true); + + ((SunToolkit)Toolkit.getDefaultToolkit()).realSync(); + + // click in the middle of the frame + robot.mouseMove(150, 150); + robot.delay(50); + robot.mousePress(InputEvent.BUTTON1_MASK); + robot.delay(50); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + + ((SunToolkit)Toolkit.getDefaultToolkit()).realSync(); + } +} From 4d337f68e85eda235757611ebc1dbadfe92da276 Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Thu, 9 Jul 2009 15:18:50 -0400 Subject: [PATCH 20/56] 6759726: TrayIcon constructor throws NPE instead of documented IAE Reviewed-by: art --- jdk/src/share/classes/java/awt/TrayIcon.java | 3 ++ .../java/awt/TrayIcon/CtorTest/CtorTest.java | 53 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 jdk/test/java/awt/TrayIcon/CtorTest/CtorTest.java diff --git a/jdk/src/share/classes/java/awt/TrayIcon.java b/jdk/src/share/classes/java/awt/TrayIcon.java index 9fcdd2a6af1..e0c31f8c3ee 100644 --- a/jdk/src/share/classes/java/awt/TrayIcon.java +++ b/jdk/src/share/classes/java/awt/TrayIcon.java @@ -143,6 +143,9 @@ public class TrayIcon { */ public TrayIcon(Image image) { this(); + if (image == null) { + throw new IllegalArgumentException("creating TrayIcon with null Image"); + } setImage(image); } diff --git a/jdk/test/java/awt/TrayIcon/CtorTest/CtorTest.java b/jdk/test/java/awt/TrayIcon/CtorTest/CtorTest.java new file mode 100644 index 00000000000..d16034a1a01 --- /dev/null +++ b/jdk/test/java/awt/TrayIcon/CtorTest/CtorTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + @test + @bug 6759726 + @summary TrayIcon constructor throws NPE instead of documented IAE + @author Dmitry Cherepanov area=awt.tray + @run main CtorTest +*/ + +/** + * CtorTest.java + * + * summary: TrayIcon ctor throws IAE if image is null + */ + +import java.awt.*; + +public class CtorTest +{ + public static void main(String []s) + { + boolean isSupported = SystemTray.isSupported(); + if (isSupported) { + try { + TrayIcon tray = new TrayIcon(null); + } catch(IllegalArgumentException e) { + // ctor should throw IAE + } + } + } +} From cd90c35e8f20b3b53ed9ed87d480c501aa6750c3 Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Thu, 9 Jul 2009 15:23:22 -0400 Subject: [PATCH 21/56] 6847958: MouseWheel event is getting triggered for the disabled Textarea in jdk7 b60 pit build Reviewed-by: art --- .../classes/sun/awt/X11/XBaseWindow.java | 5 +- .../DisabledComponent/DisabledComponent.java | 107 ++++++++++++++++++ 2 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 jdk/test/java/awt/event/MouseWheelEvent/DisabledComponent/DisabledComponent.java diff --git a/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java b/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java index 07a4fc7c265..0cd25523538 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XBaseWindow.java @@ -1000,10 +1000,7 @@ public class XBaseWindow { int buttonState = 0; final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons(); for (int i = 0; i Date: Thu, 9 Jul 2009 15:53:07 +0400 Subject: [PATCH 22/56] 6847149: test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java fails Reviewed-by: art --- jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java index 44f43c1b3bf..dda735cb7f3 100644 --- a/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java +++ b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java @@ -65,6 +65,7 @@ public class OwnedWindowsLeak break; } } + garbage = null; // Third, make sure all the weak references are null for (WeakReference ref : children) From 40a7ea7c9c6ded29c0774c04f561698f5c163e43 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 9 Jul 2009 12:31:30 -0700 Subject: [PATCH 23/56] 6628737: Specification of wrapper class valueOf static factories should require caching Reviewed-by: mr --- jdk/src/share/classes/java/lang/Byte.java | 4 ++-- jdk/src/share/classes/java/lang/Character.java | 4 ++++ jdk/src/share/classes/java/lang/Integer.java | 3 +++ jdk/src/share/classes/java/lang/Long.java | 5 +++++ jdk/src/share/classes/java/lang/Short.java | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/java/lang/Byte.java b/jdk/src/share/classes/java/lang/Byte.java index 2bb6480c539..ba7486377d6 100644 --- a/jdk/src/share/classes/java/lang/Byte.java +++ b/jdk/src/share/classes/java/lang/Byte.java @@ -90,8 +90,8 @@ public final class Byte extends Number implements Comparable { * If a new {@code Byte} instance is not required, this method * should generally be used in preference to the constructor * {@link #Byte(byte)}, as this method is likely to yield - * significantly better space and time performance by caching - * frequently requested values. + * significantly better space and time performance since + * all byte values are cached. * * @param b a byte value. * @return a {@code Byte} instance representing {@code b}. diff --git a/jdk/src/share/classes/java/lang/Character.java b/jdk/src/share/classes/java/lang/Character.java index e33052ee170..9b9c938fa1e 100644 --- a/jdk/src/share/classes/java/lang/Character.java +++ b/jdk/src/share/classes/java/lang/Character.java @@ -2571,6 +2571,10 @@ class Character extends Object implements java.io.Serializable, ComparableCharacter instance representing c. * @since 1.5 diff --git a/jdk/src/share/classes/java/lang/Integer.java b/jdk/src/share/classes/java/lang/Integer.java index 50863dd7e9f..da35d2f7a4e 100644 --- a/jdk/src/share/classes/java/lang/Integer.java +++ b/jdk/src/share/classes/java/lang/Integer.java @@ -638,6 +638,9 @@ public final class Integer extends Number implements Comparable { * to yield significantly better space and time performance by * caching frequently requested values. * + * This method will always cache values in the range -128 to 127, + * inclusive, and may cache other values outside of this range. + * * @param i an {@code int} value. * @return an {@code Integer} instance representing {@code i}. * @since 1.5 diff --git a/jdk/src/share/classes/java/lang/Long.java b/jdk/src/share/classes/java/lang/Long.java index c632d5df2d9..a2fe09c959d 100644 --- a/jdk/src/share/classes/java/lang/Long.java +++ b/jdk/src/share/classes/java/lang/Long.java @@ -560,6 +560,11 @@ public final class Long extends Number implements Comparable { * significantly better space and time performance by caching * frequently requested values. * + * Note that unlike the {@linkplain Integer#valueOf(int) + * corresponding method} in the {@code Integer} class, this method + * is not required to cache values within a particular + * range. + * * @param l a long value. * @return a {@code Long} instance representing {@code l}. * @since 1.5 diff --git a/jdk/src/share/classes/java/lang/Short.java b/jdk/src/share/classes/java/lang/Short.java index 8abbf65d61a..a5d72120dfb 100644 --- a/jdk/src/share/classes/java/lang/Short.java +++ b/jdk/src/share/classes/java/lang/Short.java @@ -219,6 +219,9 @@ public final class Short extends Number implements Comparable { * significantly better space and time performance by caching * frequently requested values. * + * This method will always cache values in the range -128 to 127, + * inclusive, and may cache other values outside of this range. + * * @param s a short value. * @return a {@code Short} instance representing {@code s}. * @since 1.5 From 5ba2fd7d33d98a75b94044fcdc0b099bd9d74ba3 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Fri, 10 Jul 2009 17:27:13 +0800 Subject: [PATCH 24/56] 6852744: PIT b61: PKI test suite fails because self signed certificates are beingrejected Make the builder aware of SKID/AKID, break the internal circular dependences Reviewed-by: mullan --- .../certpath/DistributionPointFetcher.java | 96 ++++- .../provider/certpath/ForwardBuilder.java | 176 +++++++- .../selfIssued/DisableRevocation.java | 260 ++++++++++++ .../selfIssued/KeyUsageMatters.java | 303 ++++++++++++++ .../cert/CertPathBuilder/selfIssued/README | 382 ++++++++++++++++++ .../selfIssued/StatusLoopDependency.java | 309 ++++++++++++++ .../CertPathBuilder/selfIssued/generate.sh | 221 ++++++++++ .../CertPathBuilder/selfIssued/openssl.cnf | 205 ++++++++++ 8 files changed, 1940 insertions(+), 12 deletions(-) create mode 100644 jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java create mode 100644 jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java create mode 100644 jdk/test/java/security/cert/CertPathBuilder/selfIssued/README create mode 100644 jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java create mode 100644 jdk/test/java/security/cert/CertPathBuilder/selfIssued/generate.sh create mode 100644 jdk/test/java/security/cert/CertPathBuilder/selfIssued/openssl.cnf diff --git a/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java b/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java index 34f26f64a0f..39ee1f1dad6 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * 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,6 +34,7 @@ import javax.security.auth.x500.X500Principal; import sun.security.action.GetPropertyAction; import sun.security.util.Debug; +import sun.security.util.DerOutputStream; import sun.security.x509.*; /** @@ -333,7 +334,15 @@ class DistributionPointFetcher { if (match == false) { return false; } - indirectCRL = true; + + // we accept the case that a CRL issuer provide status + // information for itself. + if (ForwardBuilder.issues(certImpl, crlImpl, provider)) { + // reset the public key used to verify the CRL's signature + prevKey = certImpl.getPublicKey(); + } else { + indirectCRL = true; + } } else if (crlIssuer.equals(certIssuer) == false) { if (debug != null) { debug.println("crl issuer does not equal cert issuer"); @@ -347,7 +356,14 @@ class DistributionPointFetcher { PKIXExtensions.AuthorityKey_Id.toString()); if (!Arrays.equals(certAKID, crlAKID)) { - indirectCRL = true; + // we accept the case that a CRL issuer provide status + // information for itself. + if (ForwardBuilder.issues(certImpl, crlImpl, provider)) { + // reset the public key used to verify the CRL's signature + prevKey = certImpl.getPublicKey(); + } else { + indirectCRL = true; + } } } @@ -542,10 +558,80 @@ class DistributionPointFetcher { certSel.setSubject(crlIssuer.asX500Principal()); boolean[] crlSign = {false,false,false,false,false,false,true}; certSel.setKeyUsage(crlSign); + + // Currently by default, forward builder does not enable + // subject/authority key identifier identifying for target + // certificate, instead, it only compares the CRL issuer and + // the target certificate subject. If the certificate of the + // delegated CRL issuer is a self-issued certificate, the + // builder is unable to find the proper CRL issuer by issuer + // name only, there is a potential dead loop on finding the + // proper issuer. It is of great help to narrow the target + // scope down to aware of authority key identifiers in the + // selector, for the purposes of breaking the dead loop. + AuthorityKeyIdentifierExtension akidext = + crlImpl.getAuthKeyIdExtension(); + if (akidext != null) { + KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID); + if (akid != null) { + DerOutputStream derout = new DerOutputStream(); + derout.putOctetString(akid.getIdentifier()); + certSel.setSubjectKeyIdentifier(derout.toByteArray()); + } + + SerialNumber asn = + (SerialNumber)akidext.get(akidext.SERIAL_NUMBER); + if (asn != null) { + certSel.setSerialNumber(asn.getNumber()); + } + // the subject criterion will be set by builder automatically. + } + + // by far, we have validated the previous certificate, we can + // trust it during validating the CRL issuer. + // Except the performance improvement, another benefit is to break + // the dead loop while looking for the issuer back and forth + // between the delegated self-issued certificate and its issuer. + Set trustAnchors = new HashSet(); + if (anchor != null) { + trustAnchors.add(anchor); + } + + if (prevKey != null) { + // if the previous key is of the anchor, don't bother to + // duplicate the trust. + boolean duplicated = false; + PublicKey publicKey = prevKey; + X500Principal principal = certImpl.getIssuerX500Principal(); + + if (anchor != null) { + X509Certificate trustedCert = anchor.getTrustedCert(); + X500Principal trustedPrincipal; + PublicKey trustedPublicKey; + if (trustedCert != null) { + trustedPrincipal = trustedCert.getSubjectX500Principal(); + trustedPublicKey = trustedCert.getPublicKey(); + } else { + trustedPrincipal = anchor.getCA(); + trustedPublicKey = anchor.getCAPublicKey(); + } + + if (principal.equals(trustedPrincipal) && + publicKey.equals(trustedPublicKey)) { + duplicated = true; + } + } + + if (!duplicated) { + TrustAnchor temporary = + new TrustAnchor(principal, publicKey, null); + trustAnchors.add(temporary); + } + } + PKIXBuilderParameters params = null; try { - params = new PKIXBuilderParameters - (Collections.singleton(anchor), certSel); + params = new PKIXBuilderParameters(trustAnchors, certSel); } catch (InvalidAlgorithmParameterException iape) { throw new CRLException(iape); } diff --git a/jdk/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java b/jdk/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java index d8713cdcac4..393a7663c91 100644 --- a/jdk/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java +++ b/jdk/src/share/classes/sun/security/provider/certpath/ForwardBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * 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 @@ import java.util.*; import java.security.GeneralSecurityException; import java.security.InvalidKeyException; +import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertPathValidatorException; import java.security.cert.PKIXReason; @@ -43,12 +44,22 @@ import java.security.cert.X509CertSelector; import javax.security.auth.x500.X500Principal; import sun.security.util.Debug; +import sun.security.util.DerOutputStream; import sun.security.x509.AccessDescription; import sun.security.x509.AuthorityInfoAccessExtension; import sun.security.x509.PKIXExtensions; import sun.security.x509.PolicyMappingsExtension; import sun.security.x509.X500Name; import sun.security.x509.X509CertImpl; +import sun.security.x509.X509CRLImpl; +import sun.security.x509.AuthorityKeyIdentifierExtension; +import sun.security.x509.KeyIdentifier; +import sun.security.x509.SubjectKeyIdentifierExtension; +import sun.security.x509.SerialNumber; +import sun.security.x509.GeneralNames; +import sun.security.x509.GeneralName; +import sun.security.x509.GeneralNameInterface; +import java.math.BigInteger; /** * This class represents a forward builder, which is able to retrieve @@ -237,7 +248,7 @@ class ForwardBuilder extends Builder { } else { if (caSelector == null) { - caSelector = new X509CertSelector(); + caSelector = new AdaptableX509CertSelector(); /* * Match on certificate validity date. @@ -269,6 +280,29 @@ class ForwardBuilder extends Builder { * at least as many CA certs that have already been traversed */ caSelector.setBasicConstraints(currentState.traversedCACerts); + + /* + * Facilitate certification path construction with authority + * key identifier and subject key identifier. + */ + AuthorityKeyIdentifierExtension akidext = + currentState.cert.getAuthorityKeyIdentifierExtension(); + if (akidext != null) { + KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID); + if (akid != null) { + DerOutputStream derout = new DerOutputStream(); + derout.putOctetString(akid.getIdentifier()); + caSelector.setSubjectKeyIdentifier(derout.toByteArray()); + } + + SerialNumber asn = + (SerialNumber)akidext.get(akidext.SERIAL_NUMBER); + if (asn != null) { + caSelector.setSerialNumber(asn.getNumber()); + } + // the subject criterion was set previously. + } + sel = caSelector; } @@ -817,13 +851,25 @@ class ForwardBuilder extends Builder { } else { continue; } - } + } else { + X500Principal principal = anchor.getCA(); + java.security.PublicKey publicKey = anchor.getCAPublicKey(); - X500Principal trustedCAName = anchor.getCA(); + if (principal != null && publicKey != null && + principal.equals(cert.getSubjectX500Principal())) { + if (publicKey.equals(cert.getPublicKey())) { + // the cert itself is a trust anchor + this.trustAnchor = anchor; + return true; + } + // else, it is a self-issued certificate of the anchor + } - /* Check subject/issuer name chaining */ - if (!trustedCAName.equals(cert.getIssuerX500Principal())) { - continue; + // Check subject/issuer name chaining + if (principal == null || + !principal.equals(cert.getIssuerX500Principal())) { + continue; + } } /* Check revocation if it is enabled */ @@ -890,4 +936,120 @@ class ForwardBuilder extends Builder { void removeFinalCertFromPath(LinkedList certPathList) { certPathList.removeFirst(); } + + /** Verifies whether a CRL is issued by a certain certificate + * + * @param cert the certificate + * @param crl the CRL to be verified + * @param provider the name of the signature provider + */ + static boolean issues(X509CertImpl cert, X509CRLImpl crl, String provider) + throws IOException { + + boolean kidmatched = false; + + // check certificate's key usage + boolean[] usages = cert.getKeyUsage(); + if (usages != null && !usages[6]) { + return false; + } + + // check certificate's SKID and CRL's AKID + AuthorityKeyIdentifierExtension akidext = crl.getAuthKeyIdExtension(); + if (akidext != null) { + // the highest priority, matching KID + KeyIdentifier akid = (KeyIdentifier)akidext.get(akidext.KEY_ID); + if (akid != null) { + SubjectKeyIdentifierExtension skidext = + cert.getSubjectKeyIdentifierExtension(); + if (skidext != null) { + KeyIdentifier skid = + (KeyIdentifier)skidext.get(skidext.KEY_ID); + if (!akid.equals(skid)) { + return false; + } + + kidmatched = true; + } + // conservatively, in case of X509 V1 certificate, + // does return false here if no SKID extension. + } + + // the medium priority, matching issuer name/serial number + SerialNumber asn = (SerialNumber)akidext.get(akidext.SERIAL_NUMBER); + GeneralNames anames = (GeneralNames)akidext.get(akidext.AUTH_NAME); + if (asn != null && anames != null) { + X500Name subject = (X500Name)cert.getSubjectDN(); + BigInteger serial = cert.getSerialNumber(); + + if (serial != null && subject != null) { + if (serial.equals(asn.getNumber())) { + return false; + } + + for (GeneralName name : anames.names()) { + GeneralNameInterface gni = name.getName(); + if (subject.equals(gni)) { + return true; + } + } + } + + return false; + } + + if (kidmatched) { + return true; + } + } + + // the last priority, verify the CRL signature with the cert. + X500Principal crlIssuer = crl.getIssuerX500Principal(); + X500Principal certSubject = cert.getSubjectX500Principal(); + if (certSubject != null && certSubject.equals(crlIssuer)) { + try { + crl.verify(cert.getPublicKey(), provider); + return true; + } catch (Exception e) { + // ignore all exceptions. + } + } + + return false; + } + + /** + * An adaptable X509 certificate selector for forward certification path + * building. + */ + private static class AdaptableX509CertSelector extends X509CertSelector { + public AdaptableX509CertSelector() { + super(); + } + + /** + * Decides whether a Certificate should be selected. + * + * For the purpose of compatibility, when a certificate is of + * version 1 and version 2, or the certificate does not include + * a subject key identifier extension, the selection criterion + * of subjectKeyIdentifier will be disabled. + * + * @Override + */ + public boolean match(Certificate cert) { + if (!(cert instanceof X509Certificate)) { + return false; + } + X509Certificate xcert = (X509Certificate)cert; + + if (xcert.getVersion() < 3 || + xcert.getExtensionValue("2.5.29.14") == null) { + // disable the subjectKeyIdentifier criterion + setSubjectKeyIdentifier(null); + } + + return super.match(cert); + } + } } diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java new file mode 100644 index 00000000000..236ec77a4ab --- /dev/null +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/DisableRevocation.java @@ -0,0 +1,260 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6852744 + * @summary PIT b61: PKI test suite fails because self signed certificates + * are being rejected + * @run main/othervm DisableRevocation subca + * @run main/othervm DisableRevocation subci + * @run main/othervm DisableRevocation alice + * @author Xuelei Fan + */ + +import java.io.*; +import java.net.SocketException; +import java.util.*; +import java.security.Security; +import java.security.cert.*; +import java.security.cert.CertPathValidatorException.BasicReason; +import sun.security.util.DerInputStream; + +/** + * A test case helps to ensure that a certification path building process is + * able to identify a self-issued certificate from its issuer when disable + * revocation checking. + */ +public final class DisableRevocation { + + // the trust anchor + static String selfSignedCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMThaFw0zMDA2MDgxMzMyMTha\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQDInJhXi0655bPXAVkz1n5I6fAcZejzPnOPuwq3hU3OxFw8\n" + + "81Uf6o9oKI1h4w4XAD8u1cUNOgiX+wPwojronlp68bIfO6FVhNf287pLtLhNJo+7\n" + + "m6Qxw3ymFvEKy+PVj20CHSggdKHxUa4MBZBmHMFNBuxfYmjwzn+yTMmCCXOvSwID\n" + + "AQABo4GJMIGGMB0GA1UdDgQWBBSQ52Dpau+gtL+Kc31dusYnKj16ZTBHBgNVHSME\n" + + "QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" + + "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw\n" + + "DQYJKoZIhvcNAQEEBQADgYEAjBt6ea65HCqbGsS2rs/HhlGusYXtThRVC5vwXSey\n" + + "ZFYwSgukuq1KDzckqZFu1meNImEwdZjwxdN0e2p/nVREPC42rZliSj6V1ThayKXj\n" + + "DWEZW1U5aR8T+3NYfDrdKcJGx4Hzfz0qKz1j4ssV1M9ptJxYYv4y2Da+592IN1S9\n" + + "v/E=\n" + + "-----END CERTIFICATE-----"; + + // the sub-ca + static String subCaCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjRaFw0yOTAzMTUxMzMyMjRa\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPFv24SK78VI0gWlyIrq/X\n" + + "srl1431K5hJJxMYZtaQunyPmrYg3oI9KvKFykxnR0N4XDPaIi75p9dXGppVu80BA\n" + + "+csvIPBwlBQoNmKDQWTziDOqfK4tE+IMuL/Y7pxnH6CDMY7VGpvatty2zcmH+m/v\n" + + "E/n+HPyeELJQT2rT/3T+7wIDAQABo4GJMIGGMB0GA1UdDgQWBBRidC8Dt3dBzYES\n" + + "KpR2tR560sZ0+zBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMeMKqrMr5d3eTQsv\n" + + "MYOD15Dl3THQGLAa4ad5Eyq5/1eUeEOpztzCgDfi0iPD8YCubIEVasBTSqTiGXqb\n" + + "RpGuPHOwwfWvHrTeHSludiFBAUiKj7aEV+oQa0FBn4U4TT8HA62HQ93FhzTDI3jP\n" + + "iil34GktVl6gfMKGzUEW/Dh8OM4=\n" + + "-----END CERTIFICATE-----"; + + // a delegated CRL issuer, it's a self-issued certificate of trust anchor + static String topCrlIssuerCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPjCCAaegAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjNaFw0yOTAzMTUxMzMyMjNa\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQC99u93trf+WmpfiqunJy/P31ej1l4rESxft2JSGNjKuLFN\n" + + "/BO3SAugGJSkCARAwXjB0c8eeXhXWhVVWdNpbKepRJTxrjDfnFIavLgtUvmFwn/3\n" + + "hPXe+RQeA8+AJ99Y+o+10kY8JAZLa2j93C2FdmwOjUbo8aIz85yhbiV1tEDjLwID\n" + + "AQABo4GJMIGGMB0GA1UdDgQWBBSyFyA3XWLbdL6W6hksmBn7RKsQmDBHBgNVHSME\n" + + "QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" + + "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw\n" + + "DQYJKoZIhvcNAQEEBQADgYEAHTm8aRTeakgCfEBCgSWK9wvMW1c18ANGMm8OFDBk\n" + + "xabVy9BT0MVFHlaneh89oIxTZN0FMTpg21GZMAvIzhEt7DGdO7HLsW7JniN7/OZ0\n" + + "rACmpK5frmZrLS03zUm8c+rTbazNfYLoZVG3/mDZbKIi+4y8IGnFcgLVsHsYoBNP\n" + + "G0c=\n" + + "-----END CERTIFICATE-----"; + + // a delegated CRL issuer, it's a self-issued certificate of sub-ca + static String subCrlIssuerCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBBDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjdaFw0yOTAzMTUxMzMyMjda\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+8AcLJtGAVUWvv3ifcyQw\n" + + "OGqwzcPrBw/XCs6vTMlcdtFzcH1M+Z3/QHN9+5VT1gqeTIZ+b8g9005Og3XKy/HX\n" + + "obXZeLv20VZsr+jm52ySghEYOVCTJ9OyFOAp5adp6nf0cA66Feh3LsmVhpTEcDOG\n" + + "GnyntQm0DBYxRoOT/GBlvQIDAQABo4GJMIGGMB0GA1UdDgQWBBSRWhMuZLQoHSDN\n" + + "xhxr+vdDmfAY8jBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMIDZLdOLFiPyS1bh\n" + + "Ch4eUYHT+K1WG93skbga3kVYg3GSe+gctwkKwKK13bwfi8zc7wwz6MtmQwEYhppc\n" + + "pKKKEwi5QirBCP54rihLCvRQaj6ZqUJ6VP+zPAqHYMDbzlBbHtVF/1lQUP30I6SV\n" + + "Fu987DvLmZ2GuQA9FKJsnlD9pbU=\n" + + "-----END CERTIFICATE-----"; + + // the target EE certificate + static String targetCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA2MjgxMzMy\n" + + "MzBaFw0yOTAzMTUxMzMyMzBaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEA7wnsvR4XEOfVznf40l8ClLod+7L0y2/+smVV+GM/\n" + + "T1/QF/stajAJxXNy08gK00WKZ6ruTHhR9vh/Z6+EQM2RZDCpU0A7LPa3kLE/XTmS\n" + + "1MLDu8ntkdlpURpvhdDWem+rl2HU5oZgzV8Jkcov9vXuSjqEDfr45FlPuV40T8+7\n" + + "cxsCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBSBwsAhi6Z1kriOs3ty\n" + + "uSIujv9a3DAfBgNVHSMEGDAWgBRidC8Dt3dBzYESKpR2tR560sZ0+zANBgkqhkiG\n" + + "9w0BAQQFAAOBgQDEiBqd5AMy2SQopFaS3dYkzj8MHlwtbCSoNVYkOfDnewcatrbk\n" + + "yFcp6FX++PMdOQFHWvvnDdkCUAzZQp8kCkF9tGLVLBtOK7XxQ1us1LZym7kOPzsd\n" + + "G93Dcf0U1JRO77juc61Br5paAy8Bok18Y/MeG7uKgB2MAEJYKhGKbCrfMw==\n" + + "-----END CERTIFICATE-----"; + + private static Set generateTrustAnchors() + throws CertificateException { + // generate certificate from cert string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + ByteArrayInputStream is = + new ByteArrayInputStream(selfSignedCertStr.getBytes()); + Certificate selfSignedCert = cf.generateCertificate(is); + + // generate a trust anchor + TrustAnchor anchor = + new TrustAnchor((X509Certificate)selfSignedCert, null); + + return Collections.singleton(anchor); + } + + private static CertStore generateCertificateStore() throws Exception { + Collection entries = new HashSet(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + ByteArrayInputStream is; + + is = new ByteArrayInputStream(targetCertStr.getBytes()); + Certificate cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(selfSignedCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(topCrlIssuerCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + return CertStore.getInstance("Collection", + new CollectionCertStoreParameters(entries)); + } + + private static X509CertSelector generateSelector(String name) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = null; + if (name.equals("subca")) { + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + } else if (name.equals("subci")) { + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + } else { + is = new ByteArrayInputStream(targetCertStr.getBytes()); + } + + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + byte[] extVal = target.getExtensionValue("2.5.29.14"); + if (extVal != null) { + DerInputStream in = new DerInputStream(extVal); + byte[] subjectKID = in.getOctetString(); + selector.setSubjectKeyIdentifier(subjectKID); + } else { + // unlikely to happen. + throw new Exception("unexpected certificate: no SKID extension"); + } + + return selector; + } + + private static boolean match(String name, Certificate cert) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = null; + if (name.equals("subca")) { + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + } else if (name.equals("subci")) { + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + } else { + is = new ByteArrayInputStream(targetCertStr.getBytes()); + } + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + + return target.equals(cert); + } + + + public static void main(String[] args) throws Exception { + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); + + X509CertSelector selector = generateSelector(args[0]); + + Set anchors = generateTrustAnchors(); + CertStore certs = generateCertificateStore(); + + + PKIXBuilderParameters params = + new PKIXBuilderParameters(anchors, selector); + params.addCertStore(certs); + params.setRevocationEnabled(false); + params.setDate(new Date(109, 7, 1)); // 2009-07-01 + Security.setProperty("ocsp.enable", "false"); + System.setProperty("com.sun.security.enableCRLDP", "false"); + + PKIXCertPathBuilderResult result = + (PKIXCertPathBuilderResult)builder.build(params); + + if (!match(args[0], result.getCertPath().getCertificates().get(0))) { + throw new Exception("unexpected certificate"); + } + } +} diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java new file mode 100644 index 00000000000..af977c3d8d2 --- /dev/null +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/KeyUsageMatters.java @@ -0,0 +1,303 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6852744 + * @summary PIT b61: PKI test suite fails because self signed certificates + * are being rejected + * @run main/othervm KeyUsageMatters subca + * @run main/othervm KeyUsageMatters subci + * @run main/othervm KeyUsageMatters alice + * @author Xuelei Fan + */ + +import java.io.*; +import java.net.SocketException; +import java.util.*; +import java.security.Security; +import java.security.cert.*; +import java.security.cert.CertPathValidatorException.BasicReason; +import sun.security.util.DerInputStream; + +/** + * KeyUsage extension plays a important rule during looking for the issuer + * of a certificate or CRL. A certificate issuer should have the keyCertSign + * bit set, and a CRL issuer should have the cRLSign bit set. + * + * Sometime, a delegated CRL issuer would also have the keyCertSign bit set, + * as would be troublesome to find the proper CRL issuer during certificate + * path build if the delegated CRL issuer is a self-issued certificate, for + * it is hard to identify it from its issuer by the "issuer" field only. + * + * The fix of 6852744 should addresses above issue, and allow a delegated CRL + * issuer to have keyCertSign bit set. + * + * In the test case, the delegated CRL issuers have cRLSign bit set only, and + * the CAs have the keyCertSign bit set only, it is expected to work before + * and after the bug fix of 6852744. + */ +public final class KeyUsageMatters { + + // the trust anchor + static String selfSignedCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzJaFw0zMDA0MDcwMjI0MzJa\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQC4OTag24sTxL2tXTNuvpmUEtdxrYAZoFsslFQ60T+WD9wQ\n" + + "Jeiw87FSPsR2vxRuv0j8DNm2a4h7LNNIFcLurfNldbz5pvgZ7VqdbbUMPE9qP85n\n" + + "jgDl4woyRTSUeRI4A7O0CO6NpES21dtbdhroWQrEkHxpnrDPxsxrz5gf2m3gqwID\n" + + "AQABo4GJMIGGMB0GA1UdDgQWBBSCJd0hpl5PdAD9IZS+Hzng4lXLGzBHBgNVHSME\n" + + "QDA+gBSCJd0hpl5PdAD9IZS+Hzng4lXLG6EjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" + + "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAgQw\n" + + "DQYJKoZIhvcNAQEEBQADgYEAluy6HIjWcq009lTLmhp+Np6dxU78pInBK8RZkza0\n" + + "484qGaxFGD3UGyZkI5uWmsH2XuMbuox5khfIq6781gmkPBHXBIEtJN8eLusOHEye\n" + + "iE8h7WI+N3qa6Pj56WionMrioqC/3X+b06o147bbhx8U0vkYv/HyPaITOFfMXTdz\n" + + "Vjw=\n" + + "-----END CERTIFICATE-----"; + + // the sub-ca + static String subCaCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzRaFw0yOTAxMTIwMjI0MzRa\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiAJnAQW2ad3ZMKUhSJVZj\n" + + "8pBqxTcHSTwAVguQkDglsN/OIwUpvR5Jgp3lpRWUEt6idEp0FZzORpvtjt3pr5MG\n" + + "Eg2CDptekC5BSPS+fIAIKlncB3HwOiFFhH6b3wTydDCdEd2fvsi4QMOSVrIYMeA8\n" + + "P/mCz6kRhfUQPE0CMmOUewIDAQABo4GJMIGGMB0GA1UdDgQWBBT0/nNP8WpyxmYr\n" + + "IBp4tN8y08jw2jBHBgNVHSMEQDA+gBSCJd0hpl5PdAD9IZS+Hzng4lXLG6EjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAgQwDQYJKoZIhvcNAQEEBQADgYEAS9PzI6B39R/U9fRj\n" + + "UExzN1FXNP5awnAPtiv34kSCL6n6MryqkfG+8aaAOdZsSjmTylNFaF7cW/Xp1VBF\n" + + "hq0bg/SbEAbK7+UwL8GSC3crhULHLbh+1iFdVTEwxCw5YmB8ji3BaZ/WKW/PkjCZ\n" + + "7cXP6VDeZMG6oRQ4hbOcixoFPXo=\n" + + "-----END CERTIFICATE-----"; + + // a delegated CRL issuer, it's a self-issued certificate of trust anchor + static String topCrlIssuerCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICKzCCAZSgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzNaFw0yOTAxMTIwMjI0MzNa\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQDMJeBMBybHykI/YpwUJ4O9euqDSLb1kpWpceBS8TVqvgBC\n" + + "SgUJWtFZL0i6bdvF6mMdlbuBkGzhXqHiVAi96/zRLbUC9F8SMEJ6MuD+YhQ0ZFTQ\n" + + "atKy8zf8O9XzztelLJ26Gqb7QPV133WY3haAqHtCXOhEKkCN16NOYNC37DTaJwID\n" + + "AQABo3cwdTAdBgNVHQ4EFgQULXSWzXzUOIpOJpzbSCpW42IJUugwRwYDVR0jBEAw\n" + + "PoAUgiXdIaZeT3QA/SGUvh854OJVyxuhI6QhMB8xCzAJBgNVBAYTAlVTMRAwDgYD\n" + + "VQQKEwdFeGFtcGxlggEAMAsGA1UdDwQEAwIBAjANBgkqhkiG9w0BAQQFAAOBgQAY\n" + + "eMnf5AHSNlyUlzXk8o2S0h4gCuvKX6C3kFfKuZcWvFAbx4yQOWLS2s15/nzR4+AP\n" + + "FGX3lgJjROyAh7fGedTQK+NFWwkM2ag1g3hXktnlnT1qHohi0w31nVBJxXEDO/Ck\n" + + "uJTpJGt8XxxbFaw5v7cHy7XuTAeU/sekvjEiNHW00Q==\n" + + "-----END CERTIFICATE-----"; + + // a delegated CRL issuer, it's a self-issued certificate of sub-ca + static String subCrlIssuerCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPTCCAaagAwIBAgIBBDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzRaFw0yOTAxMTIwMjI0MzRa\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWUtDQx2MB/7arDiquMJyd\n" + + "LWwSg6p8sg5z6wKrC1v47MT4DBhFX+0RUgTMUdQgYpgxGpczn+6y4zfV76064S0N\n" + + "4L/IQ+SunTW1w4yRGjB+xkyyJmWAqijG1nr+Dgkv5nxPI+9Er5lHcoVWVMEcvvRm\n" + + "6jIBQdldVlSgv+VgUnFm5wIDAQABo3cwdTAdBgNVHQ4EFgQUkV3Qqtk7gIot9n60\n" + + "jX6dloxrfMEwRwYDVR0jBEAwPoAUgiXdIaZeT3QA/SGUvh854OJVyxuhI6QhMB8x\n" + + "CzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlggEAMAsGA1UdDwQEAwIBAjAN\n" + + "BgkqhkiG9w0BAQQFAAOBgQADu4GM8EdmIKhC7FRvk5jF90zfvZ38wbXBzCjKI4jX\n" + + "QJrhne1bfyeNNm5c1w+VKidT+XzBzBGH7ZqYzoZmzRIfcbLKX2brEBKiukeeAyL3\n" + + "bctQtbp19tX+uu2dQberD188AAysKTkHcJUV+rRsTwVJ9vcYKxoRxKk8DhH7ZS3M\n" + + "rg==\n" + + "-----END CERTIFICATE-----"; + + // the target EE certificate + static String targetCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA0MjcwMjI0\n" + + "MzZaFw0yOTAxMTIwMjI0MzZaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEAvYSaU3oiE4Pxp/aUIXwMqOwSiWkZ+O3aTu13hRtK\n" + + "ZyR+Wtj63IuvaigAC4uC+zBypF93ThjwCzVR2qKDQaQzV8CLleO96gStt7Y+i3G2\n" + + "V3IUGgrVCqeK7N6nNYu0wW84sibcPqG/TIy0UoaQMqgB21xtRF+1DUVlFh4Z89X/\n" + + "pskCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBSynMEdcal/e9TmvlNE\n" + + "4suXGA4+hjAfBgNVHSMEGDAWgBT0/nNP8WpyxmYrIBp4tN8y08jw2jANBgkqhkiG\n" + + "9w0BAQQFAAOBgQB/jru7E/+piSmUwByw5qbZsoQZVcgR97pd2TErNJpJMAX2oIHR\n" + + "wJH6w4NuYs27+fEAX7wK4whc6EUH/w1SI6o28F2rG6HqYQPPZ2E2WqwbBQL9nYE3\n" + + "Vfzu/G9axTUQXFbf90h80UErA+mZVxqc2xtymLuH0YEaMZImtRZ2MXHfXg==\n" + + "-----END CERTIFICATE-----"; + + // CRL issued by the delegated CRL issuer, topCrlIssuerCertStr + static String topCrlStr = + "-----BEGIN X509 CRL-----\n" + + "MIIBGzCBhQIBATANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQMA4GA1UE\n" + + "ChMHRXhhbXBsZRcNMDkwNDI3MDIzODA0WhcNMjgwNjI2MDIzODA0WjAiMCACAQUX\n" + + "DTA5MDQyNzAyMzgwMFowDDAKBgNVHRUEAwoBBKAOMAwwCgYDVR0UBAMCAQIwDQYJ\n" + + "KoZIhvcNAQEEBQADgYEAoarfzXEtw3ZDi4f9U8eSvRIipHSyxOrJC7HR/hM5VhmY\n" + + "CErChny6x9lBVg9s57tfD/P9PSzBLusCcHwHMAbMOEcTltVVKUWZnnbumpywlYyg\n" + + "oKLrE9+yCOkYUOpiRlz43/3vkEL5hjIKMcDSZnPKBZi1h16Yj2hPe9GMibNip54=\n" + + "-----END X509 CRL-----"; + + // CRL issued by the delegated CRL issuer, subCrlIssuerCertStr + static String subCrlStr = + "-----BEGIN X509 CRL-----\n" + + "MIIBLTCBlwIBATANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQMA4GA1UE\n" + + "ChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMRcNMDkwNDI3MDIzODA0WhcNMjgw\n" + + "NjI2MDIzODA0WjAiMCACAQQXDTA5MDQyNzAyMzgwMVowDDAKBgNVHRUEAwoBBKAO\n" + + "MAwwCgYDVR0UBAMCAQIwDQYJKoZIhvcNAQEEBQADgYEAeS+POqYEIHIIJcsLxuUr\n" + + "aJFzQ/ujH0QmnyMNEL3Uavyq4VQuAahF+w6aTPb5UBzms0uX8NAvD2vNoUJvmJOX\n" + + "nGKuq4Q1DFj82E7/9d25nXdWGOmFvFCRVO+St2Xe5n8CJuZNBiz388FDSIOiFSCa\n" + + "ARGr6Qu68MYGtLMC6ZqP3u0=\n" + + "-----END X509 CRL-----"; + + private static Set generateTrustAnchors() + throws CertificateException { + // generate certificate from cert string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + ByteArrayInputStream is = + new ByteArrayInputStream(selfSignedCertStr.getBytes()); + Certificate selfSignedCert = cf.generateCertificate(is); + + // generate a trust anchor + TrustAnchor anchor = + new TrustAnchor((X509Certificate)selfSignedCert, null); + + return Collections.singleton(anchor); + } + + private static CertStore generateCertificateStore() throws Exception { + Collection entries = new HashSet(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + ByteArrayInputStream is; + + is = new ByteArrayInputStream(targetCertStr.getBytes()); + Certificate cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(selfSignedCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(topCrlIssuerCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + // generate CRL from CRL string + is = new ByteArrayInputStream(topCrlStr.getBytes()); + Collection mixes = cf.generateCRLs(is); + entries.addAll(mixes); + + is = new ByteArrayInputStream(subCrlStr.getBytes()); + mixes = cf.generateCRLs(is); + entries.addAll(mixes); + + return CertStore.getInstance("Collection", + new CollectionCertStoreParameters(entries)); + } + + private static X509CertSelector generateSelector(String name) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = null; + if (name.equals("subca")) { + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + } else if (name.equals("subci")) { + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + } else { + is = new ByteArrayInputStream(targetCertStr.getBytes()); + } + + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + byte[] extVal = target.getExtensionValue("2.5.29.14"); + if (extVal != null) { + DerInputStream in = new DerInputStream(extVal); + byte[] subjectKID = in.getOctetString(); + selector.setSubjectKeyIdentifier(subjectKID); + } else { + // unlikely to happen. + throw new Exception("unexpected certificate: no SKID extension"); + } + + return selector; + } + + private static boolean match(String name, Certificate cert) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = null; + if (name.equals("subca")) { + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + } else if (name.equals("subci")) { + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + } else { + is = new ByteArrayInputStream(targetCertStr.getBytes()); + } + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + + return target.equals(cert); + } + + + public static void main(String[] args) throws Exception { + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); + + X509CertSelector selector = generateSelector(args[0]); + + Set anchors = generateTrustAnchors(); + CertStore certs = generateCertificateStore(); + + + PKIXBuilderParameters params = + new PKIXBuilderParameters(anchors, selector); + params.addCertStore(certs); + params.setRevocationEnabled(true); + params.setDate(new Date(109, 5, 1)); // 2009-05-01 + Security.setProperty("ocsp.enable", "false"); + System.setProperty("com.sun.security.enableCRLDP", "true"); + + PKIXCertPathBuilderResult result = + (PKIXCertPathBuilderResult)builder.build(params); + + if (!match(args[0], result.getCertPath().getCertificates().get(0))) { + throw new Exception("unexpected certificate"); + } + } +} diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/README b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/README new file mode 100644 index 00000000000..b0c1d6e0255 --- /dev/null +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/README @@ -0,0 +1,382 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + + Certificates and CRLs + +The certificates and CRLs used by KeyUsageMatters.java are copied from +test/java/security/cert/CertPathValidator/indirectCRL. + +Here lists the local generated certificates and CRLs used in the test cases. + +The generate.sh depends on openssl, and it should be run under ksh. The +script will create many directories and files, please run it in a +directory outside of JDK workspace. + +1. root certifiate and key +-----BEGIN CERTIFICATE----- +MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMThaFw0zMDA2MDgxMzMyMTha +MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB +AQUAA4GNADCBiQKBgQDInJhXi0655bPXAVkz1n5I6fAcZejzPnOPuwq3hU3OxFw8 +81Uf6o9oKI1h4w4XAD8u1cUNOgiX+wPwojronlp68bIfO6FVhNf287pLtLhNJo+7 +m6Qxw3ymFvEKy+PVj20CHSggdKHxUa4MBZBmHMFNBuxfYmjwzn+yTMmCCXOvSwID +AQABo4GJMIGGMB0GA1UdDgQWBBSQ52Dpau+gtL+Kc31dusYnKj16ZTBHBgNVHSME +QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO +BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw +DQYJKoZIhvcNAQEEBQADgYEAjBt6ea65HCqbGsS2rs/HhlGusYXtThRVC5vwXSey +ZFYwSgukuq1KDzckqZFu1meNImEwdZjwxdN0e2p/nVREPC42rZliSj6V1ThayKXj +DWEZW1U5aR8T+3NYfDrdKcJGx4Hzfz0qKz1j4ssV1M9ptJxYYv4y2Da+592IN1S9 +v/E= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,46F13CECA9B38323 + +AVNWPH7jiPyJVq9KfL3IlGVCwD41KVapg12yJR2t/WWlLaKr19/0oWNvimcrd040 +txFKvcFO9TFLxmaco33+actCoL0K/XbrCBICThZLybzcFTuYFMum8eqL61avQgBe +Kt4CCjcupWLzKWkKTMV/bP6nPnPUSB9U8QeGwutjJYnLDi0TuYx8YSqZo/36vM98 +r3OvtcSA5XEN4guxxHusZJnhbclVb/Z1WtLVb4v2d5yBtPM2p3R0hK17L4Dnusjl +n56z6Z0AIYmfAggM/Fpge2uT3D/5n//l1lZRNoSvsX5UZipKswZKLpvx7IJ+AqgA +UO9lcmNLGnIXME3IS3smd83wPi7nxH3NCYWHbGAKLm6mkFMs5LOhofUMOBS3Rxmm +2RjCGtuzDxBPKveo9/Y80B//6sEce2gdi7fCKgWwtR4VFuJd0hWODD6CarK3edHH +rUG62Kt2aqiI/y/NLEbfHCHbyM37c9/OzS5Zy695dDl22r5EirVFsVgejQR1JGtP +ANdc6kkkJW+s6GiqimShssMTp1x0L8twT/+wEa38LafiaPKk4OweleBuyz7k2FxA +Rr2u9IOvGU3eKAeH8HSFWvaNE9S2lYFPiWWZ6O/LzVvnb847+gungQ7SPRzOkt4k +L4PtHIoKmLWFr5tzML1Q8wiaKcTWMb5LZbRbo+2XYGoIpilxkBBuhX7cMJFwOHEf +YJJRixBI97doPsnIQ3GkA8xY+INzQ4LWNQbnEtS7L7t26NA9tDlg4ILU/UfMoQIp +Ol4EZY1U7gD8BeMwo2vX3x/WA+a7R2N95klBFNqn9jSkm6a5yoeCZw== +-----END RSA PRIVATE KEY----- + + +2. root crl issuer and key +-----BEGIN CERTIFICATE----- +MIICPjCCAaegAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjNaFw0yOTAzMTUxMzMyMjNa +MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB +AQUAA4GNADCBiQKBgQC99u93trf+WmpfiqunJy/P31ej1l4rESxft2JSGNjKuLFN +/BO3SAugGJSkCARAwXjB0c8eeXhXWhVVWdNpbKepRJTxrjDfnFIavLgtUvmFwn/3 +hPXe+RQeA8+AJ99Y+o+10kY8JAZLa2j93C2FdmwOjUbo8aIz85yhbiV1tEDjLwID +AQABo4GJMIGGMB0GA1UdDgQWBBSyFyA3XWLbdL6W6hksmBn7RKsQmDBHBgNVHSME +QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO +BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw +DQYJKoZIhvcNAQEEBQADgYEAHTm8aRTeakgCfEBCgSWK9wvMW1c18ANGMm8OFDBk +xabVy9BT0MVFHlaneh89oIxTZN0FMTpg21GZMAvIzhEt7DGdO7HLsW7JniN7/OZ0 +rACmpK5frmZrLS03zUm8c+rTbazNfYLoZVG3/mDZbKIi+4y8IGnFcgLVsHsYoBNP +G0c= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,3881A5676C1AD5E5 + +KgaAtGlIQXVnsoifcd1oTi4hS1J+InHISFcZepI1h1hrU9KVAJAlwD1GIeM2qAkG +P1ABsA0TE0yRJpd3qHih2IPtD42osfc3HmNTw17nh4Trd3ESilrs4w/rrH8e6bR5 +WlqG0OKsw8x57t44m9yX94+pP3tdPaJwnFk5M7pDCO44IZskmy10S0NHBn7wMwM/ +mqlZ15mK6YZTwOuLzpdSDJqYPLiv77KpfeiqSN++ISXoNhIcNYHRVyErAS/DcBlx +mbrmBaGexhuagQYqVikEDIvg8kBDWD92EjOFbz94Z6eTvliauJ/+E1/Ffefe2cN5 +LaVwuUsiyW9GjarWwBJDFrXesTikklshC9V35j/ACHVdh5CuO8FGfVijIwlbZ14N +xKWJdSlZlJgEjkwUlWfi1KmrFrob+yK20fGMWr3oY1rTKWZdYkrqnnKEYcMQV/TH +XNY77D5idJ3FLtvJyziqIFuohdatQsu6xFP5UEOeUi6OhptJDjjS+zDhiBlL4cqA +klThzvuycxjZT+5xno0f8GEnZkQNcC6xxPoP6vstNMKLz1rI1CVUSXZBHc5nfMaF +m75rrLbvf6F2NLUspaNXnW8TUMHxcu8nNCnM4/u6hkqebQo/N8X1/v1HImsewwWO +P5uJwqmqfuRz0vZyMKAk3FzQIfrjJouxDfkNV2YHM9VP/grPlDgzmgiN0+6bCbn+ +RW2K8kvkSFZehQ1Ygdst9KYH3NEcEYVYY9pH1N1xRNAylcIDJNwrFwf9vfwjt9/q +AVsyDxUBT/KVCcqr15LNNq9HmmcP6IZZMRjdyf2BR+/cobxxDRZq1Q== +-----END RSA PRIVATE KEY----- + + +3. root CRL issued by root crl issuer. +-----BEGIN X509 CRL----- +MIIBGzCBhQIBATANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQMA4GA1UE +ChMHRXhhbXBsZRcNMDkwNjI4MTMzMjM4WhcNMjgwODI3MTMzMjM4WjAiMCACAQUX +DTA5MDYyODEzMzIzN1owDDAKBgNVHRUEAwoBBKAOMAwwCgYDVR0UBAMCAQEwDQYJ +KoZIhvcNAQEEBQADgYEAVUIeu2x7ZwsliafoCBOg+u8Q4S/VFfTe/SQnRyTM3/V1 +v+Vn5Acc7eo8Rh4AHcnFFbLNk38n6lllov/CaVR0IPZ6hnrNHVa7VYkNlRAwV2aN +GUUhkMMOLVLnN25UOrN9J637SHmRE6pB+TRMaEQ73V7UNlWxuSMK4KofWen0A34= +-----END X509 CRL----- + + +4. subca certificate and key +-----BEGIN CERTIFICATE----- +MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjRaFw0yOTAzMTUxMzMyMjRa +MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz +cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPFv24SK78VI0gWlyIrq/X +srl1431K5hJJxMYZtaQunyPmrYg3oI9KvKFykxnR0N4XDPaIi75p9dXGppVu80BA ++csvIPBwlBQoNmKDQWTziDOqfK4tE+IMuL/Y7pxnH6CDMY7VGpvatty2zcmH+m/v +E/n+HPyeELJQT2rT/3T+7wIDAQABo4GJMIGGMB0GA1UdDgQWBBRidC8Dt3dBzYES +KpR2tR560sZ0+zBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw +HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw +AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMeMKqrMr5d3eTQsv +MYOD15Dl3THQGLAa4ad5Eyq5/1eUeEOpztzCgDfi0iPD8YCubIEVasBTSqTiGXqb +RpGuPHOwwfWvHrTeHSludiFBAUiKj7aEV+oQa0FBn4U4TT8HA62HQ93FhzTDI3jP +iil34GktVl6gfMKGzUEW/Dh8OM4= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,35408AD3018F0049 + +4t6WfpFNqpOr47Wc/OAt8+KZK0+WX7d3nlJn47W+QN7AkPfBlLBpcQJkImhP4/eh +aJyk8fPOdUhT/4rgc5ORuKk4d9boD36KK5Iz/+/oNBxzuld6TybVb+Hvw41cIZTW +CtkvADQpR8XWbPre+3ZH2eAKoTeWX0xR7pYg1JsFk9vxee6U82iqsAYRdUOdot8D +9zdDbbeaLWs78UbZkxFtuXREuyNVX880Q17t8qszJL2KmmtMQpUvxTlW04Ope1Ug +uIuOxeannzpKRD+37fj+oacM3GRqVFOP47/NVaziOexDBn4b5nlW6OMro6t0qiHt +1GLJcw1oLXoFe8ycexfzYWUiHymSz5Vh3wIflsQY+Ik6dopL+fpk2cVD0bncKJlf +Ie9PvL04RwannRjgtPl9X05tzcgeyznp2Ix1/rsriZQQpdPTLGA6w6kUhQeK6TwT +eX7pXn3iLTGK+VoHRfbxBQR2Fvq1nRJbvsmJFhPOcJU5CYSaDPGGdA6NorbdVgbc +14DlkhzojhEpZ7DaUeFNUXUMlQOR5UUTZB+wL3zQoY/FzHci3JD1Gj4NlbC9mMEg +ncWZcpZWOnP2kHSz2o/UOxQM80gerukI7NOr020iJ+ZZRb/gyAAzLPnD+mCZ7/e2 +JJ3x6yHOtVA6WzZiQH1d9/bm79rtcWaRH83X/idG1lHuKXQJFAaw5f7Z2n2/yuF1 +9pZf7el1M7UoBf74oc68klAl46f4inroy8anAtc/qjSTXUYQrNvKZsWU9AZVS7oH +iEuYMVW4KiZh3SHsIg5TZdMbdVYtZpcTsl/Kh6XuY0o0Xsi+rTK5AA== +-----END RSA PRIVATE KEY----- + + +5. crl issuer of subca, the certificate and key +-----BEGIN CERTIFICATE----- +MIICUDCCAbmgAwIBAgIBBDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjdaFw0yOTAzMTUxMzMyMjda +MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz +cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+8AcLJtGAVUWvv3ifcyQw +OGqwzcPrBw/XCs6vTMlcdtFzcH1M+Z3/QHN9+5VT1gqeTIZ+b8g9005Og3XKy/HX +obXZeLv20VZsr+jm52ySghEYOVCTJ9OyFOAp5adp6nf0cA66Feh3LsmVhpTEcDOG +GnyntQm0DBYxRoOT/GBlvQIDAQABo4GJMIGGMB0GA1UdDgQWBBSRWhMuZLQoHSDN +xhxr+vdDmfAY8jBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw +HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw +AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMIDZLdOLFiPyS1bh +Ch4eUYHT+K1WG93skbga3kVYg3GSe+gctwkKwKK13bwfi8zc7wwz6MtmQwEYhppc +pKKKEwi5QirBCP54rihLCvRQaj6ZqUJ6VP+zPAqHYMDbzlBbHtVF/1lQUP30I6SV +Fu987DvLmZ2GuQA9FKJsnlD9pbU= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,4CD10EAA24AF8C25 + +6pTRc9jsn6CJ2EMYhuGX3aWrDThhacnqdtsKIqUzX8Ga7Jz9kq6HseTRlqPkzBfb +rCl+eVIkgugrPbf93375mP/ozY8LkEgD9TRAL1uXqha2N6TRLC2ozQJQSoIc441e +UZ9XkB6tPGRfPNvi1xE0WTP7bjOUkvkPU9wM9QFuBW6B7mRf3tG2nqkFiTpY6nz8 +5X5+h9jafcCvMwYhfJm0JFTGWmX4WJWubs8QeYndvIriDDw2zpVNcno45sClSQCb +YVekMLgGlKPmNGub5iRfXsozykE3jbMnXRokxrvzk20jjo0XYPVGfCRe9IhJh8Ud +iCG/kPaJspbUkUlKXfvIOdp2pnoDFZI5hbfc75YrFYJ8x8dwRYBUl6yRtBkw5Yo/ +VQDuNq3d7YpxiGxVTwFox6HQ5+rs6jwSGzOilgOCxPSs41fYcdAlogNqLzjvhn+e +0GU1XTVyMJbO0Ae6Sgm4PmxU7QM2bdzESuZWbYRFbH2ywwmoR8SahB3ICBhuIA/l +lsCrBbq+jL/K2IL1VXBKuaKBN1ShKUPZD/ABWNv4uENNg2AFq1XQ6kvTU8Glfhd9 +tyK8YnJ0ViY4VLGhdf0s2eEPmbfxOv0HCW0sz/57eASoQSTJTdVApYopWHBOwaNq +8qQUEPDMTKaPNqCjA2m/NwGrLPHhU0d5dHmp+9gTbCTmWy4sVenhBPbOy6wvFpNA +F+35tJVaZQOOurm/KC2dLOYkKyAvqnB7D2q4zducpWkiyCweg7uYL14Mo5JQmGuq +2DwfRiMxdqqoqHFKEOxsoAMrKSwJlYojUknfz/LEaqxtMePQtNwhjw== +-----END RSA PRIVATE KEY----- + + +6. CLR issued by subca CRL issuer +-----BEGIN X509 CRL----- +MIIBLTCBlwIBATANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQMA4GA1UE +ChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMRcNMDkwNjI4MTMzMjQzWhcNMjgw +ODI3MTMzMjQzWjAiMCACAQQXDTA5MDYyODEzMzIzOFowDDAKBgNVHRUEAwoBBKAO +MAwwCgYDVR0UBAMCAQEwDQYJKoZIhvcNAQEEBQADgYEACQZEf6ydb3fKTMPJ8DBO +oo630MsrT3P0x0AC4+aQOueCBaGpNqW/H379uZxXAad7yr+aXUBwaeBMYVKUbwOe +5TrN5QWPe2eCkU+MSQvh1SHASDDMH4jhWFMRdO3aPMDKKPlO/Q3s0G72eD7Zo5dr +N9AvUXxGxU4DruoJuFPcrCI= +-----END X509 CRL----- + + +7. dumca certificate and key +-----BEGIN CERTIFICATE----- +MIICUDCCAbmgAwIBAgIBBTANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjhaFw0yOTAzMTUxMzMyMjha +MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz +cy1EMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDeWn+ulgls9+dK3KzzfC1b +a9RMSf+gjv/Olw5386Vw6pJOVngR11RytWJoLiKbjYPyGhP1cms2FoUKuAEO31gD +3AoUCa+nXgaMLiDtmdC5ATqVv3Oap5aNgAqq0mxMxOylKgcUhfuH2icEnfBtHzEe +ST11S69zQr5GGfa/XslbDQIDAQABo4GJMIGGMB0GA1UdDgQWBBRCmXIsp4G3iP7Z +Qv4gS19W8W/cLzBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw +HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw +AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAkRiLpJesXyNQ34ZP +Oc4d0gvCl4pyNHx5gsV0yHtxP7oYoIa7Bw4setplQ9Y2YcH5xuXK84xvAby9csWp +cod1QOkFzZfb9qj10PXfD8bMoLOyrZfr5nsNAl2scvOtnM1TFL/ll5/S2PVcPthx +Z5t128UNQYMu93OmVjZANL5L6Jw= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,11485599004D2482 + +R+TgUoQo1Ksqpnwh1B1x3u7jxd1qJsfG5st7WJaeJzSY3v+ZnmTS4O008eKgw6Z1 +eGJevsNW8Z8ButjChzlesCm+90jpKpOqA6MlvzeknAxtGdEfe8rUEytfNOorjJTy +1Mu9T8Tlk6tmmmXNTDX1lQytYaHA4e4VVEbYGNceMNcPonT1Y0SyebJwtfd4XKkG +Ty40kMnb+qrFr1ZxVRG+LWKDR/bS0S2K2zY6Ha45d8yoYZlgLZ7yVAlrp0T0PF4B +UWvSyNK9VOBLrvqXSofK5gNGkR/C63x8FU2V25ISicBQBXLNo9OgIsbrryHF330T +2TxhnOpFU1AwgTSfp4Fy/Htkvgo7/jmFRa3r4xelTdEUKvRrwaZeMjg0fT+24529 +8o8MMOF0YWNtIDNUVRFg9/DgAsD/LoXbOGc/E2ryJdq1D4N914s4m/D5Sox27iu4 +3op/dt+WMoA0g/YbjhWn2cAfWcH9P8p8/n/FUO8APmGI3aHbtOhJQ8qwxcalp6kO +fICWsW4ygWtdpnyJWzAY0Udtsl8mglTppGTl59OYZmlDQTLhJ1hWiXLeNKj0pGPz +bAJ5jGQN8zXAk83j019rI5WveAdWp+w1XRGvmPxLL3heojHrkutuYLQ0LOcFwNvg +OqmPvZneRBoy6Yshp0XyYy+qioxDm+Vd/NV1/aCWgQXJA3vFqUg3AURLFHHTh+7h +fa3DDCLtdg/wJkRtOWjFhq0hgx5sb9zVv8HCuMERbZJbWwDOfSrHJwXj4KaTHVqY +OWfBE9vzeAxRpdpe69SZWYg3tyu7uSf6a5Rp55iMI3kjuQMCanvsNA== +-----END RSA PRIVATE KEY----- + + +8. crl issuer for dumca, the certificate and key +-----BEGIN CERTIFICATE----- +MIICUDCCAbmgAwIBAgIBBjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjlaFw0yOTAzMTUxMzMyMjla +MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz +cy1EMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDF7NjUUWji4pPmFg3qx4HB +kjtInwe7i2lPjRUN0ZwTcWob2RaD1+fhc7seeNmnypjERTa9TXF5cs2PgSHWNISC +QbQpbobOUcSsV/6Lr0kvrHJuVowcX13VsApGSJavVs2oJqUiFGNpnch8yR/pMHJf +hsd/Go+nUXMOl2xN31DMFQIDAQABo4GJMIGGMB0GA1UdDgQWBBS1XVE2CYKHgO7t +1koYVTu2w7xgNTBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw +HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw +AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAHYraYtdetZFOiTUR +dhvUi556el1WT25O8pF21YAzRI7KI4yzl6deD29DtcIPiBc8H1A4U6OhwXSQsqTd +taOHHdZxnU+m078mb231OPVvo48uZwpnX35g/qItW+Nb/dIEb08537oQKoGgL0hV +sKZPWod70JBkJabDuUirorhlk4A= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,1E0E5983F90A10E0 + +KdPTRmJjeKXFTgdVIgP0eu+m0evwVD2QFMkT3pPI9HELRxtkgIQzjK8F0KIHK9vi +Ur0CMgJkX0zs2v7HIG7jvfQ2fREidRTk1g3xCjHXVbpwjWN2dbo+mR0J2zzxNILy +mSs13PlDPdV81Vkn1WkMY0lhdrEpR6senQ4KIiMJTMsWZabG3lyFM6d7ag7CDVC+ +jnsUFg2XW5dYP/kb09p14+CdiQwruNVeVEWhWPG1pAjl7hXCEM5ssz9fNk6Gyh2X +OXB2mMysqTkt+qB+OIqLKj3NTUs2ovVQZnaCaynsnMYTcIEFmv3lC0gJHYAZtBXf +IkySb+VaB7wmk1CI1+texDU8+B2sq7wmqX0SLY7dMwkbxP1kydn9U5i4Gqmdxpw5 +4+jn7dB6oKfVFlXIZTZzhmN44cIdai48qVmse1BRDxUdfmlgd9C2W1mw4N60BXbt +DeNr8ua5UtcUOXBGJk6VEJapDU/dnnANhVR4R48Y9t+g1qlhwHB4zbSrAIJ5Rsbg +6pvdt7BQmFXtm4flZbf21Lr8awWkNFdc/k/3uXA6xemgsFNxPZXlpXO26KpIP+nz +lt9Q82WxIkzE+BvO+qd5wMqQ/GC/ztO8GJeGdRIo6un7KkNKs2AZDoCELo2lO53B +EBWHeABtJpB1Fw3lW3iJn0A6YbYzK1omztoNMkesBIi0QI5L/e0tq4Mp+LUjLm+Y +ywdrofTiYTu8R7mgS1b5q3eFtwUR9MZuKJGvhsBcSfS41vH2hDezYHg8vW55UIE3 +h7EhOUnTkHY43OKZnmXHwh3pTEmHv1TfMpeaktiU/w0= +-----END RSA PRIVATE KEY----- + +9. end entity certificate issued by subca, Alice +-----BEGIN CERTIFICATE----- +MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA2MjgxMzMy +MzBaFw0yOTAzMTUxMzMyMzBaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt +cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG +9w0BAQEFAAOBjQAwgYkCgYEA7wnsvR4XEOfVznf40l8ClLod+7L0y2/+smVV+GM/ +T1/QF/stajAJxXNy08gK00WKZ6ruTHhR9vh/Z6+EQM2RZDCpU0A7LPa3kLE/XTmS +1MLDu8ntkdlpURpvhdDWem+rl2HU5oZgzV8Jkcov9vXuSjqEDfr45FlPuV40T8+7 +cxsCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBSBwsAhi6Z1kriOs3ty +uSIujv9a3DAfBgNVHSMEGDAWgBRidC8Dt3dBzYESKpR2tR560sZ0+zANBgkqhkiG +9w0BAQQFAAOBgQDEiBqd5AMy2SQopFaS3dYkzj8MHlwtbCSoNVYkOfDnewcatrbk +yFcp6FX++PMdOQFHWvvnDdkCUAzZQp8kCkF9tGLVLBtOK7XxQ1us1LZym7kOPzsd +G93Dcf0U1JRO77juc61Br5paAy8Bok18Y/MeG7uKgB2MAEJYKhGKbCrfMw== +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,9E29E1901B338431 + +796Bj4/MwwHdy6+yZQcq3pS12EZPlEm7qsCCTl787y+DYEnnj+9W4WX4+1zWsUGV +1+39oe/KOUfi5O9ytMuKiroIrklmkskWHDoW6sr4VcDprnLYL+75AhTfgpOtY+gK +q+++N7P2o9V6YF7PiGxaBqGy/3bt0nTu0sjctfzbo4g0PniiId9sus2Y+iRHKebJ +r9V0b0jB8USuIsZ+4IQJFZ+/zeKuqqqPM/4v5VKNUahER8oykhRd4L9UactnVH5t +dsfowtHmOmKE6ObJX3m+HgJMvauMMf7zJVdqJquU2vy0bUk9ufCrA7t5ws7JDRzd +SG5gt7EVQzd5x/yXsQdKbDew5mXsYPB8vz4moTgj4YJU+m6k0t1PH00pz7LUrDHl +E8ZAmXIKLEBIih1AWkdASR/YZsfB3URIC8mLyDSZJN5iEVJxl/JWm6pbJlP3Xn3J +fraVEXP6uerf29CNhizq520AfGdsSqga6atdx6PXBVm67V0TZ+zmBMUQJrWmJUUC +NFGAac+M58lYX9uwsrO9x/x6GSZvhQQu1kfD1m8DHN3IV5m3uHxsEvhmuHaqFEMJ +uH336HbqWYENXwZfDHZvOU1o2FejsLZ7QmFjB72iAxhVNQt53pCXed2gF/bERGSn +qi0PsYtjyzfEUefqlVRSWVulbQfGwkvl8dX9s6BxmOG1q0BzlDu+cQLYXPS+XOww +H8GgkGp6XTd04qT/qCm8gcuxAvdkYkj2zgAIKaqeJ53S3Ua9lrIKnA3L3btiEG5F +JTYutSdRqB4liukkB1TciiDVSmOisszjrMHhRRYPfgeLfnRFdX9U9g== +-----END RSA PRIVATE KEY----- + +10. end entity certificate issued by subca, Bob +-----BEGIN CERTIFICATE----- +MIICNTCCAZ6gAwIBAgIBAzANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA2MjgxMzMy +MzVaFw0yOTAzMTUxMzMyMzVaMD8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt +cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQwwCgYDVQQDEwNCb2IwgZ8wDQYJKoZIhvcN +AQEBBQADgY0AMIGJAoGBALLrxd3DpXuH7yiAoyi/Rc1F7WsyyeNE1Ra2ymHpcee/ +3sbldekcgPl6lGQF/JJ5ARBbfeDtaf6ZtAK3j6aXqxVFxDKKu86r96v74gWJB7Vv +CHcUPvmE/EGESq3VNFI998DbmvqICLC97nFLUIrKWDH1rRFZjjkmouln40UxQXvV +AgMBAAGjTzBNMAsGA1UdDwQEAwID6DAdBgNVHQ4EFgQUTXz1J2viNSKvRHIRVhD6 +cJE4lgYwHwYDVR0jBBgwFoAUYnQvA7d3Qc2BEiqUdrUeetLGdPswDQYJKoZIhvcN +AQEEBQADgYEApsKyLf4FbXb26KsQrxgFn/w0d/7ck4cE8a6oXQqi5OLheNSWfD3S +fgD1dR28mGmhBiyOkdLmrhA1+6BuEr4FsuyLgrFnEqKL0ZhVhiqvwKLGqvasWxfU +Edaw4WXvRcfRWXfgjtwB6PSj/3nqGKSGRPif/OFIjO6UqHwEM7JEWO4= +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,4A820975D251613F + +GseD8MIztC0oYMxwpxeBO4/YPs9ZFFjgncXXcy+1oYZdlEsrS1xw87unjeHigL8m +QPIn8Guv3DiOsBdvweuMAgPPaA1zlophPClbGZMk7BB3T2acEfjBQH1DZz7kd7Bf +OmI2DrqcEg1yDi7l7YutBuTQPiy3nj3d7pbScuFd5YVMu6yH0YpS7JsPvviabFk2 +eYVlkaiejtQwV+4rUb7sH/0iyqX2uqvnpnGAwVzGp+tfSOl71SByz240nOODBRgY +3Uvxkrw6XhCBAayJE0t7rkPMEe1KgZaGO2IU2jsJJbyHVjvNPSugdbsT28prZHN1 +5M1J1NSOssq/kAq6S3f9sC5j7OzP7oUlx8uMUUSaz09/Ttq22tUoqmTue2IqqxAt +lDaeR8duHP5VV1wWnDsW/XaVYlBFQ4eFPJcXqmWsNAkDQVJp327GrcT6ngevP8fD +BcIxyX6J0rETPruAE+1+PAGjqy+C+oB0ssyZvKcjzdajHcNxSlRpCuOO2ekDvNPO +h+mVukNpHCEBsh3jYmk3z9i7VPLCM0BI+vheJ1TbM+homWP6bXyTQxtLfaKzXZJH +jRJ+zGTMBNJoPVKkou03uXFpT6hdWr9nYwbMT6G9hmC0If3wEl8nRjDKbmyMS29B +p3im1kPxVJA0DjhghC+7tACy42ffw6KZPALwaVDKHGeitrQBc3xTGfrjOGQOTTcm +hZ8icYCY0cjl5KQ2kq2GpXa2zQMujNV/Oj7D4sE0xcASMRXl3tst77R/j0eowx1M +niCTRphxx4iTPkieIbjWWeFTpVmSzUBrm4hSw3tiRapVWf6Zo3aAIg== +-----END RSA PRIVATE KEY----- + +11. end entity certificate issued by subca, Susan +-----BEGIN CERTIFICATE----- +MIICNzCCAaCgAwIBAgIBBDANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ +MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA2MjgxMzMy +MzZaFw0yOTAzMTUxMzMyMzZaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt +cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVTdXNhbjCBnzANBgkqhkiG +9w0BAQEFAAOBjQAwgYkCgYEAr2u6mdjqAVtfcgPze+9OUFZu3pi+HqoNBoygm2gq +qRAe+FVNSUeNAMQesQBo/eB0F1Iv/BjnYJ/7pYMLaf90MLoYr0Q5vNKYlBdcyUee +Jn1WmfN2Qk+UoUaiM4HAKHNJnZk13vWpZW54mcW1q09oj0oMjAZtaZsqpY6CtW6/ ++J8CAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBQVK9naug5W9pQlBqD2 +fVaCXooa1TAfBgNVHSMEGDAWgBRidC8Dt3dBzYESKpR2tR560sZ0+zANBgkqhkiG +9w0BAQQFAAOBgQDKYoM8EbP78ucjtsdvw4ywyo21hhSeP9PmRnNz/U3F9sQATmn+ +QBl6sBsrmbML2yrhkM1ctZTVUVp0S72fAbLgVjNk86p/CF+a2tmi0+lJh1aR7zQi +opt+68Nec2/52kgWi64ruF7YITmGHBxS/RDooFbscZbdrPgcow/Jw+5HnQ== +-----END CERTIFICATE----- + +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,9025CDB2AB43B0DE + +q4hvYnqkhDSDCsbXfxtMjPvzT38ql5wscOsGwDM/xMANSyPk9h/aqAxvB8G+8v6E +63x9Q5jRi2YY6z2sOpvu0utu7Xn6KA/H1YrpYFURTEjBbK2Qd41vPQ/NYcIO3nQd +PR2Qm3kpNumBSZomyNfJk9oegGxfw+P0af2GIb6YqmTDot+LLCLwpqxrGyQQ1LYp +zc4A9D/b19Y0eD+TU9S2KEYszvfUo7RBxRFSZ6QN1rT2SEa7IJN9wb6TvgeB2lRB +Ds90tmLtkbuwLTZre+aqbM8mU40+RI9GHh+mPw0Qz55Kw2CUe+PnGsLQnOTm7p/I +mLiPTNMJKvwaR18Z88IE9UwL0zE/ND7vZfrhqTn9bHRnzHU4NtBCBsS8zloI+rXZ +EIWKMDyzMH3wpbNYq/AemSvvUz1wGOxit5TjG2QwwCNt8hPLl0Es6Q5aWdAPPrLM +EfX/6gL7bLTHNyLPz/U32o0H4hz5J7FQ7SuYUPLI3ybiPC2qL11jbtrZMesAYEAX +mvRnqO+6dPEpwGmKz8kUj2mC8X8FPKCCiy4kbc8NjLTMao+/vOgD+wBuIePaC3yE +vpuZrsUSFZWRJ824sDMmmZFoi2DKsp1zqCV1kXozaPGigaOxtkdp890nBcGkPijQ +8F+jCGwSFda6UfuJHCQ/eJB+8LQUWa8u1TeJ9zo98oD2OBfQ5maZU0Vfv1EXvwbp +pz2R6HXFaPrQDeGO0xVzD453AbY/fZCGnhIwrEYvPAbwpIKde397MP66gYFMNFhA +IaMimFnBv7IHL08Ka0KtqbVhLpEKWFpZ6LsOnyispeB4KF0md+lpGg== +-----END RSA PRIVATE KEY----- diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java new file mode 100644 index 00000000000..ed0cf53ace1 --- /dev/null +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/StatusLoopDependency.java @@ -0,0 +1,309 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/** + * @test + * @bug 6852744 + * @summary PIT b61: PKI test suite fails because self signed certificates + * are being rejected + * @run main/othervm StatusLoopDependency subca + * @run main/othervm StatusLoopDependency subci + * @run main/othervm StatusLoopDependency alice + * @author Xuelei Fan + */ + +import java.io.*; +import java.net.SocketException; +import java.util.*; +import java.security.Security; +import java.security.cert.*; +import java.security.cert.CertPathValidatorException.BasicReason; +import sun.security.util.DerInputStream; + +/** + * KeyUsage extension plays a important rule during looking for the issuer + * of a certificate or CRL. A certificate issuer should have the keyCertSign + * bit set, and a CRL issuer should have the cRLSign bit set. + * + * Sometime, a delegated CRL issuer would also have the keyCertSign bit set, + * as would be troublesome to find the proper CRL issuer during certificate + * path build if the delegated CRL issuer is a self-issued certificate, for + * it is hard to identify it from its issuer by the "issuer" field only. + * + * In the test case, the delegated CRL issuers have keyCertSign bit set, and + * the CAs have the cRLSign bit set also. If we cannot identify the delegated + * CRL issuer from its issuer, there is a potential loop to find the correct + * CRL. + * + * And when revocation enabled, needs to check the status of the delegated + * CRL issuers. If the delegated CRL issuer issues itself status, there is + * a potential loop to verify the CRL and check the status of delegated CRL + * issuer. + * + * The fix of 6852744 should addresses above issues. + */ +public final class StatusLoopDependency { + + // the trust anchor + static String selfSignedCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMThaFw0zMDA2MDgxMzMyMTha\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQDInJhXi0655bPXAVkz1n5I6fAcZejzPnOPuwq3hU3OxFw8\n" + + "81Uf6o9oKI1h4w4XAD8u1cUNOgiX+wPwojronlp68bIfO6FVhNf287pLtLhNJo+7\n" + + "m6Qxw3ymFvEKy+PVj20CHSggdKHxUa4MBZBmHMFNBuxfYmjwzn+yTMmCCXOvSwID\n" + + "AQABo4GJMIGGMB0GA1UdDgQWBBSQ52Dpau+gtL+Kc31dusYnKj16ZTBHBgNVHSME\n" + + "QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" + + "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw\n" + + "DQYJKoZIhvcNAQEEBQADgYEAjBt6ea65HCqbGsS2rs/HhlGusYXtThRVC5vwXSey\n" + + "ZFYwSgukuq1KDzckqZFu1meNImEwdZjwxdN0e2p/nVREPC42rZliSj6V1ThayKXj\n" + + "DWEZW1U5aR8T+3NYfDrdKcJGx4Hzfz0qKz1j4ssV1M9ptJxYYv4y2Da+592IN1S9\n" + + "v/E=\n" + + "-----END CERTIFICATE-----"; + + // the sub-ca + static String subCaCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBAzANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjRaFw0yOTAzMTUxMzMyMjRa\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPFv24SK78VI0gWlyIrq/X\n" + + "srl1431K5hJJxMYZtaQunyPmrYg3oI9KvKFykxnR0N4XDPaIi75p9dXGppVu80BA\n" + + "+csvIPBwlBQoNmKDQWTziDOqfK4tE+IMuL/Y7pxnH6CDMY7VGpvatty2zcmH+m/v\n" + + "E/n+HPyeELJQT2rT/3T+7wIDAQABo4GJMIGGMB0GA1UdDgQWBBRidC8Dt3dBzYES\n" + + "KpR2tR560sZ0+zBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMeMKqrMr5d3eTQsv\n" + + "MYOD15Dl3THQGLAa4ad5Eyq5/1eUeEOpztzCgDfi0iPD8YCubIEVasBTSqTiGXqb\n" + + "RpGuPHOwwfWvHrTeHSludiFBAUiKj7aEV+oQa0FBn4U4TT8HA62HQ93FhzTDI3jP\n" + + "iil34GktVl6gfMKGzUEW/Dh8OM4=\n" + + "-----END CERTIFICATE-----"; + + // a delegated CRL issuer, it's a self-issued certificate of trust anchor + static String topCrlIssuerCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICPjCCAaegAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjNaFw0yOTAzMTUxMzMyMjNa\n" + + "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" + + "AQUAA4GNADCBiQKBgQC99u93trf+WmpfiqunJy/P31ej1l4rESxft2JSGNjKuLFN\n" + + "/BO3SAugGJSkCARAwXjB0c8eeXhXWhVVWdNpbKepRJTxrjDfnFIavLgtUvmFwn/3\n" + + "hPXe+RQeA8+AJ99Y+o+10kY8JAZLa2j93C2FdmwOjUbo8aIz85yhbiV1tEDjLwID\n" + + "AQABo4GJMIGGMB0GA1UdDgQWBBSyFyA3XWLbdL6W6hksmBn7RKsQmDBHBgNVHSME\n" + + "QDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" + + "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAQYw\n" + + "DQYJKoZIhvcNAQEEBQADgYEAHTm8aRTeakgCfEBCgSWK9wvMW1c18ANGMm8OFDBk\n" + + "xabVy9BT0MVFHlaneh89oIxTZN0FMTpg21GZMAvIzhEt7DGdO7HLsW7JniN7/OZ0\n" + + "rACmpK5frmZrLS03zUm8c+rTbazNfYLoZVG3/mDZbKIi+4y8IGnFcgLVsHsYoBNP\n" + + "G0c=\n" + + "-----END CERTIFICATE-----"; + + // a delegated CRL issuer, it's a self-issued certificate of sub-ca + static String subCrlIssuerCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICUDCCAbmgAwIBAgIBBDANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA2MjgxMzMyMjdaFw0yOTAzMTUxMzMyMjda\n" + + "MDExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMRAwDgYDVQQLEwdDbGFz\n" + + "cy0xMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+8AcLJtGAVUWvv3ifcyQw\n" + + "OGqwzcPrBw/XCs6vTMlcdtFzcH1M+Z3/QHN9+5VT1gqeTIZ+b8g9005Og3XKy/HX\n" + + "obXZeLv20VZsr+jm52ySghEYOVCTJ9OyFOAp5adp6nf0cA66Feh3LsmVhpTEcDOG\n" + + "GnyntQm0DBYxRoOT/GBlvQIDAQABo4GJMIGGMB0GA1UdDgQWBBSRWhMuZLQoHSDN\n" + + "xhxr+vdDmfAY8jBHBgNVHSMEQDA+gBSQ52Dpau+gtL+Kc31dusYnKj16ZaEjpCEw\n" + + "HzELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUw\n" + + "AwEB/zALBgNVHQ8EBAMCAQYwDQYJKoZIhvcNAQEEBQADgYEAMIDZLdOLFiPyS1bh\n" + + "Ch4eUYHT+K1WG93skbga3kVYg3GSe+gctwkKwKK13bwfi8zc7wwz6MtmQwEYhppc\n" + + "pKKKEwi5QirBCP54rihLCvRQaj6ZqUJ6VP+zPAqHYMDbzlBbHtVF/1lQUP30I6SV\n" + + "Fu987DvLmZ2GuQA9FKJsnlD9pbU=\n" + + "-----END CERTIFICATE-----"; + + // the target EE certificate + static String targetCertStr = + "-----BEGIN CERTIFICATE-----\n" + + "MIICNzCCAaCgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQ\n" + + "MA4GA1UEChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMTAeFw0wOTA2MjgxMzMy\n" + + "MzBaFw0yOTAzMTUxMzMyMzBaMEExCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFt\n" + + "cGxlMRAwDgYDVQQLEwdDbGFzcy0xMQ4wDAYDVQQDEwVBbGljZTCBnzANBgkqhkiG\n" + + "9w0BAQEFAAOBjQAwgYkCgYEA7wnsvR4XEOfVznf40l8ClLod+7L0y2/+smVV+GM/\n" + + "T1/QF/stajAJxXNy08gK00WKZ6ruTHhR9vh/Z6+EQM2RZDCpU0A7LPa3kLE/XTmS\n" + + "1MLDu8ntkdlpURpvhdDWem+rl2HU5oZgzV8Jkcov9vXuSjqEDfr45FlPuV40T8+7\n" + + "cxsCAwEAAaNPME0wCwYDVR0PBAQDAgPoMB0GA1UdDgQWBBSBwsAhi6Z1kriOs3ty\n" + + "uSIujv9a3DAfBgNVHSMEGDAWgBRidC8Dt3dBzYESKpR2tR560sZ0+zANBgkqhkiG\n" + + "9w0BAQQFAAOBgQDEiBqd5AMy2SQopFaS3dYkzj8MHlwtbCSoNVYkOfDnewcatrbk\n" + + "yFcp6FX++PMdOQFHWvvnDdkCUAzZQp8kCkF9tGLVLBtOK7XxQ1us1LZym7kOPzsd\n" + + "G93Dcf0U1JRO77juc61Br5paAy8Bok18Y/MeG7uKgB2MAEJYKhGKbCrfMw==\n" + + "-----END CERTIFICATE-----"; + + // CRL issued by the delegated CRL issuer, topCrlIssuerCertStr + static String topCrlStr = + "-----BEGIN X509 CRL-----\n" + + "MIIBGzCBhQIBATANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQMA4GA1UE\n" + + "ChMHRXhhbXBsZRcNMDkwNjI4MTMzMjM4WhcNMjgwODI3MTMzMjM4WjAiMCACAQUX\n" + + "DTA5MDYyODEzMzIzN1owDDAKBgNVHRUEAwoBBKAOMAwwCgYDVR0UBAMCAQEwDQYJ\n" + + "KoZIhvcNAQEEBQADgYEAVUIeu2x7ZwsliafoCBOg+u8Q4S/VFfTe/SQnRyTM3/V1\n" + + "v+Vn5Acc7eo8Rh4AHcnFFbLNk38n6lllov/CaVR0IPZ6hnrNHVa7VYkNlRAwV2aN\n" + + "GUUhkMMOLVLnN25UOrN9J637SHmRE6pB+TRMaEQ73V7UNlWxuSMK4KofWen0A34=\n" + + "-----END X509 CRL-----"; + + // CRL issued by the delegated CRL issuer, subCrlIssuerCertStr + static String subCrlStr = + "-----BEGIN X509 CRL-----\n" + + "MIIBLTCBlwIBATANBgkqhkiG9w0BAQQFADAxMQswCQYDVQQGEwJVUzEQMA4GA1UE\n" + + "ChMHRXhhbXBsZTEQMA4GA1UECxMHQ2xhc3MtMRcNMDkwNjI4MTMzMjQzWhcNMjgw\n" + + "ODI3MTMzMjQzWjAiMCACAQQXDTA5MDYyODEzMzIzOFowDDAKBgNVHRUEAwoBBKAO\n" + + "MAwwCgYDVR0UBAMCAQEwDQYJKoZIhvcNAQEEBQADgYEACQZEf6ydb3fKTMPJ8DBO\n" + + "oo630MsrT3P0x0AC4+aQOueCBaGpNqW/H379uZxXAad7yr+aXUBwaeBMYVKUbwOe\n" + + "5TrN5QWPe2eCkU+MSQvh1SHASDDMH4jhWFMRdO3aPMDKKPlO/Q3s0G72eD7Zo5dr\n" + + "N9AvUXxGxU4DruoJuFPcrCI=\n" + + "-----END X509 CRL-----"; + + private static Set generateTrustAnchors() + throws CertificateException { + // generate certificate from cert string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + ByteArrayInputStream is = + new ByteArrayInputStream(selfSignedCertStr.getBytes()); + Certificate selfSignedCert = cf.generateCertificate(is); + + // generate a trust anchor + TrustAnchor anchor = + new TrustAnchor((X509Certificate)selfSignedCert, null); + + return Collections.singleton(anchor); + } + + private static CertStore generateCertificateStore() throws Exception { + Collection entries = new HashSet(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + + ByteArrayInputStream is; + + is = new ByteArrayInputStream(targetCertStr.getBytes()); + Certificate cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(selfSignedCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(topCrlIssuerCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + cert = cf.generateCertificate(is); + entries.add(cert); + + // generate CRL from CRL string + is = new ByteArrayInputStream(topCrlStr.getBytes()); + Collection mixes = cf.generateCRLs(is); + entries.addAll(mixes); + + is = new ByteArrayInputStream(subCrlStr.getBytes()); + mixes = cf.generateCRLs(is); + entries.addAll(mixes); + + return CertStore.getInstance("Collection", + new CollectionCertStoreParameters(entries)); + } + + private static X509CertSelector generateSelector(String name) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = null; + if (name.equals("subca")) { + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + } else if (name.equals("subci")) { + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + } else { + is = new ByteArrayInputStream(targetCertStr.getBytes()); + } + + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + byte[] extVal = target.getExtensionValue("2.5.29.14"); + if (extVal != null) { + DerInputStream in = new DerInputStream(extVal); + byte[] subjectKID = in.getOctetString(); + selector.setSubjectKeyIdentifier(subjectKID); + } else { + // unlikely to happen. + throw new Exception("unexpected certificate: no SKID extension"); + } + + return selector; + } + + private static boolean match(String name, Certificate cert) + throws Exception { + X509CertSelector selector = new X509CertSelector(); + + // generate certificate from certificate string + CertificateFactory cf = CertificateFactory.getInstance("X.509"); + ByteArrayInputStream is = null; + if (name.equals("subca")) { + is = new ByteArrayInputStream(subCaCertStr.getBytes()); + } else if (name.equals("subci")) { + is = new ByteArrayInputStream(subCrlIssuerCertStr.getBytes()); + } else { + is = new ByteArrayInputStream(targetCertStr.getBytes()); + } + X509Certificate target = (X509Certificate)cf.generateCertificate(is); + + return target.equals(cert); + } + + + public static void main(String[] args) throws Exception { + CertPathBuilder builder = CertPathBuilder.getInstance("PKIX"); + + X509CertSelector selector = generateSelector(args[0]); + + Set anchors = generateTrustAnchors(); + CertStore certs = generateCertificateStore(); + + + PKIXBuilderParameters params = + new PKIXBuilderParameters(anchors, selector); + params.addCertStore(certs); + params.setRevocationEnabled(true); + params.setDate(new Date(109, 7, 1)); // 2009-07-01 + Security.setProperty("ocsp.enable", "false"); + System.setProperty("com.sun.security.enableCRLDP", "true"); + + PKIXCertPathBuilderResult result = + (PKIXCertPathBuilderResult)builder.build(params); + + if (!match(args[0], result.getCertPath().getCertificates().get(0))) { + throw new Exception("unexpected certificate"); + } + } +} diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/generate.sh b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/generate.sh new file mode 100644 index 00000000000..06429d63ffa --- /dev/null +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/generate.sh @@ -0,0 +1,221 @@ +# +# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# + +#!/bin/ksh +# +# needs ksh to run the script. + +# generate a self-signed root certificate +if [ ! -f root/root_cert.pem ]; then + if [ ! -d root ]; then + mkdir root + fi + + openssl req -x509 -newkey rsa:1024 -keyout root/root_key.pem \ + -out root/root_cert.pem -subj "/C=US/O=Example" \ + -config openssl.cnf -reqexts cert_issuer -days 7650 \ + -passin pass:passphrase -passout pass:passphrase +fi + +# generate a sele-issued root crl issuer certificate +if [ ! -f root/top_crlissuer_cert.pem ]; then + if [ ! -d root ]; then + mkdir root + fi + + openssl req -newkey rsa:1024 -keyout root/top_crlissuer_key.pem \ + -out root/top_crlissuer_req.pem -subj "/C=US/O=Example" -days 7650 \ + -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in root/top_crlissuer_req.pem -extfile openssl.cnf \ + -extensions crl_issuer -CA root/root_cert.pem \ + -CAkey root/root_key.pem -out root/top_crlissuer_cert.pem \ + -CAcreateserial -CAserial root/root_cert.srl -days 7200 \ + -passin pass:passphrase +fi + +# generate subca cert issuer and crl iuuser certificates +if [ ! -f subca/subca_cert.pem ]; then + if [ ! -d subca ]; then + mkdir subca + fi + + openssl req -newkey rsa:1024 -keyout subca/subca_key.pem \ + -out subca/subca_req.pem -subj "/C=US/O=Example/OU=Class-1" \ + -days 7650 -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in subca/subca_req.pem -extfile openssl.cnf \ + -extensions cert_issuer -CA root/root_cert.pem \ + -CAkey root/root_key.pem -out subca/subca_cert.pem -CAcreateserial \ + -CAserial root/root_cert.srl -days 7200 -passin pass:passphrase + + openssl req -newkey rsa:1024 -keyout subca/subca_crlissuer_key.pem \ + -out subca/subca_crlissuer_req.pem -subj "/C=US/O=Example/OU=Class-1" \ + -days 7650 -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in subca/subca_crlissuer_req.pem -extfile openssl.cnf \ + -extensions crl_issuer -CA root/root_cert.pem \ + -CAkey root/root_key.pem -out subca/subca_crlissuer_cert.pem \ + -CAcreateserial -CAserial root/root_cert.srl -days 7200 \ + -passin pass:passphrase +fi + +# generate dumca cert issuer and crl iuuser certificates +if [ ! -f dumca/dumca_cert.pem ]; then + if [ ! -d sumca ]; then + mkdir dumca + fi + + openssl req -newkey rsa:1024 -keyout dumca/dumca_key.pem \ + -out dumca/dumca_req.pem -subj "/C=US/O=Example/OU=Class-D" \ + -days 7650 -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in dumca/dumca_req.pem -extfile openssl.cnf \ + -extensions cert_issuer -CA root/root_cert.pem \ + -CAkey root/root_key.pem -out dumca/dumca_cert.pem \ + -CAcreateserial -CAserial root/root_cert.srl -days 7200 \ + -passin pass:passphrase + + openssl req -newkey rsa:1024 -keyout dumca/dumca_crlissuer_key.pem \ + -out dumca/dumca_crlissuer_req.pem -subj "/C=US/O=Example/OU=Class-D" \ + -days 7650 -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in dumca/dumca_crlissuer_req.pem \ + -extfile openssl.cnf -extensions crl_issuer -CA root/root_cert.pem \ + -CAkey root/root_key.pem -out dumca/dumca_crlissuer_cert.pem \ + -CAcreateserial -CAserial root/root_cert.srl -days 7200 \ + -passin pass:passphrase +fi + +# generate certifiacte for Alice +if [ ! -f subca/alice/alice_cert.pem ]; then + if [ ! -d subca/alice ]; then + mkdir -p subca/alice + fi + + openssl req -newkey rsa:1024 -keyout subca/alice/alice_key.pem \ + -out subca/alice/alice_req.pem \ + -subj "/C=US/O=Example/OU=Class-1/CN=Alice" -days 7650 \ + -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in subca/alice/alice_req.pem \ + -extfile openssl.cnf -extensions ee_of_subca \ + -CA subca/subca_cert.pem -CAkey subca/subca_key.pem \ + -out subca/alice/alice_cert.pem -CAcreateserial \ + -CAserial subca/subca_cert.srl -days 7200 -passin pass:passphrase +fi + +# generate certifiacte for Bob +if [ ! -f subca/bob/bob_cert.pem ]; then + if [ ! -d subca/bob ]; then + mkdir -p subca/bob + fi + + openssl req -newkey rsa:1024 -keyout subca/bob/bob_key.pem \ + -out subca/bob/bob_req.pem \ + -subj "/C=US/O=Example/OU=Class-1/CN=Bob" -days 7650 \ + -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in subca/bob/bob_req.pem \ + -extfile openssl.cnf -extensions ee_of_subca \ + -CA subca/subca_cert.pem -CAkey subca/subca_key.pem \ + -out subca/bob/bob_cert.pem -CAcreateserial \ + -CAserial subca/subca_cert.srl -days 7200 -passin pass:passphrase +fi + +# generate certifiacte for Susan +if [ ! -f subca/susan/susan_cert.pem ]; then + if [ ! -d subca/susan ]; then + mkdir -p subca/susan + fi + + openssl req -newkey rsa:1024 -keyout subca/susan/susan_key.pem \ + -out subca/susan/susan_req.pem \ + -subj "/C=US/O=Example/OU=Class-1/CN=Susan" -days 7650 \ + -passin pass:passphrase -passout pass:passphrase + + openssl x509 -req -in subca/susan/susan_req.pem -extfile openssl.cnf \ + -extensions ee_of_subca -CA subca/subca_cert.pem \ + -CAkey subca/subca_key.pem -out subca/susan/susan_cert.pem \ + -CAcreateserial -CAserial subca/subca_cert.srl -days 7200 \ + -passin pass:passphrase +fi + + +# generate the top CRL +if [ ! -f root/top_crl.pem ]; then + if [ ! -d root ]; then + mkdir root + fi + + if [ ! -f root/index.txt ]; then + touch root/index.txt + echo 00 > root/crlnumber + fi + + openssl ca -gencrl -config openssl.cnf -name ca_top -crldays 7000 \ + -crl_reason superseded -keyfile root/top_crlissuer_key.pem \ + -cert root/top_crlissuer_cert.pem -out root/top_crl.pem \ + -passin pass:passphrase +fi + +# revoke dumca +openssl ca -revoke dumca/dumca_cert.pem -config openssl.cnf \ + -name ca_top -crl_reason superseded \ + -keyfile root/top_crlissuer_key.pem -cert root/top_crlissuer_cert.pem \ + -passin pass:passphrase + +openssl ca -gencrl -config openssl.cnf -name ca_top -crldays 7000 \ + -crl_reason superseded -keyfile root/top_crlissuer_key.pem \ + -cert root/top_crlissuer_cert.pem -out root/top_crl.pem \ + -passin pass:passphrase + +# revoke for subca +if [ ! -f subca/subca_crl.pem ]; then + if [ ! -d subca ]; then + mkdir subca + fi + + if [ ! -f subca/index.txt ]; then + touch subca/index.txt + echo 00 > subca/crlnumber + fi + + openssl ca -gencrl -config openssl.cnf -name ca_subca -crldays 7000 \ + -crl_reason superseded -keyfile subca/subca_crlissuer_key.pem \ + -cert subca/subca_crlissuer_cert.pem -out subca/subca_crl.pem \ + -passin pass:passphrase +fi + +# revoke susan +openssl ca -revoke subca/susan/susan_cert.pem -config openssl.cnf \ + -name ca_subca -crl_reason superseded \ + -keyfile subca/subca_crlissuer_key.pem \ + -cert subca/subca_crlissuer_cert.pem -passin pass:passphrase + +openssl ca -gencrl -config openssl.cnf -name ca_subca -crldays 7000 \ + -crl_reason superseded -keyfile subca/subca_crlissuer_key.pem \ + -cert subca/subca_crlissuer_cert.pem -out subca/subca_crl.pem \ + -passin pass:passphrase diff --git a/jdk/test/java/security/cert/CertPathBuilder/selfIssued/openssl.cnf b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/openssl.cnf new file mode 100644 index 00000000000..f9fca998b72 --- /dev/null +++ b/jdk/test/java/security/cert/CertPathBuilder/selfIssued/openssl.cnf @@ -0,0 +1,205 @@ +# +# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +# CA 95054 USA or visit www.sun.com if you need additional information or +# have any questions. +# + +# +# OpenSSL configuration file. +# + +HOME = . +RANDFILE = $ENV::HOME/.rnd + +[ ca ] +default_ca = CA_default + +[ CA_default ] +dir = ./top +certs = $dir/certs +crl_dir = $dir/crl +database = $dir/index.txt +unique_subject = no +new_certs_dir = $dir/newcerts +certificate = $dir/cacert.pem +serial = $dir/serial +crlnumber = $dir/crlnumber +crl = $dir/crl.pem +private_key = $dir/private/cakey.pem +RANDFILE = $dir/private/.rand +x509_extensions = v3_ca + +name_opt = ca_default +cert_opt = ca_default + +default_days = 7650 +default_crl_days = 30 +default_md = sha1 +preserve = no + +policy = policy_anything + +[ ca_top ] +dir = ./root +certs = $dir/certs +crl_dir = $dir/crl +database = $dir/index.txt +unique_subject = no +new_certs_dir = $dir/newcerts +certificate = $dir/cacert.pem +serial = $dir/serial +crlnumber = $dir/crlnumber +crl = $dir/crl.pem +private_key = $dir/private/cakey.pem +RANDFILE = $dir/private/.rand + +x509_extensions = v3_ca + +name_opt = ca_default +cert_opt = ca_default + +default_days = 7650 +default_crl_days = 30 +default_md = sha1 +preserve = no + +policy = policy_anything + +[ ca_subca ] +dir = ./subca +certs = $dir/certs +crl_dir = $dir/crl +database = $dir/index.txt +unique_subject = no +new_certs_dir = $dir/newcerts + +certificate = $dir/cacert.pem +serial = $dir/serial +crlnumber = $dir/crlnumber +crl = $dir/crl.pem +private_key = $dir/private/cakey.pem +RANDFILE = $dir/private/.rand + +x509_extensions = usr_cert + +name_opt = ca_default +cert_opt = ca_default + +default_days = 7650 +default_crl_days = 30 +default_md = sha1 +preserve = no + +policy = policy_anything + +[ policy_match ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ policy_anything ] +countryName = optional +stateOrProvinceName = optional +localityName = optional +organizationName = optional +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ req ] +default_bits = 1024 +default_keyfile = privkey.pem +distinguished_name = req_distinguished_name +attributes = req_attributes +x509_extensions = v3_ca + +string_mask = nombstr + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = NO +countryName_min = 2 +countryName_max = 2 + +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = A-State + +localityName = Locality Name (eg, city) + +0.organizationName = Organization Name (eg, company) +0.organizationName_default = Internet Widgits Pty Ltd + +organizationalUnitName = Organizational Unit Name (eg, section) + +commonName = Common Name (eg, YOUR name) +commonName_max = 64 + +emailAddress = Email Address +emailAddress_max = 64 + +[ req_attributes ] +challengePassword = A challenge password +challengePassword_min = 4 +challengePassword_max = 20 +unstructuredName = An optional company name + +[ usr_cert ] +keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer + +[ v3_req ] +basicConstraints = CA:FALSE +keyUsage = nonRepudiation, digitalSignature, keyEncipherment +subjectAltName = email:example@openjdk.net, RID:1.2.3.4:true + +[ v3_ca ] +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer:always +basicConstraints = critical,CA:true +keyUsage = keyCertSign, cRLSign + +[ cert_issuer ] +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer:always +basicConstraints = critical,CA:true +keyUsage = keyCertSign, cRLSign + +[ crl_issuer ] +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer:always +basicConstraints = critical,CA:true +keyUsage = keyCertSign, cRLSign + + +[ crl_ext ] +authorityKeyIdentifier = keyid:always,issuer:always + +[ ee_of_subca ] +keyUsage = nonRepudiation, digitalSignature, keyEncipherment, keyAgreement + +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer From 1b9d35f50c366a761ef753f55662bb3d43502d1b Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Sat, 11 Jul 2009 16:43:08 +0100 Subject: [PATCH 25/56] 6562614: Compiler warnings for gettimeofday in Inet4/Inet6AddressImpl.c Add missing header to remove compiler warnings. Reviewed-by: martin --- jdk/src/solaris/native/java/net/Inet4AddressImpl.c | 1 + jdk/src/solaris/native/java/net/Inet6AddressImpl.c | 1 + 2 files changed, 2 insertions(+) diff --git a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c index 9e3cca486db..4e43c9d5a3a 100644 --- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c @@ -24,6 +24,7 @@ */ #include +#include #include #include #include diff --git a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c index 5ecedbc6c4f..246585abcc3 100644 --- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c @@ -24,6 +24,7 @@ */ #include +#include #include #include #include From cbb1a71a104f7b0166c211bf2eb10cd305b8771a Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Mon, 13 Jul 2009 23:01:03 +0800 Subject: [PATCH 26/56] 6453837: PartialCompositeContext.allEmpty is buggy Reviewed-by: weijun --- .../com/sun/jndi/toolkit/ctx/PartialCompositeContext.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java index 5e7e0e3adce..c7bfcfaae4c 100644 --- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java +++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java @@ -493,9 +493,9 @@ public abstract class PartialCompositeContext implements Context, Resolver { * Tests whether a name contains a nonempty component. */ protected static boolean allEmpty(Name name) { - Enumeration enum_ = name.getAll(); + Enumeration enum_ = name.getAll(); while (enum_.hasMoreElements()) { - if (!enum_.equals("")) { + if (!enum_.nextElement().isEmpty()) { return false; } } From fa45d4b2e5bfebd0d1b42e29d599cd7b6fe6abb1 Mon Sep 17 00:00:00 2001 From: Valerie Peng Date: Mon, 13 Jul 2009 15:14:17 -0700 Subject: [PATCH 27/56] 6832540: IllegalArgumentException in ClassLoader.definePackage when classes are loaded in parallel Modified to handle race condition for parallel-capable classloaders by re-trying/re-verifying package Reviewed-by: alanb --- .../classes/java/net/URLClassLoader.java | 64 ++++++++++++------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/jdk/src/share/classes/java/net/URLClassLoader.java b/jdk/src/share/classes/java/net/URLClassLoader.java index 601601a5652..22be20b7ecd 100644 --- a/jdk/src/share/classes/java/net/URLClassLoader.java +++ b/jdk/src/share/classes/java/net/URLClassLoader.java @@ -305,6 +305,35 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { } } + /* + * Retrieve the package using the specified package name. + * If non-null, verify the package using the specified code + * source and manifest. + */ + private Package getAndVerifyPackage(String pkgname, + Manifest man, URL url) { + Package pkg = getPackage(pkgname); + if (pkg != null) { + // Package found, so check package sealing. + if (pkg.isSealed()) { + // Verify that code source URL is the same. + if (!pkg.isSealed(url)) { + throw new SecurityException( + "sealing violation: package " + pkgname + " is sealed"); + } + } else { + // Make sure we are not attempting to seal the package + // at this code source URL. + if ((man != null) && isSealed(pkgname, man)) { + throw new SecurityException( + "sealing violation: can't seal package " + pkgname + + ": already loaded"); + } + } + } + return pkg; + } + /* * Defines a Class using the class bytes obtained from the specified * Resource. The resulting Class must be resolved before it can be @@ -316,32 +345,23 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { if (i != -1) { String pkgname = name.substring(0, i); // Check if package already loaded. - Package pkg = getPackage(pkgname); Manifest man = res.getManifest(); - if (pkg != null) { - // Package found, so check package sealing. - if (pkg.isSealed()) { - // Verify that code source URL is the same. - if (!pkg.isSealed(url)) { - throw new SecurityException( - "sealing violation: package " + pkgname + " is sealed"); + if (getAndVerifyPackage(pkgname, man, url) == null) { + try { + if (man != null) { + definePackage(pkgname, man, url); + } else { + definePackage(pkgname, null, null, null, null, null, null, null); } - - } else { - // Make sure we are not attempting to seal the package - // at this code source URL. - if ((man != null) && isSealed(pkgname, man)) { - throw new SecurityException( - "sealing violation: can't seal package " + pkgname + - ": already loaded"); + } catch (IllegalArgumentException iae) { + // parallel-capable class loaders: re-verify in case of a + // race condition + if (getAndVerifyPackage(pkgname, man, url) == null) { + // Should never happen + throw new AssertionError("Cannot find package " + + pkgname); } } - } else { - if (man != null) { - definePackage(pkgname, man, url); - } else { - definePackage(pkgname, null, null, null, null, null, null, null); - } } } // Now read the class bytes and define the class From 565f4998b5bedcac70e93aa7a893c1baac8bff03 Mon Sep 17 00:00:00 2001 From: Anthony Petrov Date: Tue, 14 Jul 2009 14:08:47 +0400 Subject: [PATCH 28/56] 6837446: Introduce Window.isOpaque() method Reviewed-by: art, alexp --- .../classes/com/sun/awt/AWTUtilities.java | 2 +- jdk/src/share/classes/java/awt/Component.java | 6 ++-- .../classes/java/awt/GraphicsDevice.java | 4 +-- jdk/src/share/classes/java/awt/Window.java | 30 ++++++++++++++----- .../javax/swing/DefaultDesktopManager.java | 2 +- .../classes/javax/swing/RepaintManager.java | 6 ++-- .../share/classes/sun/awt/AWTAccessor.java | 5 ---- jdk/src/share/classes/sun/awt/SunToolkit.java | 3 +- .../classes/sun/awt/windows/WWindowPeer.java | 3 +- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/jdk/src/share/classes/com/sun/awt/AWTUtilities.java b/jdk/src/share/classes/com/sun/awt/AWTUtilities.java index bf0628b4712..6dd292c865e 100644 --- a/jdk/src/share/classes/com/sun/awt/AWTUtilities.java +++ b/jdk/src/share/classes/com/sun/awt/AWTUtilities.java @@ -374,7 +374,7 @@ public final class AWTUtilities { "The window argument should not be null."); } - return AWTAccessor.getWindowAccessor().isOpaque(window); + return window.isOpaque(); } /** diff --git a/jdk/src/share/classes/java/awt/Component.java b/jdk/src/share/classes/java/awt/Component.java index e07fbe7c5c7..91347ad1b18 100644 --- a/jdk/src/share/classes/java/awt/Component.java +++ b/jdk/src/share/classes/java/awt/Component.java @@ -2370,12 +2370,10 @@ public abstract class Component implements ImageObserver, MenuContainer, * rectangular region. A non-opaque component paints only some of * its pixels, allowing the pixels underneath it to "show through". * A component that does not fully paint its pixels therefore - * provides a degree of transparency. Only lightweight - * components can be transparent. + * provides a degree of transparency. *

    * Subclasses that guarantee to always completely paint their - * contents should override this method and return true. All - * of the "heavyweight" AWT components are opaque. + * contents should override this method and return true. * * @return true if this component is completely opaque * @see #isLightweight diff --git a/jdk/src/share/classes/java/awt/GraphicsDevice.java b/jdk/src/share/classes/java/awt/GraphicsDevice.java index 3ad45e223aa..58061c6bc66 100644 --- a/jdk/src/share/classes/java/awt/GraphicsDevice.java +++ b/jdk/src/share/classes/java/awt/GraphicsDevice.java @@ -281,8 +281,8 @@ public abstract class GraphicsDevice { if (w.getOpacity() < 1.0f) { w.setOpacity(1.0f); } - Color bgColor = w.getBackground(); - if ((bgColor != null) && (bgColor.getAlpha() < 255)) { + if (!w.isOpaque()) { + Color bgColor = w.getBackground(); bgColor = new Color(bgColor.getRed(), bgColor.getGreen(), bgColor.getBlue(), 255); w.setBackground(bgColor); diff --git a/jdk/src/share/classes/java/awt/Window.java b/jdk/src/share/classes/java/awt/Window.java index 31c94ca77e5..b419c437c9e 100644 --- a/jdk/src/share/classes/java/awt/Window.java +++ b/jdk/src/share/classes/java/awt/Window.java @@ -3521,6 +3521,7 @@ public class Window extends Container implements Accessible { * @return this component's background color * * @see Window#setBackground + * @see Window#isOpaque * @see GraphicsDevice.WindowTranslucency */ @Override @@ -3583,6 +3584,7 @@ public class Window extends Container implements Accessible { * PERPIXEL_TRANSLUCENT} translucency is not supported * * @see Window#getBackground + * @see Window#isOpaque * @see Window#setOpacity() * @see Window#setShape() * @see GraphicsDevice.WindowTranslucency @@ -3623,6 +3625,25 @@ public class Window extends Container implements Accessible { } } + /** + * Indicates if the window is currently opaque. + *

    + * The method returns {@code false} if the background color of the window + * is not {@code null} and the alpha component of the color is less than + * 1.0f. The method returns {@code true} otherwise. + * + * @return {@code true} if the window is opaque, {@code false} otherwise + * + * @see Window#getBackground + * @see Window#setBackground + * @since 1.7 + */ + @Override + public boolean isOpaque() { + Color bg = getBackground(); + return bg != null ? bg.getAlpha() == 255 : true; + } + private void updateWindow() { synchronized (getTreeLock()) { WindowPeer peer = (WindowPeer)getPeer(); @@ -3639,12 +3660,11 @@ public class Window extends Container implements Accessible { */ @Override public void paint(Graphics g) { - Color bgColor = getBackground(); - if ((bgColor != null) && (bgColor.getAlpha() < 255)) { + if (!isOpaque()) { Graphics gg = g.create(); try { if (gg instanceof Graphics2D) { - gg.setColor(bgColor); + gg.setColor(getBackground()); ((Graphics2D)gg).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC)); gg.fillRect(0, 0, getWidth(), getHeight()); } @@ -3749,10 +3769,6 @@ public class Window extends Container implements Accessible { public void setShape(Window window, Shape shape) { window.setShape(shape); } - public boolean isOpaque(Window window) { - Color bg = window.getBackground(); - return (bg != null) ? bg.getAlpha() == 255 : true; - } public void setOpaque(Window window, boolean opaque) { Color bg = window.getBackground(); if (bg == null) { diff --git a/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java b/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java index 4bf7da1ca23..fc7977df641 100644 --- a/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java +++ b/jdk/src/share/classes/javax/swing/DefaultDesktopManager.java @@ -708,7 +708,7 @@ public class DefaultDesktopManager implements DesktopManager, java.io.Serializab // update window if it's non-opaque Window topLevel = SwingUtilities.getWindowAncestor(f); Toolkit tk = Toolkit.getDefaultToolkit(); - if (!AWTAccessor.getWindowAccessor().isOpaque(topLevel) && + if (!topLevel.isOpaque() && (tk instanceof SunToolkit) && ((SunToolkit)tk).needUpdateWindow()) { diff --git a/jdk/src/share/classes/javax/swing/RepaintManager.java b/jdk/src/share/classes/javax/swing/RepaintManager.java index 618288bd3a0..a988b99fbd3 100644 --- a/jdk/src/share/classes/javax/swing/RepaintManager.java +++ b/jdk/src/share/classes/javax/swing/RepaintManager.java @@ -732,7 +732,7 @@ public class RepaintManager (Window)dirty : SwingUtilities.getWindowAncestor(dirty); if (window != null && - !AWTAccessor.getWindowAccessor().isOpaque(window)) + !window.isOpaque()) { windows.add(window); } @@ -996,7 +996,7 @@ public class RepaintManager // If the window is non-opaque, it's double-buffered at peer's level Window w = (c instanceof Window) ? (Window)c : SwingUtilities.getWindowAncestor(c); - if (!AWTAccessor.getWindowAccessor().isOpaque(w)) { + if (!w.isOpaque()) { Toolkit tk = Toolkit.getDefaultToolkit(); if ((tk instanceof SunToolkit) && (((SunToolkit)tk).needUpdateWindow())) { return null; @@ -1032,7 +1032,7 @@ public class RepaintManager // If the window is non-opaque, it's double-buffered at peer's level Window w = (c instanceof Window) ? (Window)c : SwingUtilities.getWindowAncestor(c); - if (!AWTAccessor.getWindowAccessor().isOpaque(w)) { + if (!w.isOpaque()) { Toolkit tk = Toolkit.getDefaultToolkit(); if ((tk instanceof SunToolkit) && (((SunToolkit)tk).needUpdateWindow())) { return null; diff --git a/jdk/src/share/classes/sun/awt/AWTAccessor.java b/jdk/src/share/classes/sun/awt/AWTAccessor.java index e427b892517..c8bbc860877 100644 --- a/jdk/src/share/classes/sun/awt/AWTAccessor.java +++ b/jdk/src/share/classes/sun/awt/AWTAccessor.java @@ -136,11 +136,6 @@ public final class AWTAccessor { * Set a shape to the given window. */ void setShape(Window window, Shape shape); - /* - * Identify whether the given window is opaque (true) - * or translucent (false). - */ - boolean isOpaque(Window window); /* * Set the opaque preoperty to the given window. */ diff --git a/jdk/src/share/classes/sun/awt/SunToolkit.java b/jdk/src/share/classes/sun/awt/SunToolkit.java index 7f0ac590fa0..b4dd06a445c 100644 --- a/jdk/src/share/classes/sun/awt/SunToolkit.java +++ b/jdk/src/share/classes/sun/awt/SunToolkit.java @@ -1985,8 +1985,7 @@ public abstract class SunToolkit extends Toolkit */ public static boolean isContainingTopLevelOpaque(Component c) { Window w = getContainingWindow(c); - return w != null && ((Window)w).getBackground() != null && - ((Window)w).getBackground().getAlpha() == 255; + return w != null && w.isOpaque(); } /** diff --git a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java index 165acac4e93..fbb7442ba7d 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java @@ -194,8 +194,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, // default value of a boolean field is 'false', so set isOpaque to // true here explicitly this.isOpaque = true; - Color bgColor = ((Window)target).getBackground(); - setOpaque((bgColor == null) || (bgColor.getAlpha() == 255)); + setOpaque(((Window)target).isOpaque()); } } From addbc1de711aff94b0e991d667fc76c0e2f7f4bf Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:04 -0700 Subject: [PATCH 29/56] Added tag jdk7-b65 for changeset f5311292903a --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 6b4351ee95a..3b501dece9d 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -39,3 +39,4 @@ ffd09e767dfa6d21466183a400f72cf62d53297f jdk7-b57 c7ed15ab92ce36a09d264a5e34025884b2d7607f jdk7-b62 57f7e028c7ad1806500ae89eb3f4cd9a51b10e18 jdk7-b63 269c1ec4435dfb7b452ae6e3bdde005d55c5c830 jdk7-b64 +e01380cd1de4ce048b87d059d238e5ab5e341947 jdk7-b65 From a9c0cc5110763a4dcc5e80a5c2195df55d48a607 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:05 -0700 Subject: [PATCH 30/56] Added tag jdk7-b65 for changeset 2ad3a445ce89 --- corba/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/corba/.hgtags b/corba/.hgtags index 0bb9b5fe667..e9712d235d3 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -39,3 +39,4 @@ e906b16a12a9a63b615898afa5d9673cbd1c5ab8 jdk7-b61 65b66117dbd70a493e9644aeb4033cf95a4e3c99 jdk7-b62 d20e45cd539f20405ff843652069cfd7550c5ab3 jdk7-b63 047dd27fddb607f8135296b3754131f6e13cb8c7 jdk7-b64 +97fd9b42f5c2d342b90d18f0a2b57e4117e39415 jdk7-b65 From 7edbc2373cfc3e23c8c4bc07c2ff70a2ecf59120 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:09 -0700 Subject: [PATCH 31/56] Added tag jdk7-b65 for changeset 60611616dba4 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 0e026969a54..82f00b1c160 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -39,3 +39,4 @@ a77eddcd510c3972717c025cfcef9a60bfa4ecac jdk7-b60 a88386380bdaaa5ab4ffbedf22c57bac5dbec034 jdk7-b62 32c83fb84370a35344676991a48440378e6b6c8a jdk7-b63 ba36394eb84b949b31212bdb32a518a8f92bab5b jdk7-b64 +ba313800759b678979434d6da8ed3bf49eb8bea4 jdk7-b65 From 9b9bfcc5ffaabc7882708099e820a9e471eea70c Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:13 -0700 Subject: [PATCH 32/56] Added tag jdk7-b65 for changeset 98a2177833c8 --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 67a0b9e2e17..2713e5f9d70 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -39,3 +39,4 @@ f1ac756616eaaad795f77f7f5e7f7c7bfdc9c1de jdk7-b61 a97dd57a62604c35c79bc2fa77a612ed547f6135 jdk7-b62 ae449e9c04c1fe651bd30f0f4d4cc24ba794e0c4 jdk7-b63 a10eec7a1edf536f39b5828d8623054dbc62c2b7 jdk7-b64 +008c662e0ee9a91aebb75e46b97de979083d5c1c jdk7-b65 From 9243a3226550d0fa07b0cc0f4efdc7954bddcb40 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:15 -0700 Subject: [PATCH 33/56] Added tag jdk7-b65 for changeset 83ac5deac923 --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 3645edaf091..d85a9e3d5f0 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -39,3 +39,4 @@ aeabf802f2a1ca72b87d7397c5ece58058e000a9 jdk7-b61 75c801c13ea1ddebc58b1a8c8da9318d72750e62 jdk7-b62 b8a6e883c0a6708f6d818815040525d472262495 jdk7-b63 aaa25dfd3de68c6f1a1d3ef8c45fd99f76bca6dd jdk7-b64 +aa22a1be5866a6608ba17a7a443945559409ae0f jdk7-b65 From 27e3d0608ddf5ecccbd79150108bd2835b1cc22c Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:21 -0700 Subject: [PATCH 34/56] Added tag jdk7-b65 for changeset 6d887683b2b4 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index 4b9e6d23082..b1cc226d467 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -39,3 +39,4 @@ f72c0dc047b9b2e797beee68ae0b50decb1f020d jdk7-b61 12e11fab9a839a9666a996a8f9a02fd8fa03aab6 jdk7-b62 2ed6ed6b5bfc7dd724925b90dbb31223df59c25d jdk7-b63 a50217eb3ee10b9f9547e0708e5c9625405083ef jdk7-b64 +382a27aa78d3236fa123c60577797a887fe93e09 jdk7-b65 From c524fb1e6646bf3c3ee29feedff066a9fbe2bc22 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Thu, 16 Jul 2009 10:53:31 -0700 Subject: [PATCH 35/56] Added tag jdk7-b65 for changeset dde9c43422cd --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index 0bb6612a24f..4d03a266a98 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -39,3 +39,4 @@ dbdeb4a7581b2a8699644b91cae6793cb01953f7 jdk7-b53 6855e5aa3348f185fe5b443ee43a1b00ec5d390e jdk7-b62 5c2c8112055565b4980b6756e001e45eb7b88d6e jdk7-b63 d8f23a81d46f47a4186f1044dd9e44841bbeab84 jdk7-b64 +7e0056ded28c802609d2bd79bfcda551d72a3fec jdk7-b65 From fea09e9cd03b537903241655cc5af5be6f9868cb Mon Sep 17 00:00:00 2001 From: Poonam Bajaj Date: Thu, 16 Jul 2009 18:21:40 -0700 Subject: [PATCH 36/56] 6840305: Discrepancy in system memory details (when 4G or greater) reported by JVM and Windows OS GlobalMemoryStatus() does not report correct memory usage when the system has more than 4gb of RAM. GlobalMemoryStatusEx() should be used in place of GlobalMemoryStatus(). Reviewed-by: kamg, coleenp --- hotspot/src/os/windows/vm/os_windows.cpp | 32 +++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp index 1cf0cee81b1..9f90cf2b428 100644 --- a/hotspot/src/os/windows/vm/os_windows.cpp +++ b/hotspot/src/os/windows/vm/os_windows.cpp @@ -616,12 +616,13 @@ julong os::available_memory() { } julong os::win32::available_memory() { - // FIXME: GlobalMemoryStatus() may return incorrect value if total memory - // is larger than 4GB - MEMORYSTATUS ms; - GlobalMemoryStatus(&ms); + // Use GlobalMemoryStatusEx() because GlobalMemoryStatus() may return incorrect + // value if total memory is larger than 4GB + MEMORYSTATUSEX ms; + ms.dwLength = sizeof(ms); + GlobalMemoryStatusEx(&ms); - return (julong)ms.dwAvailPhys; + return (julong)ms.ullAvailPhys; } julong os::physical_memory() { @@ -1579,16 +1580,17 @@ void os::print_memory_info(outputStream* st) { st->print("Memory:"); st->print(" %dk page", os::vm_page_size()>>10); - // FIXME: GlobalMemoryStatus() may return incorrect value if total memory - // is larger than 4GB - MEMORYSTATUS ms; - GlobalMemoryStatus(&ms); + // Use GlobalMemoryStatusEx() because GlobalMemoryStatus() may return incorrect + // value if total memory is larger than 4GB + MEMORYSTATUSEX ms; + ms.dwLength = sizeof(ms); + GlobalMemoryStatusEx(&ms); st->print(", physical %uk", os::physical_memory() >> 10); st->print("(%uk free)", os::available_memory() >> 10); - st->print(", swap %uk", ms.dwTotalPageFile >> 10); - st->print("(%uk free)", ms.dwAvailPageFile >> 10); + st->print(", swap %uk", ms.ullTotalPageFile >> 10); + st->print("(%uk free)", ms.ullAvailPageFile >> 10); st->cr(); } @@ -3135,11 +3137,13 @@ void os::win32::initialize_system_info() { _processor_level = si.wProcessorLevel; _processor_count = si.dwNumberOfProcessors; - MEMORYSTATUS ms; + MEMORYSTATUSEX ms; + ms.dwLength = sizeof(ms); + // also returns dwAvailPhys (free physical memory bytes), dwTotalVirtual, dwAvailVirtual, // dwMemoryLoad (% of memory in use) - GlobalMemoryStatus(&ms); - _physical_memory = ms.dwTotalPhys; + GlobalMemoryStatusEx(&ms); + _physical_memory = ms.ullTotalPhys; OSVERSIONINFO oi; oi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); From 7e2e64f5e04200db27fd2aa44fd00e3274332917 Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Thu, 23 Jul 2009 11:30:49 +0400 Subject: [PATCH 37/56] 6857870: Regression tests are failing with ExceptionInInitializerError Reviewed-by: art --- .../windows/classes/sun/awt/windows/WToolkit.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java index 6e12209f94c..9fcf3d67a8b 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WToolkit.java +++ b/jdk/src/windows/classes/sun/awt/windows/WToolkit.java @@ -886,14 +886,12 @@ public class WToolkit extends SunToolkit implements Runnable { * this should be done in lazilyLoadDesktopProperty() only. */ protected synchronized void initializeDesktopProperties() { - desktopProperties.put("DnD.Autoscroll.initialDelay", Integer.valueOf(50)); - desktopProperties.put("DnD.Autoscroll.interval", Integer.valueOf(50)); - - try { - desktopProperties.put("Shell.shellFolderManager", - Class.forName("sun.awt.shell.Win32ShellFolderManager2")); - } catch (ClassNotFoundException ex) { - } + desktopProperties.put("DnD.Autoscroll.initialDelay", + Integer.valueOf(50)); + desktopProperties.put("DnD.Autoscroll.interval", + Integer.valueOf(50)); + desktopProperties.put("Shell.shellFolderManager", + "sun.awt.shell.Win32ShellFolderManager2"); } /* From 608d9bf61e7052fb4146d7b0b1d298e90acb72d3 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:46 -0700 Subject: [PATCH 38/56] Added tag jdk7-b66 for changeset 3e00e9de363a --- .hgtags-top-repo | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 3b501dece9d..6681557af03 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -40,3 +40,4 @@ c7ed15ab92ce36a09d264a5e34025884b2d7607f jdk7-b62 57f7e028c7ad1806500ae89eb3f4cd9a51b10e18 jdk7-b63 269c1ec4435dfb7b452ae6e3bdde005d55c5c830 jdk7-b64 e01380cd1de4ce048b87d059d238e5ab5e341947 jdk7-b65 +6bad5e3fe50337d95b1416d744780d65bc570da6 jdk7-b66 From b0029d3ebcc276e14b69cd30864107835692c8ff Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:48 -0700 Subject: [PATCH 39/56] Added tag jdk7-b66 for changeset ec9f33978e19 --- corba/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/corba/.hgtags b/corba/.hgtags index e9712d235d3..55f6338adba 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -40,3 +40,4 @@ e906b16a12a9a63b615898afa5d9673cbd1c5ab8 jdk7-b61 d20e45cd539f20405ff843652069cfd7550c5ab3 jdk7-b63 047dd27fddb607f8135296b3754131f6e13cb8c7 jdk7-b64 97fd9b42f5c2d342b90d18f0a2b57e4117e39415 jdk7-b65 +a821e059a961bcb02830280d51f6dd030425c066 jdk7-b66 From 7084283bfa35806a2dfa30240ef5167f2bdf5572 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:51 -0700 Subject: [PATCH 40/56] Added tag jdk7-b66 for changeset f367b7c24c74 --- hotspot/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 82f00b1c160..e805fe0c0aa 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -40,3 +40,4 @@ a88386380bdaaa5ab4ffbedf22c57bac5dbec034 jdk7-b62 32c83fb84370a35344676991a48440378e6b6c8a jdk7-b63 ba36394eb84b949b31212bdb32a518a8f92bab5b jdk7-b64 ba313800759b678979434d6da8ed3bf49eb8bea4 jdk7-b65 +57c71ad0341b8b64ed20f81151eb7f06324f8894 jdk7-b66 From 7548a15ae9b0e27629f86a27081ec8592b408c0d Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:56 -0700 Subject: [PATCH 41/56] Added tag jdk7-b66 for changeset fe07d1599221 --- jaxp/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxp/.hgtags b/jaxp/.hgtags index 2713e5f9d70..9b724960f39 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -40,3 +40,4 @@ a97dd57a62604c35c79bc2fa77a612ed547f6135 jdk7-b62 ae449e9c04c1fe651bd30f0f4d4cc24ba794e0c4 jdk7-b63 a10eec7a1edf536f39b5828d8623054dbc62c2b7 jdk7-b64 008c662e0ee9a91aebb75e46b97de979083d5c1c jdk7-b65 +22f9d5d5b5fe0f47048f41e6c6e54fee5edad0ec jdk7-b66 From fd6571fe2e59f12464c5d7ab12775f91c7d30f4f Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:39:58 -0700 Subject: [PATCH 42/56] Added tag jdk7-b66 for changeset 0d64f3a8ed0b --- jaxws/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxws/.hgtags b/jaxws/.hgtags index d85a9e3d5f0..a5dc8fecee0 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -40,3 +40,4 @@ aeabf802f2a1ca72b87d7397c5ece58058e000a9 jdk7-b61 b8a6e883c0a6708f6d818815040525d472262495 jdk7-b63 aaa25dfd3de68c6f1a1d3ef8c45fd99f76bca6dd jdk7-b64 aa22a1be5866a6608ba17a7a443945559409ae0f jdk7-b65 +fa8712c099edd5c9a6b3ed9729353738004d388f jdk7-b66 From cfd046568f1c326b358ef1b495f0dc082a847d3b Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:40:05 -0700 Subject: [PATCH 43/56] Added tag jdk7-b66 for changeset 7441718ff264 --- jdk/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/.hgtags b/jdk/.hgtags index b1cc226d467..b19d2294d2e 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -40,3 +40,4 @@ f72c0dc047b9b2e797beee68ae0b50decb1f020d jdk7-b61 2ed6ed6b5bfc7dd724925b90dbb31223df59c25d jdk7-b63 a50217eb3ee10b9f9547e0708e5c9625405083ef jdk7-b64 382a27aa78d3236fa123c60577797a887fe93e09 jdk7-b65 +bd31b30a5b21f20e42965b1633f18a5c7946d398 jdk7-b66 From c3a06b2ebe4ffa9111f601fe4549d374e5fbee13 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Fri, 24 Jul 2009 13:40:15 -0700 Subject: [PATCH 44/56] Added tag jdk7-b66 for changeset dc62947a6e47 --- langtools/.hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/.hgtags b/langtools/.hgtags index 4d03a266a98..23d21f876dc 100644 --- a/langtools/.hgtags +++ b/langtools/.hgtags @@ -40,3 +40,4 @@ dbdeb4a7581b2a8699644b91cae6793cb01953f7 jdk7-b53 5c2c8112055565b4980b6756e001e45eb7b88d6e jdk7-b63 d8f23a81d46f47a4186f1044dd9e44841bbeab84 jdk7-b64 7e0056ded28c802609d2bd79bfcda551d72a3fec jdk7-b65 +634f519d6f9a602b16bba1c7cd4a17242a8f6889 jdk7-b66 From d911e41fe74afe7336154bbcc105bfb4b9d3f15b Mon Sep 17 00:00:00 2001 From: Erik Trimble Date: Fri, 24 Jul 2009 16:41:16 -0700 Subject: [PATCH 45/56] 6864901: Bump the HS16 build number to 07 Update the HS16 build number to 07 Reviewed-by: jcoomes --- hotspot/make/hotspot_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index cdac48030fa..bbcda0a80e3 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2009 HS_MAJOR_VER=16 HS_MINOR_VER=0 -HS_BUILD_NUMBER=06 +HS_BUILD_NUMBER=07 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 From 3c30eafbb57f317dea01e9d210ffe274bae70a89 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Mon, 27 Jul 2009 09:06:22 -0700 Subject: [PATCH 46/56] 6864003: Modify JVM_FindClassFromBootLoader to return null if class not found JVM_FindClassFromBootLoader returns null if class not found Reviewed-by: acorn, alanb, dholmes --- hotspot/src/share/vm/prims/jvm.cpp | 88 +++++++++++++++++------------- hotspot/src/share/vm/prims/jvm.h | 9 +-- 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp index 627ed7f6e5b..3e2e38246d0 100644 --- a/hotspot/src/share/vm/prims/jvm.cpp +++ b/hotspot/src/share/vm/prims/jvm.cpp @@ -638,11 +638,54 @@ JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls)) if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented"); JVM_END -// Common implementation for JVM_FindClassFromBootLoader and -// JVM_FindClassFromLoader -static jclass jvm_find_class_from_class_loader(JNIEnv* env, const char* name, - jboolean init, jobject loader, - jboolean throwError, TRAPS) { + +// Returns a class loaded by the bootstrap class loader; or null +// if not found. ClassNotFoundException is not thrown. +// +// Rationale behind JVM_FindClassFromBootLoader +// a> JVM_FindClassFromClassLoader was never exported in the export tables. +// b> because of (a) java.dll has a direct dependecy on the unexported +// private symbol "_JVM_FindClassFromClassLoader@20". +// c> the launcher cannot use the private symbol as it dynamically opens +// the entry point, so if something changes, the launcher will fail +// unexpectedly at runtime, it is safest for the launcher to dlopen a +// stable exported interface. +// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its +// signature to change from _JVM_FindClassFromClassLoader@20 to +// JVM_FindClassFromClassLoader and will not be backward compatible +// with older JDKs. +// Thus a public/stable exported entry point is the right solution, +// public here means public in linker semantics, and is exported only +// to the JDK, and is not intended to be a public API. + +JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env, + const char* name)) + JVMWrapper2("JVM_FindClassFromBootLoader %s", name); + + // Java libraries should ensure that name is never null... + if (name == NULL || (int)strlen(name) > symbolOopDesc::max_length()) { + // It's impossible to create this class; the name cannot fit + // into the constant pool. + return NULL; + } + + symbolHandle h_name = oopFactory::new_symbol_handle(name, CHECK_NULL); + klassOop k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL); + if (k == NULL) { + return NULL; + } + + if (TraceClassResolution) { + trace_class_resolution(k); + } + return (jclass) JNIHandles::make_local(env, Klass::cast(k)->java_mirror()); +JVM_END + +JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, + jboolean init, jobject loader, + jboolean throwError)) + JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name, + throwError ? "error" : "exception"); // Java libraries should ensure that name is never null... if (name == NULL || (int)strlen(name) > symbolOopDesc::max_length()) { // It's impossible to create this class; the name cannot fit @@ -662,40 +705,6 @@ static jclass jvm_find_class_from_class_loader(JNIEnv* env, const char* name, trace_class_resolution(java_lang_Class::as_klassOop(JNIHandles::resolve_non_null(result))); } return result; -} - -// Rationale behind JVM_FindClassFromBootLoader -// a> JVM_FindClassFromClassLoader was never exported in the export tables. -// b> because of (a) java.dll has a direct dependecy on the unexported -// private symbol "_JVM_FindClassFromClassLoader@20". -// c> the launcher cannot use the private symbol as it dynamically opens -// the entry point, so if something changes, the launcher will fail -// unexpectedly at runtime, it is safest for the launcher to dlopen a -// stable exported interface. -// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its -// signature to change from _JVM_FindClassFromClassLoader@20 to -// JVM_FindClassFromClassLoader and will not be backward compatible -// with older JDKs. -// Thus a public/stable exported entry point is the right solution, -// public here means public in linker semantics, and is exported only -// to the JDK, and is not intended to be a public API. - -JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env, - const char* name, - jboolean throwError)) - JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name, - throwError ? "error" : "exception"); - return jvm_find_class_from_class_loader(env, name, JNI_FALSE, - (jobject)NULL, throwError, THREAD); -JVM_END - -JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, - jboolean init, jobject loader, - jboolean throwError)) - JVMWrapper3("JVM_FindClassFromClassLoader %s throw %s", name, - throwError ? "error" : "exception"); - return jvm_find_class_from_class_loader(env, name, init, loader, - throwError, THREAD); JVM_END @@ -3919,6 +3928,7 @@ jclass find_class_from_class_loader(JNIEnv* env, symbolHandle name, jboolean ini // The Java level wrapper will perform the necessary security check allowing // us to pass the NULL as the initiating class loader. klassOop klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL); + KlassHandle klass_handle(THREAD, klass); // Check if we should initialize the class if (init && klass_handle->oop_is_instance()) { diff --git a/hotspot/src/share/vm/prims/jvm.h b/hotspot/src/share/vm/prims/jvm.h index 7dbc38d94b6..fea96ee4aa7 100644 --- a/hotspot/src/share/vm/prims/jvm.h +++ b/hotspot/src/share/vm/prims/jvm.h @@ -390,15 +390,10 @@ JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, jboolean init, jobject loader, jboolean throwError); /* - * Find a class from a boot class loader. Throw ClassNotFoundException - * or NoClassDefFoundError depending on the value of the last - * argument. This is the same as FindClassFromClassLoader but provided - * as a convenience method exported correctly on all platforms for - * JSR 277 launcher class loading. + * Find a class from a boot class loader. Returns NULL if class not found. */ JNIEXPORT jclass JNICALL -JVM_FindClassFromBootLoader(JNIEnv *env, const char *name, - jboolean throwError); +JVM_FindClassFromBootLoader(JNIEnv *env, const char *name); /* * Find a class from a given class. From 10a6d2437a31d33f43f8f2c13e49d0234e9a280a Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:34 -0700 Subject: [PATCH 47/56] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- make/deploy-rules.gmk | 2 +- make/jprt.properties | 2 +- make/sanity-rules.gmk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/make/deploy-rules.gmk b/make/deploy-rules.gmk index 2884601bb33..afec0ea267a 100644 --- a/make/deploy-rules.gmk +++ b/make/deploy-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/make/jprt.properties b/make/jprt.properties index 7f2fffd0a2d..b451b0f25d9 100644 --- a/make/jprt.properties +++ b/make/jprt.properties @@ -1,5 +1,5 @@ # -# Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/make/sanity-rules.gmk b/make/sanity-rules.gmk index 2119af3b0e4..5d2a7adb84d 100644 --- a/make/sanity-rules.gmk +++ b/make/sanity-rules.gmk @@ -1,5 +1,5 @@ # -# Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it From f3605fc37cfc14a82b088680764bdd4a5b391448 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:36 -0700 Subject: [PATCH 48/56] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- corba/make/Makefile | 2 +- corba/make/common/Library.gmk | 2 +- corba/make/common/Rules.gmk | 2 +- corba/make/common/shared/Compiler-gcc.gmk | 2 +- corba/make/common/shared/Defs-java.gmk | 2 +- corba/make/common/shared/Defs-windows.gmk | 2 +- corba/make/common/shared/Platform.gmk | 2 +- corba/make/jprt.properties | 2 +- corba/make/org/omg/idl/Makefile | 2 +- corba/make/tools/logutil/Makefile | 2 +- .../com/sun/corba/se/impl/encoding/BufferManagerReadStream.java | 2 +- .../classes/com/sun/corba/se/impl/io/ObjectStreamClass.java | 2 +- .../share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java | 2 +- corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java | 2 +- .../share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java | 2 +- .../share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java | 2 +- .../corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java | 2 +- .../com/sun/corba/se/impl/resolver/INSURLOperationImpl.java | 2 +- .../corba/se/impl/transport/SocketOrChannelConnectionImpl.java | 2 +- .../share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/first.set | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp | 2 +- corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp | 2 +- .../src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp | 2 +- .../sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp | 2 +- .../sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp | 2 +- .../tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp | 2 +- .../src/share/classes/com/sun/tools/corba/se/logutil/Input.java | 2 +- .../share/classes/com/sun/tools/corba/se/logutil/InputCode.java | 2 +- .../classes/com/sun/tools/corba/se/logutil/InputException.java | 2 +- corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java | 2 +- corba/src/share/classes/org/omg/CORBA/ORB.java | 2 +- corba/src/windows/resource/version.rc | 2 +- 37 files changed, 37 insertions(+), 37 deletions(-) diff --git a/corba/make/Makefile b/corba/make/Makefile index 1cd81c90ab0..0ca13f6c3ab 100644 --- a/corba/make/Makefile +++ b/corba/make/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/common/Library.gmk b/corba/make/common/Library.gmk index 49de4c64457..d0671c9a36f 100644 --- a/corba/make/common/Library.gmk +++ b/corba/make/common/Library.gmk @@ -1,5 +1,5 @@ # -# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/common/Rules.gmk b/corba/make/common/Rules.gmk index aa674a9bd95..0598f08df88 100644 --- a/corba/make/common/Rules.gmk +++ b/corba/make/common/Rules.gmk @@ -1,5 +1,5 @@ # -# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/common/shared/Compiler-gcc.gmk b/corba/make/common/shared/Compiler-gcc.gmk index c8e6779ffd6..5fc30edb995 100644 --- a/corba/make/common/shared/Compiler-gcc.gmk +++ b/corba/make/common/shared/Compiler-gcc.gmk @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/common/shared/Defs-java.gmk b/corba/make/common/shared/Defs-java.gmk index f80f0ffa4e1..44764bdc8b6 100644 --- a/corba/make/common/shared/Defs-java.gmk +++ b/corba/make/common/shared/Defs-java.gmk @@ -1,5 +1,5 @@ # -# Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/common/shared/Defs-windows.gmk b/corba/make/common/shared/Defs-windows.gmk index d78f7f7293e..3e1fad1226a 100644 --- a/corba/make/common/shared/Defs-windows.gmk +++ b/corba/make/common/shared/Defs-windows.gmk @@ -1,5 +1,5 @@ # -# Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/common/shared/Platform.gmk b/corba/make/common/shared/Platform.gmk index 428ff67b791..18f3aa330ec 100644 --- a/corba/make/common/shared/Platform.gmk +++ b/corba/make/common/shared/Platform.gmk @@ -1,5 +1,5 @@ # -# Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/jprt.properties b/corba/make/jprt.properties index 50a286b77d3..928f5998a4c 100644 --- a/corba/make/jprt.properties +++ b/corba/make/jprt.properties @@ -1,5 +1,5 @@ # -# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/org/omg/idl/Makefile b/corba/make/org/omg/idl/Makefile index d83fbdc2bb5..26c14039c15 100644 --- a/corba/make/org/omg/idl/Makefile +++ b/corba/make/org/omg/idl/Makefile @@ -1,5 +1,5 @@ # -# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/make/tools/logutil/Makefile b/corba/make/tools/logutil/Makefile index 2e19867f8d4..97472913b7e 100644 --- a/corba/make/tools/logutil/Makefile +++ b/corba/make/tools/logutil/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java b/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java index c57942f0da1..cbdf76ff2f9 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerReadStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java index b23049c08bc..50caa525af3 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java index c0cb1d8c100..0376fb6404b 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/oa/poa/POAFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java index 45fa6dde373..9fdf4b892ff 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java index ecd9539b8aa..f5c0116e2e8 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBSingleton.java @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java index dd5af6e8b3b..551c5f94cd0 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java index e19bc78ea7a..0d48f2fc203 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/IDLNameTranslatorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java index 0bb9d94a1fd..56ebef4a2fc 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java index 5dbfedb9fea..881f0639768 100644 --- a/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java +++ b/corba/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc index 7c46f35a117..6d933f6ed76 100644 --- a/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc +++ b/corba/src/share/classes/com/sun/corba/se/spi/logging/data/ORBUtil.mc @@ -1,6 +1,6 @@ ; -; Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. +; Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. ; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ; ; This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java b/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java index 17221825f62..d8cc4da5c24 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/Parser.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set b/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set index 93fcf81fdc2..86a71c55976 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/first.set @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set b/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set index d2797389d8e..5f2d8c1e3ab 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/follow.set @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl index 2db525ed665..16a61f6ffe9 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar.idl @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl index 28d07b44229..c236d7559c0 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/grammar3.idl @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp index 2c6efdf76b4..b670a98a234 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl.prp @@ -1,5 +1,5 @@ # -# Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp index b3dd5f6c788..d29bd79992c 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_ja.prp @@ -1,5 +1,5 @@ # -# Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp index 5da7dd9a845..372ca9100cb 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/idl_zh_CN.prp @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp index c24814126da..29af17fbb11 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable.prp @@ -1,5 +1,5 @@ # -# Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp index cce4ee5a7ec..e7a309be58c 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_ja.prp @@ -1,5 +1,5 @@ # -# Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp index 338a27a37fd..796bc3e5cb3 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp +++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/toJavaPortable_zh_CN.prp @@ -1,5 +1,5 @@ # -# Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java index 5431f0c7a17..1e69647eee5 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/Input.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java index 810a449f486..100b873cb9f 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputCode.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java index 597d3185a6b..a40d365629b 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/InputException.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java index 9246f70c3ab..59a0da3de43 100644 --- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java +++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/share/classes/org/omg/CORBA/ORB.java b/corba/src/share/classes/org/omg/CORBA/ORB.java index dde09300f2f..2fb6ca01959 100644 --- a/corba/src/share/classes/org/omg/CORBA/ORB.java +++ b/corba/src/share/classes/org/omg/CORBA/ORB.java @@ -1,5 +1,5 @@ /* - * Copyright 1995-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1995-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/corba/src/windows/resource/version.rc b/corba/src/windows/resource/version.rc index dff3ae50fe7..ad3c51b64cc 100644 --- a/corba/src/windows/resource/version.rc +++ b/corba/src/windows/resource/version.rc @@ -1,5 +1,5 @@ // -// Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. +// Copyright 2004-2009 Sun Microsystems, Inc. All Rights Reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it From a63ef1000477ddb5e11e048a7cc5b266bf02fce6 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:40 -0700 Subject: [PATCH 49/56] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- hotspot/agent/src/os/linux/Makefile | 2 +- .../src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java | 2 +- .../share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java | 2 +- .../src/share/classes/sun/jvm/hotspot/code/MonitorValue.java | 2 +- .../agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java | 2 +- .../src/share/classes/sun/jvm/hotspot/code/ScopeValue.java | 2 +- .../src/share/classes/sun/jvm/hotspot/debugger/Debugger.java | 2 +- .../share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java | 2 +- .../src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java | 2 +- .../classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java | 2 +- .../sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java | 2 +- .../sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java | 2 +- .../share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java | 2 +- .../share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java | 2 +- .../src/share/classes/sun/jvm/hotspot/memory/Universe.java | 2 +- .../share/classes/sun/jvm/hotspot/runtime/ClassConstants.java | 2 +- .../share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java | 2 +- .../classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/StackValue.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java | 2 +- .../agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java | 2 +- .../src/share/classes/sun/jvm/hotspot/runtime/Threads.java | 2 +- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java | 2 +- .../classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java | 2 +- .../share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java | 2 +- .../share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java | 2 +- .../classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java | 2 +- .../classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java | 2 +- hotspot/make/jprt.properties | 2 +- hotspot/make/linux/makefiles/jsig.make | 2 +- hotspot/make/linux/makefiles/saproc.make | 2 +- hotspot/make/solaris/makefiles/optimized.make | 2 +- hotspot/make/solaris/makefiles/sparcWorks.make | 2 +- hotspot/make/windows/build_vm_def.sh | 2 +- hotspot/make/windows/create.bat | 2 +- hotspot/make/windows/get_msc_ver.sh | 2 +- hotspot/make/windows/makefiles/adlc.make | 2 +- hotspot/make/windows/makefiles/compile.make | 2 +- hotspot/make/windows/makefiles/makedeps.make | 2 +- hotspot/make/windows/makefiles/rules.make | 2 +- hotspot/make/windows/makefiles/sa.make | 2 +- hotspot/make/windows/makefiles/sanity.make | 2 +- hotspot/make/windows/makefiles/vm.make | 2 +- hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp | 2 +- hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp | 2 +- hotspot/src/cpu/sparc/vm/globals_sparc.hpp | 2 +- hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp | 2 +- hotspot/src/cpu/x86/vm/frame_x86.cpp | 2 +- hotspot/src/cpu/x86/vm/globals_x86.hpp | 2 +- hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp | 2 +- hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp | 2 +- hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp | 2 +- hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp | 2 +- hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp | 2 +- hotspot/src/os/linux/vm/os_linux.hpp | 2 +- hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp | 2 +- hotspot/src/os/solaris/dtrace/jhelper.d | 2 +- hotspot/src/os/solaris/dtrace/libjvm_db.c | 2 +- hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp | 2 +- hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp | 2 +- hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp | 2 +- .../src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp | 2 +- hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp | 2 +- .../solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp | 2 +- hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp | 2 +- hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp | 2 +- hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp | 2 +- .../os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp | 2 +- .../os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp | 2 +- hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp | 2 +- hotspot/src/share/tools/MakeDeps/BuildConfig.java | 2 +- hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java | 2 +- hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java | 2 +- hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java | 2 +- hotspot/src/share/tools/hsdis/Makefile | 2 +- hotspot/src/share/tools/hsdis/hsdis-demo.c | 2 +- hotspot/src/share/tools/hsdis/hsdis.c | 2 +- hotspot/src/share/vm/adlc/adlc.hpp | 2 +- hotspot/src/share/vm/asm/assembler.cpp | 2 +- hotspot/src/share/vm/c1/c1_Compilation.cpp | 2 +- hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 2 +- hotspot/src/share/vm/c1/c1_LinearScan.cpp | 2 +- hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp | 2 +- hotspot/src/share/vm/ci/ciEnv.cpp | 2 +- hotspot/src/share/vm/ci/ciEnv.hpp | 2 +- hotspot/src/share/vm/ci/ciMethodBlocks.cpp | 2 +- hotspot/src/share/vm/ci/ciStreams.cpp | 2 +- hotspot/src/share/vm/ci/ciStreams.hpp | 2 +- hotspot/src/share/vm/ci/ciTypeFlow.cpp | 2 +- hotspot/src/share/vm/classfile/classLoader.cpp | 2 +- hotspot/src/share/vm/classfile/verifier.cpp | 2 +- hotspot/src/share/vm/code/vtableStubs.cpp | 2 +- hotspot/src/share/vm/compiler/compileBroker.cpp | 2 +- .../src/share/vm/gc_implementation/g1/collectionSetChooser.cpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp | 2 +- .../share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp | 2 +- .../share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp | 2 +- .../src/share/vm/gc_implementation/g1/concurrentZFThread.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp | 2 +- hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp | 2 +- .../src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp | 2 +- .../vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp | 2 +- .../share/vm/gc_implementation/shared/concurrentGCThread.cpp | 2 +- .../share/vm/gc_implementation/shared/concurrentGCThread.hpp | 2 +- hotspot/src/share/vm/gc_interface/gcCause.hpp | 2 +- hotspot/src/share/vm/includeDB_compiler1 | 2 +- hotspot/src/share/vm/includeDB_jvmti | 2 +- hotspot/src/share/vm/interpreter/bytecode.cpp | 2 +- hotspot/src/share/vm/interpreter/bytecode.hpp | 2 +- hotspot/src/share/vm/interpreter/bytecodeStream.hpp | 2 +- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp | 2 +- hotspot/src/share/vm/interpreter/bytecodes.cpp | 2 +- hotspot/src/share/vm/interpreter/bytecodes.hpp | 2 +- hotspot/src/share/vm/interpreter/invocationCounter.cpp | 2 +- hotspot/src/share/vm/interpreter/rewriter.hpp | 2 +- hotspot/src/share/vm/interpreter/templateTable.cpp | 2 +- hotspot/src/share/vm/interpreter/templateTable.hpp | 2 +- hotspot/src/share/vm/memory/blockOffsetTable.hpp | 2 +- hotspot/src/share/vm/memory/cardTableRS.cpp | 2 +- hotspot/src/share/vm/memory/gcLocker.hpp | 2 +- hotspot/src/share/vm/memory/heap.cpp | 2 +- hotspot/src/share/vm/oops/cpCacheOop.cpp | 2 +- hotspot/src/share/vm/oops/generateOopMap.cpp | 2 +- hotspot/src/share/vm/oops/methodDataOop.cpp | 2 +- hotspot/src/share/vm/opto/addnode.cpp | 2 +- hotspot/src/share/vm/opto/block.hpp | 2 +- hotspot/src/share/vm/opto/buildOopMap.cpp | 2 +- hotspot/src/share/vm/opto/bytecodeInfo.cpp | 2 +- hotspot/src/share/vm/opto/c2compiler.cpp | 2 +- hotspot/src/share/vm/opto/callnode.cpp | 2 +- hotspot/src/share/vm/opto/callnode.hpp | 2 +- hotspot/src/share/vm/opto/coalesce.cpp | 2 +- hotspot/src/share/vm/opto/connode.cpp | 2 +- hotspot/src/share/vm/opto/doCall.cpp | 2 +- hotspot/src/share/vm/opto/escape.cpp | 2 +- hotspot/src/share/vm/opto/loopTransform.cpp | 2 +- hotspot/src/share/vm/opto/loopopts.cpp | 2 +- hotspot/src/share/vm/opto/machnode.cpp | 2 +- hotspot/src/share/vm/opto/matcher.hpp | 2 +- hotspot/src/share/vm/opto/output.cpp | 2 +- hotspot/src/share/vm/opto/parse.hpp | 2 +- hotspot/src/share/vm/opto/parse1.cpp | 2 +- hotspot/src/share/vm/opto/parse2.cpp | 2 +- hotspot/src/share/vm/opto/parse3.cpp | 2 +- hotspot/src/share/vm/opto/parseHelper.cpp | 2 +- hotspot/src/share/vm/opto/subnode.cpp | 2 +- hotspot/src/share/vm/opto/superword.hpp | 2 +- hotspot/src/share/vm/prims/jvm_misc.hpp | 2 +- hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp | 2 +- hotspot/src/share/vm/prims/jvmtiEnvBase.cpp | 2 +- hotspot/src/share/vm/prims/methodComparator.cpp | 2 +- hotspot/src/share/vm/runtime/biasedLocking.cpp | 2 +- hotspot/src/share/vm/runtime/deoptimization.cpp | 2 +- hotspot/src/share/vm/runtime/dtraceJSDT.cpp | 2 +- hotspot/src/share/vm/runtime/frame.hpp | 2 +- hotspot/src/share/vm/runtime/hpi.hpp | 2 +- hotspot/src/share/vm/runtime/interfaceSupport.cpp | 2 +- hotspot/src/share/vm/runtime/mutexLocker.cpp | 2 +- hotspot/src/share/vm/runtime/mutexLocker.hpp | 2 +- hotspot/src/share/vm/runtime/orderAccess.cpp | 2 +- hotspot/src/share/vm/runtime/orderAccess.hpp | 2 +- hotspot/src/share/vm/runtime/stackValue.cpp | 2 +- hotspot/src/share/vm/runtime/stackValue.hpp | 2 +- hotspot/src/share/vm/runtime/thread.cpp | 2 +- hotspot/src/share/vm/runtime/thread.hpp | 2 +- hotspot/src/share/vm/runtime/vframe.cpp | 2 +- hotspot/src/share/vm/runtime/vframe.hpp | 2 +- hotspot/src/share/vm/runtime/vframeArray.cpp | 2 +- hotspot/src/share/vm/runtime/vframe_hp.cpp | 2 +- hotspot/src/share/vm/runtime/virtualspace.cpp | 2 +- hotspot/src/share/vm/runtime/virtualspace.hpp | 2 +- hotspot/src/share/vm/runtime/vmStructs.cpp | 2 +- hotspot/src/share/vm/runtime/vmThread.cpp | 2 +- hotspot/src/share/vm/runtime/vm_operations.hpp | 2 +- hotspot/src/share/vm/runtime/vm_version.cpp | 2 +- hotspot/src/share/vm/utilities/bitMap.cpp | 2 +- hotspot/src/share/vm/utilities/bitMap.hpp | 2 +- hotspot/src/share/vm/utilities/bitMap.inline.hpp | 2 +- hotspot/src/share/vm/utilities/exceptions.hpp | 2 +- hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp | 2 +- hotspot/src/share/vm/utilities/macros.hpp | 2 +- hotspot/test/compiler/6772683/InterruptedTest.java | 2 +- hotspot/test/compiler/6832293/Test.java | 2 +- hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java | 2 +- 199 files changed, 199 insertions(+), 199 deletions(-) diff --git a/hotspot/agent/src/os/linux/Makefile b/hotspot/agent/src/os/linux/Makefile index c7b64107b14..4f99ac31067 100644 --- a/hotspot/agent/src/os/linux/Makefile +++ b/hotspot/agent/src/os/linux/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java index 82f5ac44d0b..8c7c15d6ae7 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotTypeDataBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java index fa60c49839b..0ae5a9be997 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/DebugInfoReadStream.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java index 43937fc690a..edfdaa18ac0 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/MonitorValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java index e75365ae226..93b498efbd4 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeDesc.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java index 71166a706b1..5bb1077f40e 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/ScopeValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java index 41e71c2228e..d7f1e4851a2 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java index 8f5c732499b..854e5a0de1e 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java index 80b71637393..586a505f702 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java index df03ce3e01c..f0b5814f4b8 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java index 8a1bacb2fee..c4a8404c902 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java index edb52a65012..60f64d9814c 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java index b469bde96b6..44054f93506 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ObjectReferenceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java index 7ae8675f48a..3df1f22e2fd 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ThreadReferenceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java index b9cdc92ff03..c6bbe3de65d 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java index 306a9e677a6..431a18261a9 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ClassConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java index 6588da2e8bd..5b870c9fe69 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/CompiledVFrame.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java index f86e4f7a2c5..96f96346326 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/InterpretedVFrame.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java index 9cd4aedf6ce..4a68a22b97c 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java index d4801fa05f6..b6aa76edca3 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/MonitorInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java index 98becd01816..6e6f0b8d740 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StackValue.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java index fad351b495d..7eb5f4924d1 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/StubRoutines.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java index 9ca93b931fb..425ad5c743d 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Thread.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java index 9be499b5b80..ce3694ad530 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java index 6301b560a8e..fda1e4f39d7 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java index 3ab24ab3167..23d12314105 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java index d0cbd109b5d..1f866dfc3a7 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassDump.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java index ef6ef8c7e61..077ce1241e1 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java index 6ee998699bd..bccf9fd6434 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/tree/OopTreeNodeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java index b8fce3abdbf..b9f54946232 100644 --- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java +++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/JSJavaThread.java @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2004-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/jprt.properties b/hotspot/make/jprt.properties index 0a60bae587a..c0cb616c530 100644 --- a/hotspot/make/jprt.properties +++ b/hotspot/make/jprt.properties @@ -1,5 +1,5 @@ # -# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/linux/makefiles/jsig.make b/hotspot/make/linux/makefiles/jsig.make index edf4f77cca9..6dcff6aa72a 100644 --- a/hotspot/make/linux/makefiles/jsig.make +++ b/hotspot/make/linux/makefiles/jsig.make @@ -1,5 +1,5 @@ # -# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make index 11a100ad051..db05d137396 100644 --- a/hotspot/make/linux/makefiles/saproc.make +++ b/hotspot/make/linux/makefiles/saproc.make @@ -1,5 +1,5 @@ # -# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/solaris/makefiles/optimized.make b/hotspot/make/solaris/makefiles/optimized.make index 66609cae946..d3cf526f60c 100644 --- a/hotspot/make/solaris/makefiles/optimized.make +++ b/hotspot/make/solaris/makefiles/optimized.make @@ -1,5 +1,5 @@ # -# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/solaris/makefiles/sparcWorks.make b/hotspot/make/solaris/makefiles/sparcWorks.make index f88cfdfff3a..d1648383857 100644 --- a/hotspot/make/solaris/makefiles/sparcWorks.make +++ b/hotspot/make/solaris/makefiles/sparcWorks.make @@ -1,5 +1,5 @@ # -# Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/build_vm_def.sh b/hotspot/make/windows/build_vm_def.sh index 99e30bb1b9e..6f78c6a2f1d 100644 --- a/hotspot/make/windows/build_vm_def.sh +++ b/hotspot/make/windows/build_vm_def.sh @@ -1,5 +1,5 @@ # -# Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/create.bat b/hotspot/make/windows/create.bat index bdb1916107d..0f208806b65 100644 --- a/hotspot/make/windows/create.bat +++ b/hotspot/make/windows/create.bat @@ -1,6 +1,6 @@ @echo off REM -REM Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +REM Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. REM REM This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/get_msc_ver.sh b/hotspot/make/windows/get_msc_ver.sh index 67df0d0dd95..9cf69456a52 100644 --- a/hotspot/make/windows/get_msc_ver.sh +++ b/hotspot/make/windows/get_msc_ver.sh @@ -1,5 +1,5 @@ # -# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/adlc.make b/hotspot/make/windows/makefiles/adlc.make index e9af2f964bb..8e424eb888c 100644 --- a/hotspot/make/windows/makefiles/adlc.make +++ b/hotspot/make/windows/makefiles/adlc.make @@ -1,5 +1,5 @@ # -# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make index 4906ab5a989..fcbd74663b4 100644 --- a/hotspot/make/windows/makefiles/compile.make +++ b/hotspot/make/windows/makefiles/compile.make @@ -1,5 +1,5 @@ # -# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/makedeps.make b/hotspot/make/windows/makefiles/makedeps.make index 43f25a4666d..f9c8e6ab530 100644 --- a/hotspot/make/windows/makefiles/makedeps.make +++ b/hotspot/make/windows/makefiles/makedeps.make @@ -1,5 +1,5 @@ # -# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/rules.make b/hotspot/make/windows/makefiles/rules.make index 064fb3f231d..90815ace24c 100644 --- a/hotspot/make/windows/makefiles/rules.make +++ b/hotspot/make/windows/makefiles/rules.make @@ -1,5 +1,5 @@ # -# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make index 1970f116b45..734f2259432 100644 --- a/hotspot/make/windows/makefiles/sa.make +++ b/hotspot/make/windows/makefiles/sa.make @@ -1,5 +1,5 @@ # -# Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/sanity.make b/hotspot/make/windows/makefiles/sanity.make index dd5c7499f1d..dc7b07192fc 100644 --- a/hotspot/make/windows/makefiles/sanity.make +++ b/hotspot/make/windows/makefiles/sanity.make @@ -1,5 +1,5 @@ # -# Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make index eafb4417da5..2da551fc804 100644 --- a/hotspot/make/windows/makefiles/vm.make +++ b/hotspot/make/windows/makefiles/vm.make @@ -1,5 +1,5 @@ # -# Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp index a6e6c60e2a7..379ae282de3 100644 --- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp +++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp index 4d11edf2a3a..dd29a3fab66 100644 --- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp +++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp index 98b3230ec7b..ff28c96cfc7 100644 --- a/hotspot/src/cpu/sparc/vm/globals_sparc.hpp +++ b/hotspot/src/cpu/sparc/vm/globals_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp index 83178a8ef91..c340c87c0b1 100644 --- a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/frame_x86.cpp b/hotspot/src/cpu/x86/vm/frame_x86.cpp index dc0ca4af509..8ec4ba76295 100644 --- a/hotspot/src/cpu/x86/vm/frame_x86.cpp +++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/globals_x86.hpp b/hotspot/src/cpu/x86/vm/globals_x86.hpp index 9d6d0292eab..f5586c1ee56 100644 --- a/hotspot/src/cpu/x86/vm/globals_x86.hpp +++ b/hotspot/src/cpu/x86/vm/globals_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp b/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp index 04f87f3bbab..6975fdc2699 100644 --- a/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/interpreterRT_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp index a89eff6f606..51c05b3d4b7 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp index 07034a48121..48285f46ddd 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp b/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp index 3a16d35aa78..3de2675f5a8 100644 --- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_32.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp index 03de86684fa..3f40366c940 100644 --- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os/linux/vm/os_linux.hpp b/hotspot/src/os/linux/vm/os_linux.hpp index a51c2feed41..9291613b1bb 100644 --- a/hotspot/src/os/linux/vm/os_linux.hpp +++ b/hotspot/src/os/linux/vm/os_linux.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp index 5ad280c3b7b..70ce7437886 100644 --- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp +++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os/solaris/dtrace/jhelper.d b/hotspot/src/os/solaris/dtrace/jhelper.d index da5837238c8..622e51a1ca0 100644 --- a/hotspot/src/os/solaris/dtrace/jhelper.d +++ b/hotspot/src/os/solaris/dtrace/jhelper.d @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os/solaris/dtrace/libjvm_db.c b/hotspot/src/os/solaris/dtrace/libjvm_db.c index afa443092b4..b162f057b5b 100644 --- a/hotspot/src/os/solaris/dtrace/libjvm_db.c +++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp index 68be1d43523..d9379c0eaa6 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp index 865cd1ce0f1..4db57ad1e14 100644 --- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp +++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp index 24d2bab7c19..a1cb9732ace 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp +++ b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp index 9777b0a131d..5a175f5fff7 100644 --- a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp +++ b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp index 71f16d94158..e982d220361 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp index 5e27aefb977..ffb0fc9fd5f 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp index 44b67e9d035..3d8fc1c44b4 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp index 62fee83dd25..3faa28adaf4 100644 --- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp +++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp index 1a291cd91ff..4b51eef5ee0 100644 --- a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp +++ b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp index bf4d97d21b4..60fde2bd571 100644 --- a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp +++ b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp index 97226fa37dd..300541e0e96 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp index 1e53ed1aaa1..74efbf3df73 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp index e322f5fd1e8..5d9f5cfe330 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp +++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp index 1e0c6b334b5..192b381702f 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp index 5f8958567e0..2159d8752da 100644 --- a/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp +++ b/hotspot/src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2004-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/MakeDeps/BuildConfig.java b/hotspot/src/share/tools/MakeDeps/BuildConfig.java index ec26bc698c7..323bfd3f0b1 100644 --- a/hotspot/src/share/tools/MakeDeps/BuildConfig.java +++ b/hotspot/src/share/tools/MakeDeps/BuildConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java index 109613b45d7..5e47abea0d8 100644 --- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java +++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java index a346b611560..2bf9e68f30a 100644 --- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java +++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC8.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java index 4b64a555833..e18f693b174 100644 --- a/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java +++ b/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC9.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/hsdis/Makefile b/hotspot/src/share/tools/hsdis/Makefile index c1fd4ca4b9d..605e4218c39 100644 --- a/hotspot/src/share/tools/hsdis/Makefile +++ b/hotspot/src/share/tools/hsdis/Makefile @@ -1,5 +1,5 @@ # -# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/hsdis/hsdis-demo.c b/hotspot/src/share/tools/hsdis/hsdis-demo.c index 513245350f0..7036cf6dc38 100644 --- a/hotspot/src/share/tools/hsdis/hsdis-demo.c +++ b/hotspot/src/share/tools/hsdis/hsdis-demo.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/tools/hsdis/hsdis.c b/hotspot/src/share/tools/hsdis/hsdis.c index 841a3af62ec..213a6be5be3 100644 --- a/hotspot/src/share/tools/hsdis/hsdis.c +++ b/hotspot/src/share/tools/hsdis/hsdis.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/adlc/adlc.hpp b/hotspot/src/share/vm/adlc/adlc.hpp index 6b92dfd8476..449238d6f37 100644 --- a/hotspot/src/share/vm/adlc/adlc.hpp +++ b/hotspot/src/share/vm/adlc/adlc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/asm/assembler.cpp b/hotspot/src/share/vm/asm/assembler.cpp index e41fc7e9d31..492f2fd134c 100644 --- a/hotspot/src/share/vm/asm/assembler.cpp +++ b/hotspot/src/share/vm/asm/assembler.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/c1/c1_Compilation.cpp b/hotspot/src/share/vm/c1/c1_Compilation.cpp index 8b4f5bcead8..d89ef4e7b1a 100644 --- a/hotspot/src/share/vm/c1/c1_Compilation.cpp +++ b/hotspot/src/share/vm/c1/c1_Compilation.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp index dac5e5b2c75..30a1ada8231 100644 --- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp index 40332b1e91d..bab43e2ad21 100644 --- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp +++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp index e5b6b66498f..71cffdbd6da 100644 --- a/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp +++ b/hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp index e713d51a674..ccce4e539f3 100644 --- a/hotspot/src/share/vm/ci/ciEnv.cpp +++ b/hotspot/src/share/vm/ci/ciEnv.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp index 5fc25bae6ab..e58e5a67dfa 100644 --- a/hotspot/src/share/vm/ci/ciEnv.hpp +++ b/hotspot/src/share/vm/ci/ciEnv.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp index 934cca6d99d..ff2e908b7fa 100644 --- a/hotspot/src/share/vm/ci/ciMethodBlocks.cpp +++ b/hotspot/src/share/vm/ci/ciMethodBlocks.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/ciStreams.cpp b/hotspot/src/share/vm/ci/ciStreams.cpp index 5401e64f7b9..d343ab8446d 100644 --- a/hotspot/src/share/vm/ci/ciStreams.cpp +++ b/hotspot/src/share/vm/ci/ciStreams.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/ciStreams.hpp b/hotspot/src/share/vm/ci/ciStreams.hpp index cc3e55ed9ab..448e27cb16a 100644 --- a/hotspot/src/share/vm/ci/ciStreams.hpp +++ b/hotspot/src/share/vm/ci/ciStreams.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/ci/ciTypeFlow.cpp b/hotspot/src/share/vm/ci/ciTypeFlow.cpp index 9bf831ef9f3..cc6cc667917 100644 --- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp +++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/classfile/classLoader.cpp b/hotspot/src/share/vm/classfile/classLoader.cpp index 9e48c90a7e4..9871561b420 100644 --- a/hotspot/src/share/vm/classfile/classLoader.cpp +++ b/hotspot/src/share/vm/classfile/classLoader.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/classfile/verifier.cpp b/hotspot/src/share/vm/classfile/verifier.cpp index 6e0fc7e984d..bb5edc785dc 100644 --- a/hotspot/src/share/vm/classfile/verifier.cpp +++ b/hotspot/src/share/vm/classfile/verifier.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/code/vtableStubs.cpp b/hotspot/src/share/vm/code/vtableStubs.cpp index 6c5a937bf4c..67149eae5c6 100644 --- a/hotspot/src/share/vm/code/vtableStubs.cpp +++ b/hotspot/src/share/vm/code/vtableStubs.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/compiler/compileBroker.cpp b/hotspot/src/share/vm/compiler/compileBroker.cpp index 290f64872d0..799d9f89202 100644 --- a/hotspot/src/share/vm/compiler/compileBroker.cpp +++ b/hotspot/src/share/vm/compiler/compileBroker.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp index 418dd584954..3000f010b17 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/collectionSetChooser.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp index 5cd82d79585..3473fac0186 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp index a97a7c48a17..cd5729cfd58 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp index 3ab9b1958ad..0a89e96ba05 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp index 20f001d7758..9596aea2183 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp index 23164b6b075..20e38dcd916 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp index a91f319d067..e439bdb44d1 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp index db6a7d09ddc..659d4e78892 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentZFThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp index 5b0dfba7066..19405a0eccb 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp index 5670ebe5ac3..492d9f54acb 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp index 00aa14452c2..db345b993d0 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp index 43af2b52cb7..170d9473eed 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp index 6eee58edcd3..8509a8cadfe 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp index 9f9d9dd1839..060743dd38a 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp index 7bee59dbff7..5baa5505662 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp index 40af9313c33..e59dbe483d2 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp index 47eb146e7de..6cf0605ec8c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/vm_operations_g1.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp b/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp index dddb3bb7d3c..2894794c1cb 100644 --- a/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp +++ b/hotspot/src/share/vm/gc_implementation/parNew/parGCAllocBuffer.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp index 482b1a452e4..01522a7758c 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp index d046323d266..8351694c6ca 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp index a4ebd858d28..ca1d97169c9 100644 --- a/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp +++ b/hotspot/src/share/vm/gc_implementation/shared/concurrentGCThread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/gc_interface/gcCause.hpp b/hotspot/src/share/vm/gc_interface/gcCause.hpp index da23c8e70d4..19c2ab738b1 100644 --- a/hotspot/src/share/vm/gc_interface/gcCause.hpp +++ b/hotspot/src/share/vm/gc_interface/gcCause.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/includeDB_compiler1 b/hotspot/src/share/vm/includeDB_compiler1 index 6f33d724516..21b26cdc90e 100644 --- a/hotspot/src/share/vm/includeDB_compiler1 +++ b/hotspot/src/share/vm/includeDB_compiler1 @@ -1,5 +1,5 @@ // -// Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. +// Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/includeDB_jvmti b/hotspot/src/share/vm/includeDB_jvmti index ba6dc9b23fa..1af182ae24c 100644 --- a/hotspot/src/share/vm/includeDB_jvmti +++ b/hotspot/src/share/vm/includeDB_jvmti @@ -1,5 +1,5 @@ // -// Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. +// Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // // This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/bytecode.cpp b/hotspot/src/share/vm/interpreter/bytecode.cpp index f91d5667ed3..0cc8a728950 100644 --- a/hotspot/src/share/vm/interpreter/bytecode.cpp +++ b/hotspot/src/share/vm/interpreter/bytecode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/bytecode.hpp b/hotspot/src/share/vm/interpreter/bytecode.hpp index 64941d8d5fc..49e70e8c1f3 100644 --- a/hotspot/src/share/vm/interpreter/bytecode.hpp +++ b/hotspot/src/share/vm/interpreter/bytecode.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp index 7a3a0125e0e..5a9fa3223af 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeStream.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeStream.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp index ed216864d36..79cee762daa 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp +++ b/hotspot/src/share/vm/interpreter/bytecodeTracer.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/bytecodes.cpp b/hotspot/src/share/vm/interpreter/bytecodes.cpp index 56a89b39864..e55c9ff3851 100644 --- a/hotspot/src/share/vm/interpreter/bytecodes.cpp +++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/bytecodes.hpp b/hotspot/src/share/vm/interpreter/bytecodes.hpp index bf888725992..1f8f2268792 100644 --- a/hotspot/src/share/vm/interpreter/bytecodes.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodes.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/invocationCounter.cpp b/hotspot/src/share/vm/interpreter/invocationCounter.cpp index 7ecc70d1997..80be66bebd7 100644 --- a/hotspot/src/share/vm/interpreter/invocationCounter.cpp +++ b/hotspot/src/share/vm/interpreter/invocationCounter.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/rewriter.hpp b/hotspot/src/share/vm/interpreter/rewriter.hpp index 4b8ff7e6012..2546b57ef37 100644 --- a/hotspot/src/share/vm/interpreter/rewriter.hpp +++ b/hotspot/src/share/vm/interpreter/rewriter.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/templateTable.cpp b/hotspot/src/share/vm/interpreter/templateTable.cpp index 8e116ae77b3..11b5aa0ba23 100644 --- a/hotspot/src/share/vm/interpreter/templateTable.cpp +++ b/hotspot/src/share/vm/interpreter/templateTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/interpreter/templateTable.hpp b/hotspot/src/share/vm/interpreter/templateTable.hpp index 41d82d5e618..79b2ad8676f 100644 --- a/hotspot/src/share/vm/interpreter/templateTable.hpp +++ b/hotspot/src/share/vm/interpreter/templateTable.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/memory/blockOffsetTable.hpp b/hotspot/src/share/vm/memory/blockOffsetTable.hpp index b812a243190..2b64487d5b0 100644 --- a/hotspot/src/share/vm/memory/blockOffsetTable.hpp +++ b/hotspot/src/share/vm/memory/blockOffsetTable.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/memory/cardTableRS.cpp b/hotspot/src/share/vm/memory/cardTableRS.cpp index da80ddf9725..df73a90f24b 100644 --- a/hotspot/src/share/vm/memory/cardTableRS.cpp +++ b/hotspot/src/share/vm/memory/cardTableRS.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/memory/gcLocker.hpp b/hotspot/src/share/vm/memory/gcLocker.hpp index 8a131736976..e88554c641c 100644 --- a/hotspot/src/share/vm/memory/gcLocker.hpp +++ b/hotspot/src/share/vm/memory/gcLocker.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp index ced1bf23c01..4f638fda468 100644 --- a/hotspot/src/share/vm/memory/heap.cpp +++ b/hotspot/src/share/vm/memory/heap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/oops/cpCacheOop.cpp b/hotspot/src/share/vm/oops/cpCacheOop.cpp index 55aa6d9a2ac..6f549afbe38 100644 --- a/hotspot/src/share/vm/oops/cpCacheOop.cpp +++ b/hotspot/src/share/vm/oops/cpCacheOop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/oops/generateOopMap.cpp b/hotspot/src/share/vm/oops/generateOopMap.cpp index 36e98c40404..eb533a81e6f 100644 --- a/hotspot/src/share/vm/oops/generateOopMap.cpp +++ b/hotspot/src/share/vm/oops/generateOopMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/oops/methodDataOop.cpp b/hotspot/src/share/vm/oops/methodDataOop.cpp index e61dffe81f3..a77db3c455b 100644 --- a/hotspot/src/share/vm/oops/methodDataOop.cpp +++ b/hotspot/src/share/vm/oops/methodDataOop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/addnode.cpp b/hotspot/src/share/vm/opto/addnode.cpp index 63932df349d..0af6bafd742 100644 --- a/hotspot/src/share/vm/opto/addnode.cpp +++ b/hotspot/src/share/vm/opto/addnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/block.hpp b/hotspot/src/share/vm/opto/block.hpp index 93940b466c3..0511b46dda3 100644 --- a/hotspot/src/share/vm/opto/block.hpp +++ b/hotspot/src/share/vm/opto/block.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/buildOopMap.cpp b/hotspot/src/share/vm/opto/buildOopMap.cpp index 81ad6b7dbee..90dc89f53e5 100644 --- a/hotspot/src/share/vm/opto/buildOopMap.cpp +++ b/hotspot/src/share/vm/opto/buildOopMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2002-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/bytecodeInfo.cpp b/hotspot/src/share/vm/opto/bytecodeInfo.cpp index 20e1faff505..9f93ab83773 100644 --- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp +++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/c2compiler.cpp b/hotspot/src/share/vm/opto/c2compiler.cpp index 22509077fbb..4ee3a6f5d2c 100644 --- a/hotspot/src/share/vm/opto/c2compiler.cpp +++ b/hotspot/src/share/vm/opto/c2compiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/callnode.cpp b/hotspot/src/share/vm/opto/callnode.cpp index 94a261d4622..44baf2a878c 100644 --- a/hotspot/src/share/vm/opto/callnode.cpp +++ b/hotspot/src/share/vm/opto/callnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/callnode.hpp b/hotspot/src/share/vm/opto/callnode.hpp index e82f7606b43..fa775de846c 100644 --- a/hotspot/src/share/vm/opto/callnode.hpp +++ b/hotspot/src/share/vm/opto/callnode.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/coalesce.cpp b/hotspot/src/share/vm/opto/coalesce.cpp index 99584ca165c..fbde9f80fce 100644 --- a/hotspot/src/share/vm/opto/coalesce.cpp +++ b/hotspot/src/share/vm/opto/coalesce.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/connode.cpp b/hotspot/src/share/vm/opto/connode.cpp index 4f7036ca933..431ddbc6271 100644 --- a/hotspot/src/share/vm/opto/connode.cpp +++ b/hotspot/src/share/vm/opto/connode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp index 7246fb36d45..5104e648aa6 100644 --- a/hotspot/src/share/vm/opto/doCall.cpp +++ b/hotspot/src/share/vm/opto/doCall.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/escape.cpp b/hotspot/src/share/vm/opto/escape.cpp index ed3067e9e94..ac17b5c27a1 100644 --- a/hotspot/src/share/vm/opto/escape.cpp +++ b/hotspot/src/share/vm/opto/escape.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp index d315a9e6c61..0d4bf7869ea 100644 --- a/hotspot/src/share/vm/opto/loopTransform.cpp +++ b/hotspot/src/share/vm/opto/loopTransform.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/loopopts.cpp b/hotspot/src/share/vm/opto/loopopts.cpp index 5084e3d8234..206a6f9fd9f 100644 --- a/hotspot/src/share/vm/opto/loopopts.cpp +++ b/hotspot/src/share/vm/opto/loopopts.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/machnode.cpp b/hotspot/src/share/vm/opto/machnode.cpp index b7357f86ab6..80b1735b132 100644 --- a/hotspot/src/share/vm/opto/machnode.cpp +++ b/hotspot/src/share/vm/opto/machnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/matcher.hpp b/hotspot/src/share/vm/opto/matcher.hpp index 0067e216355..fe657c53421 100644 --- a/hotspot/src/share/vm/opto/matcher.hpp +++ b/hotspot/src/share/vm/opto/matcher.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp index 3c8af599142..7065cebec0e 100644 --- a/hotspot/src/share/vm/opto/output.cpp +++ b/hotspot/src/share/vm/opto/output.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/parse.hpp b/hotspot/src/share/vm/opto/parse.hpp index 7120c51a1c6..4b3ca591297 100644 --- a/hotspot/src/share/vm/opto/parse.hpp +++ b/hotspot/src/share/vm/opto/parse.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp index 0b603aa7673..222a2f35a16 100644 --- a/hotspot/src/share/vm/opto/parse1.cpp +++ b/hotspot/src/share/vm/opto/parse1.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/parse2.cpp b/hotspot/src/share/vm/opto/parse2.cpp index 40675d41cbc..496b4f230cf 100644 --- a/hotspot/src/share/vm/opto/parse2.cpp +++ b/hotspot/src/share/vm/opto/parse2.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/parse3.cpp b/hotspot/src/share/vm/opto/parse3.cpp index 0869ee6b634..04b63939a77 100644 --- a/hotspot/src/share/vm/opto/parse3.cpp +++ b/hotspot/src/share/vm/opto/parse3.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/parseHelper.cpp b/hotspot/src/share/vm/opto/parseHelper.cpp index 7e87d7702d1..6b3f432eae7 100644 --- a/hotspot/src/share/vm/opto/parseHelper.cpp +++ b/hotspot/src/share/vm/opto/parseHelper.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/subnode.cpp b/hotspot/src/share/vm/opto/subnode.cpp index ae88d736b10..81e033f2769 100644 --- a/hotspot/src/share/vm/opto/subnode.cpp +++ b/hotspot/src/share/vm/opto/subnode.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/opto/superword.hpp b/hotspot/src/share/vm/opto/superword.hpp index 4c11ff639b8..647bd27a79e 100644 --- a/hotspot/src/share/vm/opto/superword.hpp +++ b/hotspot/src/share/vm/opto/superword.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/prims/jvm_misc.hpp b/hotspot/src/share/vm/prims/jvm_misc.hpp index 50644842bbd..e93181ac56b 100644 --- a/hotspot/src/share/vm/prims/jvm_misc.hpp +++ b/hotspot/src/share/vm/prims/jvm_misc.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp index 447dcb23766..c8d9865c8b4 100644 --- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp +++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp index 142b60c54e4..c6526995912 100644 --- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp +++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/prims/methodComparator.cpp b/hotspot/src/share/vm/prims/methodComparator.cpp index 494f0482216..a6ef36ef290 100644 --- a/hotspot/src/share/vm/prims/methodComparator.cpp +++ b/hotspot/src/share/vm/prims/methodComparator.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/biasedLocking.cpp b/hotspot/src/share/vm/runtime/biasedLocking.cpp index ddc7305c77f..8fbd33aad00 100644 --- a/hotspot/src/share/vm/runtime/biasedLocking.cpp +++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp index 586f4f5fd2f..8962bf7dfec 100644 --- a/hotspot/src/share/vm/runtime/deoptimization.cpp +++ b/hotspot/src/share/vm/runtime/deoptimization.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp index 2de788a2ffd..cd00dea55e3 100644 --- a/hotspot/src/share/vm/runtime/dtraceJSDT.cpp +++ b/hotspot/src/share/vm/runtime/dtraceJSDT.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/frame.hpp b/hotspot/src/share/vm/runtime/frame.hpp index 7513ca1f4b2..9817a36414a 100644 --- a/hotspot/src/share/vm/runtime/frame.hpp +++ b/hotspot/src/share/vm/runtime/frame.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/hpi.hpp b/hotspot/src/share/vm/runtime/hpi.hpp index 506b911ca12..f30c2c3ebe4 100644 --- a/hotspot/src/share/vm/runtime/hpi.hpp +++ b/hotspot/src/share/vm/runtime/hpi.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/interfaceSupport.cpp b/hotspot/src/share/vm/runtime/interfaceSupport.cpp index b60f3ffd7bf..1852f7a6b53 100644 --- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp +++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/mutexLocker.cpp b/hotspot/src/share/vm/runtime/mutexLocker.cpp index 437192d6ba3..3b21a2094f5 100644 --- a/hotspot/src/share/vm/runtime/mutexLocker.cpp +++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/mutexLocker.hpp b/hotspot/src/share/vm/runtime/mutexLocker.hpp index e1715064385..80d626a8031 100644 --- a/hotspot/src/share/vm/runtime/mutexLocker.hpp +++ b/hotspot/src/share/vm/runtime/mutexLocker.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/orderAccess.cpp b/hotspot/src/share/vm/runtime/orderAccess.cpp index 1e66d6258f5..8f385a45dce 100644 --- a/hotspot/src/share/vm/runtime/orderAccess.cpp +++ b/hotspot/src/share/vm/runtime/orderAccess.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/orderAccess.hpp b/hotspot/src/share/vm/runtime/orderAccess.hpp index d6b83466da5..38833159df5 100644 --- a/hotspot/src/share/vm/runtime/orderAccess.hpp +++ b/hotspot/src/share/vm/runtime/orderAccess.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/stackValue.cpp b/hotspot/src/share/vm/runtime/stackValue.cpp index 9f3fb0f0ec3..8e601d2e378 100644 --- a/hotspot/src/share/vm/runtime/stackValue.cpp +++ b/hotspot/src/share/vm/runtime/stackValue.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/stackValue.hpp b/hotspot/src/share/vm/runtime/stackValue.hpp index 1715ec65b20..f242ca3eced 100644 --- a/hotspot/src/share/vm/runtime/stackValue.hpp +++ b/hotspot/src/share/vm/runtime/stackValue.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 5c08990e53b..59fb8dbc725 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp index f5529e0155a..c1920bb220f 100644 --- a/hotspot/src/share/vm/runtime/thread.hpp +++ b/hotspot/src/share/vm/runtime/thread.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vframe.cpp b/hotspot/src/share/vm/runtime/vframe.cpp index 64215384091..3b6ba813f9c 100644 --- a/hotspot/src/share/vm/runtime/vframe.cpp +++ b/hotspot/src/share/vm/runtime/vframe.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vframe.hpp b/hotspot/src/share/vm/runtime/vframe.hpp index 2924aeae983..034da7d3768 100644 --- a/hotspot/src/share/vm/runtime/vframe.hpp +++ b/hotspot/src/share/vm/runtime/vframe.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vframeArray.cpp b/hotspot/src/share/vm/runtime/vframeArray.cpp index 60a2a23b737..426f57e2cb9 100644 --- a/hotspot/src/share/vm/runtime/vframeArray.cpp +++ b/hotspot/src/share/vm/runtime/vframeArray.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vframe_hp.cpp b/hotspot/src/share/vm/runtime/vframe_hp.cpp index 1fc0f2b7d18..1c991d91bc9 100644 --- a/hotspot/src/share/vm/runtime/vframe_hp.cpp +++ b/hotspot/src/share/vm/runtime/vframe_hp.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/virtualspace.cpp b/hotspot/src/share/vm/runtime/virtualspace.cpp index e6e4b55a690..94947f58149 100644 --- a/hotspot/src/share/vm/runtime/virtualspace.cpp +++ b/hotspot/src/share/vm/runtime/virtualspace.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/virtualspace.hpp b/hotspot/src/share/vm/runtime/virtualspace.hpp index f412d11ad55..37f12ad4c3a 100644 --- a/hotspot/src/share/vm/runtime/virtualspace.hpp +++ b/hotspot/src/share/vm/runtime/virtualspace.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp index 23d1db27980..c0226759c70 100644 --- a/hotspot/src/share/vm/runtime/vmStructs.cpp +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vmThread.cpp b/hotspot/src/share/vm/runtime/vmThread.cpp index c2d7c11db48..7b2cc45bed8 100644 --- a/hotspot/src/share/vm/runtime/vmThread.cpp +++ b/hotspot/src/share/vm/runtime/vmThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vm_operations.hpp b/hotspot/src/share/vm/runtime/vm_operations.hpp index 8f6e114623b..09fc2eee914 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.hpp +++ b/hotspot/src/share/vm/runtime/vm_operations.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp index 3e7a7e6e0fe..b05e41ffc6b 100644 --- a/hotspot/src/share/vm/runtime/vm_version.cpp +++ b/hotspot/src/share/vm/runtime/vm_version.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/utilities/bitMap.cpp b/hotspot/src/share/vm/utilities/bitMap.cpp index f2f54fa814c..991c7450b6b 100644 --- a/hotspot/src/share/vm/utilities/bitMap.cpp +++ b/hotspot/src/share/vm/utilities/bitMap.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/utilities/bitMap.hpp b/hotspot/src/share/vm/utilities/bitMap.hpp index 89818dfa6f2..1c0d6dac496 100644 --- a/hotspot/src/share/vm/utilities/bitMap.hpp +++ b/hotspot/src/share/vm/utilities/bitMap.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/utilities/bitMap.inline.hpp b/hotspot/src/share/vm/utilities/bitMap.inline.hpp index 7abce42c35d..ff104ade44f 100644 --- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp +++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/utilities/exceptions.hpp b/hotspot/src/share/vm/utilities/exceptions.hpp index 0dbfd91c10f..ca01f455c75 100644 --- a/hotspot/src/share/vm/utilities/exceptions.hpp +++ b/hotspot/src/share/vm/utilities/exceptions.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp index 2b64dfc4662..453ff8a75c7 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/utilities/macros.hpp b/hotspot/src/share/vm/utilities/macros.hpp index 1d7cb9cce19..b4d7ea45743 100644 --- a/hotspot/src/share/vm/utilities/macros.hpp +++ b/hotspot/src/share/vm/utilities/macros.hpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/6772683/InterruptedTest.java b/hotspot/test/compiler/6772683/InterruptedTest.java index c1670a58bc5..8ecaa8cb2be 100644 --- a/hotspot/test/compiler/6772683/InterruptedTest.java +++ b/hotspot/test/compiler/6772683/InterruptedTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/compiler/6832293/Test.java b/hotspot/test/compiler/6832293/Test.java index 7a2c74d3ca1..cda47a84c90 100644 --- a/hotspot/test/compiler/6832293/Test.java +++ b/hotspot/test/compiler/6832293/Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java b/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java index dc49db66122..9d1fc927774 100644 --- a/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java +++ b/hotspot/test/runtime/6819213/TestBootNativeLibraryPath.java @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it From 632469b81d4d78fce99e6b6f7cc49a69d4f24262 Mon Sep 17 00:00:00 2001 From: Xiomara Jayasena Date: Tue, 28 Jul 2009 12:12:45 -0700 Subject: [PATCH 50/56] 6862919: Update copyright year Update copyright for files that have been modified in 2009, up to 07/09 Reviewed-by: tbell, ohair --- jaxp/make/build.properties | 2 +- jaxp/make/build.xml | 2 +- jaxp/make/jprt.properties | 2 +- .../sun/org/apache/xerces/internal/impl/PropertyManager.java | 2 +- .../xerces/internal/impl/XMLDocumentFragmentScannerImpl.java | 2 +- .../org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java | 2 +- .../org/apache/xerces/internal/impl/XMLStreamFilterImpl.java | 2 +- .../sun/xml/internal/stream/events/XMLEventAllocatorImpl.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jaxp/make/build.properties b/jaxp/make/build.properties index ed598102aa9..6689159753b 100644 --- a/jaxp/make/build.properties +++ b/jaxp/make/build.properties @@ -1,5 +1,5 @@ # -# Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. +# Copyright 2007-2009 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxp/make/build.xml b/jaxp/make/build.xml index c9439d0109e..63a78a18909 100644 --- a/jaxp/make/build.xml +++ b/jaxp/make/build.xml @@ -1,6 +1,6 @@