Skip to content

Commit 656eb55

Browse files
committed
[GR-36219] Fix failing JCK class redefine test
PullRequest: graal/10748
2 parents b79445b + decfa9d commit 656eb55

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/classfile/attributes/ConstantValueAttribute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public boolean sameAs(Attribute other) {
6262
if (other == null || getClass() != other.getClass()) {
6363
return false;
6464
}
65-
if (!super.equals(other)) {
65+
if (!super.sameAs(other)) {
6666
return false;
6767
}
6868
ConstantValueAttribute that = (ConstantValueAttribute) other;

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/classfile/attributes/MethodParametersAttribute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public boolean sameAs(Attribute other) {
7676
if (other == null || getClass() != other.getClass()) {
7777
return false;
7878
}
79-
if (!super.equals(other)) {
79+
if (!super.sameAs(other)) {
8080
return false;
8181
}
8282
MethodParametersAttribute that = (MethodParametersAttribute) other;

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/redefinition/ClassRedefinition.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import com.oracle.truffle.espresso.classfile.ClassfileParser;
4242
import com.oracle.truffle.espresso.classfile.ClassfileStream;
4343
import com.oracle.truffle.espresso.classfile.ConstantPool;
44+
import com.oracle.truffle.espresso.classfile.Constants;
4445
import com.oracle.truffle.espresso.classfile.attributes.CodeAttribute;
4546
import com.oracle.truffle.espresso.classfile.attributes.LineNumberTableAttribute;
4647
import com.oracle.truffle.espresso.classfile.attributes.Local;
@@ -626,7 +627,7 @@ private static boolean isSameMethod(ParserMethod oldMethod, ParserMethod newMeth
626627
private static boolean isUnchangedField(Field oldField, ParserField newField, Map<ParserField, Field> compatibleFields) {
627628
boolean sameName = oldField.getName() == newField.getName();
628629
boolean sameType = oldField.getType() == newField.getType();
629-
boolean sameFlags = oldField.getModifiers() == newField.getFlags();
630+
boolean sameFlags = oldField.getModifiers() == (newField.getFlags() & Constants.JVM_RECOGNIZED_FIELD_MODIFIERS);
630631

631632
if (sameName && sameType) {
632633
if (sameFlags) {

0 commit comments

Comments
 (0)