RFR(M): 8165550: Add class loader names to ClassCastException message
Rachel Protacio
rachel.protacio at oracle.com
Thu Nov 17 20:47:25 UTC 2016
Actually, I searched for the uses of SystemDictionary::loader_name.
There are about 30 places where it's called, and I think changing it in
all those places is beyond the scope of this changeset. I'll just do
your second suggestion and commit. We can open a separate RFE if anyone
wants to change the SystemDictionary function name.
Rachel
On 11/17/2016 3:37 PM, Rachel Protacio wrote:
> Thanks for the review, Mandy. I'll make those edits and commit.
>
> Rachel
>
>
> On 11/17/2016 3:28 PM, Mandy Chung wrote:
>> Thanks for adding the test.
>>
>> 2898 const char* SystemDictionary::loader_name(const oop loader) {
>> 2904 const char* SystemDictionary::loader_name(const ClassLoaderData*
>> loader_data) {
>> These functions return the type name of the class loader, right?
>> Would it be better to rename to loader_type_name to avoid confusion?
>>
>> 1957 oop loader = klass->class_loader();
>> 1959 oopDesc* class_loader_oop =
>> java_lang_ClassLoader::name(loader);
>> I think you mean this be “loader_name_oop”??
>>
>> Mandy
>>
>>> On Nov 17, 2016, at 8:36 AM, Rachel Protacio
>>> <rachel.protacio at oracle.com> wrote:
>>>
>>> Last one! http://cr.openjdk.java.net/~rprotacio/8165550.03
>>> - Thanks to Lois, I've added a new test case for a custom-named
>>> class loader with the unnamed module, and also throw an exception in
>>> the test if no CCE is thrown.
>>> - Thanks to Mandy and Coleen, I've corrected the part of my code
>>> getting the Class Loader Name, which ironically, I was doing
>>> incorrectly before.
>>>
>>> Rachel
>
More information about the hotspot-runtime-dev
mailing list