Skip to content

Commit

Permalink
Remove outdated value type field verification checks
Browse files Browse the repository at this point in the history
Signed-off-by: Theresa Mammarella <[email protected]>
  • Loading branch information
theresa-m committed Oct 23, 2024
1 parent 4934df0 commit c58e548
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions runtime/bcutil/cfreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1708,18 +1708,6 @@ checkFields(J9PortLibrary* portLib, J9CfrClassFile * classfile, U_8 * segment, U

#if defined(J9VM_OPT_VALHALLA_VALUE_TYPES)
if (J9_IS_CLASSFILE_VALUETYPE(classfile)) {
if (J9_ARE_ALL_BITS_SET(classfile->accessFlags, CFR_ACC_ABSTRACT)) {
if (J9_ARE_NO_BITS_SET(value, CFR_ACC_STATIC)) {
errorCode = J9NLS_CFR_ERR_MISSING_ACC_STATIC_ON_ABSTRACT_IDENTITYLESS_CLASS_FIELD__ID;
goto _errorFound;
}
} else {
if (J9_ARE_NO_BITS_SET(value, CFR_ACC_STATIC | CFR_ACC_FINAL)) {
errorCode = J9NLS_CFR_ERR_VALUE_CLASS_FIELD_NOT_STATIC_OR_FINAL__ID;
goto _errorFound;
}
}

/* Each field of a value class must have exactly one of its ACC_STATIC or ACC_STRICT flags set. */
if (J9_ARE_NO_BITS_SET(value, CFR_ACC_STRICT | CFR_ACC_STATIC)) {
errorCode = J9NLS_CFR_ERR_VALUE_CLASS_FIELD_NOT_STATIC_OR_STRICT__ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2904,7 +2904,7 @@ static public void testAccStrictFieldMustHaveAccFinal() {
}

/* Each field of a value class must have exactly one of its ACC_STATIC or ACC_STRICT flags set */
@Test(expectedExceptions = java.lang.ClassFormatError.class, expectedExceptionsMessageRegExp = ".*Fields of value classes must have either ACC_STATIC or ACC_FINAL flags set.*")
@Test(expectedExceptions = java.lang.ClassFormatError.class, expectedExceptionsMessageRegExp = ".*Value class fields must have either ACC_STATIC or ACC_STRICT set.*")
static public void testValueClassFieldMustHaveAccStaticOrAccStrict() {
ValueTypeGenerator.generateTestValueClassFieldMustHaveAccStaticOrAccStrict();
}
Expand Down

0 comments on commit c58e548

Please sign in to comment.