RFR (L) JDK-8230199: consolidate signature parsing code in HotSpot sources
David Holmes
david.holmes at oracle.com
Tue Feb 4 22:46:51 UTC 2020
Hi Lois,
<trimming>
On 5/02/2020 4:42 am, Lois Foltan wrote:
> On 2/3/2020 11:07 PM, David Holmes wrote:
>> Sorry I'm still unclear whether as_symbol() can ever return NULL? If
>> it can't then the existing NULL checks should be removed. If it can
>> then many other uses may need to add NULL checks.
>
> Signature::as_symbol can never return a NULL. I have removed the 2
> checks for null in nmethod::print_nmethod_labels() and
> Method::has_unloaded_classes_in_signature(). See
> http://cr.openjdk.java.net/~lfoltan/bug_jdk8230199.4/webrev/index.html
There is a third case in signature.cpp itself:
Klass* SignatureStream::as_klass(Handle class_loader, Handle
protection_domain,
FailureMode failure_mode, TRAPS) {
if (!is_reference()) return NULL;
Symbol* name = as_symbol();
if (name == NULL) {
assert(failure_mode == CachedOrNull, "signature incorrect failure
mode");
return NULL;
}
Thanks,
David
More information about the hotspot-runtime-dev
mailing list