Commit c72a86bd authored by Eric Bruneton's avatar Eric Bruneton

Rename V_PREVIEW into V_PREVIEW_EXPERIMENTAL, and deprecate it.

parent fba2e218
......@@ -242,7 +242,7 @@ public abstract class ClassVisitor {
* @param nestMember the internal name of a nest member.
* @deprecated This API is experimental.
*/
@Deprecated()
@Deprecated
public void visitNestMemberExperimental(final String nestMember) {
if (api < Opcodes.ASM7_EXPERIMENTAL) {
throw new UnsupportedOperationException();
......
......@@ -73,10 +73,12 @@ public interface Opcodes {
/**
* Version flag indicating that the class is using 'preview' features.
*
* <p>{@code version & V_PREVIEW == V_PREVIEW} tests if a version is flagged with {@code
* V_PREVIEW}.
* <p>{@code version & V_PREVIEW_EXPERIMENTAL == V_PREVIEW_EXPERIMENTAL} tests if a version is
* flagged with {@code V_PREVIEW_EXPERIMENTAL}.
*
* @deprecated This API is experimental.
*/
int V_PREVIEW = 0xFFFF0000;
@Deprecated int V_PREVIEW_EXPERIMENTAL = 0xFFFF0000;
// Access flags values, defined in
// - https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1
......
......@@ -441,7 +441,8 @@ public class ClassReaderTest extends AsmTest implements Opcodes {
String signature,
String superName,
String[] interfaces) {
assertTrue((version & Opcodes.V_PREVIEW) == Opcodes.V_PREVIEW);
assertTrue(
(version & Opcodes.V_PREVIEW_EXPERIMENTAL) == Opcodes.V_PREVIEW_EXPERIMENTAL);
}
},
0);
......
......@@ -67,7 +67,7 @@ public class ConstantsTest {
assertFalse(asmVersions.contains(field.getInt(null)));
asmVersions.add(field.getInt(null));
break;
case "V_PREVIEW":
case "V_PREVIEW_EXPERIMENTAL":
case "V1_1":
case "V1_2":
case "V1_3":
......
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