Commit 0c06fb1b authored by Remi Forax's avatar Remi Forax

remove ACC_SEALED

parent f8612d6e
Pipeline #6721 failed with stage
in 2 minutes and 22 seconds
......@@ -1351,13 +1351,6 @@ public class ASMifier extends Printer {
stringBuilder.append("ACC_DEPRECATED");
isEmpty = false;
}
if ((accessFlags & Opcodes.ACC_SEALED) != 0) {
if (!isEmpty) {
stringBuilder.append(" | ");
}
stringBuilder.append("ACC_SEALED");
isEmpty = false;
}
if ((accessFlags & (Opcodes.ACC_MANDATED | Opcodes.ACC_MODULE)) != 0) {
if (!isEmpty) {
stringBuilder.append(" | ");
......
......@@ -224,8 +224,7 @@ public class CheckClassAdapter extends ClassVisitor {
| Opcodes.ACC_ANNOTATION
| Opcodes.ACC_ENUM
| Opcodes.ACC_DEPRECATED
| Opcodes.ACC_MODULE
| Opcodes.ACC_SEALED);
| Opcodes.ACC_MODULE);
if (name == null) {
throw new IllegalArgumentException("Illegal class name (null)");
}
......@@ -533,8 +532,7 @@ public class CheckClassAdapter extends ClassVisitor {
throw new IllegalArgumentException(
"public, protected and private are mutually exclusive: " + access);
}
if ((access & Opcodes.ACC_SEALED) == 0
&& Integer.bitCount(access & (Opcodes.ACC_FINAL | Opcodes.ACC_ABSTRACT)) > 1) {
if (Integer.bitCount(access & (Opcodes.ACC_FINAL | Opcodes.ACC_ABSTRACT)) > 1) {
throw new IllegalArgumentException("final and abstract are mutually exclusive: " + access);
}
}
......
......@@ -1252,9 +1252,6 @@ public class Textifier extends Printer {
if ((accessFlags & Opcodes.ACC_ENUM) != 0) {
stringBuilder.append("enum ");
}
if ((accessFlags & Opcodes.ACC_SEALED) != 0) {
stringBuilder.append("sealed ");
}
}
/**
......
......@@ -492,7 +492,6 @@ public class ClassReader {
nestMembersOffset = currentAttributeOffset;
} else if (Constants.PERMITTED_SUBTYPES.equals(attributeName)) {
permittedSubtypesOffset = currentAttributeOffset;
accessFlags |= Opcodes.ACC_SEALED;
} else if (Constants.SIGNATURE.equals(attributeName)) {
signature = readUTF8(currentAttributeOffset, charBuffer);
} else if (Constants.RUNTIME_VISIBLE_ANNOTATIONS.equals(attributeName)) {
......
......@@ -79,8 +79,8 @@ public class ClassWriter extends ClassVisitor {
/**
* The access_flags field of the JVMS ClassFile structure. This field can contain ASM specific
* access flags, such as {@link Opcodes#ACC_DEPRECATED}, or {@link Opcodes#ACC_SEALED} which are
* removed when generating the ClassFile structure.
* access flags, such as {@link Opcodes#ACC_DEPRECATED}, which are removed when generating the
* ClassFile structure.
*/
private int accessFlags;
......
......@@ -323,7 +323,6 @@ public interface Opcodes {
// written in class files (because access flags are stored using 16 bits only).
int ACC_DEPRECATED = 0x20000; // class, field, method
int ACC_SEALED = 0x40000; // class
// Possible values for the type operand of the NEWARRAY instruction.
// See https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-6.html#jvms-6.5.newarray.
......
......@@ -137,7 +137,8 @@ public class ConstantsTest {
List<Field> verificationTypeInfoTags = getConstants(ConstantType.VERIFICATION_TYPE_INFO_TAG);
Set<Integer> verificationTypeInfoTagValues =
verificationTypeInfoTags.stream()
verificationTypeInfoTags
.stream()
.map(ConstantsTest::getIntegerValue)
.collect(Collectors.toSet());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment