The name "has_old_class_version" doesn't reflect what the function actually does. See discussions in https://github.com/openjdk/jdk/pull/3983
// Check if a class or any of its supertypes has a version older than 50.
// CDS will not perform verification of old classes during dump time because
// without changing the old verifier, the verification constraint cannot be
// retrieved during dump time.
// Verification of archived old classes will be performed during run time.
bool InstanceKlass::has_old_class_version()
Trying to describe what the function does in a short and meaningful name is not always possible.
In this case, I think it's better to say what the function is intended to be used for. InstanceKlass::can_be_verified_at_dumptime() will probably suffice. It's unlikely that this function will be used for any other purpose.
// Check if a class or any of its supertypes has a version older than 50.
// CDS will not perform verification of old classes during dump time because
// without changing the old verifier, the verification constraint cannot be
// retrieved during dump time.
// Verification of archived old classes will be performed during run time.
bool InstanceKlass::has_old_class_version()
Trying to describe what the function does in a short and meaningful name is not always possible.
In this case, I think it's better to say what the function is intended to be used for. InstanceKlass::can_be_verified_at_dumptime() will probably suffice. It's unlikely that this function will be used for any other purpose.
- relates to
-
JDK-8268522 InstanceKlass::can_be_verified_at_dumptime() returns opposite value
-
- Resolved
-
-
JDK-8266822 Rename MetaspaceShared::is_old_class to be more explicit about what "old" means
-
- Resolved
-