RFR: 8261479: CDS runtime code should check exceptions [v3]
Calvin Cheung
ccheung at openjdk.java.net
Tue Mar 23 16:11:03 UTC 2021
On Tue, 23 Mar 2021 04:08:48 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> @iklam review comment
>
> src/hotspot/share/classfile/classLoader.cpp line 290:
>
>> 288: u1* ClassPathZipEntry::open_entry(Thread* current, const char* name, jint* filesize, bool nul_terminate) {
>> 289: // enable call to C land
>> 290: JavaThread* thread = current->as_Java_thread();
>
> No need to introduce a local for a single use.
This is an existing issue but I've made the change and also fixed the indentation of the comment at line 289.
> src/hotspot/share/classfile/klassFactory.cpp line 176:
>
>> 174: assert(THREAD->is_Java_thread(), "must be a JavaThread");
>> 175:
>> 176: JavaThread* current = THREAD->as_Java_thread();
>
> You can delete the assert at line 174 as the same assert is inside as_Java_thread().
>
> But I think this is the kind of change that Coleen objects to: introducing a new local variable just to avoid using THREAD. The changes in this file can probably be reverted.
Ok. I've reverted the changes.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3097
More information about the hotspot-runtime-dev
mailing list